aboutsummaryrefslogtreecommitdiffstats
path: root/ui/qt/capture_preferences_frame.cpp
diff options
context:
space:
mode:
authorDario Lombardo <lomato@gmail.com>2018-01-07 22:06:13 +0100
committerRoland Knall <rknall@gmail.com>2018-01-09 09:58:48 +0000
commit22b5ffad861b2efede6d64d16e38710d2c713ba1 (patch)
tree3987df75222880846fa9a07dea6edf088bd1e54a /ui/qt/capture_preferences_frame.cpp
parent0a8d6cf97e0dccc02cb36f2636feb053725118da (diff)
extcap: add preference to prevent interfaces loading.
Change-Id: Ia5865a40c75e582f28408a0515c5c0b38e43a916 Reviewed-on: https://code.wireshark.org/review/25188 Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org> Petri-Dish: Dario Lombardo <lomato@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Roland Knall <rknall@gmail.com>
Diffstat (limited to 'ui/qt/capture_preferences_frame.cpp')
-rw-r--r--ui/qt/capture_preferences_frame.cpp8
1 files changed, 8 insertions, 0 deletions
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
*