From 22b5ffad861b2efede6d64d16e38710d2c713ba1 Mon Sep 17 00:00:00 2001 From: Dario Lombardo Date: Sun, 7 Jan 2018 22:06:13 +0100 Subject: extcap: add preference to prevent interfaces loading. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Ia5865a40c75e582f28408a0515c5c0b38e43a916 Reviewed-on: https://code.wireshark.org/review/25188 Reviewed-by: Stig Bjørlykke Petri-Dish: Dario Lombardo Tested-by: Petri Dish Buildbot Reviewed-by: Roland Knall --- ui/qt/capture_preferences_frame.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'ui/qt/capture_preferences_frame.cpp') diff --git a/ui/qt/capture_preferences_frame.cpp b/ui/qt/capture_preferences_frame.cpp index 2a7baf9c5d..2fd6aadea6 100644 --- a/ui/qt/capture_preferences_frame.cpp +++ b/ui/qt/capture_preferences_frame.cpp @@ -50,6 +50,7 @@ CapturePreferencesFrame::CapturePreferencesFrame(QWidget *parent) : pref_pcap_ng_ = prefFromPrefPtr(&prefs.capture_pcap_ng); pref_real_time_ = prefFromPrefPtr(&prefs.capture_real_time); pref_auto_scroll_ = prefFromPrefPtr(&prefs.capture_auto_scroll); + pref_no_extcap_ = prefFromPrefPtr(&prefs.capture_no_extcap); // Setting the left margin via a style sheet clobbers its // appearance. @@ -117,6 +118,7 @@ void CapturePreferencesFrame::updateWidgets() ui->captureRealTimeCheckBox->setChecked(prefs_get_bool_value(pref_real_time_, pref_stashed)); ui->captureAutoScrollCheckBox->setChecked(prefs_get_bool_value(pref_auto_scroll_, pref_stashed)); #endif // HAVE_LIBPCAP + ui->captureNoExtcapCheckBox->setChecked(prefs_get_bool_value(pref_no_extcap_, pref_stashed)); } void CapturePreferencesFrame::on_defaultInterfaceComboBox_editTextChanged(const QString &new_iface) @@ -144,6 +146,12 @@ void CapturePreferencesFrame::on_captureAutoScrollCheckBox_toggled(bool checked) prefs_set_bool_value(pref_auto_scroll_, checked, pref_stashed); } +void CapturePreferencesFrame::on_captureNoExtcapCheckBox_toggled(bool checked) +{ + prefs_set_bool_value(pref_no_extcap_, checked, pref_stashed); + wsApp->refreshLocalInterfaces(); +} + /* * Editor modelines * -- cgit v1.2.3