From 20674d88774e5af1cf17bfc651351869b07485d6 Mon Sep 17 00:00:00 2001 From: Jeff Morriss Date: Sun, 30 Jun 2013 21:58:25 +0000 Subject: [PATCH] From Cal Turney via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8876 : Errors in preferences preceding "gui.console_open" are not immediately displayed in the console: If a gui.console_open is set to "AUTOMATIC" or "ALWAYS" and an error or warning occurs in a preference previous to it, the warning is not displayed in the console window because the window is not yet open. However, if the user switches to another profile and returns, the messages will be displayed. Fix: Move the gui.console_open to the top of the list in prefs_register_modules() of prefs.c. Existing preferences files can be corrected by saving them. svn path=/trunk/; revision=50269 --- epan/prefs.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/epan/prefs.c b/epan/prefs.c index f71825fb44..6989bd5b55 100644 --- a/epan/prefs.c +++ b/epan/prefs.c @@ -1859,6 +1859,14 @@ prefs_register_modules(void) gui_module = prefs_register_module(NULL, "gui", "User Interface", "User Interface", &gui_callback, FALSE); + /* gui.console_open is placed first in the list so that any problems encountered + * in the following prefs can be displayed in the console window. + */ + prefs_register_enum_preference(gui_module, "console_open", + "Open a console window", + "Open a console window (WIN32 only)", + (gint*)(void*)(&prefs.gui_console_open), gui_console_open_type, FALSE); + prefs_register_obsolete_preference(gui_module, "scrollbar_on_right"); prefs_register_obsolete_preference(gui_module, "packet_list_sel_browse"); prefs_register_obsolete_preference(gui_module, "protocol_tree_sel_browse"); @@ -1997,11 +2005,6 @@ prefs_register_modules(void) prefs_register_color_preference(gui_color_module, "color_filter_bg.deprecated", "Deprecated color filter background", "Deprecated color filter background", &prefs.gui_text_deprecated); - prefs_register_enum_preference(gui_module, "console_open", - "Open a console window", - "Open a console window (WIN32 only)", - (gint*)(void*)(&prefs.gui_console_open), gui_console_open_type, FALSE); - prefs_register_enum_preference(gui_module, "fileopen.style", "Where to start the File Open dialog box", "Where to start the File Open dialog box",