Hi again, Attached is a small patch which removes lots of useless libgnome usage: * gnome_init() in test applications when g_type_init() etc will do * g_file_exists() from libgnome, replaced with g_file_test from glib 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: addressbook/backends/groupwise/create-account.c =================================================================== RCS file: /cvs/gnome/evolution-data-server/addressbook/backends/groupwise/create-account.c,v retrieving revision 1.2 diff -u -r1.2 create-account.c --- addressbook/backends/groupwise/create-account.c 11 Mar 2004 10:23:26 -0000 1.2 +++ addressbook/backends/groupwise/create-account.c 3 Feb 2005 16:38:43 -0000 @@ -2,7 +2,6 @@ #include <config.h> #include <gconf/gconf-client.h> #include <glib/gmain.h> -#include <libgnome/gnome-init.h> #include <libedataserver/e-source-list.h> static GConfClient *conf_client; @@ -62,10 +61,7 @@ int main (int argc, char *argv[]) { - gnome_program_init (PACKAGE, VERSION, - LIBGNOME_MODULE, - argc, argv, - NULL); + g_type_init (); if (argc != 3 && argc != 4) { g_print ("Usage: %s hostname username [password]\n", argv[0]); Index: addressbook/tests/ebook/test-categories.c =================================================================== RCS file: /cvs/gnome/evolution-data-server/addressbook/tests/ebook/test-categories.c,v retrieving revision 1.2 diff -u -r1.2 test-categories.c --- addressbook/tests/ebook/test-categories.c 12 Mar 2004 22:10:23 -0000 1.2 +++ addressbook/tests/ebook/test-categories.c 3 Feb 2005 16:38:44 -0000 @@ -1,5 +1,4 @@ -#include <libgnome/gnome-init.h> #include <bonobo/bonobo-main.h> #include <stdlib.h> #include <string.h> @@ -11,8 +10,6 @@ EContact *contact; GList *category_list; char *categories; - - gnome_program_init("test-categories", "0.0", LIBGNOME_MODULE, argc, argv, NULL); if (bonobo_init (&argc, argv) == FALSE) g_error ("Could not initialize Bonobo"); Index: addressbook/tests/ebook/test-changes.c =================================================================== RCS file: /cvs/gnome/evolution-data-server/addressbook/tests/ebook/test-changes.c,v retrieving revision 1.2 diff -u -r1.2 test-changes.c --- addressbook/tests/ebook/test-changes.c 20 May 2004 01:13:01 -0000 1.2 +++ addressbook/tests/ebook/test-changes.c 3 Feb 2005 16:38:44 -0000 @@ -1,6 +1,5 @@ /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -#include <libgnome/gnome-init.h> #include <bonobo/bonobo-main.h> #include <stdlib.h> #include <libebook/e-book.h> @@ -22,8 +21,6 @@ GList *changes; GError *error = NULL; EBookChange *change; - - gnome_program_init("test-changes", "0.0", LIBGNOME_MODULE, argc, argv, NULL); if (bonobo_init (&argc, argv) == FALSE) g_error ("Could not initialize Bonobo"); Index: addressbook/tests/ebook/test-date.c =================================================================== RCS file: /cvs/gnome/evolution-data-server/addressbook/tests/ebook/test-date.c,v retrieving revision 1.2 diff -u -r1.2 test-date.c --- addressbook/tests/ebook/test-date.c 9 Jan 2004 19:18:24 -0000 1.2 +++ addressbook/tests/ebook/test-date.c 3 Feb 2005 16:38:44 -0000 @@ -1,5 +1,3 @@ - -#include <libgnome/gnome-init.h> #include <bonobo/bonobo-main.h> #include <stdlib.h> #include <libebook/e-book.h> @@ -9,8 +7,6 @@ { EContact *contact; EContactDate date, *dp; - - gnome_program_init("test-string", "0.0", LIBGNOME_MODULE, argc, argv, NULL); if (bonobo_init (&argc, argv) == FALSE) g_error ("Could not initialize Bonobo"); Index: addressbook/tests/ebook/test-ebook-async.c =================================================================== RCS file: /cvs/gnome/evolution-data-server/addressbook/tests/ebook/test-ebook-async.c,v retrieving revision 1.3 diff -u -r1.3 test-ebook-async.c --- addressbook/tests/ebook/test-ebook-async.c 17 Jun 2004 21:44:52 -0000 1.3 +++ addressbook/tests/ebook/test-ebook-async.c 3 Feb 2005 16:38:44 -0000 @@ -1,6 +1,5 @@ /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -#include <libgnome/gnome-init.h> #include <bonobo/bonobo-main.h> #include <stdlib.h> #include <libebook/e-book.h> @@ -83,8 +82,6 @@ main (int argc, char **argv) { EBook *book; - - gnome_program_init("test-ebook", "0.0", LIBGNOME_MODULE, argc, argv, NULL); if (bonobo_init (&argc, argv) == FALSE) g_error ("Could not initialize Bonobo"); Index: addressbook/tests/ebook/test-ebook-view.c =================================================================== RCS file: /cvs/gnome/evolution-data-server/addressbook/tests/ebook/test-ebook-view.c,v retrieving revision 1.2 diff -u -r1.2 test-ebook-view.c --- addressbook/tests/ebook/test-ebook-view.c 20 May 2004 01:13:01 -0000 1.2 +++ addressbook/tests/ebook/test-ebook-view.c 3 Feb 2005 16:38:44 -0000 @@ -1,6 +1,5 @@ /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -#include <libgnome/gnome-init.h> #include <bonobo/bonobo-main.h> #include <stdlib.h> #include <libebook/e-book.h> @@ -57,8 +56,6 @@ gboolean status; EBookQuery *query; EBookView *view; - - gnome_program_init("test-ebook", "0.0", LIBGNOME_MODULE, argc, argv, NULL); if (bonobo_init (&argc, argv) == FALSE) g_error ("Could not initialize Bonobo"); Index: addressbook/tests/ebook/test-ebook.c =================================================================== RCS file: /cvs/gnome/evolution-data-server/addressbook/tests/ebook/test-ebook.c,v retrieving revision 1.5 diff -u -r1.5 test-ebook.c --- addressbook/tests/ebook/test-ebook.c 20 May 2004 01:13:01 -0000 1.5 +++ addressbook/tests/ebook/test-ebook.c 3 Feb 2005 16:38:44 -0000 @@ -1,6 +1,5 @@ /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -#include <libgnome/gnome-init.h> #include <bonobo/bonobo-main.h> #include <stdlib.h> #include <libebook/e-book.h> @@ -75,8 +74,6 @@ { EBook *book; gboolean status; - - gnome_program_init("test-ebook", "0.0", LIBGNOME_MODULE, argc, argv, NULL); if (bonobo_init (&argc, argv) == FALSE) g_error ("Could not initialize Bonobo"); Index: addressbook/tests/ebook/test-nonexistent-id.c =================================================================== RCS file: /cvs/gnome/evolution-data-server/addressbook/tests/ebook/test-nonexistent-id.c,v retrieving revision 1.2 diff -u -r1.2 test-nonexistent-id.c --- addressbook/tests/ebook/test-nonexistent-id.c 20 May 2004 01:13:01 -0000 1.2 +++ addressbook/tests/ebook/test-nonexistent-id.c 3 Feb 2005 16:38:44 -0000 @@ -1,12 +1,9 @@ -#include <libgnome/gnome-init.h> #include <libebook/e-book.h> int main (int argc, char **argv) { GError *err = NULL; EBook *book = NULL; - - gnome_program_init("test-nonexistent-id", "0.0", LIBGNOME_MODULE, argc, argv, NULL); printf ("loading addressbook\n"); book = e_book_new_system_addressbook (NULL); Index: addressbook/tests/ebook/test-photo.c =================================================================== RCS file: /cvs/gnome/evolution-data-server/addressbook/tests/ebook/test-photo.c,v retrieving revision 1.3 diff -u -r1.3 test-photo.c --- addressbook/tests/ebook/test-photo.c 25 Aug 2004 14:38:42 -0000 1.3 +++ addressbook/tests/ebook/test-photo.c 3 Feb 2005 16:38:44 -0000 @@ -1,5 +1,3 @@ - -#include <libgnome/gnome-init.h> #include <bonobo/bonobo-main.h> #include <stdlib.h> #include <string.h> @@ -32,8 +30,6 @@ { EContact *contact; EContactPhoto *photo, *new_photo; - - gnome_program_init("test-photo", "0.0", LIBGNOME_MODULE, argc, argv, NULL); if (bonobo_init (&argc, argv) == FALSE) g_error ("Could not initialize Bonobo"); Index: addressbook/tests/ebook/test-query.c =================================================================== RCS file: /cvs/gnome/evolution-data-server/addressbook/tests/ebook/test-query.c,v retrieving revision 1.2 diff -u -r1.2 test-query.c --- addressbook/tests/ebook/test-query.c 24 Oct 2004 09:40:47 -0000 1.2 +++ addressbook/tests/ebook/test-query.c 3 Feb 2005 16:38:44 -0000 @@ -1,5 +1,3 @@ - -#include <libgnome/gnome-init.h> #include <string.h> #include <libebook/e-book.h> @@ -18,8 +16,6 @@ { int i; gboolean failure = FALSE; - - gnome_program_init("test-query", "0.0", LIBGNOME_MODULE, argc, argv, NULL); for (i = 0; i < G_N_ELEMENTS (queries); i ++) { EBookQuery *query = e_book_query_from_string (queries[i]); Index: addressbook/tests/ebook/test-search.c =================================================================== RCS file: /cvs/gnome/evolution-data-server/addressbook/tests/ebook/test-search.c,v retrieving revision 1.3 diff -u -r1.3 test-search.c --- addressbook/tests/ebook/test-search.c 24 Oct 2004 09:40:47 -0000 1.3 +++ addressbook/tests/ebook/test-search.c 3 Feb 2005 16:38:44 -0000 @@ -1,6 +1,5 @@ /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -#include <libgnome/gnome-init.h> #include <bonobo/bonobo-main.h> #include <stdlib.h> #include <libebook/e-book.h> @@ -12,8 +11,6 @@ gboolean status; EBookQuery *query; GList *c, *contacts; - - gnome_program_init("test-ebook", "0.0", LIBGNOME_MODULE, argc, argv, NULL); if (bonobo_init (&argc, argv) == FALSE) g_error ("Could not initialize Bonobo"); Index: addressbook/tests/ebook/test-self.c =================================================================== RCS file: /cvs/gnome/evolution-data-server/addressbook/tests/ebook/test-self.c,v retrieving revision 1.1 diff -u -r1.1 test-self.c --- addressbook/tests/ebook/test-self.c 26 Nov 2003 00:35:30 -0000 1.1 +++ addressbook/tests/ebook/test-self.c 3 Feb 2005 16:38:44 -0000 @@ -1,6 +1,5 @@ /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -#include <libgnome/gnome-init.h> #include <bonobo/bonobo-main.h> #include <stdlib.h> #include <libebook/e-book.h> @@ -12,8 +11,6 @@ EContact *contact; GError *error = NULL; char *vcard; - - gnome_program_init("test-ebook", "0.0", LIBGNOME_MODULE, argc, argv, NULL); if (bonobo_init (&argc, argv) == FALSE) g_error ("Could not initialize Bonobo"); Index: addressbook/tests/ebook/test-stress-bookviews.c =================================================================== RCS file: /cvs/gnome/evolution-data-server/addressbook/tests/ebook/test-stress-bookviews.c,v retrieving revision 1.2 diff -u -r1.2 test-stress-bookviews.c --- addressbook/tests/ebook/test-stress-bookviews.c 20 May 2004 01:13:01 -0000 1.2 +++ addressbook/tests/ebook/test-stress-bookviews.c 3 Feb 2005 16:38:44 -0000 @@ -1,6 +1,5 @@ /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -#include <libgnome/gnome-init.h> #include <bonobo/bonobo-main.h> #include <stdlib.h> #include <libebook/e-book.h> @@ -59,8 +58,6 @@ EBookView *view = NULL; EBookView *new_view; int i; - - gnome_program_init("test-ebook", "0.0", LIBGNOME_MODULE, argc, argv, NULL); if (bonobo_init (&argc, argv) == FALSE) g_error ("Could not initialize Bonobo"); Index: addressbook/tests/ebook/test-string.c =================================================================== RCS file: /cvs/gnome/evolution-data-server/addressbook/tests/ebook/test-string.c,v retrieving revision 1.2 diff -u -r1.2 test-string.c --- addressbook/tests/ebook/test-string.c 9 Jan 2004 19:12:11 -0000 1.2 +++ addressbook/tests/ebook/test-string.c 3 Feb 2005 16:38:44 -0000 @@ -1,5 +1,3 @@ - -#include <libgnome/gnome-init.h> #include <bonobo/bonobo-main.h> #include <stdlib.h> #include <string.h> @@ -11,8 +9,6 @@ main (int argc, char **argv) { EContact *contact; - - gnome_program_init("test-string", "0.0", LIBGNOME_MODULE, argc, argv, NULL); if (bonobo_init (&argc, argv) == FALSE) g_error ("Could not initialize Bonobo"); Index: addressbook/tests/ebook/test-undefinedfield.c =================================================================== RCS file: /cvs/gnome/evolution-data-server/addressbook/tests/ebook/test-undefinedfield.c,v retrieving revision 1.1 diff -u -r1.1 test-undefinedfield.c --- addressbook/tests/ebook/test-undefinedfield.c 29 Dec 2003 21:57:30 -0000 1.1 +++ addressbook/tests/ebook/test-undefinedfield.c 3 Feb 2005 16:38:44 -0000 @@ -1,5 +1,3 @@ - -#include <libgnome/gnome-init.h> #include <bonobo/bonobo-main.h> #include <stdlib.h> #include <libebook/e-book.h> @@ -9,8 +7,6 @@ { EContact *contact; gpointer test; - - gnome_program_init("test-undefinedfield", "0.0", LIBGNOME_MODULE, argc, argv, NULL); if (bonobo_init (&argc, argv) == FALSE) g_error ("Could not initialize Bonobo"); Index: addressbook/tests/ebook/test-untyped-phones.c =================================================================== RCS file: /cvs/gnome/evolution-data-server/addressbook/tests/ebook/test-untyped-phones.c,v retrieving revision 1.2 diff -u -r1.2 test-untyped-phones.c --- addressbook/tests/ebook/test-untyped-phones.c 27 Jan 2004 22:04:15 -0000 1.2 +++ addressbook/tests/ebook/test-untyped-phones.c 3 Feb 2005 16:38:44 -0000 @@ -1,5 +1,3 @@ - -#include <libgnome/gnome-init.h> #include <bonobo/bonobo-main.h> #include <stdlib.h> #include <string.h> @@ -29,8 +27,6 @@ { EContact *contact; const char *phone; - - gnome_program_init("test-untyped-phones", "0.0", LIBGNOME_MODULE, argc, argv, NULL); if (bonobo_init (&argc, argv) == FALSE) g_error ("Could not initialize Bonobo"); Index: calendar/tests/ecal/test-search.c =================================================================== RCS file: /cvs/gnome/evolution-data-server/calendar/tests/ecal/test-search.c,v retrieving revision 1.1 diff -u -r1.1 test-search.c --- calendar/tests/ecal/test-search.c 28 Apr 2004 14:02:53 -0000 1.1 +++ calendar/tests/ecal/test-search.c 3 Feb 2005 16:38:44 -0000 @@ -1,6 +1,5 @@ /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -#include <libgnome/gnome-init.h> #include <bonobo/bonobo-main.h> #include <stdlib.h> #include <libecal/e-cal.h> @@ -10,8 +9,6 @@ { ECal *ecal; GList *l, *objects; - - gnome_program_init("test-search", "0.0", LIBGNOME_MODULE, argc, argv, NULL); if (bonobo_init (&argc, argv) == FALSE) g_error ("Could not initialize Bonobo"); Index: libedataserver/e-db3-utils.c =================================================================== RCS file: /cvs/gnome/evolution-data-server/libedataserver/e-db3-utils.c,v retrieving revision 1.2 diff -u -r1.2 e-db3-utils.c --- libedataserver/e-db3-utils.c 25 Nov 2003 22:35:11 -0000 1.2 +++ libedataserver/e-db3-utils.c 3 Feb 2005 16:38:45 -0000 @@ -10,7 +10,6 @@ #include <sys/stat.h> #include <fcntl.h> #include <unistd.h> -#include <libgnome/gnome-util.h> static char * get_check_filename (const char *filename) @@ -132,9 +131,9 @@ copy_filename = get_copy_filename (filename); check_filename = get_check_filename (filename); - if (g_file_exists (check_filename)) { + if (g_file_test(check_filename, G_FILE_TEST_EXISTS)) { ret_val = resume_upgrade(filename, copy_filename, check_filename); - } else if (g_file_exists (copy_filename)) { + } else if (g_file_test (copy_filename, G_FILE_TEST_EXISTS)) { unlink (copy_filename); } Index: libedataserverui/test-source-option-menu.c =================================================================== RCS file: /cvs/gnome/evolution-data-server/libedataserverui/test-source-option-menu.c,v retrieving revision 1.3 diff -u -r1.3 test-source-option-menu.c --- libedataserverui/test-source-option-menu.c 13 Oct 2004 17:55:01 -0000 1.3 +++ libedataserverui/test-source-option-menu.c 3 Feb 2005 16:38:45 -0000 @@ -30,9 +30,6 @@ #include <gtk/gtkwindow.h> #include <gtk/gtkmain.h> -#include <libgnomeui/gnome-ui-init.h> - - static void source_selected_callback (ESourceOptionMenu *menu, ESource *source, @@ -70,11 +67,10 @@ int main (int argc, char **argv) { - GnomeProgram *program; const char *gconf_path; - program = gnome_program_init ("test-source-option-menu", "0.0", LIBGNOMEUI_MODULE, argc, argv, NULL); - + gtk_init (&argc, &argv); + if (argc < 2) gconf_path = "/apps/evolution/calendar/sources"; else Index: libedataserverui/test-source-selector.c =================================================================== RCS file: /cvs/gnome/evolution-data-server/libedataserverui/test-source-selector.c,v retrieving revision 1.3 diff -u -r1.3 test-source-selector.c --- libedataserverui/test-source-selector.c 13 Oct 2004 17:55:01 -0000 1.3 +++ libedataserverui/test-source-selector.c 3 Feb 2005 16:38:45 -0000 @@ -33,9 +33,6 @@ #include <gtk/gtkscrolledwindow.h> #include <gtk/gtkwindow.h> -#include <libgnomeui/gnome-ui-init.h> - - static void dump_selection (ESourceSelector *selector) { @@ -118,13 +115,9 @@ int main (int argc, char **argv) { - GnomeProgram *program; const char *gconf_path; - program = gnome_program_init ("test-source-selector", "0.0", - LIBGNOMEUI_MODULE, argc, argv, - NULL); - + gtk_init (&argc, &argv); if (argc < 2) gconf_path = "/apps/evolution/calendar/sources"; else Index: servers/groupwise/create-account.c =================================================================== RCS file: /cvs/gnome/evolution-data-server/servers/groupwise/create-account.c,v retrieving revision 1.10 diff -u -r1.10 create-account.c --- servers/groupwise/create-account.c 18 Mar 2004 17:51:26 -0000 1.10 +++ servers/groupwise/create-account.c 3 Feb 2005 16:38:45 -0000 @@ -2,7 +2,6 @@ #include <config.h> #include <gconf/gconf-client.h> #include <glib/gmain.h> -#include <libgnome/gnome-init.h> #include <libedataserver/e-source-list.h> static GConfClient *conf_client; @@ -52,11 +51,7 @@ int main (int argc, char *argv[]) { - gnome_program_init (PACKAGE, VERSION, - LIBGNOME_MODULE, - argc, argv, - NULL); - + g_type_init (); if (argc != 3 && argc != 4) { g_print ("Usage: %s hostname username [password]\n", argv[0]); return -1; Index: servers/groupwise/soap-test.c =================================================================== RCS file: /cvs/gnome/evolution-data-server/servers/groupwise/soap-test.c,v retrieving revision 1.6 diff -u -r1.6 soap-test.c --- servers/groupwise/soap-test.c 6 Dec 2004 02:55:32 -0000 1.6 +++ servers/groupwise/soap-test.c 3 Feb 2005 16:38:45 -0000 @@ -1,6 +1,5 @@ #include <config.h> #include <glib/gmain.h> -#include <libgnome/gnome-init.h> #include "e-gw-connection.h" static GMainLoop *main_loop; @@ -49,10 +48,7 @@ int main (int argc, char *argv[]) { - gnome_program_init (PACKAGE, VERSION, - LIBGNOME_MODULE, - argc, argv, - NULL); + g_type_init (); if (argc != 3 && argc != 4) { g_print ("Usage: %s hostname username [password]\n", argv[0]);
Attachment:
signature.asc
Description: This is a digitally signed message part