[nautilus] all: don't use EEL_CALL_PARENT* macros



commit f0dc94fed68eb5a52d705391053bd642a88ab1d3
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Wed Oct 5 10:52:34 2011 -0400

    all: don't use EEL_CALL_PARENT* macros
    
    Replace them with regular calls to the parent class method pointer.

 libnautilus-private/nautilus-desktop-directory.c   |    3 +-
 .../nautilus-desktop-link-monitor.c                |   26 ++++-----------
 libnautilus-private/nautilus-directory.c           |   15 ++-------
 libnautilus-private/nautilus-merged-directory.c    |   13 ++++---
 libnautilus-private/nautilus-module.c              |    3 +-
 libnautilus-private/nautilus-query.c               |   17 +++------
 .../nautilus-search-engine-simple.c                |   21 +++---------
 libnautilus-private/nautilus-search-engine.c       |   34 +-------------------
 libnautilus-private/nautilus-tree-view-drag-dest.c |   16 +++------
 src/nautilus-empty-view.c                          |   27 +++------------
 src/nautilus-list-view.c                           |   17 +++------
 src/nautilus-location-entry.c                      |   25 +++++---------
 src/nautilus-view.c                                |   11 +++---
 13 files changed, 65 insertions(+), 163 deletions(-)
---
diff --git a/libnautilus-private/nautilus-desktop-directory.c b/libnautilus-private/nautilus-desktop-directory.c
index 7a3e9de..b2fd7c5 100644
--- a/libnautilus-private/nautilus-desktop-directory.c
+++ b/libnautilus-private/nautilus-desktop-directory.c
@@ -66,7 +66,6 @@ static void desktop_directory_changed_callback (gpointer data);
 
 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,
@@ -398,7 +397,7 @@ desktop_get_file_list (NautilusDirectory *directory)
 	
 	real_dir_file_list = nautilus_directory_get_file_list
 				(NAUTILUS_DESKTOP_DIRECTORY (directory)->details->real_directory);
-	desktop_dir_file_list = EEL_CALL_PARENT_WITH_RETURN_VALUE (NAUTILUS_DIRECTORY_CLASS, get_file_list, (directory));
+	desktop_dir_file_list = NAUTILUS_DIRECTORY_CLASS (nautilus_desktop_directory_parent_class)->get_file_list (directory);
 
 	return g_list_concat (real_dir_file_list, desktop_dir_file_list);
 }
diff --git a/libnautilus-private/nautilus-desktop-link-monitor.c b/libnautilus-private/nautilus-desktop-link-monitor.c
index 2f79ce9..4798cbb 100644
--- a/libnautilus-private/nautilus-desktop-link-monitor.c
+++ b/libnautilus-private/nautilus-desktop-link-monitor.c
@@ -57,14 +57,7 @@ struct NautilusDesktopLinkMonitorDetails {
 	GList *mount_links;
 };
 
-
-static void nautilus_desktop_link_monitor_init       (gpointer              object,
-						      gpointer              klass);
-static void nautilus_desktop_link_monitor_class_init (gpointer              klass);
-
-EEL_CLASS_BOILERPLATE (NautilusDesktopLinkMonitor,
-		       nautilus_desktop_link_monitor,
-		       G_TYPE_OBJECT)
+G_DEFINE_TYPE (NautilusDesktopLinkMonitor, nautilus_desktop_link_monitor, G_TYPE_OBJECT);
 
 static NautilusDesktopLinkMonitor *the_link_monitor = NULL;
 
@@ -395,18 +388,15 @@ create_link_and_add_preference (NautilusDesktopLink   **link_ref,
 }
 
 static void
-nautilus_desktop_link_monitor_init (gpointer object, gpointer klass)
+nautilus_desktop_link_monitor_init (NautilusDesktopLinkMonitor *monitor)
 {
-	NautilusDesktopLinkMonitor *monitor;
 	GList *l, *mounts;
 	GMount *mount;
 
-	monitor = NAUTILUS_DESKTOP_LINK_MONITOR (object);
+	monitor->details = G_TYPE_INSTANCE_GET_PRIVATE (monitor, NAUTILUS_TYPE_DESKTOP_LINK_MONITOR,
+							NautilusDesktopLinkMonitorDetails);
 
 	the_link_monitor = monitor;
-
-	monitor->details = g_new0 (NautilusDesktopLinkMonitorDetails, 1);
-
 	monitor->details->volume_monitor = g_volume_monitor_get ();
 
 	/* We keep around a ref to the desktop dir */
@@ -534,18 +524,16 @@ desktop_link_monitor_finalize (GObject *object)
 		g_source_remove (monitor->details->changed_id);
 	}
 
-	g_free (monitor->details);
-
-	EEL_CALL_PARENT (G_OBJECT_CLASS, finalize, (object));
+	G_OBJECT_CLASS (nautilus_desktop_link_monitor_parent_class)->finalize (object);
 }
 
 static void
-nautilus_desktop_link_monitor_class_init (gpointer klass)
+nautilus_desktop_link_monitor_class_init (NautilusDesktopLinkMonitorClass *klass)
 {
 	GObjectClass *object_class;
 
 	object_class = G_OBJECT_CLASS (klass);
-
 	object_class->finalize = desktop_link_monitor_finalize;
 
+	g_type_class_add_private (klass, sizeof (NautilusDesktopLinkMonitorDetails));
 }
diff --git a/libnautilus-private/nautilus-directory.c b/libnautilus-private/nautilus-directory.c
index af7f401..546b44b 100644
--- a/libnautilus-private/nautilus-directory.c
+++ b/libnautilus-private/nautilus-directory.c
@@ -53,9 +53,6 @@ static guint signals[LAST_SIGNAL];
 static GHashTable *directories;
 
 static void               nautilus_directory_finalize         (GObject                *object);
-static void               nautilus_directory_init             (gpointer                object,
-							       gpointer                klass);
-static void               nautilus_directory_class_init (NautilusDirectoryClass *klass);
 static NautilusDirectory *nautilus_directory_new              (GFile                  *location);
 static char *             real_get_name_for_self_as_new_file  (NautilusDirectory      *directory);
 static GList *            real_get_file_list                  (NautilusDirectory      *directory);
@@ -63,9 +60,7 @@ static gboolean		  real_is_editable                    (NautilusDirectory      *
 static void               set_directory_location              (NautilusDirectory      *directory,
 							       GFile                  *location);
 
-EEL_CLASS_BOILERPLATE (NautilusDirectory,
-		       nautilus_directory,
-		       G_TYPE_OBJECT)
+G_DEFINE_TYPE (NautilusDirectory, nautilus_directory, G_TYPE_OBJECT);
 
 static void
 nautilus_directory_class_init (NautilusDirectoryClass *klass)
@@ -117,12 +112,8 @@ nautilus_directory_class_init (NautilusDirectoryClass *klass)
 }
 
 static void
-nautilus_directory_init (gpointer object, gpointer klass)
+nautilus_directory_init (NautilusDirectory *directory)
 {
-	NautilusDirectory *directory;
-
-	directory = NAUTILUS_DIRECTORY(object);
-
 	directory->details = G_TYPE_INSTANCE_GET_PRIVATE ((directory), NAUTILUS_TYPE_DIRECTORY, NautilusDirectoryDetails);
 	directory->details->file_hash = g_hash_table_new (g_str_hash, g_str_equal);
 	directory->details->high_priority_queue = nautilus_file_queue_new ();
@@ -205,7 +196,7 @@ nautilus_directory_finalize (GObject *object)
 	g_assert (directory->details->dequeue_pending_idle_id == 0);
 	g_list_free_full (directory->details->pending_file_info, g_object_unref);
 
-	EEL_CALL_PARENT (G_OBJECT_CLASS, finalize, (object));
+	G_OBJECT_CLASS (nautilus_directory_parent_class)->finalize (object);
 }
 
 static void
diff --git a/libnautilus-private/nautilus-merged-directory.c b/libnautilus-private/nautilus-merged-directory.c
index 2099c81..56f79fd 100644
--- a/libnautilus-private/nautilus-merged-directory.c
+++ b/libnautilus-private/nautilus-merged-directory.c
@@ -69,7 +69,6 @@ static guint signals[LAST_SIGNAL];
 
 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)
@@ -414,8 +413,8 @@ merged_get_file_list (NautilusDirectory *directory)
 						 nautilus_directory_get_file_list (cur_dir));
 	}
 
-	merged_dir_file_list = EEL_CALL_PARENT_WITH_RETURN_VALUE
-				(NAUTILUS_DIRECTORY_CLASS, get_file_list, (directory));
+	merged_dir_file_list = NAUTILUS_DIRECTORY_CLASS 
+		(nautilus_merged_directory_parent_class)->get_file_list (directory);
 
 	return g_list_concat (dirs_file_list, merged_dir_file_list);
 }
@@ -640,15 +639,15 @@ merged_finalize (GObject *object)
 	g_hash_table_destroy (merged->details->monitors);
 	nautilus_directory_list_free (merged->details->directories);
 	g_list_free (merged->details->directories_not_done_loading);
-	g_free (merged->details);
 
-	G_OBJECT_CLASS (parent_class)->finalize (object);
+	G_OBJECT_CLASS (nautilus_merged_directory_parent_class)->finalize (object);
 }
 
 static void
 nautilus_merged_directory_init (NautilusMergedDirectory *merged)
 {
-	merged->details = g_new0 (NautilusMergedDirectoryDetails, 1);
+	merged->details = G_TYPE_INSTANCE_GET_PRIVATE (merged, NAUTILUS_TYPE_MERGED_DIRECTORY,
+						       NautilusMergedDirectoryDetails);
 	merged->details->callbacks = g_hash_table_new
 		(merged_callback_hash, merged_callback_equal);
 	merged->details->monitors = g_hash_table_new (NULL, NULL);
@@ -679,6 +678,8 @@ nautilus_merged_directory_class_init (NautilusMergedDirectoryClass *class)
 	class->add_real_directory = merged_add_real_directory;
 	class->remove_real_directory = merged_remove_real_directory;
 
+	g_type_class_add_private (class, sizeof (NautilusMergedDirectoryDetails));
+
 	signals[ADD_REAL_DIRECTORY] 
 		= g_signal_new ("add_real_directory",
 		                G_TYPE_FROM_CLASS (class),
diff --git a/libnautilus-private/nautilus-module.c b/libnautilus-private/nautilus-module.c
index cb76326..1e5ed0a 100644
--- a/libnautilus-private/nautilus-module.c
+++ b/libnautilus-private/nautilus-module.c
@@ -62,7 +62,6 @@ static GList *module_objects = NULL;
 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
 module_pulls_in_orbit (GModule *module)
@@ -145,7 +144,7 @@ nautilus_module_finalize (GObject *object)
 
 	g_free (module->path);
 	
-	EEL_CALL_PARENT (G_OBJECT_CLASS, finalize, (object));
+	G_OBJECT_CLASS (nautilus_module_parent_class)->finalize (object);
 }
 
 static void
diff --git a/libnautilus-private/nautilus-query.c b/libnautilus-private/nautilus-query.c
index 3a78561..9b6695d 100644
--- a/libnautilus-private/nautilus-query.c
+++ b/libnautilus-private/nautilus-query.c
@@ -39,11 +39,7 @@ struct NautilusQueryDetails {
 static void  nautilus_query_class_init       (NautilusQueryClass *class);
 static void  nautilus_query_init             (NautilusQuery      *query);
 
-G_DEFINE_TYPE (NautilusQuery,
-	       nautilus_query,
-	       G_TYPE_OBJECT);
-
-static GObjectClass *parent_class = NULL;
+G_DEFINE_TYPE (NautilusQuery, nautilus_query, G_TYPE_OBJECT);
 
 static void
 finalize (GObject *object)
@@ -51,11 +47,9 @@ finalize (GObject *object)
 	NautilusQuery *query;
 
 	query = NAUTILUS_QUERY (object);
-	
 	g_free (query->details->text);
-	g_free (query->details);
 
-	EEL_CALL_PARENT (G_OBJECT_CLASS, finalize, (object));
+	G_OBJECT_CLASS (nautilus_query_parent_class)->finalize (object);
 }
 
 static void
@@ -63,16 +57,17 @@ nautilus_query_class_init (NautilusQueryClass *class)
 {
 	GObjectClass *gobject_class;
 
-	parent_class = g_type_class_peek_parent (class);
-
 	gobject_class = G_OBJECT_CLASS (class);
 	gobject_class->finalize = finalize;
+
+	g_type_class_add_private (class, sizeof (NautilusQueryDetails));
 }
 
 static void
 nautilus_query_init (NautilusQuery *query)
 {
-	query->details = g_new0 (NautilusQueryDetails, 1);
+	query->details = G_TYPE_INSTANCE_GET_PRIVATE (query, NAUTILUS_TYPE_QUERY,
+						      NautilusQueryDetails);
 }
 
 NautilusQuery *
diff --git a/libnautilus-private/nautilus-search-engine-simple.c b/libnautilus-private/nautilus-search-engine-simple.c
index db4c790..f258f98 100644
--- a/libnautilus-private/nautilus-search-engine-simple.c
+++ b/libnautilus-private/nautilus-search-engine-simple.c
@@ -56,16 +56,9 @@ struct NautilusSearchEngineSimpleDetails {
 	gboolean query_finished;
 };
 
-
-static void  nautilus_search_engine_simple_class_init       (NautilusSearchEngineSimpleClass *class);
-static void  nautilus_search_engine_simple_init             (NautilusSearchEngineSimple      *engine);
-
-G_DEFINE_TYPE (NautilusSearchEngineSimple,
-	       nautilus_search_engine_simple,
+G_DEFINE_TYPE (NautilusSearchEngineSimple, nautilus_search_engine_simple,
 	       NAUTILUS_TYPE_SEARCH_ENGINE);
 
-static NautilusSearchEngineClass *parent_class = NULL;
-
 static void
 finalize (GObject *object)
 {
@@ -78,9 +71,7 @@ finalize (GObject *object)
 		simple->details->query = NULL;
 	}
 
-	g_free (simple->details);
-
-	EEL_CALL_PARENT (G_OBJECT_CLASS, finalize, (object));
+	G_OBJECT_CLASS (nautilus_search_engine_simple_parent_class)->finalize (object);
 }
 
 static SearchThreadData *
@@ -392,8 +383,6 @@ nautilus_search_engine_simple_class_init (NautilusSearchEngineSimpleClass *class
 	GObjectClass *gobject_class;
 	NautilusSearchEngineClass *engine_class;
 
-	parent_class = g_type_class_peek_parent (class);
-
 	gobject_class = G_OBJECT_CLASS (class);
 	gobject_class->finalize = finalize;
 
@@ -401,15 +390,17 @@ nautilus_search_engine_simple_class_init (NautilusSearchEngineSimpleClass *class
 	engine_class->set_query = nautilus_search_engine_simple_set_query;
 	engine_class->start = nautilus_search_engine_simple_start;
 	engine_class->stop = nautilus_search_engine_simple_stop;
+
+	g_type_class_add_private (class, sizeof (NautilusSearchEngineSimpleDetails));
 }
 
 static void
 nautilus_search_engine_simple_init (NautilusSearchEngineSimple *engine)
 {
-	engine->details = g_new0 (NautilusSearchEngineSimpleDetails, 1);
+	engine->details = G_TYPE_INSTANCE_GET_PRIVATE (engine, NAUTILUS_TYPE_SEARCH_ENGINE_SIMPLE,
+						       NautilusSearchEngineSimpleDetails);
 }
 
-
 NautilusSearchEngine *
 nautilus_search_engine_simple_new (void)
 {
diff --git a/libnautilus-private/nautilus-search-engine.c b/libnautilus-private/nautilus-search-engine.c
index a01191f..1ff24c8 100644
--- a/libnautilus-private/nautilus-search-engine.c
+++ b/libnautilus-private/nautilus-search-engine.c
@@ -29,12 +29,6 @@
 #include "nautilus-search-engine-tracker.h"
 #endif
 
-#include <eel/eel-gtk-macros.h>
-
-struct NautilusSearchEngineDetails {
-	int none;
-};
-
 enum {
 	HITS_ADDED,
 	HITS_SUBTRACTED,
@@ -45,37 +39,12 @@ enum {
 
 static guint signals[LAST_SIGNAL];
 
-static void  nautilus_search_engine_class_init       (NautilusSearchEngineClass *class);
-static void  nautilus_search_engine_init             (NautilusSearchEngine      *engine);
-
-G_DEFINE_ABSTRACT_TYPE (NautilusSearchEngine,
-			nautilus_search_engine,
+G_DEFINE_ABSTRACT_TYPE (NautilusSearchEngine, nautilus_search_engine,
 			G_TYPE_OBJECT);
 
-static GObjectClass *parent_class = NULL;
-
-static void
-finalize (GObject *object)
-{
-	NautilusSearchEngine *engine;
-
-	engine = NAUTILUS_SEARCH_ENGINE (object);
-	
-	g_free (engine->details);
-
-	EEL_CALL_PARENT (G_OBJECT_CLASS, finalize, (object));
-}
-
 static void
 nautilus_search_engine_class_init (NautilusSearchEngineClass *class)
 {
-	GObjectClass *gobject_class;
-
-	parent_class = g_type_class_peek_parent (class);
-
-	gobject_class = G_OBJECT_CLASS (class);
-	gobject_class->finalize = finalize;
-
 	signals[HITS_ADDED] =
 		g_signal_new ("hits-added",
 		              G_TYPE_FROM_CLASS (class),
@@ -120,7 +89,6 @@ nautilus_search_engine_class_init (NautilusSearchEngineClass *class)
 static void
 nautilus_search_engine_init (NautilusSearchEngine *engine)
 {
-	engine->details = g_new0 (NautilusSearchEngineDetails, 1);
 }
 
 NautilusSearchEngine *
diff --git a/libnautilus-private/nautilus-tree-view-drag-dest.c b/libnautilus-private/nautilus-tree-view-drag-dest.c
index b919b4f..e32e65a 100644
--- a/libnautilus-private/nautilus-tree-view-drag-dest.c
+++ b/libnautilus-private/nautilus-tree-view-drag-dest.c
@@ -78,14 +78,10 @@ enum {
 	LAST_SIGNAL
 };
 
-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];
 
 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 },
@@ -1007,7 +1003,7 @@ nautilus_tree_view_drag_dest_dispose (GObject *object)
 	remove_scroll_timeout (dest);
 	remove_expand_timeout (dest);
 
-	EEL_CALL_PARENT (G_OBJECT_CLASS, dispose, (object));
+	G_OBJECT_CLASS (nautilus_tree_view_drag_dest_parent_class)->dispose (object);
 }
 
 static void
@@ -1016,18 +1012,16 @@ nautilus_tree_view_drag_dest_finalize (GObject *object)
 	NautilusTreeViewDragDest *dest;
 	
 	dest = NAUTILUS_TREE_VIEW_DRAG_DEST (object);
-
 	free_drag_data (dest);
 
-	g_free (dest->details);
-
-	EEL_CALL_PARENT (G_OBJECT_CLASS, finalize, (object));
+	G_OBJECT_CLASS (nautilus_tree_view_drag_dest_parent_class)->finalize (object);
 }
 
 static void
 nautilus_tree_view_drag_dest_init (NautilusTreeViewDragDest *dest)
 {
-	dest->details = g_new0 (NautilusTreeViewDragDestDetails, 1);
+	dest->details = G_TYPE_INSTANCE_GET_PRIVATE (dest, NAUTILUS_TYPE_TREE_VIEW_DRAG_DEST,
+						     NautilusTreeViewDragDestDetails);
 }
 
 static void
@@ -1040,6 +1034,8 @@ nautilus_tree_view_drag_dest_class_init (NautilusTreeViewDragDestClass *class)
 	gobject_class->dispose = nautilus_tree_view_drag_dest_dispose;
 	gobject_class->finalize = nautilus_tree_view_drag_dest_finalize;
 
+	g_type_class_add_private (class, sizeof (NautilusTreeViewDragDestDetails));
+
 	signals[GET_ROOT_URI] = 
 		g_signal_new ("get_root_uri",
 			      G_TYPE_FROM_CLASS (class),
diff --git a/src/nautilus-empty-view.c b/src/nautilus-empty-view.c
index 54d3a8a..5820038 100644
--- a/src/nautilus-empty-view.c
+++ b/src/nautilus-empty-view.c
@@ -31,8 +31,6 @@
 
 #include <string.h>
 #include <libnautilus-private/nautilus-file-utilities.h>
-#include <eel/eel-glib-extensions.h>
-#include <eel/eel-gtk-macros.h>
 #include <eel/eel-vfs-extensions.h>
 
 struct NautilusEmptyViewDetails {
@@ -46,9 +44,6 @@ static void   nautilus_empty_view_scroll_to_file                  (NautilusView
 
 G_DEFINE_TYPE (NautilusEmptyView, nautilus_empty_view, NAUTILUS_TYPE_VIEW)
 
-/* for EEL_CALL_PARENT */
-#define parent_class nautilus_empty_view_parent_class
-
 static void
 nautilus_empty_view_add_file (NautilusView *view, NautilusFile *file, NautilusDirectory *directory)
 {
@@ -144,13 +139,13 @@ nautilus_empty_view_reveal_selection (NautilusView *view)
 static void
 nautilus_empty_view_merge_menus (NautilusView *view)
 {
-	EEL_CALL_PARENT (NAUTILUS_VIEW_CLASS, merge_menus, (view));
+	NAUTILUS_VIEW_CLASS (nautilus_empty_view_parent_class)->merge_menus (view);
 }
 
 static void
 nautilus_empty_view_update_menus (NautilusView *view)
 {
-	EEL_CALL_PARENT (NAUTILUS_VIEW_CLASS, update_menus, (view));
+	NAUTILUS_VIEW_CLASS (nautilus_empty_view_parent_class)->update_menus (view);
 }
 
 /* Reset sort criteria and zoom level to match defaults */
@@ -232,17 +227,6 @@ nautilus_empty_view_end_loading (NautilusView *view,
 {
 }
 
-static void
-nautilus_empty_view_finalize (GObject *object)
-{
-	NautilusEmptyView *empty_view;
-
-	empty_view = NAUTILUS_EMPTY_VIEW (object);
-	g_free (empty_view->details);
-
-	G_OBJECT_CLASS (parent_class)->finalize (object);
-}
-
 static char *
 nautilus_empty_view_get_first_visible_file (NautilusView *view)
 {
@@ -271,9 +255,9 @@ nautilus_empty_view_class_init (NautilusEmptyViewClass *class)
 {
 	NautilusViewClass *nautilus_view_class;
 
-	nautilus_view_class = NAUTILUS_VIEW_CLASS (class);
+	g_type_class_add_private (class, sizeof (NautilusEmptyViewDetails));
 
-	G_OBJECT_CLASS (class)->finalize = nautilus_empty_view_finalize;
+	nautilus_view_class = NAUTILUS_VIEW_CLASS (class);
 
 	nautilus_view_class->add_file = nautilus_empty_view_add_file;
 	nautilus_view_class->begin_loading = nautilus_empty_view_begin_loading;
@@ -311,7 +295,8 @@ nautilus_empty_view_class_init (NautilusEmptyViewClass *class)
 static void
 nautilus_empty_view_init (NautilusEmptyView *empty_view)
 {
-	empty_view->details = g_new0 (NautilusEmptyViewDetails, 1);
+	empty_view->details = G_TYPE_INSTANCE_GET_PRIVATE (empty_view, NAUTILUS_TYPE_EMPTY_VIEW,
+							   NautilusEmptyViewDetails);
 }
 
 static NautilusView *
diff --git a/src/nautilus-list-view.c b/src/nautilus-list-view.c
index a260f4b..7b6a487 100644
--- a/src/nautilus-list-view.c
+++ b/src/nautilus-list-view.c
@@ -158,10 +158,6 @@ static const char * default_trash_columns_order[] = {
 	"name", "size", "type", "trashed_on", "trash_orig_path", NULL
 };
 
-/* for EEL_CALL_PARENT */
-#define parent_class nautilus_list_view_parent_class
-
-
 static const gchar*
 get_default_sort_order (NautilusFile *file, gboolean *reversed)
 {
@@ -2190,8 +2186,7 @@ nautilus_list_view_get_backing_uri (NautilusView *view)
 		return uri;
 	}
 
-	return EEL_CALL_PARENT_WITH_RETURN_VALUE (NAUTILUS_VIEW_CLASS,
-						  get_backing_uri, (view));
+	return NAUTILUS_VIEW_CLASS (nautilus_list_view_parent_class)->get_backing_uri (view);
 }
 
 static void
@@ -2657,10 +2652,10 @@ nautilus_list_view_merge_menus (NautilusView *view)
 	GtkActionGroup *action_group;
 	const char *ui;
 
-	EEL_CALL_PARENT (NAUTILUS_VIEW_CLASS, merge_menus, (view));
-
 	list_view = NAUTILUS_LIST_VIEW (view);
 
+	NAUTILUS_VIEW_CLASS (nautilus_list_view_parent_class)->merge_menus (view);
+
 	ui_manager = nautilus_view_get_ui_manager (view);
 
 	action_group = gtk_action_group_new ("ListViewActions");
@@ -2709,7 +2704,7 @@ nautilus_list_view_update_menus (NautilusView *view)
 		return;
 	}
 
-	EEL_CALL_PARENT (NAUTILUS_VIEW_CLASS, update_menus, (view));
+	NAUTILUS_VIEW_CLASS (nautilus_list_view_parent_class)->update_menus (view);
 }
 
 /* Reset sort criteria and zoom level to match defaults */
@@ -3093,7 +3088,7 @@ nautilus_list_view_dispose (GObject *object)
 		list_view->details->clipboard_handler_id = 0;
 	}
 
-	G_OBJECT_CLASS (parent_class)->dispose (object);
+	G_OBJECT_CLASS (nautilus_list_view_parent_class)->dispose (object);
 }
 
 static void
@@ -3142,7 +3137,7 @@ nautilus_list_view_finalize (GObject *object)
 					      default_column_order_changed_callback,
 					      list_view);
 
-	G_OBJECT_CLASS (parent_class)->finalize (object);
+	G_OBJECT_CLASS (nautilus_list_view_parent_class)->finalize (object);
 }
 
 static char *
diff --git a/src/nautilus-location-entry.c b/src/nautilus-location-entry.c
index 9f0d6bf..8ec64a7 100644
--- a/src/nautilus-location-entry.c
+++ b/src/nautilus-location-entry.c
@@ -35,10 +35,6 @@
 
 #include "nautilus-window-private.h"
 #include "nautilus-window.h"
-#include <eel/eel-glib-extensions.h>
-#include <eel/eel-gtk-macros.h>
-#include <eel/eel-stock-dialogs.h>
-#include <eel/eel-string.h>
 #include <gtk/gtk.h>
 #include <gdk/gdkkeysyms.h>
 #include <glib/gi18n.h>
@@ -64,12 +60,7 @@ struct NautilusLocationEntryDetails {
 	NautilusLocationEntryAction secondary_action;
 };
 
-static void  nautilus_location_entry_class_init       (NautilusLocationEntryClass *class);
-static void  nautilus_location_entry_init             (NautilusLocationEntry      *entry);
-
-EEL_CLASS_BOILERPLATE (NautilusLocationEntry,
-		       nautilus_location_entry,
-		       NAUTILUS_TYPE_ENTRY)
+G_DEFINE_TYPE (NautilusLocationEntry, nautilus_location_entry, NAUTILUS_TYPE_ENTRY);
 
 /* routine that performs the tab expansion.  Extract the directory name and
    incomplete basename, then iterate through the directory trying to complete it.  If we
@@ -259,9 +250,8 @@ finalize (GObject *object)
 
 	g_object_unref (entry->details->completer);
 	g_free (entry->details->special_text);
-	g_free (entry->details);
 
-	EEL_CALL_PARENT (G_OBJECT_CLASS, finalize, (object));
+	G_OBJECT_CLASS (nautilus_location_entry_parent_class)->finalize (object);
 }
 
 static void
@@ -280,7 +270,7 @@ destroy (GtkWidget *object)
 	g_free (entry->details->current_directory);
 	entry->details->current_directory = NULL;
 	
-	EEL_CALL_PARENT (GTK_WIDGET_CLASS, destroy, (object));
+	GTK_WIDGET_CLASS (nautilus_location_entry_parent_class)->destroy (object);
 }
 
 static void
@@ -324,7 +314,7 @@ nautilus_location_entry_focus_in (GtkWidget     *widget,
 		entry->details->setting_special_text = FALSE;
 	}
 
-	return EEL_CALL_PARENT_WITH_RETURN_VALUE (GTK_WIDGET_CLASS, focus_in_event, (widget, event));
+	return GTK_WIDGET_CLASS (nautilus_location_entry_parent_class)->focus_in_event (widget, event);
 }
 
 static void
@@ -350,7 +340,7 @@ nautilus_location_entry_activate (GtkEntry *entry)
 		g_free (uri_scheme);
 	}
 
-	EEL_CALL_PARENT (GTK_ENTRY_CLASS, activate, (entry));
+	GTK_ENTRY_CLASS (nautilus_location_entry_parent_class)->activate (entry);
 }
 
 static void
@@ -369,6 +359,8 @@ nautilus_location_entry_class_init (NautilusLocationEntryClass *class)
 
 	entry_class = GTK_ENTRY_CLASS (class);
 	entry_class->activate = nautilus_location_entry_activate;
+
+	g_type_class_add_private (class, sizeof (NautilusLocationEntryDetails));
 }
 
 void
@@ -409,7 +401,8 @@ nautilus_location_entry_set_secondary_action (NautilusLocationEntry *entry,
 static void
 nautilus_location_entry_init (NautilusLocationEntry *entry)
 {
-	entry->details = g_new0 (NautilusLocationEntryDetails, 1);
+	entry->details = G_TYPE_INSTANCE_GET_PRIVATE (entry, NAUTILUS_TYPE_LOCATION_ENTRY,
+						      NautilusLocationEntryDetails);
 
 	entry->details->completer = g_filename_completer_new ();
 	g_filename_completer_set_dirs_only (entry->details->completer, TRUE);
diff --git a/src/nautilus-view.c b/src/nautilus-view.c
index 5e27a6a..127675e 100644
--- a/src/nautilus-view.c
+++ b/src/nautilus-view.c
@@ -2483,7 +2483,8 @@ nautilus_view_init (NautilusView *view)
 	NautilusDirectory *templates_directory;
 	char *templates_uri;
 
-	view->details = g_new0 (NautilusViewDetails, 1);
+	view->details = G_TYPE_INSTANCE_GET_PRIVATE (view, NAUTILUS_TYPE_VIEW,
+						     NautilusViewDetails);
 
 	/* Default to true; desktop-icon-view sets to false */
 	view->details->show_foreign_files = TRUE;
@@ -2649,7 +2650,7 @@ nautilus_view_destroy (GtkWidget *object)
 		view->details->directory_as_file = NULL;
 	}
 
-	EEL_CALL_PARENT (GTK_WIDGET_CLASS, destroy, (object));
+	GTK_WIDGET_CLASS (nautilus_view_parent_class)->destroy (object);
 }
 
 static void
@@ -2678,9 +2679,7 @@ nautilus_view_finalize (GObject *object)
 
 	g_hash_table_destroy (view->details->non_ready_files);
 
-	g_free (view->details);
-
-	EEL_CALL_PARENT (G_OBJECT_CLASS, finalize, (object));
+	G_OBJECT_CLASS (nautilus_view_parent_class)->finalize (object);
 }
 
 /**
@@ -9530,6 +9529,8 @@ nautilus_view_class_init (NautilusViewClass *klass)
 	widget_class->scroll_event = nautilus_view_scroll_event;
 	widget_class->parent_set = nautilus_view_parent_set;
 
+	g_type_class_add_private (klass, sizeof (NautilusViewDetails));
+
 	/* Get rid of the strange 3-pixel gap that GtkScrolledWindow
 	 * uses by default. It does us no good.
 	 */



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