nautilus r14686 - in trunk: . libnautilus-private src src/file-manager



Author: alexl
Date: Mon Oct  6 09:59:45 2008
New Revision: 14686
URL: http://svn.gnome.org/viewvc/nautilus?rev=14686&view=rev

Log:
2008-10-06  Cosimo Cecchi  <cosimoc gnome org>

        * libnautilus-private/nautilus-bookmark.c:
        * libnautilus-private/nautilus-desktop-directory.c:
        * libnautilus-private/nautilus-icon-container.c:
        * libnautilus-private/nautilus-merged-directory.c:
        * libnautilus-private/nautilus-module.c:
        * libnautilus-private/nautilus-module.h:
        * libnautilus-private/nautilus-search-directory.c:
        * libnautilus-private/nautilus-signaller.c:
        * libnautilus-private/nautilus-tree-view-drag-dest.c:
        * src/file-manager/fm-icon-container.c:
        * src/nautilus-application.c:
        * src/nautilus-desktop-window.c:
        * src/nautilus-file-management-properties-main.c:
        * src/nautilus-zoom-control.c:
	Use G_DEFINE_TYPE instead of libgnome macros.



Modified:
   trunk/ChangeLog
   trunk/libnautilus-private/nautilus-bookmark.c
   trunk/libnautilus-private/nautilus-desktop-directory.c
   trunk/libnautilus-private/nautilus-icon-container.c
   trunk/libnautilus-private/nautilus-merged-directory.c
   trunk/libnautilus-private/nautilus-module.c
   trunk/libnautilus-private/nautilus-module.h
   trunk/libnautilus-private/nautilus-search-directory.c
   trunk/libnautilus-private/nautilus-signaller.c
   trunk/libnautilus-private/nautilus-tree-view-drag-dest.c
   trunk/src/file-manager/fm-icon-container.c
   trunk/src/nautilus-application.c
   trunk/src/nautilus-desktop-window.c
   trunk/src/nautilus-file-management-properties-main.c
   trunk/src/nautilus-zoom-control.c

Modified: trunk/libnautilus-private/nautilus-bookmark.c
==============================================================================
--- trunk/libnautilus-private/nautilus-bookmark.c	(original)
+++ trunk/libnautilus-private/nautilus-bookmark.c	Mon Oct  6 09:59:45 2008
@@ -32,8 +32,6 @@
 #include <eel/eel-string.h>
 #include <eel/eel-vfs-extensions.h>
 #include <gtk/gtk.h>
-#include <libgnome/gnome-macros.h>
-#include <libgnome/gnome-util.h>
 #include <gio/gio.h>
 #include <libnautilus-private/nautilus-file.h>
 
@@ -64,8 +62,7 @@
 static void	  nautilus_bookmark_connect_file	  (NautilusBookmark	 *file);
 static void	  nautilus_bookmark_disconnect_file	  (NautilusBookmark	 *file);
 
-GNOME_CLASS_BOILERPLATE (NautilusBookmark, nautilus_bookmark,
-			 GtkObject, GTK_TYPE_OBJECT)
+G_DEFINE_TYPE (NautilusBookmark, nautilus_bookmark, GTK_TYPE_OBJECT);
 
 /* GtkObject methods.  */
 
@@ -88,7 +85,7 @@
 	g_free (bookmark->details->scroll_file);
 	g_free (bookmark->details);
 
-	G_OBJECT_CLASS (parent_class)->finalize (object);
+	G_OBJECT_CLASS (nautilus_bookmark_parent_class)->finalize (object);
 }
 
 /* Initialization.  */
@@ -119,7 +116,7 @@
 }
 
 static void
-nautilus_bookmark_instance_init (NautilusBookmark *bookmark)
+nautilus_bookmark_init (NautilusBookmark *bookmark)
 {
 	bookmark->details = g_new0 (NautilusBookmarkDetails, 1);
 }

Modified: trunk/libnautilus-private/nautilus-desktop-directory.c
==============================================================================
--- trunk/libnautilus-private/nautilus-desktop-directory.c	(original)
+++ trunk/libnautilus-private/nautilus-desktop-directory.c	Mon Oct  6 09:59:45 2008
@@ -33,8 +33,8 @@
 #include "nautilus-file-utilities.h"
 #include "nautilus-global-preferences.h"
 #include <eel/eel-glib-extensions.h>
+#include <eel/eel-gtk-macros.h>
 #include <gtk/gtk.h>
-#include <libgnome/gnome-macros.h>
 
 struct NautilusDesktopDirectoryDetails {
 	NautilusDirectory *real_directory;
@@ -65,9 +65,9 @@
 
 static void desktop_directory_changed_callback (gpointer data);
 
-GNOME_CLASS_BOILERPLATE (NautilusDesktopDirectory, nautilus_desktop_directory,
-			 NautilusDirectory, NAUTILUS_TYPE_DIRECTORY)
-
+G_DEFINE_TYPE (NautilusDesktopDirectory, nautilus_desktop_directory,
+	       NAUTILUS_TYPE_DIRECTORY);
+#define parent_class nautilus_desktop_directory_parent_class
 
 static gboolean
 desktop_contains_file (NautilusDirectory *directory,
@@ -397,11 +397,12 @@
 static GList *
 desktop_get_file_list (NautilusDirectory *directory)
 {
-	GList *real_dir_file_list, *desktop_dir_file_list;
+	GList *real_dir_file_list, *desktop_dir_file_list = NULL;
+	
 	real_dir_file_list = nautilus_directory_get_file_list
 				(NAUTILUS_DESKTOP_DIRECTORY (directory)->details->real_directory);
-	desktop_dir_file_list = GNOME_CALL_PARENT_WITH_DEFAULT
-				 (NAUTILUS_DIRECTORY_CLASS, get_file_list, (directory), NULL);
+	desktop_dir_file_list = EEL_CALL_PARENT_WITH_RETURN_VALUE (NAUTILUS_DIRECTORY_CLASS, get_file_list, (directory));
+
 	return g_list_concat (real_dir_file_list, desktop_dir_file_list);
 }
 
@@ -430,7 +431,7 @@
 					 desktop_directory_changed_callback,
 					 desktop);
 	
-	G_OBJECT_CLASS (parent_class)->finalize (object);
+	G_OBJECT_CLASS (nautilus_desktop_directory_parent_class)->finalize (object);
 }
 
 static void
@@ -500,7 +501,7 @@
 }
 
 static void
-nautilus_desktop_directory_instance_init (NautilusDesktopDirectory *desktop)
+nautilus_desktop_directory_init (NautilusDesktopDirectory *desktop)
 {
 	desktop->details = g_new0 (NautilusDesktopDirectoryDetails, 1);
 

Modified: trunk/libnautilus-private/nautilus-icon-container.c
==============================================================================
--- trunk/libnautilus-private/nautilus-icon-container.c	(original)
+++ trunk/libnautilus-private/nautilus-icon-container.c	Mon Oct  6 09:59:45 2008
@@ -48,11 +48,9 @@
 #include <eel/eel-preferences.h>
 #include <eel/eel-enumeration.h>
 #include <eel/eel-canvas-rect-ellipse.h>
-#include <libgnomeui/gnome-icon-item.h>
 #include <gdk/gdkkeysyms.h>
 #include <gtk/gtk.h>
 #include <glib/gi18n.h>
-#include <libgnome/gnome-macros.h>
 #include <stdio.h>
 #include <string.h>
 
@@ -242,8 +240,7 @@
 	NULL
 };
 
-GNOME_CLASS_BOILERPLATE (NautilusIconContainer, nautilus_icon_container,
-			 EelCanvas, EEL_TYPE_CANVAS)
+G_DEFINE_TYPE (NautilusIconContainer, nautilus_icon_container, EEL_TYPE_CANVAS);
 
 /* The NautilusIconContainer signals.  */
 enum {
@@ -3999,7 +3996,7 @@
 	}
 
 
-	GTK_OBJECT_CLASS (parent_class)->destroy (object);
+	GTK_OBJECT_CLASS (nautilus_icon_container_parent_class)->destroy (object);
 }
 
 static void
@@ -4030,7 +4027,7 @@
 
 	g_free (details);
 
-	G_OBJECT_CLASS (parent_class)->finalize (object);
+	G_OBJECT_CLASS (nautilus_icon_container_parent_class)->finalize (object);
 }
 
 /* GtkWidget methods.  */
@@ -4039,7 +4036,7 @@
 size_request (GtkWidget *widget,
 	      GtkRequisition *requisition)
 {
-	GTK_WIDGET_CLASS (parent_class)->size_request (widget, requisition);
+	GTK_WIDGET_CLASS (nautilus_icon_container_parent_class)->size_request (widget, requisition);
 	requisition->width = 1;
 	requisition->height = 1;
 }
@@ -4063,7 +4060,7 @@
 		need_layout_redone = TRUE;
 	}
 
-	GTK_WIDGET_CLASS (parent_class)->size_allocate (widget, allocation);
+	GTK_WIDGET_CLASS (nautilus_icon_container_parent_class)->size_allocate (widget, allocation);
 
 	container->details->has_been_allocated = TRUE;
 
@@ -4079,7 +4076,7 @@
 	GdkBitmap *stipple;
 	GtkAdjustment *vadj, *hadj;
 
-	GTK_WIDGET_CLASS (parent_class)->realize (widget);
+	GTK_WIDGET_CLASS (nautilus_icon_container_parent_class)->realize (widget);
 
 	/* Set up DnD.  */
 	nautilus_icon_dnd_init (NAUTILUS_ICON_CONTAINER (widget), NULL);
@@ -4133,7 +4130,7 @@
 		container->details->typeselect_flush_timeout = 0;
 	}
 
-	GTK_WIDGET_CLASS (parent_class)->unrealize (widget);
+	GTK_WIDGET_CLASS (nautilus_icon_container_parent_class)->unrealize (widget);
 }
 
 static void
@@ -4158,7 +4155,7 @@
 		nautilus_icon_container_request_update_all (container);
 	}
 	
-	GTK_WIDGET_CLASS (parent_class)->style_set (widget, previous_style);
+	GTK_WIDGET_CLASS (nautilus_icon_container_parent_class)->style_set (widget, previous_style);
 }
 
 static gboolean
@@ -4183,7 +4180,7 @@
 	}
 
 	/* Invoke the canvas event handler and see if an item picks up the event. */
-	clicked_on_icon = GTK_WIDGET_CLASS (parent_class)->button_press_event (widget, event);
+	clicked_on_icon = GTK_WIDGET_CLASS (nautilus_icon_container_parent_class)->button_press_event (widget, event);
 	
 	/* Move focus to icon container, unless we're still renaming (to avoid exiting
 	 * renaming mode)
@@ -4624,7 +4621,7 @@
 		return TRUE;
 	}
 
-	return GTK_WIDGET_CLASS (parent_class)->button_release_event (widget, event);
+	return GTK_WIDGET_CLASS (nautilus_icon_container_parent_class)->button_release_event (widget, event);
 }
 
 static int
@@ -4694,7 +4691,7 @@
 		}
 	}
 
-	return GTK_WIDGET_CLASS (parent_class)->motion_notify_event (widget, event);
+	return GTK_WIDGET_CLASS (nautilus_icon_container_parent_class)->motion_notify_event (widget, event);
 }
 
 static void
@@ -5366,7 +5363,7 @@
 	}
 
 	if (!handled) {
-		handled = GTK_WIDGET_CLASS (parent_class)->key_press_event (widget, event);
+		handled = GTK_WIDGET_CLASS (nautilus_icon_container_parent_class)->key_press_event (widget, event);
 	}
 	
 	/* We pass the event to the search_entry.  If its text changes, then we
@@ -5471,7 +5468,7 @@
 		   event->area.x, event->area.y,
 		   event->area.width, event->area.height); */
 	
-	return GTK_WIDGET_CLASS (parent_class)->expose_event (widget, event);
+	return GTK_WIDGET_CLASS (nautilus_icon_container_parent_class)->expose_event (widget, event);
 }
 
 static AtkObject *
@@ -5527,9 +5524,10 @@
 	NautilusIconContainer *container;
 	GObject *object;
 
-	object = G_OBJECT_CLASS (parent_class)->constructor (type,
-							     n_construct_params,
-							     construct_params);
+	object = G_OBJECT_CLASS (nautilus_icon_container_parent_class)->constructor
+		(type,
+		 n_construct_params,
+		 construct_params);
 
 	container = NAUTILUS_ICON_CONTAINER (object);
 	if (nautilus_icon_container_get_is_desktop (container)) {
@@ -6156,7 +6154,7 @@
 }
 
 static void
-nautilus_icon_container_instance_init (NautilusIconContainer *container)
+nautilus_icon_container_init (NautilusIconContainer *container)
 {
 	NautilusIconContainerDetails *details;
 	EelBackground *background;

Modified: trunk/libnautilus-private/nautilus-merged-directory.c
==============================================================================
--- trunk/libnautilus-private/nautilus-merged-directory.c	(original)
+++ trunk/libnautilus-private/nautilus-merged-directory.c	Mon Oct  6 09:59:45 2008
@@ -30,8 +30,8 @@
 #include "nautilus-directory-notify.h"
 #include "nautilus-file.h"
 #include <eel/eel-glib-extensions.h>
+#include <eel/eel-gtk-macros.h>
 #include <gtk/gtk.h>
-#include <libgnome/gnome-macros.h>
 
 struct NautilusMergedDirectoryDetails {
 	GList *directories;
@@ -68,8 +68,9 @@
 
 static guint signals[LAST_SIGNAL];
 
-GNOME_CLASS_BOILERPLATE (NautilusMergedDirectory, nautilus_merged_directory,
-			 NautilusDirectory, NAUTILUS_TYPE_DIRECTORY)
+G_DEFINE_TYPE (NautilusMergedDirectory, nautilus_merged_directory,
+	       NAUTILUS_TYPE_DIRECTORY);
+#define parent_class nautilus_merged_directory_parent_class
 
 static guint
 merged_callback_hash (gconstpointer merged_callback_as_pointer)
@@ -401,7 +402,7 @@
 static GList *
 merged_get_file_list (NautilusDirectory *directory)
 {
-	GList *dirs_file_list, *merged_dir_file_list;
+	GList *dirs_file_list, *merged_dir_file_list = NULL;
 	GList *dir_list;
 	GList *cur_node;
 
@@ -416,8 +417,8 @@
 						 nautilus_directory_get_file_list (cur_dir));
 	}
 
-	merged_dir_file_list = GNOME_CALL_PARENT_WITH_DEFAULT
-				(NAUTILUS_DIRECTORY_CLASS, get_file_list, (directory), NULL);
+	merged_dir_file_list = EEL_CALL_PARENT_WITH_RETURN_VALUE
+				(NAUTILUS_DIRECTORY_CLASS, get_file_list, (directory));
 
 	return g_list_concat (dirs_file_list, merged_dir_file_list);
 }
@@ -649,7 +650,7 @@
 }
 
 static void
-nautilus_merged_directory_instance_init (NautilusMergedDirectory *merged)
+nautilus_merged_directory_init (NautilusMergedDirectory *merged)
 {
 	merged->details = g_new0 (NautilusMergedDirectoryDetails, 1);
 	merged->details->callbacks = g_hash_table_new

Modified: trunk/libnautilus-private/nautilus-module.c
==============================================================================
--- trunk/libnautilus-private/nautilus-module.c	(original)
+++ trunk/libnautilus-private/nautilus-module.c	Mon Oct  6 09:59:45 2008
@@ -27,7 +27,6 @@
 #include <eel/eel-gtk-macros.h>
 #include <eel/eel-debug.h>
 #include <gmodule.h>
-#include <libgnome/gnome-macros.h>
 
 #define NAUTILUS_TYPE_MODULE    	(nautilus_module_get_type ())
 #define NAUTILUS_MODULE(obj)		(G_TYPE_CHECK_INSTANCE_CAST ((obj), NAUTILUS_TYPE_MODULE, NautilusModule))
@@ -57,14 +56,12 @@
 	GTypeModuleClass parent;	
 };
 
-static GType nautilus_module_get_type (void);
-
 static GList *module_objects = NULL;
 
-GNOME_CLASS_BOILERPLATE (NautilusModule,
-			 nautilus_module,
-			 GTypeModule,
-			 G_TYPE_TYPE_MODULE);
+static GType nautilus_module_get_type (void);
+
+G_DEFINE_TYPE (NautilusModule, nautilus_module, G_TYPE_TYPE_MODULE);
+#define parent_class nautilus_module_parent_class
 
 static gboolean
 nautilus_module_load (GTypeModule *gmodule)
@@ -130,7 +127,7 @@
 }
 
 static void
-nautilus_module_instance_init (NautilusModule *module)
+nautilus_module_init (NautilusModule *module)
 {
 }
 
@@ -223,7 +220,7 @@
 }
 
 void
-nautilus_module_init (void)
+nautilus_module_setup (void)
 {
 	static gboolean initialized = FALSE;
 

Modified: trunk/libnautilus-private/nautilus-module.h
==============================================================================
--- trunk/libnautilus-private/nautilus-module.h	(original)
+++ trunk/libnautilus-private/nautilus-module.h	Mon Oct  6 09:59:45 2008
@@ -28,7 +28,7 @@
 
 G_BEGIN_DECLS
 
-void   nautilus_module_init                    (void);
+void   nautilus_module_setup                   (void);
 GList *nautilus_module_get_extensions_for_type (GType  type);
 void   nautilus_module_extension_list_free     (GList *list);
 

Modified: trunk/libnautilus-private/nautilus-search-directory.c
==============================================================================
--- trunk/libnautilus-private/nautilus-search-directory.c	(original)
+++ trunk/libnautilus-private/nautilus-search-directory.c	Mon Oct  6 09:59:45 2008
@@ -32,7 +32,6 @@
 #include <eel/eel-glib-extensions.h>
 #include <gtk/gtk.h>
 #include <gio/gio.h>
-#include <libgnome/gnome-macros.h>
 #include <string.h>
 #include <sys/time.h>
 
@@ -74,8 +73,8 @@
 	GHashTable *non_ready_hash;
 } SearchCallback;
 
-GNOME_CLASS_BOILERPLATE (NautilusSearchDirectory, nautilus_search_directory,
-			 NautilusDirectory, NAUTILUS_TYPE_DIRECTORY)
+G_DEFINE_TYPE (NautilusSearchDirectory, nautilus_search_directory,
+	       NAUTILUS_TYPE_DIRECTORY);
 
 static void search_engine_hits_added (NautilusSearchEngine *engine, GList *hits, NautilusSearchDirectory *search);
 static void search_engine_hits_subtracted (NautilusSearchEngine *engine, GList *hits, NautilusSearchDirectory *search);
@@ -702,7 +701,7 @@
 		search->details->engine = NULL;
 	}
 	
-	G_OBJECT_CLASS (parent_class)->dispose (object);
+	G_OBJECT_CLASS (nautilus_search_directory_parent_class)->dispose (object);
 }
 
 static void
@@ -716,11 +715,11 @@
 	
 	g_free (search->details);
 
-	G_OBJECT_CLASS (parent_class)->finalize (object);
+	G_OBJECT_CLASS (nautilus_search_directory_parent_class)->finalize (object);
 }
 
 static void
-nautilus_search_directory_instance_init (NautilusSearchDirectory *search)
+nautilus_search_directory_init (NautilusSearchDirectory *search)
 {
 	search->details = g_new0 (NautilusSearchDirectoryDetails, 1);
 }

Modified: trunk/libnautilus-private/nautilus-signaller.c
==============================================================================
--- trunk/libnautilus-private/nautilus-signaller.c	(original)
+++ trunk/libnautilus-private/nautilus-signaller.c	Mon Oct  6 09:59:45 2008
@@ -30,7 +30,6 @@
 #include "nautilus-signaller.h"
 
 #include <eel/eel-debug.h>
-#include <libgnome/gnome-macros.h>
 
 typedef GObject NautilusSignaller;
 typedef GObjectClass NautilusSignallerClass;
@@ -48,8 +47,7 @@
 
 static GType nautilus_signaller_get_type (void);
 
-GNOME_CLASS_BOILERPLATE (NautilusSignaller, nautilus_signaller,
-			 GObject, G_TYPE_OBJECT)
+G_DEFINE_TYPE (NautilusSignaller, nautilus_signaller, G_TYPE_OBJECT);
 
 GObject *
 nautilus_signaller_get_current (void)
@@ -65,7 +63,7 @@
 }
 
 static void
-nautilus_signaller_instance_init (NautilusSignaller *signaller)
+nautilus_signaller_init (NautilusSignaller *signaller)
 {
 }
 

Modified: trunk/libnautilus-private/nautilus-tree-view-drag-dest.c
==============================================================================
--- trunk/libnautilus-private/nautilus-tree-view-drag-dest.c	(original)
+++ trunk/libnautilus-private/nautilus-tree-view-drag-dest.c	Mon Oct  6 09:59:45 2008
@@ -32,7 +32,6 @@
 
 #include <eel/eel-gtk-macros.h>
 #include <gtk/gtk.h>
-#include <libgnome/gnome-macros.h>
 #include "nautilus-file-dnd.h"
 #include "nautilus-icon-dnd.h"
 #include "nautilus-link.h"
@@ -67,14 +66,14 @@
 	LAST_SIGNAL
 };
 
-static void nautilus_tree_view_drag_dest_instance_init (NautilusTreeViewDragDest      *dest);
+static void nautilus_tree_view_drag_dest_init (NautilusTreeViewDragDest      *dest);
 static void nautilus_tree_view_drag_dest_class_init    (NautilusTreeViewDragDestClass *class);
 
 static guint signals[LAST_SIGNAL];
 
-GNOME_CLASS_BOILERPLATE (NautilusTreeViewDragDest,
-			 nautilus_tree_view_drag_dest,
-			 GObject, G_TYPE_OBJECT);
+G_DEFINE_TYPE (NautilusTreeViewDragDest, nautilus_tree_view_drag_dest,
+	       G_TYPE_OBJECT);
+#define parent_class nautilus_tree_view_drag_dest_parent_class
 
 static const GtkTargetEntry drag_types [] = {
 	{ NAUTILUS_ICON_DND_GNOME_ICON_LIST_TYPE, 0, NAUTILUS_ICON_DND_GNOME_ICON_LIST },
@@ -852,7 +851,7 @@
 }
 
 static void
-nautilus_tree_view_drag_dest_instance_init (NautilusTreeViewDragDest *dest)
+nautilus_tree_view_drag_dest_init (NautilusTreeViewDragDest *dest)
 {
 	dest->details = g_new0 (NautilusTreeViewDragDestDetails, 1);
 }

Modified: trunk/src/file-manager/fm-icon-container.c
==============================================================================
--- trunk/src/file-manager/fm-icon-container.c	(original)
+++ trunk/src/file-manager/fm-icon-container.c	Mon Oct  6 09:59:45 2008
@@ -24,7 +24,6 @@
 #include <config.h>
 
 #include <string.h>
-#include <libgnome/gnome-macros.h>
 #include <glib/gi18n.h>
 #include <gio/gio.h>
 #include <libnautilus-private/nautilus-global-preferences.h>
@@ -37,9 +36,7 @@
 #define ICON_TEXT_ATTRIBUTES_NUM_ITEMS		3
 #define ICON_TEXT_ATTRIBUTES_DEFAULT_TOKENS	"size,date_modified,type"
 
-GNOME_CLASS_BOILERPLATE (FMIconContainer, fm_icon_container,
-			 NautilusIconContainer,
-			 nautilus_icon_container_get_type ())
+G_DEFINE_TYPE (FMIconContainer, fm_icon_container, nautilus_icon_container_get_type ());
 
 static GQuark attribute_none_q;
 
@@ -517,7 +514,7 @@
 
 	icon_container->view = NULL;
 
-	GNOME_CALL_PARENT (G_OBJECT_CLASS, dispose, (object));
+	G_OBJECT_CLASS (fm_icon_container_parent_class)->dispose (object);
 }
 
 static void
@@ -545,7 +542,7 @@
 }
 
 static void
-fm_icon_container_instance_init (FMIconContainer *icon_container)
+fm_icon_container_init (FMIconContainer *icon_container)
 {
 }
 

Modified: trunk/src/nautilus-application.c
==============================================================================
--- trunk/src/nautilus-application.c	(original)
+++ trunk/src/nautilus-application.c	Mon Oct  6 09:59:45 2008
@@ -460,7 +460,7 @@
 	GList *drives;
 
 	/* initialize nautilus modules */
-	nautilus_module_init ();
+	nautilus_module_setup ();
 
 	/* attach menu-provider module callback */
 	menu_provider_init_callback ();

Modified: trunk/src/nautilus-desktop-window.c
==============================================================================
--- trunk/src/nautilus-desktop-window.c	(original)
+++ trunk/src/nautilus-desktop-window.c	Mon Oct  6 09:59:45 2008
@@ -32,7 +32,6 @@
 #include <gtk/gtk.h>
 #include <eel/eel-gtk-macros.h>
 #include <eel/eel-vfs-extensions.h>
-#include <libgnome/gnome-macros.h>
 #include <libnautilus-private/nautilus-file-utilities.h>
 #include <libnautilus-private/nautilus-icon-names.h>
 #include <gio/gio.h>
@@ -44,11 +43,11 @@
 
 static void set_wmspec_desktop_hint (GdkWindow *window);
 
-GNOME_CLASS_BOILERPLATE (NautilusDesktopWindow, nautilus_desktop_window,
-			 NautilusSpatialWindow, NAUTILUS_TYPE_SPATIAL_WINDOW)
+G_DEFINE_TYPE (NautilusDesktopWindow, nautilus_desktop_window, 
+	       NAUTILUS_TYPE_SPATIAL_WINDOW);
 
 static void
-nautilus_desktop_window_instance_init (NautilusDesktopWindow *window)
+nautilus_desktop_window_init (NautilusDesktopWindow *window)
 {
 	GtkAction *action;
 	
@@ -149,14 +148,14 @@
 
 	g_free (window->details);
 
-	G_OBJECT_CLASS (parent_class)->finalize (object);
+	G_OBJECT_CLASS (nautilus_desktop_window_parent_class)->finalize (object);
 }
 
 static void
 map (GtkWidget *widget)
 {
 	/* Chain up to realize our children */
-	GTK_WIDGET_CLASS (parent_class)->map (widget);
+	GTK_WIDGET_CLASS (nautilus_desktop_window_parent_class)->map (widget);
 	gdk_window_lower (widget->window);
 }
 
@@ -179,7 +178,7 @@
 					      G_CALLBACK (nautilus_desktop_window_screen_size_changed),
 					      window);
 		
-	GTK_WIDGET_CLASS (parent_class)->unrealize (widget);
+	GTK_WIDGET_CLASS (nautilus_desktop_window_parent_class)->unrealize (widget);
 }
 
 static void
@@ -227,7 +226,7 @@
 			      | GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK);
 			      
 	/* Do the work of realizing. */
-	GTK_WIDGET_CLASS (parent_class)->realize (widget);
+	GTK_WIDGET_CLASS (nautilus_desktop_window_parent_class)->realize (widget);
 
 	/* This is the new way to set up the desktop window */
 	set_wmspec_desktop_hint (widget->window);

Modified: trunk/src/nautilus-file-management-properties-main.c
==============================================================================
--- trunk/src/nautilus-file-management-properties-main.c	(original)
+++ trunk/src/nautilus-file-management-properties-main.c	Mon Oct  6 09:59:45 2008
@@ -53,7 +53,7 @@
 
 	eel_preferences_init ("/apps/nautilus");
 
-	nautilus_module_init ();
+	nautilus_module_setup ();
 
 	nautilus_file_management_properties_dialog_show (G_CALLBACK (nautilus_file_management_properties_main_close_callback), NULL);
 

Modified: trunk/src/nautilus-zoom-control.c
==============================================================================
--- trunk/src/nautilus-zoom-control.c	(original)
+++ trunk/src/nautilus-zoom-control.c	Mon Oct  6 09:59:45 2008
@@ -38,7 +38,6 @@
 #include <eel/eel-gtk-extensions.h>
 #include <gtk/gtk.h>
 #include <gdk/gdkkeysyms.h>
-#include <libgnome/gnome-macros.h>
 #include <libnautilus-private/nautilus-file-utilities.h>
 #include <libnautilus-private/nautilus-global-preferences.h>
 #include <libnautilus-private/nautilus-marshal.h>
@@ -103,15 +102,14 @@
 
 #define NUM_ACTIONS ((int)G_N_ELEMENTS (nautilus_zoom_control_accessible_action_names))
 
-GNOME_CLASS_BOILERPLATE (NautilusZoomControl, nautilus_zoom_control,
-			 GtkHBox, GTK_TYPE_HBOX)
+G_DEFINE_TYPE (NautilusZoomControl, nautilus_zoom_control, GTK_TYPE_HBOX);
 
 static void
 nautilus_zoom_control_finalize (GObject *object)
 {
 	g_list_free (NAUTILUS_ZOOM_CONTROL (object)->details->preferred_zoom_levels);
 
-	G_OBJECT_CLASS (parent_class)->finalize (object);
+	G_OBJECT_CLASS (nautilus_zoom_control_parent_class)->finalize (object);
 }
 
 static void 
@@ -268,7 +266,7 @@
 }		  
 
 static void
-nautilus_zoom_control_instance_init (NautilusZoomControl *zoom_control)
+nautilus_zoom_control_init (NautilusZoomControl *zoom_control)
 {
 	GtkWidget *image;
 	int i;



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