From 75eede56b40ef3a0ec69ad4627270ca3b2490d41 Mon Sep 17 00:00:00 2001 From: Carlos Garcia Campos Date: Thu, 8 Jun 2006 13:51:32 +0000 Subject: ** Fixes bug #343764 Ensure g_label points to the right widget before 2006-06-08 Carlos Garcia Campos ** Fixes bug #343764 * e-table-header-utils.c: (e_table_header_draw_button): Ensure g_label points to the right widget before accessing to its style. svn path=/trunk/; revision=32094 --- widgets/table/ChangeLog | 7 +++++++ widgets/table/e-table-header-utils.c | 5 ++--- 2 files changed, 9 insertions(+), 3 deletions(-) (limited to 'widgets/table') diff --git a/widgets/table/ChangeLog b/widgets/table/ChangeLog index a329658289..c9b68fd40b 100644 --- a/widgets/table/ChangeLog +++ b/widgets/table/ChangeLog @@ -1,3 +1,10 @@ +2006-06-08 Carlos Garcia Campos + + ** Fixes bug #343764 + * e-table-header-utils.c: (e_table_header_draw_button): + Ensure g_label points to the right widget before accessing to its + style. + 2006-06-05 Hiroyuki Ikezoe * Makefile.am: Remove extra tabs. Fixes #343734. diff --git a/widgets/table/e-table-header-utils.c b/widgets/table/e-table-header-utils.c index 8a1831bd49..8d452467c6 100644 --- a/widgets/table/e-table-header-utils.c +++ b/widgets/table/e-table-header-utils.c @@ -303,8 +303,6 @@ e_table_draw_elided_string (GdkDrawable *drawable, GdkGC *gc, GtkWidget *widget, } } -static GtkWidget *g_label; - /** * e_table_header_draw_button: * @drawable: Destination drawable. @@ -335,6 +333,7 @@ e_table_header_draw_button (GdkDrawable *drawable, ETableCol *ecol, int inner_width, inner_height; GdkGC *gc; PangoLayout *layout; + static GtkWidget *g_label = NULL; g_return_if_fail (drawable != NULL); g_return_if_fail (ecol != NULL); @@ -347,10 +346,10 @@ e_table_header_draw_button (GdkDrawable *drawable, ETableCol *ecol, if (g_label == NULL) { GtkWidget *button = gtk_button_new_with_label("Hi"); GtkWidget *window = gtk_window_new(GTK_WINDOW_TOPLEVEL); - g_label = GTK_BIN(button)->child; gtk_container_add (GTK_CONTAINER (window), button); gtk_widget_ensure_style (window); gtk_widget_ensure_style (button); + g_label = GTK_BIN(button)->child; gtk_widget_ensure_style (g_label); } -- cgit v1.2.3