[glade3] * gladeui/glade-widget-adaptor.[ch]: Removed the '->scrollable' flag on the adaptor class in fav



commit 409390710e92164743e1e2cf48446eaffbcacf65
Author: Tristan Van Berkom <tristan van berkom gmail com>
Date:   Mon Dec 27 18:22:47 2010 +0900

    	* gladeui/glade-widget-adaptor.[ch]: Removed the '->scrollable' flag on the adaptor
    	  class in favor of just checking if the class type implements GtkScrollable

 ChangeLog                      |    3 +++
 gladeui/glade-widget-adaptor.c |    4 ----
 gladeui/glade-widget-adaptor.h |    8 +-------
 3 files changed, 4 insertions(+), 11 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 07522a1..b5efca7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -15,6 +15,9 @@
 	* gladui/glade-placeholder.c: Made GladePlaceholder Implement GtkScrollable so
 	  as to avoid warnings when using placeholders inside scrolled windows.
 
+	* gladeui/glade-widget-adaptor.[ch]: Removed the '->scrollable' flag on the adaptor
+	  class in favor of just checking if the class type implements GtkScrollable
+
 2010-12-26  Tristan Van Berkom <tristanvb openismus com>
 
 	* gladeui/glade-previewer.c: Added include <locale.h> for setlocale() (bug 638035).
diff --git a/gladeui/glade-widget-adaptor.c b/gladeui/glade-widget-adaptor.c
index bff69b9..e296891 100644
--- a/gladeui/glade-widget-adaptor.c
+++ b/gladeui/glade-widget-adaptor.c
@@ -595,10 +595,6 @@ glade_widget_adaptor_constructor (GType                  type,
 		gwa_setup_properties (adaptor, object_class, TRUE);
 	}
 
-	/* Detect scrollability */
-	if (g_type_is_a (adaptor->type, GTK_TYPE_SCROLLABLE))
-	    GLADE_WIDGET_ADAPTOR_GET_CLASS(adaptor)->scrollable = TRUE;
-
 	/* Inherit packing defaults here */
 	adaptor->child_packings = gwa_inherit_child_packing (adaptor);
 
diff --git a/gladeui/glade-widget-adaptor.h b/gladeui/glade-widget-adaptor.h
index fb3149d..d9bd5af 100644
--- a/gladeui/glade-widget-adaptor.h
+++ b/gladeui/glade-widget-adaptor.h
@@ -179,8 +179,7 @@ typedef struct _GladeWidgetAdaptorClass   GladeWidgetAdaptorClass;
  * Checks whether this is a GtkWidgetClass with scrolling capabilities.
  */
 #define GWA_SCROLLABLE_WIDGET(obj) \
-        ((obj) ? GLADE_WIDGET_ADAPTOR_GET_CLASS(obj)->scrollable : FALSE)
-
+        ((obj) ? g_type_is_a (GLADE_WIDGET_ADAPTOR (obj)->type, GTK_TYPE_SCROLLABLE) : FALSE)
 
 /**
  * GWA_GET_CLASS:
@@ -697,11 +696,6 @@ struct _GladeWidgetAdaptorClass
 							      * to interface with child widgets.
 							      */
 
-	guint                      scrollable : 1;           /* Whether this is a widget class that has
-							      * klass->set_scroll_adjustments_signal != NULL (i.e.
-							      * can be directly added to a GtkScrolledWindow).
-							      */
-
 	gint                       default_width;  /* Default width in GladeDesignLayout */
 	gint                       default_height; /* Default height in GladeDesignLayout */
 



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