diff options
author | Gerald Combs <gerald@wireshark.org> | 2012-10-15 18:32:51 +0000 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 2012-10-15 18:32:51 +0000 |
commit | 9051385deb6a3f318da44862ae17c33be2b04fec (patch) | |
tree | cd536ed0796af408eb496311dd6039d11d0b6857 /ui/qt/export_dissection_dialog.cpp | |
parent | 4ee129c34181d7073dc47e5fffeb80ec465247b6 (diff) |
Add help buttons. Ifdef out some code on Windows.
svn path=/trunk/; revision=45564
Diffstat (limited to 'ui/qt/export_dissection_dialog.cpp')
-rw-r--r-- | ui/qt/export_dissection_dialog.cpp | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/ui/qt/export_dissection_dialog.cpp b/ui/qt/export_dissection_dialog.cpp index 0fe701335a..59920d04f0 100644 --- a/ui/qt/export_dissection_dialog.cpp +++ b/ui/qt/export_dissection_dialog.cpp @@ -66,10 +66,6 @@ ExportDissectionDialog::ExportDissectionDialog(QWidget *parent, capture_file *ca setAcceptMode(QFileDialog::AcceptSave); setLabelText(FileType, "Export as:"); - if (button_box) { - save_bt_ = button_box->button(QDialogButtonBox::Save); - } - // export_type_map_keys() sorts alphabetically. We don't want that. name_filters << "Plain text (*.txt)" @@ -100,6 +96,13 @@ ExportDissectionDialog::ExportDissectionDialog(QWidget *parent, capture_file *ca h_box->addWidget(&packet_format_group_box_, 0, Qt::AlignTop); + if (button_box) { + button_box->addButton(QDialogButtonBox::Help); + connect(button_box, SIGNAL(helpRequested()), this, SLOT(on_buttonBox_helpRequested())); + + save_bt_ = button_box->button(QDialogButtonBox::Save); + } + if (save_bt_) { connect(&packet_range_group_box_, SIGNAL(validityChanged(bool)), this, SLOT(checkValidity())); @@ -240,4 +243,14 @@ void ExportDissectionDialog::checkValidity() save_bt_->setEnabled(enable); } + +void ExportDissectionDialog::on_buttonBox_helpRequested() +{ + gchar *url = topic_action_url(HELP_EXPORT_FILE_DIALOG); + + if(url != NULL) { + QDesktopServices::openUrl(QUrl(url)); + g_free(url); + } +} #endif // Q_WS_WIN |