diff options
author | Jirka Novak <j.novak@netsystem.cz> | 2021-05-02 00:33:54 +0200 |
---|---|---|
committer | Wireshark GitLab Utility <gerald+gitlab-utility@wireshark.org> | 2021-05-04 20:45:35 +0000 |
commit | 6d6b376b432bbddb10d643ff03eefb999ff2e127 (patch) | |
tree | 3a2b8007cabcbc2b63f0b436bd3e5353b4b8d440 /ui/qt/rtp_stream_dialog.cpp | |
parent | 773c35d70a0b6ebcb6ea345fd8c5a6624db65d1f (diff) |
VoIP dialogs: Default actions for buttons works as before
When button is pressed or triggered by shortcut, it opens same
window as before.
User can click small arrow next to button and it open menu with all
new actions e.g. Set/Add/Remove for RTP Player.
Documentation updated.
Diffstat (limited to 'ui/qt/rtp_stream_dialog.cpp')
-rw-r--r-- | ui/qt/rtp_stream_dialog.cpp | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/ui/qt/rtp_stream_dialog.cpp b/ui/qt/rtp_stream_dialog.cpp index 521299b9d0..89754ddaaa 100644 --- a/ui/qt/rtp_stream_dialog.cpp +++ b/ui/qt/rtp_stream_dialog.cpp @@ -285,12 +285,17 @@ RtpStreamDialog::RtpStreamDialog(QWidget &parent, CaptureFile &cf) : connect(ui->streamTreeWidget, SIGNAL(customContextMenuRequested(QPoint)), SLOT(showStreamMenu(QPoint))); - find_reverse_button_ = ui->buttonBox->addButton(ui->actionFindReverse->text(), QDialogButtonBox::ActionRole); - find_reverse_button_->setToolTip(ui->actionFindReverse->toolTip()); + find_reverse_button_ = new QToolButton(); + ui->buttonBox->addButton(find_reverse_button_, QDialogButtonBox::ActionRole); + find_reverse_button_->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); + find_reverse_button_->setPopupMode(QToolButton::MenuButtonPopup); + + connect(ui->actionFindReverse, SIGNAL(triggered()), this, SLOT(on_actionFindReverseNormal_triggered())); + find_reverse_button_->setDefaultAction(ui->actionFindReverse); + // Overrides text striping of shortcut undercode in QAction + find_reverse_button_->setText(ui->actionFindReverseNormal->text()); find_reverse_button_->setMenu(ui->menuFindReverse); - connect(ui->actionFindReverseNormal, SIGNAL(triggered()), this, SLOT(on_actionFindReverseNormal_triggered())); - connect(ui->actionFindReversePair, SIGNAL(triggered()), this, SLOT(on_actionFindReversePair_triggered())); - connect(ui->actionFindReverseSingle, SIGNAL(triggered()), this, SLOT(on_actionFindReverseSingle_triggered())); + analyze_button_ = RtpAnalysisDialog::addAnalyzeButton(ui->buttonBox, this); prepare_button_ = ui->buttonBox->addButton(ui->actionPrepareFilter->text(), QDialogButtonBox::ActionRole); prepare_button_->setToolTip(ui->actionPrepareFilter->toolTip()); |