Do not try to use unknown/non-existent webbrowser
authorMichal Labedzki <michal.labedzki@tieto.com>
Wed, 5 Mar 2014 11:37:30 +0000 (12:37 +0100)
committerAnders Broman <a.broman58@gmail.com>
Sat, 8 Mar 2014 06:30:17 +0000 (06:30 +0000)
Some systems do not have webbrowser or have strange browser.
Do not try to use it and dislayed URL for user information.

Change-Id: I3f5bcca6701b20cafa942629cbee78aa1fc689b1
Reviewed-on: https://code.wireshark.org/review/516
Reviewed-by: Evan Huus <eapache@gmail.com>
epan/prefs.c
ui/gtk/webbrowser.c

index f565726d89d9686800c2900c17ca6ee4d59da665..beff049a02407ff63712f3ab117a139e3a6db16d 100644 (file)
@@ -2963,7 +2963,11 @@ pre_init_prefs(void)
   prefs.gui_update_enabled         = TRUE;
   prefs.gui_update_channel         = UPDATE_CHANNEL_STABLE;
   prefs.gui_update_interval        = 60*60*24; /* Seconds */
+#ifdef HTML_VIEWER
   prefs.gui_webbrowser             = (char *) HTML_VIEWER " %s";
+#else
+  prefs.gui_webbrowser             = (char *) "";
+#endif
   prefs.gui_window_title           = (char *) "";
   prefs.gui_start_title            = "The World's Most Popular Network Protocol Analyzer";
   prefs.gui_version_placement      = version_both;
index 760ae02f16184ed0053f890eeb433620903496fa..5452481966da3091bb7873c0e67126074f1c792b 100644 (file)
@@ -245,7 +245,8 @@ browser_open_url (const gchar *url)
     {
       simple_dialog(ESD_TYPE_WARN, ESD_BTN_OK,
           "Web browser not specified.\n"
-          "Please correct the web browser setting in the Preferences dialog.");
+          "Please correct the web browser setting in the Preferences dialog.\n"
+          "URL: %s", url);
       g_free (browser);
       return FALSE;
     }
@@ -401,7 +402,8 @@ filemanager_open_directory (const gchar *path)
     {
       simple_dialog(ESD_TYPE_WARN, ESD_BTN_OK,
           "Web browser not specified.\n"
-          "Please correct the web browser setting in the Preferences dialog.");
+          "Please correct the web browser setting in the Preferences dialog.\n"
+          "URL: %s", path);
       g_free (browser);
       return FALSE;
     }