2006-09-14 Michael Dominic Kostrzewa <michael.kostrzewa@nokia.com>
authorMichael Dominic Kostrzewa <michael.kostrzewa@nokia.com>
Thu, 14 Sep 2006 08:02:33 +0000 (08:02 +0000)
committerMichael Dominic Kostrzewa <michael.kostrzewa@nokia.com>
Thu, 14 Sep 2006 08:02:33 +0000 (08:02 +0000)
* hildon-widgets/hildon-defines.c: Ensure the style before setting the
logical color. Fixes #NB40041.

ChangeLog
hildon-widgets/hildon-defines.c

index e53a245..22f80c0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2006-09-14  Michael Dominic Kostrzewa  <michael.kostrzewa@nokia.com> 
 
+       * hildon-widgets/hildon-defines.c: Ensure the style before setting the
+       logical color. Fixes #NB40041.
+
+2006-09-14  Michael Dominic Kostrzewa  <michael.kostrzewa@nokia.com> 
+
        * hildon-widgets/hildon-date-editor.c: Bring focus to date after the
        date has been choosen in the calendar popup.
 
index c7dc33b..0af7733 100644 (file)
@@ -116,6 +116,7 @@ static void hildon_change_style_recursive_from_ld (GtkWidget *widget, GtkStyle *
     {
       /* Changing logical color */
       GdkColor color;
+      gtk_widget_ensure_style (widget);
       if (gtk_style_lookup_logical_color (widget->style, ld->logicalcolorstring, &color) == TRUE)
         switch (ld->rcflags)
           {
@@ -131,6 +132,9 @@ static void hildon_change_style_recursive_from_ld (GtkWidget *widget, GtkStyle *
             case GTK_RC_BASE:
               gtk_widget_modify_base (widget, ld->state, &color);
              break;
+         } else 
+         {
+           g_warning ("Failed to lookup '%s' color!", ld->logicalcolorstring);
          }
     }