[glade3] Fix accessor function



commit b5e6b7442611fc4de4276e3d095203b18d8aa287
Author: Javier Jardón <jjardon gnome org>
Date:   Fri Feb 5 04:11:58 2010 +0100

    Fix accessor function
    
    Use gtk_widget_style_attach() to replace
    widget->style = gtk_style_attach (widget->style, widget->window);
    
    Fixes https://bugzilla.gnome.org/show_bug.cgi?id=609041

 configure.ac                  |    2 +-
 gladeui/glade-custom.c        |    2 +-
 gladeui/glade-design-layout.c |    4 ++--
 gladeui/glade-placeholder.c   |    2 +-
 gladeui/glade-widget.c        |    5 ++---
 5 files changed, 7 insertions(+), 8 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 35c9b46..5ccb02f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -121,7 +121,7 @@ GTK_DOC_CHECK(1.9)
 dnl ================================================================
 dnl Check for gtk+
 dnl ================================================================
-PKG_CHECK_MODULES(GTK, [gtk+-2.0 >= 2.19.0 gthread-2.0 libxml-2.0 >= 2.4.0])
+PKG_CHECK_MODULES(GTK, [gtk+-2.0 >= 2.19.5 gthread-2.0 libxml-2.0 >= 2.4.0])
 AC_SUBST(GTK_LIBS)
 AC_SUBST(GTK_CFLAGS)
 
diff --git a/gladeui/glade-custom.c b/gladeui/glade-custom.c
index 5f2157a..bf93436 100644
--- a/gladeui/glade-custom.c
+++ b/gladeui/glade-custom.c
@@ -132,7 +132,7 @@ glade_custom_realize (GtkWidget *widget)
 	gtk_widget_set_window (widget, window);
 	gdk_window_set_user_data (window, custom);
 
-	gtk_widget_set_style (widget, gtk_style_attach (gtk_widget_get_style (widget), window));
+	gtk_widget_style_attach (widget);
 
 	glade_custom_send_configure (custom);
 
diff --git a/gladeui/glade-design-layout.c b/gladeui/glade-design-layout.c
index a1072d8..731af8f 100644
--- a/gladeui/glade-design-layout.c
+++ b/gladeui/glade-design-layout.c
@@ -655,8 +655,8 @@ glade_design_layout_realize (GtkWidget *widget)
 					     &attributes, attributes_mask);
 	gdk_window_set_user_data (priv->event_window, widget);
 
-	style = gtk_style_attach (gtk_widget_get_style (widget), window);
-	gtk_widget_set_style (widget, style);
+	gtk_widget_style_attach (widget);
+	style = gtk_widget_get_style (widget);
 	gtk_style_set_background (style, window, GTK_STATE_NORMAL);
 }
 
diff --git a/gladeui/glade-placeholder.c b/gladeui/glade-placeholder.c
index 3a8814d..49caa96 100644
--- a/gladeui/glade-placeholder.c
+++ b/gladeui/glade-placeholder.c
@@ -211,7 +211,7 @@ glade_placeholder_realize (GtkWidget *widget)
 	gtk_widget_set_window (widget, window);
 	gdk_window_set_user_data (window, placeholder);
 
-	gtk_widget_set_style (widget, gtk_style_attach (gtk_widget_get_style (widget), gtk_widget_get_window (widget)));
+	gtk_widget_style_attach (widget);
 
 	glade_placeholder_send_configure (GLADE_PLACEHOLDER (widget));
 
diff --git a/gladeui/glade-widget.c b/gladeui/glade-widget.c
index 46408f5..c3dfe5a 100644
--- a/gladeui/glade-widget.c
+++ b/gladeui/glade-widget.c
@@ -4247,10 +4247,9 @@ embedded_window_realize_handler (GtkWidget *widget)
 
 	gdk_window_set_user_data (window, GTK_WINDOW (widget));
 
-	style = gtk_style_attach (gtk_widget_get_style (widget), window);
-	gtk_widget_set_style (widget, style);
+	gtk_widget_style_attach (widget);
+	style = gtk_widget_get_style (widget);
 	gtk_style_set_background (style, window, GTK_STATE_NORMAL);
-
 }
 
 static void



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