gtk_font_selection_set_font_name doesn't work when run before appending
authoroabad <oabad@f5534014-38df-0310-8fa8-9805f1628bb7>
Wed, 21 Jan 2004 12:19:19 +0000 (12:19 +0000)
committeroabad <oabad@f5534014-38df-0310-8fa8-9805f1628bb7>
Wed, 21 Jan 2004 12:19:19 +0000 (12:19 +0000)
the font selection widget to the notebook (at least in GTK2).

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

gtk/gui_prefs.c
gtk/prefs_dlg.c

index 0d6fd07cca13b202f4ddc009eb9e77570d35a36e..f1335cdc09d566d1c4db8acf712eda3caea1c970 100644 (file)
@@ -1,7 +1,7 @@
 /* gui_prefs.c
  * Dialog box for GUI preferences
  *
- * $Id: gui_prefs.c,v 1.56 2004/01/20 19:33:23 ulfl Exp $
+ * $Id: gui_prefs.c,v 1.57 2004/01/21 12:19:19 oabad Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -313,15 +313,6 @@ gui_font_prefs_show(void)
 #endif
 #endif
 
-    /* Set the font to the current font.
-          XXX - GTK+ 1.2.8, and probably earlier versions, have a bug
-          wherein that doesn't necessarily cause that font to be
-          selected in the dialog box.  I've sent to the GTK+ folk
-          a fix; hopefully, it'll show up in 1.2.9 if, as, and when
-          they put out a 1.2.9 release. */
-       gtk_font_selection_set_font_name(
-           GTK_FONT_SELECTION(font_browse_w), prefs.PREFS_GUI_FONT_NAME);
-
        gtk_widget_show(font_browse_w);
 
        return font_browse_w;
index 22606444ae54470d39173171624244b5fa5e6997..27af15896f9e3e268e935a2e974576a03f7baeb6 100644 (file)
@@ -1,7 +1,7 @@
 /* prefs_dlg.c
  * Routines for handling preferences
  *
- * $Id: prefs_dlg.c,v 1.72 2004/01/17 00:26:22 ulfl Exp $
+ * $Id: prefs_dlg.c,v 1.73 2004/01/21 12:19:19 oabad Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -486,6 +486,10 @@ prefs_cb(GtkWidget *w _U_, gpointer dummy _U_)
   gtk_container_add(GTK_CONTAINER(frame), gui_font_pg);
   OBJECT_SET_DATA(prefs_w, E_GUI_FONT_PAGE_KEY, gui_font_pg);
   gtk_notebook_append_page (GTK_NOTEBOOK(prefs_nb), frame, NULL);
+  /* gtk_font_selection_set_font_name doesn't work when run before appending the
+   * frame to the notebook (at least in GTK2) */
+  gtk_font_selection_set_font_name(
+           GTK_FONT_SELECTION(gui_font_pg), prefs.PREFS_GUI_FONT_NAME);
   strcpy(label_str, "Font");
 #if GTK_MAJOR_VERSION < 2
   ct_node = gtk_ctree_insert_node(GTK_CTREE(cts.tree), ct_base_node, NULL,