diff options
author | Owen Taylor <otaylor@redhat.com> | 1998-12-11 14:00:09 +0000 |
---|---|---|
committer | Owen Taylor <otaylor@src.gnome.org> | 1998-12-11 14:00:09 +0000 |
commit | 11a8051179a2a411a2a332f7128ae188d7e3bd93 (patch) | |
tree | 58e269b65fd1641fec3690eb374df4623715e11f /gtk/gtklist.c | |
parent | 84b2d43d958a9f4e6a952d7e533d365eef6e5aa8 (diff) | |
download | gtk+-11a8051179a2a411a2a332f7128ae188d7e3bd93.tar.gz |
Added "style_set" handlers.
Fri Dec 11 08:59:12 1998 Owen Taylor <otaylor@redhat.com>
* gtk/gtklistitem.c (gtk_list_item_style_set):
* gtk/gtklist.c (gtk_list_style_set):
Added "style_set" handlers.
Diffstat (limited to 'gtk/gtklist.c')
-rw-r--r-- | gtk/gtklist.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/gtk/gtklist.c b/gtk/gtklist.c index e7a9bc8393..18291954b0 100644 --- a/gtk/gtklist.c +++ b/gtk/gtklist.c @@ -46,6 +46,8 @@ static void gtk_list_size_allocate (GtkWidget *widget, static void gtk_list_realize (GtkWidget *widget); static void gtk_list_map (GtkWidget *widget); static void gtk_list_unmap (GtkWidget *widget); +static void gtk_list_style_set (GtkWidget *widget, + GtkStyle *previous_style); static void gtk_list_draw (GtkWidget *widget, GdkRectangle *area); static gint gtk_list_expose (GtkWidget *widget, @@ -218,6 +220,7 @@ gtk_list_class_init (GtkListClass *class) widget_class->map = gtk_list_map; widget_class->unmap = gtk_list_unmap; + widget_class->style_set = gtk_list_style_set; widget_class->realize = gtk_list_realize; widget_class->draw = gtk_list_draw; widget_class->expose_event = gtk_list_expose; @@ -806,6 +809,15 @@ gtk_list_expose (GtkWidget *widget, return FALSE; } +static void +gtk_list_style_set (GtkWidget *widget, + GtkStyle *previous_style) +{ + g_return_if_fail (widget != NULL); + + if (previous_style && GTK_WIDGET_REALIZED (widget)) + gdk_window_set_background (widget->window, &widget->style->base[GTK_WIDGET_STATE (widget)]); +} /* GtkContainer Methods : * gtk_list_add |