forked from osmocom/wireshark
Qt: Set Close as default button
Set Close as default button in some statistics dialogs. Change-Id: I82e17d27de256aabaec1633bb973c554eec907c3 Reviewed-on: https://code.wireshark.org/review/17685 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
This commit is contained in:
parent
c9abf97b58
commit
057b6bbd2e
|
@ -64,6 +64,11 @@ CaptureFilePropertiesDialog::CaptureFilePropertiesDialog(QWidget &parent, Captur
|
|||
button->setText(tr("Save Comments"));
|
||||
}
|
||||
|
||||
button = ui->buttonBox->button(QDialogButtonBox::Close);
|
||||
if (button) {
|
||||
button->setDefault(true);
|
||||
}
|
||||
|
||||
setWindowSubtitle(tr("Capture File Properties"));
|
||||
QTimer::singleShot(0, this, SLOT(updateWidgets()));
|
||||
}
|
||||
|
|
|
@ -104,6 +104,11 @@ ConversationDialog::ConversationDialog(QWidget &parent, CaptureFile &cf, int cli
|
|||
|
||||
fillTypeMenu(conv_protos);
|
||||
|
||||
QPushButton *close_bt = buttonBox()->button(QDialogButtonBox::Close);
|
||||
if (close_bt) {
|
||||
close_bt->setDefault(true);
|
||||
}
|
||||
|
||||
updateWidgets();
|
||||
// currentTabChanged();
|
||||
|
||||
|
|
|
@ -87,6 +87,11 @@ EndpointDialog::EndpointDialog(QWidget &parent, CaptureFile &cf, int cli_proto_i
|
|||
tabChanged();
|
||||
#endif
|
||||
|
||||
QPushButton *close_bt = buttonBox()->button(QDialogButtonBox::Close);
|
||||
if (close_bt) {
|
||||
close_bt->setDefault(true);
|
||||
}
|
||||
|
||||
updateWidgets();
|
||||
// currentTabChanged();
|
||||
|
||||
|
|
|
@ -204,6 +204,11 @@ IOGraphDialog::IOGraphDialog(QWidget &parent, CaptureFile &cf) :
|
|||
QPushButton *copy_bt = ui->buttonBox->addButton(tr("Copy"), QDialogButtonBox::ActionRole);
|
||||
connect (copy_bt, SIGNAL(clicked()), this, SLOT(copyAsCsvClicked()));
|
||||
|
||||
QPushButton *close_bt = ui->buttonBox->button(QDialogButtonBox::Close);
|
||||
if (close_bt) {
|
||||
close_bt->setDefault(true);
|
||||
}
|
||||
|
||||
stat_timer_ = new QTimer(this);
|
||||
connect(stat_timer_, SIGNAL(timeout()), this, SLOT(updateStatistics()));
|
||||
stat_timer_->start(stat_update_interval_);
|
||||
|
|
|
@ -240,6 +240,10 @@ ProtocolHierarchyDialog::ProtocolHierarchyDialog(QWidget &parent, CaptureFile &c
|
|||
connect(ca, SIGNAL(triggered()), this, SLOT(on_actionCopyAsYaml_triggered()));
|
||||
copy_button_->setMenu(copy_menu);
|
||||
|
||||
QPushButton *close_bt = ui->buttonBox->button(QDialogButtonBox::Close);
|
||||
if (close_bt) {
|
||||
close_bt->setDefault(true);
|
||||
}
|
||||
|
||||
display_filter_ = cap_file_.capFile()->dfilter;
|
||||
updateWidgets();
|
||||
|
|
|
@ -169,6 +169,11 @@ SequenceDialog::SequenceDialog(QWidget &parent, CaptureFile &cf, SequenceInfo *i
|
|||
QPushButton *save_bt = ui->buttonBox->button(QDialogButtonBox::Save);
|
||||
save_bt->setText(tr("Save As" UTF8_HORIZONTAL_ELLIPSIS));
|
||||
|
||||
QPushButton *close_bt = ui->buttonBox->button(QDialogButtonBox::Close);
|
||||
if (close_bt) {
|
||||
close_bt->setDefault(true);
|
||||
}
|
||||
|
||||
ProgressFrame::addToButtonBox(ui->buttonBox, &parent);
|
||||
|
||||
connect(ui->horizontalScrollBar, SIGNAL(valueChanged(int)), this, SLOT(hScrollBarChanged(int)));
|
||||
|
|
|
@ -233,6 +233,11 @@ TCPStreamDialog::TCPStreamDialog(QWidget *parent, capture_file *cf, tcp_graph_ty
|
|||
QPushButton *save_bt = ui->buttonBox->button(QDialogButtonBox::Save);
|
||||
save_bt->setText(tr("Save As" UTF8_HORIZONTAL_ELLIPSIS));
|
||||
|
||||
QPushButton *close_bt = ui->buttonBox->button(QDialogButtonBox::Close);
|
||||
if (close_bt) {
|
||||
close_bt->setDefault(true);
|
||||
}
|
||||
|
||||
ProgressFrame::addToButtonBox(ui->buttonBox, parent);
|
||||
|
||||
connect(sp, SIGNAL(mousePress(QMouseEvent*)), this, SLOT(graphClicked(QMouseEvent*)));
|
||||
|
|
Loading…
Reference in New Issue