aboutsummaryrefslogtreecommitdiffstats
path: root/ui/qt/extcap_options_dialog.cpp
diff options
context:
space:
mode:
authorRoland Knall <roland.knall@br-automation.com>2016-09-05 07:54:47 +0200
committerRoland Knall <rknall@gmail.com>2016-09-07 09:09:30 +0000
commitee1a4109cfc8fb314d151f59859a348765ba9dbf (patch)
tree36f0efeb8e85e339824ce3d63841f87385ab971b /ui/qt/extcap_options_dialog.cpp
parent859cf86c8d25b7ead113821ece4e9dec853e70d6 (diff)
extcap: Add tool-specified helppage
Allow the tool to provide a link to a helppage, displayed by clicking on help in the configuration dialog. The URL will be opened using an URL based service, therefore local as well as remote URLs are possible. Change-Id: I58b30244e97919d5cf6892faf96536ddc30fb5a7 Reviewed-on: https://code.wireshark.org/review/17549 Reviewed-by: Roland Knall <rknall@gmail.com>
Diffstat (limited to 'ui/qt/extcap_options_dialog.cpp')
-rw-r--r--ui/qt/extcap_options_dialog.cpp19
1 files changed, 17 insertions, 2 deletions
diff --git a/ui/qt/extcap_options_dialog.cpp b/ui/qt/extcap_options_dialog.cpp
index cd728d8d91..0c1e8bae9d 100644
--- a/ui/qt/extcap_options_dialog.cpp
+++ b/ui/qt/extcap_options_dialog.cpp
@@ -34,6 +34,8 @@
#include <QHBoxLayout>
#include <QVBoxLayout>
#include <QGridLayout>
+#include <QUrl>
+#include <QDesktopServices>
#include "ringbuffer.h"
#include "ui/capture_ui_utils.h"
@@ -304,8 +306,21 @@ void ExtcapOptionsDialog::on_buttonBox_rejected()
void ExtcapOptionsDialog::on_buttonBox_helpRequested()
{
- // Probably the wrong URL.
- wsApp->helpTopicAction(HELP_EXTCAP_OPTIONS_DIALOG);
+ interface_t device;
+ gchar * interface_help = NULL;
+
+ device = g_array_index(global_capture_opts.all_ifaces, interface_t, device_idx);
+ interface_help = extcap_get_help_for_ifname(device.name);
+
+ if (interface_help)
+ {
+ QUrl help_url = QString(interface_help);
+ QDesktopServices::openUrl(help_url);
+ }
+ else
+ {
+ wsApp->helpTopicAction(HELP_EXTCAP_OPTIONS_DIALOG);
+ }
}
bool ExtcapOptionsDialog::saveOptionToCaptureInfo()