]> Pileus Git - ~andy/gtk/commitdiff
Don't create ->font_entry, ->font_style_entry at all rather than just not
authorOwen Taylor <otaylor@redhat.com>
Tue, 5 Mar 2002 23:10:11 +0000 (23:10 +0000)
committerOwen Taylor <otaylor@src.gnome.org>
Tue, 5 Mar 2002 23:10:11 +0000 (23:10 +0000)
Tue Mar  5 17:43:43 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkfontsel.c (gtk_font_selection_init): Don't
        create ->font_entry, ->font_style_entry at all rather
        than just not showing them to avoid the problem of
        them popping up if gtk_widget_show_all() is done
        on the dialog. (#72913, Charles Kerr.)

ChangeLog
ChangeLog.pre-2-0
ChangeLog.pre-2-10
ChangeLog.pre-2-2
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
gtk/gtkfontsel.c

index 1cd0f54a03af31de20e93227dbbf49edb975c17b..9fd446eb9264633bcdc927e2ef05800695103ad0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+Tue Mar  5 17:43:43 2002  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/gtkfontsel.c (gtk_font_selection_init): Don't
+       create ->font_entry, ->font_style_entry at all rather
+       than just not showing them to avoid the problem of
+       them popping up if gtk_widget_show_all() is done
+       on the dialog. (#72913, Charles Kerr.)
+
 Tue Mar  5 18:06:49 2002  Jonathan Blandford  <jrb@redhat.com>
 
        * gtk/gtktreeviewcolumn.c (gtk_tree_view_column_set_resizable):
index 1cd0f54a03af31de20e93227dbbf49edb975c17b..9fd446eb9264633bcdc927e2ef05800695103ad0 100644 (file)
@@ -1,3 +1,11 @@
+Tue Mar  5 17:43:43 2002  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/gtkfontsel.c (gtk_font_selection_init): Don't
+       create ->font_entry, ->font_style_entry at all rather
+       than just not showing them to avoid the problem of
+       them popping up if gtk_widget_show_all() is done
+       on the dialog. (#72913, Charles Kerr.)
+
 Tue Mar  5 18:06:49 2002  Jonathan Blandford  <jrb@redhat.com>
 
        * gtk/gtktreeviewcolumn.c (gtk_tree_view_column_set_resizable):
index 1cd0f54a03af31de20e93227dbbf49edb975c17b..9fd446eb9264633bcdc927e2ef05800695103ad0 100644 (file)
@@ -1,3 +1,11 @@
+Tue Mar  5 17:43:43 2002  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/gtkfontsel.c (gtk_font_selection_init): Don't
+       create ->font_entry, ->font_style_entry at all rather
+       than just not showing them to avoid the problem of
+       them popping up if gtk_widget_show_all() is done
+       on the dialog. (#72913, Charles Kerr.)
+
 Tue Mar  5 18:06:49 2002  Jonathan Blandford  <jrb@redhat.com>
 
        * gtk/gtktreeviewcolumn.c (gtk_tree_view_column_set_resizable):
index 1cd0f54a03af31de20e93227dbbf49edb975c17b..9fd446eb9264633bcdc927e2ef05800695103ad0 100644 (file)
@@ -1,3 +1,11 @@
+Tue Mar  5 17:43:43 2002  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/gtkfontsel.c (gtk_font_selection_init): Don't
+       create ->font_entry, ->font_style_entry at all rather
+       than just not showing them to avoid the problem of
+       them popping up if gtk_widget_show_all() is done
+       on the dialog. (#72913, Charles Kerr.)
+
 Tue Mar  5 18:06:49 2002  Jonathan Blandford  <jrb@redhat.com>
 
        * gtk/gtktreeviewcolumn.c (gtk_tree_view_column_set_resizable):
index 1cd0f54a03af31de20e93227dbbf49edb975c17b..9fd446eb9264633bcdc927e2ef05800695103ad0 100644 (file)
@@ -1,3 +1,11 @@
+Tue Mar  5 17:43:43 2002  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/gtkfontsel.c (gtk_font_selection_init): Don't
+       create ->font_entry, ->font_style_entry at all rather
+       than just not showing them to avoid the problem of
+       them popping up if gtk_widget_show_all() is done
+       on the dialog. (#72913, Charles Kerr.)
+
 Tue Mar  5 18:06:49 2002  Jonathan Blandford  <jrb@redhat.com>
 
        * gtk/gtktreeviewcolumn.c (gtk_tree_view_column_set_resizable):
index 1cd0f54a03af31de20e93227dbbf49edb975c17b..9fd446eb9264633bcdc927e2ef05800695103ad0 100644 (file)
@@ -1,3 +1,11 @@
+Tue Mar  5 17:43:43 2002  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/gtkfontsel.c (gtk_font_selection_init): Don't
+       create ->font_entry, ->font_style_entry at all rather
+       than just not showing them to avoid the problem of
+       them popping up if gtk_widget_show_all() is done
+       on the dialog. (#72913, Charles Kerr.)
+
 Tue Mar  5 18:06:49 2002  Jonathan Blandford  <jrb@redhat.com>
 
        * gtk/gtktreeviewcolumn.c (gtk_tree_view_column_set_resizable):
index 1cd0f54a03af31de20e93227dbbf49edb975c17b..9fd446eb9264633bcdc927e2ef05800695103ad0 100644 (file)
@@ -1,3 +1,11 @@
+Tue Mar  5 17:43:43 2002  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/gtkfontsel.c (gtk_font_selection_init): Don't
+       create ->font_entry, ->font_style_entry at all rather
+       than just not showing them to avoid the problem of
+       them popping up if gtk_widget_show_all() is done
+       on the dialog. (#72913, Charles Kerr.)
+
 Tue Mar  5 18:06:49 2002  Jonathan Blandford  <jrb@redhat.com>
 
        * gtk/gtktreeviewcolumn.c (gtk_tree_view_column_set_resizable):
index 853b368ee34bb46e1c6de74d35b79f9f86c06544..6b9f2e91066a40b57bda334c929d0889b5a41dd7 100644 (file)
 #include "gtkscrolledwindow.h"
 #include "gtkintl.h"
 
+/* We don't enable the font and style entries because they don't add
+ * much in terms of visible effect and have a weird effect on keynav.
+ * the Windows font selector has entries similarly positioned but they
+ * act in conjunction with the associated lists to form a single focus
+ * location.
+ */
+#undef INCLUDE_FONT_ENTRIES
+
 /* This is the default text shown in the preview entry, though the user
    can set it. Remember that some fonts only have capital letters. */
 #define PREVIEW_TEXT N_("abcdefghijk ABCDEFGHIJK")
@@ -285,19 +293,21 @@ gtk_font_selection_init (GtkFontSelection *fontsel)
   gtk_table_set_col_spacings (GTK_TABLE (table), 8);
   gtk_box_pack_start (GTK_BOX (fontsel), table, TRUE, TRUE, 0);
 
+#ifdef INCLUDE_FONT_ENTRIES  
   fontsel->font_entry = gtk_entry_new ();
   gtk_entry_set_editable (GTK_ENTRY (fontsel->font_entry), FALSE);
   gtk_widget_set_usize (fontsel->font_entry, 20, -1);
-  /*  gtk_widget_show (fontsel->font_entry); */
+  gtk_widget_show (fontsel->font_entry);
   gtk_table_attach (GTK_TABLE (table), fontsel->font_entry, 0, 1, 1, 2,
                    GTK_FILL, 0, 0, 0);
   
   fontsel->font_style_entry = gtk_entry_new ();
   gtk_entry_set_editable (GTK_ENTRY (fontsel->font_style_entry), FALSE);
   gtk_widget_set_usize (fontsel->font_style_entry, 20, -1);
-  /* gtk_widget_show (fontsel->font_style_entry); */
+  gtk_widget_show (fontsel->font_style_entry);
   gtk_table_attach (GTK_TABLE (table), fontsel->font_style_entry, 1, 2, 1, 2,
                    GTK_FILL, 0, 0, 0);
+#endif /* INCLUDE_FONT_ENTRIES */
   
   fontsel->size_entry = gtk_entry_new ();
   gtk_widget_set_usize (fontsel->size_entry, 20, -1);
@@ -588,7 +598,9 @@ gtk_font_selection_select_font (GtkTreeSelection *selection,
          
          family_name = pango_font_family_get_name (fontsel->family);
          
+#ifdef INCLUDE_FONT_ENTRIES
          gtk_entry_set_text (GTK_ENTRY (fontsel->font_entry), family_name);
+#endif
          
          gtk_font_selection_show_available_styles (fontsel);
          gtk_font_selection_select_best_style (fontsel, TRUE);
@@ -646,8 +658,10 @@ gtk_font_selection_show_available_fonts (GtkFontSelection *fontsel)
   if (match_family)
     {
       set_cursor_to_iter (GTK_TREE_VIEW (fontsel->family_list), &match_row);
+#ifdef INCLUDE_FONT_ENTRIES      
       gtk_entry_set_text (GTK_ENTRY (fontsel->font_entry), 
                          pango_font_family_get_name (match_family));
+#endif /* INCLUDE_FONT_ENTRIES */
     }
 
   g_free (families);
@@ -761,7 +775,9 @@ gtk_font_selection_show_available_styles (GtkFontSelection *fontsel)
     {
       const gchar *str = pango_font_face_get_face_name (fontsel->face);
 
+#ifdef INCLUDE_FONT_ENTRIES        
       gtk_entry_set_text (GTK_ENTRY (fontsel->font_style_entry), str);
+#endif      
       set_cursor_to_iter (GTK_TREE_VIEW (fontsel->face_list), &match_row);
     }