From 6e2db6b3bd951c62ae11dab8f0ba9f4611470c6e Mon Sep 17 00:00:00 2001 From: Ettore Perazzoli Date: Mon, 13 Aug 2001 22:50:06 +0000 Subject: Revert the previous e-gray-bar patch as it was, um, wrong. svn path=/trunk/; revision=11974 --- shell/ChangeLog | 6 ------ shell/e-gray-bar.c | 26 +++++++++++++++++++------- 2 files changed, 19 insertions(+), 13 deletions(-) (limited to 'shell') diff --git a/shell/ChangeLog b/shell/ChangeLog index 7430442383..1ad77d0682 100644 --- a/shell/ChangeLog +++ b/shell/ChangeLog @@ -3,12 +3,6 @@ * e-shell-view.c (setup_widgets): Add some little padding to the title bar so it looks nicer. -2001-08-13 Ettore Perazzoli - - * e-gray-bar.c (impl_style_set): Removed. - (class_init): Don't override that method anymore. - (e_gray_bar_new): Call `endarken_style()' here instead. - 2001-08-13 Ettore Perazzoli [Fix #7109, Evolution crashes when the splash screen dialog is diff --git a/shell/e-gray-bar.c b/shell/e-gray-bar.c index be8daa50c5..1058bf5740 100644 --- a/shell/e-gray-bar.c +++ b/shell/e-gray-bar.c @@ -44,7 +44,6 @@ endarken_style (GtkWidget *widget) GtkStyle *style; GtkRcStyle *new_rc_style; int i; - static int first_time = TRUE; style = widget->style; @@ -67,14 +66,28 @@ endarken_style (GtkWidget *widget) new_rc_style->color_flags[i] = GTK_RC_BG | GTK_RC_FG | GTK_RC_BASE | GTK_RC_TEXT; } - if (first_time) { - gtk_widget_modify_style (widget, new_rc_style); - first_time = FALSE; - } + gtk_widget_modify_style (widget, new_rc_style); gtk_rc_style_unref (new_rc_style); } + +static void +impl_style_set (GtkWidget *widget, + GtkStyle *previous_style) +{ + static int in_style_set = 0; + + if (in_style_set > 0) + return; + + in_style_set ++; + + endarken_style (widget); + + in_style_set --; +} + static void class_init (GtkObjectClass *object_class) @@ -84,6 +97,7 @@ class_init (GtkObjectClass *object_class) parent_class = gtk_type_class (PARENT_TYPE); widget_class = GTK_WIDGET_CLASS (object_class); + widget_class->style_set = impl_style_set; } static void @@ -99,8 +113,6 @@ e_gray_bar_new (void) new = gtk_type_new (e_gray_bar_get_type ()); - endarken_style (new); - return new; } -- cgit v1.2.3