From 3fb32662a861fffbdda802a0bb7fd359f2a837fd Mon Sep 17 00:00:00 2001 From: Roland Knall Date: Thu, 20 Oct 2016 09:34:49 +0200 Subject: InterfaceList: Add button to toggle hidden interfaces Add a button to the context menu, to allow for easy display of hidden interfaces, and make that a storable preference Change-Id: I8df5562b3ce8119b0ed38f9893c1879127f40c47 Reviewed-on: https://code.wireshark.org/review/18005 Petri-Dish: Roland Knall Tested-by: Petri Dish Buildbot Reviewed-by: Roland Knall --- epan/prefs.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'epan/prefs.c') diff --git a/epan/prefs.c b/epan/prefs.c index aaeca8cc00..224c6dc35a 100644 --- a/epan/prefs.c +++ b/epan/prefs.c @@ -2495,6 +2495,12 @@ prefs_register_modules(void) "Show the intelligent scroll bar (a minimap of packet list colors in the scrollbar)", &prefs.gui_packet_list_show_minimap); + + prefs_register_bool_preference(gui_module, "interfaces_show_hidden", + "Show hidden interfaces", + "Show all interfaces, including interfaces marked as hidden", + &prefs.gui_interfaces_show_hidden); + register_string_like_preference(gui_module, "interfaces_hidden_types", "Hide interface types in list", "Hide the given interface types in the startup list", &prefs.gui_interfaces_hide_types, PREF_STRING, NULL, TRUE); @@ -3169,6 +3175,7 @@ pre_init_prefs(void) prefs.gui_packet_list_show_minimap = TRUE; if (prefs.gui_interfaces_hide_types) g_free (prefs.gui_interfaces_hide_types); prefs.gui_interfaces_hide_types = g_strdup(""); + prefs.gui_interfaces_show_hidden = FALSE; prefs.gui_qt_packet_list_separator = FALSE; -- cgit v1.2.3