mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-11 21:20:09 +00:00
Patch from Richard Hestilow to fix gtk-font-name changes for widgets that
Wed Mar 20 17:11:51 2002 Owen Taylor <otaylor@redhat.com> * gtk/gtkrc.c: Patch from Richard Hestilow to fix gtk-font-name changes for widgets that get the actual default style. (#73709)
This commit is contained in:
parent
92febe2720
commit
b93bcb5ecb
@ -1,3 +1,9 @@
|
||||
Wed Mar 20 17:11:51 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkrc.c: Patch from Richard Hestilow to fix
|
||||
gtk-font-name changes for widgets that get the actual
|
||||
default style. (#73709)
|
||||
|
||||
Wed Mar 20 22:59:23 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtkrbtree.[ch]: add _gtk_rbtree_set_fixed_height()
|
||||
|
@ -1,3 +1,9 @@
|
||||
Wed Mar 20 17:11:51 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkrc.c: Patch from Richard Hestilow to fix
|
||||
gtk-font-name changes for widgets that get the actual
|
||||
default style. (#73709)
|
||||
|
||||
Wed Mar 20 22:59:23 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtkrbtree.[ch]: add _gtk_rbtree_set_fixed_height()
|
||||
|
@ -1,3 +1,9 @@
|
||||
Wed Mar 20 17:11:51 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkrc.c: Patch from Richard Hestilow to fix
|
||||
gtk-font-name changes for widgets that get the actual
|
||||
default style. (#73709)
|
||||
|
||||
Wed Mar 20 22:59:23 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtkrbtree.[ch]: add _gtk_rbtree_set_fixed_height()
|
||||
|
@ -1,3 +1,9 @@
|
||||
Wed Mar 20 17:11:51 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkrc.c: Patch from Richard Hestilow to fix
|
||||
gtk-font-name changes for widgets that get the actual
|
||||
default style. (#73709)
|
||||
|
||||
Wed Mar 20 22:59:23 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtkrbtree.[ch]: add _gtk_rbtree_set_fixed_height()
|
||||
|
@ -1,3 +1,9 @@
|
||||
Wed Mar 20 17:11:51 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkrc.c: Patch from Richard Hestilow to fix
|
||||
gtk-font-name changes for widgets that get the actual
|
||||
default style. (#73709)
|
||||
|
||||
Wed Mar 20 22:59:23 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtkrbtree.[ch]: add _gtk_rbtree_set_fixed_height()
|
||||
|
@ -1,3 +1,9 @@
|
||||
Wed Mar 20 17:11:51 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkrc.c: Patch from Richard Hestilow to fix
|
||||
gtk-font-name changes for widgets that get the actual
|
||||
default style. (#73709)
|
||||
|
||||
Wed Mar 20 22:59:23 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtkrbtree.[ch]: add _gtk_rbtree_set_fixed_height()
|
||||
|
23
gtk/gtkrc.c
23
gtk/gtkrc.c
@ -101,6 +101,7 @@ struct _GtkRcContext
|
||||
gchar *pixmap_path[GTK_RC_MAX_PIXMAP_PATHS];
|
||||
|
||||
gint default_priority;
|
||||
GtkStyle *default_style;
|
||||
};
|
||||
|
||||
static GtkRcContext *gtk_rc_context_get (GtkSettings *settings);
|
||||
@ -534,6 +535,7 @@ gtk_rc_context_get (GtkSettings *settings)
|
||||
context->rc_sets_widget_class = NULL;
|
||||
context->rc_sets_class = NULL;
|
||||
context->rc_files = NULL;
|
||||
context->default_style = NULL;
|
||||
|
||||
g_object_get (settings,
|
||||
"gtk-theme-name", &context->theme_name,
|
||||
@ -1285,9 +1287,17 @@ _gtk_rc_context_get_default_font_name (GtkSettings *settings)
|
||||
|
||||
if (new_font_name != context->font_name && !(new_font_name && strcmp (context->font_name, new_font_name) == 0))
|
||||
{
|
||||
gboolean reset = FALSE;
|
||||
g_free (context->font_name);
|
||||
context->font_name = g_strdup (new_font_name);
|
||||
|
||||
if (context->default_style)
|
||||
{
|
||||
g_object_unref (G_OBJECT (context->default_style));
|
||||
context->default_style = NULL;
|
||||
reset = TRUE;
|
||||
}
|
||||
|
||||
/* Clear out styles that have been looked up already
|
||||
*/
|
||||
if (realized_style_ht)
|
||||
@ -1295,9 +1305,11 @@ _gtk_rc_context_get_default_font_name (GtkSettings *settings)
|
||||
g_hash_table_foreach (realized_style_ht, gtk_rc_clear_realized_style, NULL);
|
||||
g_hash_table_destroy (realized_style_ht);
|
||||
realized_style_ht = NULL;
|
||||
|
||||
gtk_rc_reset_widgets (context);
|
||||
reset = TRUE;
|
||||
}
|
||||
|
||||
if (reset)
|
||||
gtk_rc_reset_widgets (context);
|
||||
}
|
||||
|
||||
g_free (new_font_name);
|
||||
@ -1579,8 +1591,13 @@ gtk_rc_get_style (GtkWidget *widget)
|
||||
|
||||
if (rc_styles)
|
||||
return gtk_rc_init_style (rc_styles);
|
||||
else
|
||||
{
|
||||
if (!context->default_style)
|
||||
context->default_style = gtk_style_new ();
|
||||
|
||||
return NULL;
|
||||
return context->default_style;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user