aboutsummaryrefslogtreecommitdiffstats
path: root/ui/qt
diff options
context:
space:
mode:
authorJirka Novak <j.novak@netsystem.cz>2021-03-23 11:37:59 +0100
committerWireshark GitLab Utility <gerald+gitlab-utility@wireshark.org>2021-03-24 20:02:41 +0000
commitf10ebb959d5e0fd1bd05a9bddeed0b37ed1ef8b3 (patch)
treee430f19ffd3b68eb98c9f7be7bf5ec6ea476ca11 /ui/qt
parent4b1dad3f2e232967fb954e98c908e2901fc96786 (diff)
VoIP UI: Added shortcuts for dialog buttons
VoIP/SIP Calls, Sequence, RTP Streams, RTP Player and RTP Analysis dialogs have shortcuts assigned. Shortcuts are same over all dialogs.
Diffstat (limited to 'ui/qt')
-rw-r--r--ui/qt/rtp_analysis_dialog.cpp3
-rw-r--r--ui/qt/rtp_analysis_dialog.ui8
-rw-r--r--ui/qt/rtp_player_dialog.cpp3
-rw-r--r--ui/qt/rtp_stream_dialog.cpp6
-rw-r--r--ui/qt/rtp_stream_dialog.ui19
-rw-r--r--ui/qt/sequence_dialog.cpp13
-rw-r--r--ui/qt/sequence_dialog.h1
-rw-r--r--ui/qt/sequence_dialog.ui18
-rw-r--r--ui/qt/voip_calls_dialog.cpp9
-rw-r--r--ui/qt/voip_calls_dialog.ui24
10 files changed, 85 insertions, 19 deletions
diff --git a/ui/qt/rtp_analysis_dialog.cpp b/ui/qt/rtp_analysis_dialog.cpp
index 282979a0c4..d640f90a36 100644
--- a/ui/qt/rtp_analysis_dialog.cpp
+++ b/ui/qt/rtp_analysis_dialog.cpp
@@ -330,7 +330,8 @@ RtpAnalysisDialog::RtpAnalysisDialog(QWidget &parent, CaptureFile &cf, rtpstream
player_button_ = RtpPlayerDialog::addPlayerButton(ui->buttonBox);
- QPushButton *export_btn = ui->buttonBox->addButton(tr("Export"), QDialogButtonBox::ActionRole);
+ QPushButton *export_btn = ui->buttonBox->addButton(ui->actionExportButton->text(), QDialogButtonBox::ActionRole);
+ export_btn->setToolTip(ui->actionExportButton->toolTip());
QMenu *save_menu = new QMenu(export_btn);
save_menu->addAction(ui->actionSaveAudioUnsync);
diff --git a/ui/qt/rtp_analysis_dialog.ui b/ui/qt/rtp_analysis_dialog.ui
index 183cec8741..fee564a97b 100644
--- a/ui/qt/rtp_analysis_dialog.ui
+++ b/ui/qt/rtp_analysis_dialog.ui
@@ -328,6 +328,14 @@
</widget>
</item>
</layout>
+ <action name="actionExportButton">
+ <property name="text">
+ <string>&amp;Export</string>
+ </property>
+ <property name="toolTip">
+ <string>Open export menu</string>
+ </property>
+ </action>
<action name="actionSaveAudioUnsync">
<property name="text">
<string>Unsynchronized Forward and Reverse Audio</string>
diff --git a/ui/qt/rtp_player_dialog.cpp b/ui/qt/rtp_player_dialog.cpp
index a28e24d27a..889d71aa4a 100644
--- a/ui/qt/rtp_player_dialog.cpp
+++ b/ui/qt/rtp_player_dialog.cpp
@@ -288,7 +288,8 @@ QPushButton *RtpPlayerDialog::addPlayerButton(QDialogButtonBox *button_box)
if (!button_box) return NULL;
QPushButton *player_button;
- player_button = button_box->addButton(tr("Play Streams"), QDialogButtonBox::ActionRole);
+ player_button = button_box->addButton(tr("&Play Streams"), QDialogButtonBox::ActionRole);
+ player_button->setToolTip(tr("Open RTP player dialog"));
player_button->setIcon(StockIcon("media-playback-start"));
return player_button;
}
diff --git a/ui/qt/rtp_stream_dialog.cpp b/ui/qt/rtp_stream_dialog.cpp
index 9773dbff58..82ecd907ff 100644
--- a/ui/qt/rtp_stream_dialog.cpp
+++ b/ui/qt/rtp_stream_dialog.cpp
@@ -278,11 +278,11 @@ RtpStreamDialog::RtpStreamDialog(QWidget &parent, CaptureFile &cf) :
prepare_button_ = ui->buttonBox->addButton(ui->actionPrepareFilter->text(), QDialogButtonBox::ActionRole);
prepare_button_->setToolTip(ui->actionPrepareFilter->toolTip());
player_button_ = RtpPlayerDialog::addPlayerButton(ui->buttonBox);
- copy_button_ = ui->buttonBox->addButton(tr("Copy"), QDialogButtonBox::ActionRole);
- export_button_ = ui->buttonBox->addButton(tr("Export"), QDialogButtonBox::ActionRole);
+ copy_button_ = ui->buttonBox->addButton(ui->actionCopyButton->text(), QDialogButtonBox::ActionRole);
+ copy_button_->setToolTip(ui->actionCopyButton->toolTip());
+ export_button_ = ui->buttonBox->addButton(ui->actionExportAsRtpDump->text(), QDialogButtonBox::ActionRole);
export_button_->setToolTip(ui->actionExportAsRtpDump->toolTip());
-
QMenu *copy_menu = new QMenu(copy_button_);
QAction *ca;
ca = copy_menu->addAction(tr("as CSV"));
diff --git a/ui/qt/rtp_stream_dialog.ui b/ui/qt/rtp_stream_dialog.ui
index 743a06e27c..13138e9700 100644
--- a/ui/qt/rtp_stream_dialog.ui
+++ b/ui/qt/rtp_stream_dialog.ui
@@ -169,7 +169,7 @@
</layout>
<action name="actionFindReverse">
<property name="text">
- <string>Find Reverse</string>
+ <string>Find &amp;Reverse</string>
</property>
<property name="toolTip">
<string>Find the reverse stream matching the selected forward stream.</string>
@@ -235,7 +235,7 @@
</action>
<action name="actionPrepareFilter">
<property name="text">
- <string>Prepare Filter</string>
+ <string>Prepare &amp;Filter</string>
</property>
<property name="toolTip">
<string>Prepare a filter matching the selected stream(s).</string>
@@ -246,7 +246,7 @@
</action>
<action name="actionExportAsRtpDump">
<property name="text">
- <string>Export As RTPDump</string>
+ <string>&amp;Export</string>
</property>
<property name="toolTip">
<string>Export the stream payload as rtpdump</string>
@@ -257,11 +257,22 @@
</action>
<action name="actionAnalyze">
<property name="text">
- <string>Analyze</string>
+ <string>&amp;Analyze</string>
</property>
<property name="toolTip">
<string>Open the analysis window for the selected stream(s)</string>
</property>
+ <property name="shortcut">
+ <string>A</string>
+ </property>
+ </action>
+ <action name="actionCopyButton">
+ <property name="text">
+ <string>Cop&amp;y</string>
+ </property>
+ <property name="toolTip">
+ <string>Open copy menu</string>
+ </property>
</action>
<action name="actionCopyAsCsv">
<property name="text">
diff --git a/ui/qt/sequence_dialog.cpp b/ui/qt/sequence_dialog.cpp
index 828e69f7af..2e67ce6897 100644
--- a/ui/qt/sequence_dialog.cpp
+++ b/ui/qt/sequence_dialog.cpp
@@ -160,10 +160,6 @@ SequenceDialog::SequenceDialog(QWidget &parent, CaptureFile &cf, SequenceInfo *i
ui->addressComboBox->setCurrentIndex(0);
- QPushButton * btn = ui->buttonBox->addButton(tr("Reset Diagram"), QDialogButtonBox::ActionRole);
- btn->setToolTip(tr("Reset the diagram to its initial state."));
- connect(btn, &QPushButton::clicked, this, &SequenceDialog::resetView);
-
sequence_items_t item_data;
item_data.curr_index = 0;
@@ -178,7 +174,10 @@ SequenceDialog::SequenceDialog(QWidget &parent, CaptureFile &cf, SequenceInfo *i
ui->controlFrame->hide();
}
- export_button_ = ui->buttonBox->addButton(tr("Export"), QDialogButtonBox::ActionRole);
+ reset_button_ = ui->buttonBox->addButton(ui->actionResetDiagram->text(), QDialogButtonBox::ActionRole);
+ reset_button_->setToolTip(ui->actionResetDiagram->toolTip());
+ export_button_ = ui->buttonBox->addButton(ui->actionExportDiagram->text(), QDialogButtonBox::ActionRole);
+ export_button_->setToolTip(ui->actionExportDiagram->toolTip());
QPushButton *close_bt = ui->buttonBox->button(QDialogButtonBox::Close);
if (close_bt) {
@@ -399,7 +398,9 @@ void SequenceDialog::mouseWheeled(QWheelEvent *event)
void SequenceDialog::on_buttonBox_clicked(QAbstractButton *button)
{
- if (button == export_button_) {
+ if (button == reset_button_) {
+ resetView();
+ } else if (button == export_button_) {
exportDiagram();
}
}
diff --git a/ui/qt/sequence_dialog.h b/ui/qt/sequence_dialog.h
index b3f439d7bc..655da6373b 100644
--- a/ui/qt/sequence_dialog.h
+++ b/ui/qt/sequence_dialog.h
@@ -104,6 +104,7 @@ private:
guint32 packet_num_;
double one_em_;
int sequence_w_;
+ QPushButton *reset_button_;
QPushButton *export_button_;
QMenu ctx_menu_;
QCPItemText *key_text_;
diff --git a/ui/qt/sequence_dialog.ui b/ui/qt/sequence_dialog.ui
index 470aa444f3..4c3cb31518 100644
--- a/ui/qt/sequence_dialog.ui
+++ b/ui/qt/sequence_dialog.ui
@@ -186,7 +186,7 @@
</layout>
<action name="actionReset">
<property name="text">
- <string>Reset Diagram</string>
+ <string>Reset &amp;Diagram</string>
</property>
<property name="toolTip">
<string>Reset the diagram to its initial state.</string>
@@ -195,6 +195,22 @@
<string>0</string>
</property>
</action>
+ <action name="actionResetDiagram">
+ <property name="text">
+ <string>&amp;Reset Diagram</string>
+ </property>
+ <property name="toolTip">
+ <string>Reset the diagram to its initial state</string>
+ </property>
+ </action>
+ <action name="actionExportDiagram">
+ <property name="text">
+ <string>&amp;Export</string>
+ </property>
+ <property name="toolTip">
+ <string>Export diagram</string>
+ </property>
+ </action>
<action name="actionZoomIn">
<property name="text">
<string>Zoom In</string>
diff --git a/ui/qt/voip_calls_dialog.cpp b/ui/qt/voip_calls_dialog.cpp
index 45d99b5e33..baee64095a 100644
--- a/ui/qt/voip_calls_dialog.cpp
+++ b/ui/qt/voip_calls_dialog.cpp
@@ -66,13 +66,16 @@ VoipCallsDialog::VoipCallsDialog(QWidget &parent, CaptureFile &cf, bool all_flow
ui->callTreeView->sortByColumn(VoipCallsInfoModel::StartTime, Qt::AscendingOrder);
setWindowSubtitle(all_flows ? tr("SIP Flows") : tr("VoIP Calls"));
- sequence_button_ = ui->buttonBox->addButton(tr("Flow Sequence"), QDialogButtonBox::ActionRole);
- prepare_button_ = ui->buttonBox->addButton(tr("Prepare Filter"), QDialogButtonBox::ActionRole);
+ sequence_button_ = ui->buttonBox->addButton(ui->actionFlowSequence->text(), QDialogButtonBox::ActionRole);
+ sequence_button_->setToolTip(ui->actionFlowSequence->toolTip());
+ prepare_button_ = ui->buttonBox->addButton(ui->actionPrepareFilter->text(), QDialogButtonBox::ActionRole);
+ prepare_button_->setToolTip(ui->actionPrepareFilter->toolTip());
player_button_ = RtpPlayerDialog::addPlayerButton(ui->buttonBox);
connect (ui->todCheckBox, &QAbstractButton::toggled, this, &VoipCallsDialog::switchTimeOfDay);
- copy_button_ = ui->buttonBox->addButton(tr("Copy"), QDialogButtonBox::ActionRole);
+ copy_button_ = ui->buttonBox->addButton(ui->actionCopyButton->text(), QDialogButtonBox::ActionRole);
+ copy_button_->setToolTip(ui->actionCopyButton->toolTip());
QMenu *copy_menu = new QMenu(copy_button_);
QAction *ca;
ca = copy_menu->addAction(tr("as CSV"));
diff --git a/ui/qt/voip_calls_dialog.ui b/ui/qt/voip_calls_dialog.ui
index 4eb775505d..f7d9f08737 100644
--- a/ui/qt/voip_calls_dialog.ui
+++ b/ui/qt/voip_calls_dialog.ui
@@ -85,6 +85,30 @@
</widget>
</item>
</layout>
+ <action name="actionFlowSequence">
+ <property name="text">
+ <string>Flow &amp;Sequence</string>
+ </property>
+ <property name="toolTip">
+ <string>Show flow sequence for selected call(s).</string>
+ </property>
+ </action>
+ <action name="actionPrepareFilter">
+ <property name="text">
+ <string>Prepare &amp;Filter</string>
+ </property>
+ <property name="toolTip">
+ <string>Prepare a filter matching the selected calls(s).</string>
+ </property>
+ </action>
+ <action name="actionCopyButton">
+ <property name="text">
+ <string>Cop&amp;y</string>
+ </property>
+ <property name="toolTip">
+ <string>Open copy menu</string>
+ </property>
+ </action>
<action name="actionSelectAll">
<property name="text">
<string>All</string>