[glade3/offscreen-gtk3: 1/2] Bug 630690 - drop GtkObject use



commit cbc454d050a79e8ff863b236e635997672cbd944
Author: Johannes Schmid <jhs gnome org>
Date:   Fri Nov 5 15:25:58 2010 +0100

    Bug 630690 - drop GtkObject use
    
    2010-11-05  Matthias Clasen <mclasen redhat com>
    
    	* gladeui/glade-command.c:
    	* gladeui/glade-editor-property.c:
    	* gladeui/glade-widget.c:
    	* plugins/gtk+/glade-convert.c:
    	Bug 630690 - drop GtkObject use

 ChangeLog                       |    8 ++++++++
 gladeui/glade-command.c         |    4 ++--
 gladeui/glade-editor-property.c |    1 -
 gladeui/glade-widget.c          |    8 ++++----
 plugins/gtk+/glade-convert.c    |    2 +-
 5 files changed, 15 insertions(+), 8 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index e30b7cf..62c7507 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2010-11-05  Matthias Clasen <mclasen redhat com>
+
+	* gladeui/glade-command.c:
+	* gladeui/glade-editor-property.c:
+	* gladeui/glade-widget.c:
+	* plugins/gtk+/glade-convert.c:
+	Bug 630690 - drop GtkObject use
+
 2010-10-15  Matthias Clasen <mclasen redhat com>
 
 	* src/glade-window.c: Removed specific resize-grip handling as now
diff --git a/gladeui/glade-command.c b/gladeui/glade-command.c
index 5c00b31..0202d9c 100644
--- a/gladeui/glade-command.c
+++ b/gladeui/glade-command.c
@@ -909,9 +909,9 @@ GLADE_MAKE_COMMAND (GladeCommandAddRemove, glade_command_add_remove);
 #define GLADE_IS_COMMAND_ADD_REMOVE_CLASS(k)	(G_TYPE_CHECK_CLASS_TYPE ((k), GLADE_COMMAND_ADD_REMOVE_TYPE))
 
 static void 
-glade_command_placeholder_destroyed (GtkObject *object, CommandData *cdata)
+glade_command_placeholder_destroyed (GtkWidget *object, CommandData *cdata)
 {
-	if (GTK_OBJECT (cdata->placeholder) == object)
+	if (cdata->placeholder == object)
 	{
 		cdata->placeholder = NULL;
 		cdata->handler_id = 0;
diff --git a/gladeui/glade-editor-property.c b/gladeui/glade-editor-property.c
index 37b0b4b..92e96de 100644
--- a/gladeui/glade-editor-property.c
+++ b/gladeui/glade-editor-property.c
@@ -3532,7 +3532,6 @@ glade_eprop_adjustment_prop_changed_common (GladeEditorProperty *eprop,
 	    gtk_adjustment_get_page_increment (adjustment) == 10.00 &&
 	    gtk_adjustment_get_page_size (adjustment) == 10.00)
 	{
-		gtk_object_destroy (GTK_OBJECT (adjustment));
 		g_value_set_object (&value, NULL);
 	}
 	else
diff --git a/gladeui/glade-widget.c b/gladeui/glade-widget.c
index b946c95..cff053e 100644
--- a/gladeui/glade-widget.c
+++ b/gladeui/glade-widget.c
@@ -828,8 +828,8 @@ glade_widget_dispose (GObject *object)
 	/* We do not keep a reference to internal widgets */
 	if (widget->internal == NULL)
 	{
-		if (GTK_IS_OBJECT (widget->object))
-			gtk_object_destroy (GTK_OBJECT (widget->object));
+		if (GTK_IS_WIDGET (widget->object))
+			gtk_widget_destroy (GTK_WIDGET (widget->object));
 		else 
 			g_object_unref (widget->object);
 	}
@@ -2409,8 +2409,8 @@ glade_widget_rebuild (GladeWidget *gwidget)
 				      old_object, new_object);
 
 	/* Must call dispose for cases like dialogs and toplevels */
-	if (g_type_is_a (adaptor->type, GTK_TYPE_OBJECT))
-		gtk_object_destroy  (GTK_OBJECT (old_object));
+	if (g_type_is_a (adaptor->type, GTK_TYPE_WIDGET))
+		gtk_widget_destroy  (GTK_WIDGET (old_object));
 	else
 		g_object_run_dispose (G_OBJECT (old_object));
 
diff --git a/plugins/gtk+/glade-convert.c b/plugins/gtk+/glade-convert.c
index c2c465c..8b44b9b 100644
--- a/plugins/gtk+/glade-convert.c
+++ b/plugins/gtk+/glade-convert.c
@@ -106,7 +106,7 @@ convert_adjustments_finished (GladeProject  *project,
 			glade_command_set_property (adata->property, widget->object);
 
 			/* destroy the fabricated object */
-			gtk_object_destroy (GTK_OBJECT (adata->adjustment));
+			g_object_unref (G_OBJECT (adata->adjustment));
 		} 
 		else
 		{



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