Optionally display Wireshark version in the main window's title bar.
(Modified to include SVN version).
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5040
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@33631
f5534014-38df-0310-8fa8-
9805f1628bb7
fprintf(pf, PRS_GUI_START_TITLE ": %s\n",
prefs.gui_start_title);
- fprintf(pf, "\n# Show version in start page, can be useful in custom builds.\n");
+ fprintf(pf, "\n# Show version in start page and main window's title bar.\n");
+ fprintf(pf, "# This can be useful for keeping track of custom builds.\n");
fprintf(pf, "# TRUE or FALSE (case-insensitive).\n");
fprintf(pf, PRS_GUI_VERSION_IN_START_PAGE ": %s\n",
prefs.gui_version_in_start_page == TRUE ? "TRUE" : "FALSE");
}
/* window title */
- win_name = g_strdup_printf("%s - Wireshark", cf_get_display_name(cf));
+ if (prefs.gui_version_in_start_page) {
+ win_name = g_strdup_printf("Wireshark %s %s: %s", VERSION, wireshark_svnversion, cf_get_display_name(cf));
+ } else {
+ win_name = g_strdup_printf("Wireshark: %s", cf_get_display_name(cf));
+ }
set_main_window_name(win_name);
g_free(win_name);
}
/* Show version in welcome screen */
show_version_cb = create_preference_check_button(main_tb, pos++,
- "Welcome screen shows version:",
- "Whether version should be shown in the start page or not.",
+ "Welcome screen and title bar shows the version:",
+ "Whether version should be shown in the start page and main window's title bar.",
prefs.gui_version_in_start_page );
g_object_set_data(G_OBJECT(main_vb), GUI_SHOW_VERSION_KEY, show_version_cb);