[nautilus] Remove other deprecated GTK+ symbols



commit c308f7f3e96094c4d5077655960a0910dbaa605c
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Wed Apr 22 00:36:07 2009 +0200

    Remove other deprecated GTK+ symbols
    
    There were still some references to deprecated GTK+ symbols in some
    files, or in some comments. Let's drop them all.
---
 eel/eel-editable-label.c                           |    2 +-
 eel/eel-gdk-pixbuf-extensions.c                    |    2 +-
 .../nautilus-cell-renderer-text-ellipsized.h       |   16 +++++++++-------
 libnautilus-private/nautilus-directory.h           |    4 ++--
 libnautilus-private/nautilus-file.h                |    4 ++--
 libnautilus-private/nautilus-saved-search-file.h   |   14 ++++++++------
 .../nautilus-undo-signal-handlers.c                |    4 ++--
 src/file-manager/fm-empty-view.c                   |    2 +-
 src/file-manager/fm-empty-view.h                   |   16 +++++++++++-----
 test/test-eel-background.c                         |    7 -------
 10 files changed, 37 insertions(+), 34 deletions(-)

diff --git a/eel/eel-editable-label.c b/eel/eel-editable-label.c
index ffbb8ed..3409207 100644
--- a/eel/eel-editable-label.c
+++ b/eel/eel-editable-label.c
@@ -1102,7 +1102,7 @@ eel_editable_label_size_request (GtkWidget      *widget,
    * If word wrapping is on, then the height requisition can depend
    * on:
    *
-   *   - Any width set on the widget via gtk_widget_set_usize().
+   *   - Any width set on the widget via gtk_widget_set_size_request().
    *   - The padding of the widget (xpad, set by gtk_misc_set_padding)
    *
    * Instead of trying to detect changes to these quantities, if we
diff --git a/eel/eel-gdk-pixbuf-extensions.c b/eel/eel-gdk-pixbuf-extensions.c
index 9f7dd66..0a4a146 100644
--- a/eel/eel-gdk-pixbuf-extensions.c
+++ b/eel/eel-gdk-pixbuf-extensions.c
@@ -897,7 +897,7 @@ pixbuf_destroy_callback (guchar  *pixels,
  *
  * Create a pixbuf from a sub area of another pixbuf.  The resulting pixbuf
  * will share the pixel data of the source pixbuf.  Memory bookeeping is
- * all taken care for the caller.  All you need to do is gdk_pixbuf_unref()
+ * all taken care for the caller.  All you need to do is g_object_unref()
  * the resulting pixbuf to properly free resources.
  */
 GdkPixbuf *
diff --git a/libnautilus-private/nautilus-cell-renderer-text-ellipsized.h b/libnautilus-private/nautilus-cell-renderer-text-ellipsized.h
index ab3a0cf..4d17c92 100644
--- a/libnautilus-private/nautilus-cell-renderer-text-ellipsized.h
+++ b/libnautilus-private/nautilus-cell-renderer-text-ellipsized.h
@@ -29,17 +29,19 @@
 
 #include <gtk/gtk.h>
 
-#define NAUTILUS_TYPE_CELL_RENDERER_TEXT_ELLIPSIZED \
-	(nautilus_cell_renderer_text_ellipsized_get_type ())
+#define NAUTILUS_TYPE_CELL_RENDERER_TEXT_ELLIPSIZED nautilus_cell_renderer_text_ellipsized_get_type()
 #define NAUTILUS_CELL_RENDERER_TEXT_ELLIPSIZED(obj) \
-	(GTK_CHECK_CAST ((obj), NAUTILUS_TYPE_CELL_RENDERER_TEXT_ELLIPSIZED, NautilusCellRendererTextEllipsized))
+  (G_TYPE_CHECK_INSTANCE_CAST ((obj), NAUTILUS_TYPE_CELL_RENDERER_TEXT_ELLIPSIZED, NautilusCellRendererTextEllipsized))
 #define NAUTILUS_CELL_RENDERER_TEXT_ELLIPSIZED_CLASS(klass) \
-	(GTK_CHECK_CLASS_CAST ((klass), NAUTILUS_TYPE_CELL_RENDERER_TEXT_ELLIPSIZED, NautilusCellRendererTextEllipsizedClass))
+  (G_TYPE_CHECK_CLASS_CAST ((klass), NAUTILUS_TYPE_CELL_RENDERER_TEXT_ELLIPSIZED, NautilusCellRendererTextEllipsizedClass))
 #define NAUTILUS_IS_CELL_RENDERER_TEXT_ELLIPSIZED(obj) \
-	(GTK_CHECK_TYPE ((obj), NAUTILUS_TYPE_CELL_RENDERER_TEXT_ELLIPSIZED))
+  (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NAUTILUS_TYPE_CELL_RENDERER_TEXT_ELLIPSIZED))
 #define NAUTILUS_IS_CELL_RENDERER_TEXT_ELLIPSIZED_CLASS(klass) \
-	(GTK_CHECK_CLASS_TYPE ((klass), NAUTILUS_TYPE_CELL_RENDERER_TEXT_ELLIPSIZED))
-	
+  (G_TYPE_CHECK_CLASS_TYPE ((klass), NAUTILUS_TYPE_CELL_RENDERER_TEXT_ELLIPSIZED))
+#define NAUTILUS_CELL_RENDERER_TEXT_ELLIPSIZED_GET_CLASS(obj) \
+  (G_TYPE_INSTANCE_GET_CLASS ((obj), NAUTILUS_TYPE_CELL_RENDERER_TEXT_ELLIPSIZED, NautilusCellRendererTextEllipsizedClass))
+
+
 typedef struct _NautilusCellRendererTextEllipsized NautilusCellRendererTextEllipsized;
 typedef struct _NautilusCellRendererTextEllipsizedClass NautilusCellRendererTextEllipsizedClass;
 
diff --git a/libnautilus-private/nautilus-directory.h b/libnautilus-private/nautilus-directory.h
index 4860865..7df4838 100644
--- a/libnautilus-private/nautilus-directory.h
+++ b/libnautilus-private/nautilus-directory.h
@@ -156,8 +156,8 @@ NautilusDirectory *nautilus_directory_get                      (GFile
 NautilusDirectory *nautilus_directory_get_by_uri               (const char                *uri);
 NautilusDirectory *nautilus_directory_get_for_file             (NautilusFile              *file);
 
-/* Covers for gtk_object_ref and gtk_object_unref that provide two conveniences:
- * 1) You don't have to cast to GtkObject *, so using these is type safe.
+/* Covers for g_object_ref and g_object_unref that provide two conveniences:
+ * 1) Using these is type safe.
  * 2) You are allowed to call these with NULL,
  */
 NautilusDirectory *nautilus_directory_ref                      (NautilusDirectory         *directory);
diff --git a/libnautilus-private/nautilus-file.h b/libnautilus-private/nautilus-file.h
index c6385c4..a9e573d 100644
--- a/libnautilus-private/nautilus-file.h
+++ b/libnautilus-private/nautilus-file.h
@@ -120,8 +120,8 @@ NautilusFile *          nautilus_file_get_by_uri                        (const c
 NautilusFile *          nautilus_file_get_existing                      (GFile                          *location);
 NautilusFile *          nautilus_file_get_existing_by_uri               (const char                     *uri);
 
-/* Covers for gtk_object_ref and gtk_object_unref that provide two conveniences:
- * 1) You don't have to cast to GtkObject *, so using these is type safe.
+/* Covers for g_object_ref and g_object_unref that provide two conveniences:
+ * 1) Using these is type safe.
  * 2) You are allowed to call these with NULL,
  */
 NautilusFile *          nautilus_file_ref                               (NautilusFile                   *file);
diff --git a/libnautilus-private/nautilus-saved-search-file.h b/libnautilus-private/nautilus-saved-search-file.h
index 16cf359..db6a554 100644
--- a/libnautilus-private/nautilus-saved-search-file.h
+++ b/libnautilus-private/nautilus-saved-search-file.h
@@ -28,16 +28,18 @@
 
 #include <libnautilus-private/nautilus-vfs-file.h>
 
-#define NAUTILUS_TYPE_SAVED_SEARCH_FILE \
-	(nautilus_saved_search_file_get_type ())
+#define NAUTILUS_TYPE_SAVED_SEARCH_FILE nautilus_saved_search_file_get_type()
 #define NAUTILUS_SAVED_SEARCH_FILE(obj) \
-	(GTK_CHECK_CAST ((obj), NAUTILUS_TYPE_SAVED_SEARCH_FILE, NautilusSavedSearchFile))
+  (G_TYPE_CHECK_INSTANCE_CAST ((obj), NAUTILUS_TYPE_SAVED_SEARCH_FILE, NautilusSavedSearchFile))
 #define NAUTILUS_SAVED_SEARCH_FILE_CLASS(klass) \
-	(GTK_CHECK_CLASS_CAST ((klass), NAUTILUS_TYPE_SAVED_SEARCH_FILE, NautilusSavedSearchFileClass))
+  (G_TYPE_CHECK_CLASS_CAST ((klass), NAUTILUS_TYPE_SAVED_SEARCH_FILE, NautilusSavedSearchFileClass))
 #define NAUTILUS_IS_SAVED_SEARCH_FILE(obj) \
-	(GTK_CHECK_TYPE ((obj), NAUTILUS_TYPE_SAVED_SEARCH_FILE))
+  (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NAUTILUS_TYPE_SAVED_SEARCH_FILE))
 #define NAUTILUS_IS_SAVED_SEARCH_FILE_CLASS(klass) \
-	(GTK_CHECK_CLASS_TYPE ((klass), NAUTILUS_TYPE_SAVED_SEARCH_FILE))
+  (G_TYPE_CHECK_CLASS_TYPE ((klass), NAUTILUS_TYPE_SAVED_SEARCH_FILE))
+#define NAUTILUS_SAVED_SEARCH_FILE_GET_CLASS(obj) \
+  (G_TYPE_INSTANCE_GET_CLASS ((obj), NAUTILUS_TYPE_SAVED_SEARCH_FILE, NautilusSavedSearchFileClass))
+
 
 typedef struct NautilusSavedSearchFileDetails NautilusSavedSearchFileDetails;
 
diff --git a/libnautilus-private/nautilus-undo-signal-handlers.c b/libnautilus-private/nautilus-undo-signal-handlers.c
index c20d2b2..b2c52c0 100644
--- a/libnautilus-private/nautilus-undo-signal-handlers.c
+++ b/libnautilus-private/nautilus-undo-signal-handlers.c
@@ -323,8 +323,8 @@ nautilus_undo_editable_set_undo_key (GtkEditable *editable, gboolean value)
 		 * is not already connected. We could use object data
 		 * to prevent that little problem.
 		 */
-		gtk_signal_disconnect_by_func (editable, 
-					       G_CALLBACK (editable_key_press_event), NULL);
+		g_signal_disconnect_by_func (editable, 
+					     G_CALLBACK (editable_key_press_event), NULL);
 	}
 #endif
 }
diff --git a/src/file-manager/fm-empty-view.c b/src/file-manager/fm-empty-view.c
index afba0e0..487015a 100644
--- a/src/file-manager/fm-empty-view.c
+++ b/src/file-manager/fm-empty-view.c
@@ -356,7 +356,7 @@ fm_empty_view_create (NautilusWindowSlotInfo *slot)
 			     "window-slot", slot,
 			     NULL);
 	g_object_ref (view);
-	gtk_object_sink (GTK_OBJECT (view));
+
 	return NAUTILUS_VIEW (view);
 }
 
diff --git a/src/file-manager/fm-empty-view.h b/src/file-manager/fm-empty-view.h
index a66ef71..ffed3d4 100644
--- a/src/file-manager/fm-empty-view.h
+++ b/src/file-manager/fm-empty-view.h
@@ -27,11 +27,17 @@
 
 #include "fm-directory-view.h"
 
-#define FM_TYPE_EMPTY_VIEW		(fm_empty_view_get_type ())
-#define FM_EMPTY_VIEW(obj)		(GTK_CHECK_CAST ((obj), FM_TYPE_EMPTY_VIEW, FMEmptyView))
-#define FM_EMPTY_VIEW_CLASS(klass)	(GTK_CHECK_CLASS_CAST ((klass), FM_TYPE_EMPTY_VIEW, FMEmptyViewClass))
-#define FM_IS_EMPTY_VIEW(obj)		(GTK_CHECK_TYPE ((obj), FM_TYPE_EMPTY_VIEW))
-#define FM_IS_EMPTY_VIEW_CLASS(klass)	(GTK_CHECK_CLASS_TYPE ((klass), FM_TYPE_EMPTY_VIEW))
+#define FM_TYPE_EMPTY_VIEW fm_empty_view_get_type()
+#define FM_EMPTY_VIEW(obj) \
+  (G_TYPE_CHECK_INSTANCE_CAST ((obj), FM_TYPE_EMPTY_VIEW, FMEmptyView))
+#define FM_EMPTY_VIEW_CLASS(klass) \
+  (G_TYPE_CHECK_CLASS_CAST ((klass), FM_TYPE_EMPTY_VIEW, FMEmptyViewClass))
+#define FM_IS_EMPTY_VIEW(obj) \
+  (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FM_TYPE_EMPTY_VIEW))
+#define FM_IS_EMPTY_VIEW_CLASS(klass) \
+  (G_TYPE_CHECK_CLASS_TYPE ((klass), FM_TYPE_EMPTY_VIEW))
+#define FM_EMPTY_VIEW_GET_CLASS(obj) \
+  (G_TYPE_INSTANCE_GET_CLASS ((obj), FM_TYPE_EMPTY_VIEW, FMEmptyViewClass))
 
 #define FM_EMPTY_VIEW_ID "OAFIID:Nautilus_File_Manager_Empty_View"
 
diff --git a/test/test-eel-background.c b/test/test-eel-background.c
index 64a3d3d..cb2e897 100644
--- a/test/test-eel-background.c
+++ b/test/test-eel-background.c
@@ -11,17 +11,10 @@ main  (int argc, char *argv[])
 	GtkWidget *window;
 	EelBackground *background;
 	char *image_uri;
-#if 0
-	char *titles[] = { "test 1", "test 2", "test 3"};
-#endif
 
 	gtk_init (&argc, &argv);
 
 	window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
-#if 0
-	ctree = gtk_ctree_new_with_titles (3, 2, titles);
-	gtk_container_add (GTK_CONTAINER (window), ctree);
-#endif
 	g_signal_connect (window, "destroy",
 			    gtk_main_quit, NULL);
 



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