- do not issue the font warning if in the child process (used for real time
authordeniel <deniel@f5534014-38df-0310-8fa8-9805f1628bb7>
Sun, 20 Aug 2000 15:38:50 +0000 (15:38 +0000)
committerdeniel <deniel@f5534014-38df-0310-8fa8-9805f1628bb7>
Sun, 20 Aug 2000 15:38:50 +0000 (15:38 +0000)
  capture) since it has already been done at GUI startup.

- fix a font name in warning message.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2309 f5534014-38df-0310-8fa8-9805f1628bb7

gtk/main.c

index ec47e413f5f6b9fbe59c1c3ac65a0fb13368196f..5f600aecd467f6edd8266c5e3d22970aa64a545a 100644 (file)
@@ -1,6 +1,6 @@
 /* main.c
  *
- * $Id: main.c,v 1.139 2000/08/20 09:02:29 guy Exp $
+ * $Id: main.c,v 1.140 2000/08/20 15:38:50 deniel Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@zing.org>
@@ -1155,24 +1155,28 @@ main(int argc, char *argv[])
   m_r_font = gdk_font_load(prefs->gui_font_name);
   m_b_font = gdk_font_load(bold_font_name);
   if (m_r_font == NULL || m_b_font == NULL) {
-    /* XXX - pop this up as a dialog box? */
-    if (m_r_font == NULL)
-      fprintf(stderr, "ethereal: Warning: font %s not found - defaulting to 6x13 and 6x13bold\n",
+    /* XXX - pop this up as a dialog box? no */
+    if (m_r_font == NULL) {
+      if (!capture_child) 
+       fprintf(stderr, "ethereal: Warning: font %s not found - defaulting to 6x13 and 6x13bold\n",
                prefs->gui_font_name);
-    else
+    } else {
       gdk_font_unref(m_r_font);
-    if (m_b_font == NULL)
-      fprintf(stderr, "ethereal: Warning: font %s not found - defaulting to 6x13 and 6x13bold\n",
+    }
+    if (m_b_font == NULL) {
+      if (!capture_child)
+       fprintf(stderr, "ethereal: Warning: font %s not found - defaulting to 6x13 and 6x13bold\n",
                bold_font_name);
-    else
+    } else {
       gdk_font_unref(m_b_font);
+    }
     g_free(bold_font_name);
     if ((m_r_font = gdk_font_load("6x13")) == NULL) {
       fprintf(stderr, "ethereal: Error: font 6x13 not found\n");
       exit(1);
     }
     if ((m_b_font = gdk_font_load("6x13bold")) == NULL) {
-      fprintf(stderr, "ethereal: Error: font 6x13 not found\n");
+      fprintf(stderr, "ethereal: Error: font 6x13bold not found\n");
       exit(1);
     }
   }