Set captures preferences for PREF_EFFECT_CAPTURE.

This is a simple example of changing preferences that don't
affect dissection to something else, so that changing them
doesn't cause a file to be redissected unnecessarily

Change-Id: I77c64c739e8bbc9f2a202f744f27cb07be4a822b
Reviewed-on: https://code.wireshark.org/review/25173
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
This commit is contained in:
Michael Mann 2018-01-06 12:10:06 -05:00
parent 7165b60879
commit 603bb5097d
3 changed files with 7 additions and 1 deletions

View File

@ -3424,6 +3424,8 @@ prefs_register_modules(void)
*/
capture_module = prefs_register_module(NULL, "capture", "Capture",
"Capture preferences", NULL, FALSE);
/* Capture preferences don't affect dissection */
prefs_set_module_effect_flags(capture_module, PREF_EFFECT_CAPTURE);
register_string_like_preference(capture_module, "device", "Default capture device",
"Default capture device",

View File

@ -269,7 +269,7 @@ void PreferencesDialog::on_buttonBox_accepted()
wsApp->setMonospaceFont(prefs.gui_qt_font_name);
if (must_redissect) {
if (must_redissect & PREF_EFFECT_DISSECTION) {
/* Redissect all the packets, and re-evaluate the display filter. */
wsApp->queueAppSignal(WiresharkApplication::PacketDissectionChanged);
}

View File

@ -276,6 +276,8 @@ void ProtocolPreferencesMenu::boolPreferenceTriggered()
prefs_main_write();
}
/* Protocol preference changes almost always affect dissection,
so don't bother checking flags */
wsApp->emitAppSignal(WiresharkApplication::PacketDissectionChanged);
}
@ -292,6 +294,8 @@ void ProtocolPreferencesMenu::enumPreferenceTriggered()
prefs_main_write();
}
/* Protocol preference changes almost always affect dissection,
so don't bother checking flags */
wsApp->emitAppSignal(WiresharkApplication::PacketDissectionChanged);
}
}