diff options
-rw-r--r-- | ChangeLog | 30 | ||||
-rw-r--r-- | Makefile.am | 1 | ||||
-rw-r--r-- | configure.in | 1 | ||||
-rw-r--r-- | tools/Makefile.am | 11 | ||||
-rw-r--r-- | tools/evolution-addressbook-abuse.c | 26 | ||||
-rw-r--r-- | tools/evolution-addressbook-export.c | 16 | ||||
-rw-r--r-- | tools/evolution-addressbook-import.c | 19 |
7 files changed, 68 insertions, 36 deletions
@@ -1,3 +1,33 @@ +2003-01-27 Ettore Perazzoli <ettore@ximian.com> + + * tools/evolution-addressbook-export.c: #include bonobo-activation + instead of oaf. + (main): Initialize using gnome_program_init(). + (save_cards): Use g_main_loop_quit() instead of gtk_exit(). + + * tools/evolution-addressbook-import.c: Update include list for + GNOME 2. + (main): Initialize using gnome_program_init(). + (unref_executable): Use g_main_loop_quit() instead of gtk_exit(). + (add_cb): Likewise. + + * tools/evolution-addressbook-abuse.c: Update include list for + GNOME 2. + (main): Initialize using gnome_program_init(). + (use_addressbook): Use g_object_unref() instead of + gtk_object_unref(). + (main): Use g_timeout_add() instead of gtk_timeout_add(). + (add_cb): Use g_main_loop_quit() instead of gtk_exit(). + + * configure.in (AC_SUBST): Add tools/Makefile. + + * Makefile.am (SUBDIRS): Add tools/ back into the list. + + * tools/Makefile.am: Install everything in + $(datadir)/evolution-$(BASE_VERSION)/tools. + (INCLUDES): Add the defines that gnome_program_init() likes and + also add the _DISABLE_DEPRECATED stuff. + 2003-01-26 Chris Toshok <toshok@ximian.com> * configure.in (AC_OUTPUT): add in the conduit Makefile's. diff --git a/Makefile.am b/Makefile.am index 4b81e15179..908a1e0804 100644 --- a/Makefile.am +++ b/Makefile.am @@ -42,6 +42,7 @@ SUBDIRS = \ default_user \ views \ wombat \ + tools \ po diff --git a/configure.in b/configure.in index bf55e912c0..9d53876aca 100644 --- a/configure.in +++ b/configure.in @@ -1369,6 +1369,7 @@ calendar/gui/dialogs/Makefile composer/Makefile mail/Makefile mail/importers/Makefile +tools/Makefile evolution-shell.pc evolution-addressbook.pc evolution-calendar.pc diff --git a/tools/Makefile.am b/tools/Makefile.am index a2de0296a6..4a2b484a9b 100644 --- a/tools/Makefile.am +++ b/tools/Makefile.am @@ -1,10 +1,12 @@ -bin_SCRIPTS = \ +toolsdir = $(datadir)/evolution-$(BASE_VERSION)/tools + +tools_SCRIPTS = \ csv2vcard \ evolution-move-tasks \ evolution-addressbook-clean \ killev -bin_PROGRAMS = \ +tools_PROGRAMS = \ evolution-addressbook-import \ evolution-addressbook-export @@ -16,9 +18,14 @@ INCLUDES = \ -I$(top_builddir) \ -DEVOLUTION_BINDIR=\""$(bindir)"\" \ -DEVOLUTION_LOCALEDIR=\""$(localedir)"\" \ + -DPREFIX=\""$(prefix)"\" \ + -DSYSCONFDIR=\""$(sysconfdir)"\" \ + -DDATADIR=\""$(datadir)"\" \ + -DLIBDIR=\""$(libdir)"\" \ -I$(top_srcdir)/addressbook \ -I$(top_srcdir)/addressbook/backend \ -I$(top_builddir)/addressbook/backend \ + -DG_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED \ $(GNOME_FULL_CFLAGS) EXTRA_DIST = $(bin_SCRIPTS) verify-evolution-install.sh \ diff --git a/tools/evolution-addressbook-abuse.c b/tools/evolution-addressbook-abuse.c index 4ba7bfc5ee..dc8b721ef8 100644 --- a/tools/evolution-addressbook-abuse.c +++ b/tools/evolution-addressbook-abuse.c @@ -2,8 +2,9 @@ #include <config.h> -#include <liboaf/liboaf.h> +#include <bonobo-activation/bonobo-activation.h> #include <bonobo/bonobo-main.h> + #include <backend/ebook/e-book-util.h> #include <gnome.h> @@ -62,11 +63,11 @@ add_cb (EBook *book, EBookStatus status, const char *id, gpointer closure) --cards_to_add_total; g_message ("succesful add! (%d remaining)", cards_to_add_total); if (cards_to_add_total <= 0) - gtk_exit (0); + g_main_loop_quit (NULL); break; default: g_message ("something went wrong..."); - gtk_exit (status); + g_main_loop_quit (NULL); break; } } @@ -85,10 +86,10 @@ use_addressbook (EBook *book, EBookStatus status, gpointer closure) g_message ("adding %d", i); e_book_add_card (book, card, add_cb, NULL); g_free (vcard); - gtk_object_unref (GTK_OBJECT (card)); + g_object_unref (card); } - gtk_object_unref (GTK_OBJECT (book)); + g_object_unref (book); } static gint @@ -109,7 +110,6 @@ main (int argc, char *argv[]) struct poptOption options[] = { { "input-file", '\0', POPT_ARG_STRING, &filename, 0, N_("Input File"), NULL }, - { NULL, '\0', POPT_ARG_INCLUDE_TABLE, &oaf_popt_options, 0, NULL, NULL }, POPT_AUTOHELP { NULL, '\0', 0, NULL, 0, NULL, NULL } }; @@ -123,15 +123,13 @@ main (int argc, char *argv[]) bindtextdomain (PACKAGE, EVOLUTION_LOCALEDIR); textdomain (PACKAGE); - gnome_init_with_popt_table ("evolution-addressbook-clean", "0.0", - argc, argv, options, 0, NULL); - - oaf_init (argc, argv); - - if (bonobo_init (CORBA_OBJECT_NIL, CORBA_OBJECT_NIL, CORBA_OBJECT_NIL) == FALSE) - g_error (_("Could not initialize Bonobo")); + gnome_program_init ("evolution-addressbook-abuse", VERSION, + LIBGNOMEUI_MODULE, argc, argv, + GNOME_PROGRAM_STANDARD_PROPERTIES, + GNOME_PARAM_POPT_TABLE, options, + NULL); - gtk_timeout_add (20, abuse_timeout, NULL); + g_timeout_add (20, abuse_timeout, NULL); bonobo_main (); diff --git a/tools/evolution-addressbook-export.c b/tools/evolution-addressbook-export.c index e21053b300..585728f853 100644 --- a/tools/evolution-addressbook-export.c +++ b/tools/evolution-addressbook-export.c @@ -2,7 +2,7 @@ #include <config.h> -#include <liboaf/liboaf.h> +#include <bonobo-activation/bonobo-activation.h> #include <bonobo/bonobo-main.h> #include <backend/ebook/e-book-util.h> #include <gnome.h> @@ -26,7 +26,7 @@ save_cards (EBook *book, EBookSimpleQueryStatus status, const GList *cards, gpoi result = e_write_file_mkstemp (tmpname, vcard); printf (tmpname); sync(); - gtk_exit (result); + g_main_loop_quit (NULL); } static void @@ -44,7 +44,6 @@ main (int argc, char *argv[]) struct poptOption options[] = { { "output-file", '\0', POPT_ARG_STRING, &filename, 0, N_("Output File"), NULL }, - { NULL, '\0', POPT_ARG_INCLUDE_TABLE, &oaf_popt_options, 0, NULL, NULL }, POPT_AUTOHELP { NULL, '\0', 0, NULL, 0, NULL, NULL } }; @@ -52,12 +51,11 @@ main (int argc, char *argv[]) bindtextdomain (PACKAGE, EVOLUTION_LOCALEDIR); textdomain (PACKAGE); - gnome_init_with_popt_table ("evolution-addressbook-clean", "0.0", - argc, argv, options, 0, NULL); - oaf_init (argc, argv); - - if (bonobo_init (CORBA_OBJECT_NIL, CORBA_OBJECT_NIL, CORBA_OBJECT_NIL) == FALSE) - g_error (_("Could not initialize Bonobo")); + gnome_program_init ("evolution-addressbook-export", VERSION, + LIBGNOMEUI_MODULE, argc, argv, + GNOME_PROGRAM_STANDARD_PROPERTIES, + GNOME_PARAM_POPT_TABLE, options, + NULL); e_book_use_default_book (use_addressbook, filename); diff --git a/tools/evolution-addressbook-import.c b/tools/evolution-addressbook-import.c index 60180fb883..234899cb9a 100644 --- a/tools/evolution-addressbook-import.c +++ b/tools/evolution-addressbook-import.c @@ -2,7 +2,7 @@ #include <config.h> -#include <liboaf/liboaf.h> +#include <bonobo-activation/bonobo-activation.h> #include <bonobo/bonobo-main.h> #include <backend/ebook/e-book-util.h> #include <gnome.h> @@ -20,7 +20,7 @@ unref_executable (void) { exec_ref_count --; if (exec_ref_count == 0) - gtk_exit (0); + g_main_loop_quit (0); } static void @@ -31,7 +31,7 @@ add_cb (EBook *book, EBookStatus status, const char *id, gpointer closure) unref_executable (); break; default: - gtk_exit (status); + g_main_loop_quit (NULL); break; } } @@ -65,7 +65,6 @@ main (int argc, char *argv[]) struct poptOption options[] = { { "input-file", '\0', POPT_ARG_STRING, &filename, 0, N_("Input File"), NULL }, - { NULL, '\0', POPT_ARG_INCLUDE_TABLE, &oaf_popt_options, 0, NULL, NULL }, POPT_AUTOHELP { NULL, '\0', 0, NULL, 0, NULL, NULL } }; @@ -73,18 +72,16 @@ main (int argc, char *argv[]) bindtextdomain (PACKAGE, EVOLUTION_LOCALEDIR); textdomain (PACKAGE); - gnome_init_with_popt_table ("evolution-addressbook-clean", "0.0", - argc, argv, options, 0, NULL); + gnome_program_init ("evolution-addressbook-import", VERSION, + LIBGNOMEUI_MODULE, argc, argv, + GNOME_PROGRAM_STANDARD_PROPERTIES, + GNOME_PARAM_POPT_TABLE, options, + NULL); if (filename == NULL) { g_error (_("No filename provided.")); } - oaf_init (argc, argv); - - if (bonobo_init (CORBA_OBJECT_NIL, CORBA_OBJECT_NIL, CORBA_OBJECT_NIL) == FALSE) - g_error (_("Could not initialize Bonobo")); - e_book_use_default_book (use_addressbook, filename); bonobo_main (); |