From Cal Turney:
authoretxrab <etxrab@f5534014-38df-0310-8fa8-9805f1628bb7>
Mon, 26 Jul 2010 13:23:30 +0000 (13:23 +0000)
committeretxrab <etxrab@f5534014-38df-0310-8fa8-9805f1628bb7>
Mon, 26 Jul 2010 13:23:30 +0000 (13:23 +0000)
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

epan/prefs.c
gtk/main.c
gtk/prefs_gui.c

index 532a843247b6bec4957d71b7e31e923cdbd3ade5..256d557030beca88353faa60778cd44030cb57c9 100644 (file)
@@ -2979,7 +2979,8 @@ write_prefs(char **pf_path_return)
   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");
index 74a0d7bb199569dd582bb4f5ac1e4542eed163ed..cc72bf1b15aca9676579bf110af15c994a9fe1d1 100644 (file)
@@ -1427,7 +1427,11 @@ set_display_filename(capture_file *cf)
   }
 
   /* 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);
 }
index 17d16357ee4c3381fbba1546bb2bdf9752e65be9..6a7272dfb12f155afc887d4789f95bccce7ff455 100644 (file)
@@ -326,8 +326,8 @@ gui_prefs_show(void)
 
        /* 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);