[nautilus/gtk3-happyness: 4/19] [libnautilus-private] don't use GtkObject



commit a18ac634883dbe2de6fdc5380038e73b062c6a5c
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Wed Sep 29 12:54:53 2010 +0200

    [libnautilus-private] don't use GtkObject

 libnautilus-private/nautilus-autorun.c             |    2 +-
 libnautilus-private/nautilus-clipboard.c           |    4 ++--
 libnautilus-private/nautilus-entry.c               |   12 ++++--------
 libnautilus-private/nautilus-icon-container.c      |    8 +++-----
 libnautilus-private/nautilus-mime-actions.c        |    6 +++---
 .../nautilus-mime-application-chooser.c            |   10 ----------
 libnautilus-private/nautilus-open-with-dialog.c    |   12 +-----------
 libnautilus-private/nautilus-program-choosing.c    |    2 +-
 libnautilus-private/nautilus-undo-transaction.c    |    2 +-
 9 files changed, 16 insertions(+), 42 deletions(-)
---
diff --git a/libnautilus-private/nautilus-autorun.c b/libnautilus-private/nautilus-autorun.c
index bd82854..c0b99a6 100644
--- a/libnautilus-private/nautilus-autorun.c
+++ b/libnautilus-private/nautilus-autorun.c
@@ -259,7 +259,7 @@ dialog_response_cb (GtkDialog *dialog,
 }
 
 static void
-dialog_destroy_cb (GtkObject *object,
+dialog_destroy_cb (GtkWidget *object,
                    NautilusAutorunComboBoxData *data)
 {
 	handle_dialog_closure (data);
diff --git a/libnautilus-private/nautilus-clipboard.c b/libnautilus-private/nautilus-clipboard.c
index 947dbba..386cf71 100644
--- a/libnautilus-private/nautilus-clipboard.c
+++ b/libnautilus-private/nautilus-clipboard.c
@@ -411,7 +411,7 @@ owner_change_callback (GtkClipboard        *clipboard,
 }
 
 static void
-target_destroy_callback (GtkObject *object,
+target_destroy_callback (GtkWidget *object,
 			 gpointer callback_data)
 {
 	TargetCallbackData *target_data;
@@ -419,7 +419,7 @@ target_destroy_callback (GtkObject *object,
 	g_assert (callback_data != NULL);
 	target_data = callback_data;
 
-	if (clipboard_items_are_merged_in (GTK_WIDGET(object))) {
+	if (clipboard_items_are_merged_in (object)) {
 		merge_out_clipboard_menu_items (G_OBJECT (object), callback_data);
 	}
 }
diff --git a/libnautilus-private/nautilus-entry.c b/libnautilus-private/nautilus-entry.c
index 0c23139..80fe4c8 100644
--- a/libnautilus-private/nautilus-entry.c
+++ b/libnautilus-private/nautilus-entry.c
@@ -378,12 +378,10 @@ static void
 nautilus_entry_class_init (NautilusEntryClass *class)
 {
 	GtkWidgetClass *widget_class;
-	GtkObjectClass *object_class;
 	GObjectClass *gobject_class;
 
 	widget_class = GTK_WIDGET_CLASS (class);
 	gobject_class = G_OBJECT_CLASS (class);
-	object_class = GTK_OBJECT_CLASS (class);
 		
 	widget_class->button_press_event = nautilus_entry_button_press;
 	widget_class->button_release_event = nautilus_entry_button_release;
@@ -396,19 +394,17 @@ nautilus_entry_class_init (NautilusEntryClass *class)
 	/* Set up signals */
 	signals[USER_CHANGED] = g_signal_new
 		("user_changed",
-		 G_TYPE_FROM_CLASS (object_class),
+		 G_TYPE_FROM_CLASS (class),
 		 G_SIGNAL_RUN_LAST,
-		 G_STRUCT_OFFSET (NautilusEntryClass,
-				    user_changed),
+		 G_STRUCT_OFFSET (NautilusEntryClass, user_changed),
 		 NULL, NULL,
 		 g_cclosure_marshal_VOID__VOID,
 		 G_TYPE_NONE, 0);
 	signals[SELECTION_CHANGED] = g_signal_new
 		("selection_changed",
-		 G_TYPE_FROM_CLASS (object_class),
+		 G_TYPE_FROM_CLASS (class),
 		 G_SIGNAL_RUN_LAST,
-		 G_STRUCT_OFFSET (NautilusEntryClass,
-				    selection_changed),
+		 G_STRUCT_OFFSET (NautilusEntryClass, selection_changed),
 		 NULL, NULL,
 		 g_cclosure_marshal_VOID__VOID,
 		 G_TYPE_NONE, 0);
diff --git a/libnautilus-private/nautilus-icon-container.c b/libnautilus-private/nautilus-icon-container.c
index a83a9a1..019377c 100644
--- a/libnautilus-private/nautilus-icon-container.c
+++ b/libnautilus-private/nautilus-icon-container.c
@@ -3985,10 +3985,8 @@ select_previous_or_next_icon (NautilusIconContainer *container,
 }
 #endif
 
-/* GtkObject methods.  */
-
 static void
-destroy (GtkObject *object)
+destroy (GtkWidget *object)
 {
 	NautilusIconContainer *container;
 
@@ -4038,7 +4036,7 @@ destroy (GtkObject *object)
 	}
 
 
-	GTK_OBJECT_CLASS (nautilus_icon_container_parent_class)->destroy (object);
+	GTK_WIDGET_CLASS (nautilus_icon_container_parent_class)->destroy (object);
 }
 
 static void
@@ -5665,7 +5663,6 @@ nautilus_icon_container_class_init (NautilusIconContainerClass *class)
 
 	G_OBJECT_CLASS (class)->constructor = nautilus_icon_container_constructor;
 	G_OBJECT_CLASS (class)->finalize = finalize;
-	GTK_OBJECT_CLASS (class)->destroy = destroy;
 
 	/* Signals.  */
 
@@ -6016,6 +6013,7 @@ nautilus_icon_container_class_init (NautilusIconContainerClass *class)
 	/* GtkWidget class.  */
 
 	widget_class = GTK_WIDGET_CLASS (class);
+	widget_class->destroy = destroy;
 	widget_class->size_request = size_request;
 	widget_class->size_allocate = size_allocate;
 	widget_class->realize = realize;
diff --git a/libnautilus-private/nautilus-mime-actions.c b/libnautilus-private/nautilus-mime-actions.c
index 858dd49..31aa8f0 100644
--- a/libnautilus-private/nautilus-mime-actions.c
+++ b/libnautilus-private/nautilus-mime-actions.c
@@ -729,7 +729,7 @@ report_broken_symbolic_link (GtkWindow *parent_window, NautilusFile *file)
 	 */
 
 	response = gtk_dialog_run (dialog);
-	gtk_object_destroy (GTK_OBJECT (dialog));
+	gtk_widget_destroy (GTK_WIDGET (dialog));
 
 	if (response == GTK_RESPONSE_YES) {
 		file_as_list.data = file;
@@ -794,7 +794,7 @@ get_executable_text_file_action (GtkWindow *parent_window, NautilusFile *file)
 	g_free (detail);
 
 	response = gtk_dialog_run (dialog);
-	gtk_object_destroy (GTK_OBJECT (dialog));
+	gtk_widget_destroy (GTK_WIDGET (dialog));
 	
 	switch (response) {
 	case RESPONSE_RUN:
@@ -1124,7 +1124,7 @@ confirm_multiple_windows (GtkWindow *parent_window,
 	g_free (detail);
 
 	response = gtk_dialog_run (dialog);
-	gtk_object_destroy (GTK_OBJECT (dialog));
+	gtk_widget_destroy (GTK_WIDGET (dialog));
 
 	return response == GTK_RESPONSE_YES;
 }
diff --git a/libnautilus-private/nautilus-mime-application-chooser.c b/libnautilus-private/nautilus-mime-application-chooser.c
index 8ead2d7..08e6109 100644
--- a/libnautilus-private/nautilus-mime-application-chooser.c
+++ b/libnautilus-private/nautilus-mime-application-chooser.c
@@ -105,22 +105,12 @@ nautilus_mime_application_chooser_finalize (GObject *object)
 }
 
 static void
-nautilus_mime_application_chooser_destroy (GtkObject *object)
-{
-	GTK_OBJECT_CLASS (nautilus_mime_application_chooser_parent_class)->destroy (object);
-}
-
-static void
 nautilus_mime_application_chooser_class_init (NautilusMimeApplicationChooserClass *class)
 {
 	GObjectClass *gobject_class;
-	GtkObjectClass *object_class;
 
 	gobject_class = G_OBJECT_CLASS (class);
 	gobject_class->finalize = nautilus_mime_application_chooser_finalize;
-	
-	object_class = GTK_OBJECT_CLASS (class);
-	object_class->destroy = nautilus_mime_application_chooser_destroy;
 }
 
 static void
diff --git a/libnautilus-private/nautilus-open-with-dialog.c b/libnautilus-private/nautilus-open-with-dialog.c
index a96e5ca..fd6fce9 100644
--- a/libnautilus-private/nautilus-open-with-dialog.c
+++ b/libnautilus-private/nautilus-open-with-dialog.c
@@ -113,12 +113,6 @@ nautilus_open_with_dialog_finalize (GObject *object)
 	G_OBJECT_CLASS (nautilus_open_with_dialog_parent_class)->finalize (object);
 }
 
-static void
-nautilus_open_with_dialog_destroy (GtkObject *object)
-{
-	GTK_OBJECT_CLASS (nautilus_open_with_dialog_parent_class)->destroy (object);
-}
-
 /* An application is valid if:
  *
  * 1) The file exists
@@ -359,17 +353,13 @@ static void
 nautilus_open_with_dialog_class_init (NautilusOpenWithDialogClass *class)
 {
 	GObjectClass *gobject_class;
-	GtkObjectClass *object_class;
 
 	gobject_class = G_OBJECT_CLASS (class);
 	gobject_class->finalize = nautilus_open_with_dialog_finalize;
 
-	object_class = GTK_OBJECT_CLASS (class);
-	object_class->destroy = nautilus_open_with_dialog_destroy;
-
 	signals[APPLICATION_SELECTED] =
 		g_signal_new ("application_selected",
-			      G_TYPE_FROM_CLASS (object_class),
+			      G_TYPE_FROM_CLASS (class),
 			      G_SIGNAL_RUN_LAST,
 			      G_STRUCT_OFFSET (NautilusOpenWithDialogClass,
 					       application_selected),
diff --git a/libnautilus-private/nautilus-program-choosing.c b/libnautilus-private/nautilus-program-choosing.c
index 98a833c..8d8f749 100644
--- a/libnautilus-private/nautilus-program-choosing.c
+++ b/libnautilus-private/nautilus-program-choosing.c
@@ -94,7 +94,7 @@ application_cannot_open_location (GAppInfo *application,
 							 GTK_STOCK_CANCEL,
 							 parent_window);
 		response = gtk_dialog_run (message_dialog);
-		gtk_object_destroy (GTK_OBJECT (message_dialog));
+		gtk_widget_destroy (GTK_WIDGET (message_dialog));
 		
 		if (response == GTK_RESPONSE_YES) {
 			launch_parameters = launch_parameters_new (file, parent_window);
diff --git a/libnautilus-private/nautilus-undo-transaction.c b/libnautilus-private/nautilus-undo-transaction.c
index 0f398c6..d2cbf43 100644
--- a/libnautilus-private/nautilus-undo-transaction.c
+++ b/libnautilus-private/nautilus-undo-transaction.c
@@ -171,7 +171,7 @@ nautilus_undo_transaction_add_atom (NautilusUndoTransaction *transaction,
 	
 	g_return_if_fail (NAUTILUS_IS_UNDO_TRANSACTION (transaction));
 	g_return_if_fail (atom != NULL);
-	g_return_if_fail (GTK_IS_OBJECT (atom->target));
+	g_return_if_fail (G_IS_OBJECT (atom->target));
 
 	/* Add the atom to the atom list in the transaction. */
 	transaction->atom_list = g_list_append



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