[gnome-control-center] datetime: fix a critical when showing the panel



commit 534a7a1eac0864fdd205293b64d82a48c9385719
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Tue Apr 5 12:23:00 2011 -0400

    datetime: fix a critical when showing the panel
    
    The critical was spawned because we were calling gtk_style_attach()
    before calling gtk_widget_set_window(), but that code can go away
    entirely.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=646836

 panels/datetime/cc-timezone-map.c |    7 +------
 1 files changed, 1 insertions(+), 6 deletions(-)
---
diff --git a/panels/datetime/cc-timezone-map.c b/panels/datetime/cc-timezone-map.c
index 7e0e585..755c48c 100644
--- a/panels/datetime/cc-timezone-map.c
+++ b/panels/datetime/cc-timezone-map.c
@@ -281,15 +281,10 @@ cc_timezone_map_realize (GtkWidget *widget)
   window = gdk_window_new (gtk_widget_get_parent_window (widget), &attr,
                            GDK_WA_X | GDK_WA_Y);
 
-  gtk_widget_set_style (widget,
-                        gtk_style_attach (gtk_widget_get_style (widget),
-                                          window));
-
-  gdk_window_set_user_data (window, widget);
-
   cursor = gdk_cursor_new (GDK_HAND2);
   gdk_window_set_cursor (window, cursor);
 
+  gdk_window_set_user_data (window, widget);
   gtk_widget_set_window (widget, window);
 }
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]