[evolution-patches] Remove deprecated libgnome calls from libedataserver



Hi,

The attached patch removed the use of the deprecated
GNOME_CLASS_BOILERPLATE macro from libgnome and replaces it with
G_DEFINE_TYPE from GLib.  This results in e_data_server_module_init
being renamed to _initialize as the _init suffix is used by
G_DEFINE_TYPE for the instance initializer, but fixing this is a
one-line change to server.c

Please CC: me on replies as I am not subscribed to -patches.

Thanks,
Ross
-- 
Ross Burton                                 mail: ross burtonini com
                                          jabber: ross burtonini com
                                     www: http://www.burtonini.com./
 PGP Fingerprint: 1A21 F5B0 D8D0 CFE3 81D4 E25A 2D09 E447 D0B4 33DF

Index: libedataserver/e-data-server-module.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/libedataserver/e-data-server-module.c,v
retrieving revision 1.3
diff -u -r1.3 e-data-server-module.c
--- libedataserver/e-data-server-module.c	10 Feb 2005 16:37:21 -0000	1.3
+++ libedataserver/e-data-server-module.c	18 Apr 2005 11:02:35 -0000
@@ -27,7 +27,6 @@
 #include "e-data-server-module.h"
 
 #include <gmodule.h>
-#include <libgnome/gnome-macros.h>
 
 #define E_DATA_SERVER_TYPE_MODULE    	        (e_data_server_module_get_type ())
 #define E_DATA_SERVER_MODULE(obj)		(G_TYPE_CHECK_INSTANCE_CAST ((obj), E_DATA_SERVER_TYPE_MODULE, EDataServerModule))
@@ -61,10 +60,7 @@
 
 static GList *module_objects = NULL;
 
-GNOME_CLASS_BOILERPLATE (EDataServerModule,
-			 e_data_server_module,
-			 GTypeModule,
-			 G_TYPE_TYPE_MODULE);
+G_DEFINE_TYPE (EDataServerModule, e_data_server_module, G_TYPE_TYPE_MODULE)
 
 static gboolean
 e_data_server_module_load (GTypeModule *gmodule)
@@ -126,12 +122,12 @@
 
 	g_free (module->path);
 
-        if (G_OBJECT_CLASS (parent_class)->finalize)
-		(*G_OBJECT_CLASS (parent_class)->finalize) (object);
+        if (G_OBJECT_CLASS (e_data_server_module_parent_class)->finalize)
+		(*G_OBJECT_CLASS (e_data_server_module_parent_class)->finalize) (object);
 }
 
 static void
-e_data_server_module_instance_init (EDataServerModule *module)
+e_data_server_module_init (EDataServerModule *module)
 {
 }
 
@@ -208,7 +204,7 @@
 }
 
 void
-e_data_server_module_init (void)
+e_data_server_module_initialize (void)
 {
 	static gboolean initialized = FALSE;
 
Index: libedataserver/e-data-server-module.h
===================================================================
RCS file: /cvs/gnome/evolution-data-server/libedataserver/e-data-server-module.h,v
retrieving revision 1.3
diff -u -r1.3 e-data-server-module.h
--- libedataserver/e-data-server-module.h	4 Oct 2004 20:38:13 -0000	1.3
+++ libedataserver/e-data-server-module.h	18 Apr 2005 11:02:35 -0000
@@ -27,7 +27,7 @@
 
 G_BEGIN_DECLS
 
-void   e_data_server_module_init             (void);
+void   e_data_server_module_initialize             (void);
 GList *e_data_server_get_extensions_for_type (GType type);
 void   e_data_server_extension_list_free     (GList *list);
 
Index: src/server.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/src/server.c,v
retrieving revision 1.25
diff -u -r1.25 server.c
--- src/server.c	3 Feb 2005 16:35:03 -0000	1.25
+++ src/server.c	18 Apr 2005 11:02:35 -0000
@@ -310,7 +310,7 @@
 	
 	setup_segv_handler ();
 
-	e_data_server_module_init ();
+	e_data_server_module_initialize ();
 
 	if (!( (did_books = setup_books ())
 	       && (did_cals = setup_cals ())


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