[evolution-webcal] Remove dependency on libgnome - bug #574047



commit 066b15698bbefbf4827c601e6e999474ae595951
Author: Gabor Kelemen <kelemeng gnome hu>
Date:   Thu Jul 16 21:32:45 2009 -0400

    	Remove dependency on libgnome - bug #574047

 configure.ac                |    2 +-
 src/evolution-webcal-main.c |   25 +++++++++----------------
 2 files changed, 10 insertions(+), 17 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 0182bce..495949f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -31,7 +31,7 @@ AM_GCONF_SOURCE_2
 # EDS's libical now has an #ifndef and warns about memory management
 AC_DEFINE_UNQUOTED(HANDLE_LIBICAL_MEMORY,, [Handle libical memory])
 
-PKG_CHECK_MODULES(EVOLUTION_WEBCAL, glib-2.0 >= 2.8 gtk+-2.0 >= 2.4 libgnome-2.0 >= 2.14 libecal-1.2 >= 1.1.0 libsoup-2.4 >= 2.3.0)
+PKG_CHECK_MODULES(EVOLUTION_WEBCAL, glib-2.0 >= 2.8 gtk+-2.0 >= 2.4 libecal-1.2 >= 1.1.0 libsoup-2.4 >= 2.3.0)
 AC_SUBST(EVOLUTION_WEBCAL_CFLAGS)
 AC_SUBST(EVOLUTION_WEBCAL_LIBS)
 
diff --git a/src/evolution-webcal-main.c b/src/evolution-webcal-main.c
index 07a1021..1110587 100644
--- a/src/evolution-webcal-main.c
+++ b/src/evolution-webcal-main.c
@@ -21,9 +21,6 @@
 
 #include <config.h>
 
-#include <libgnome/gnome-init.h>
-#include <libgnome/gnome-program.h>
-
 #include "evolution-webcal-notify.h"
 
 static void e_webcal_open_cal_http (const gchar * uri, const gchar * old);
@@ -240,35 +237,31 @@ static gboolean e_webcal_idle_callback (void * data) {
 }
 
 gint main (gint argc, gchar ** argv) {
-  GnomeProgram * program;
   GSList * uri_list = NULL;
-  GOptionContext *ctx;
   static gchar **args;
+  GError *error = NULL;
 
   static GOptionEntry options[] = {
     { G_OPTION_REMAINING, 0, 0, G_OPTION_ARG_STRING_ARRAY, &args, NULL,  "[URI...]" },
     { NULL }
   };
 
-  ctx = g_option_context_new (_("- Evolution webcal: URI Handler"));
-
 #ifdef ENABLE_NLS
   bindtextdomain (GETTEXT_PACKAGE, GNOMELOCALEDIR);
   bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
   textdomain (GETTEXT_PACKAGE);
-  g_option_context_add_main_entries (ctx, options, GETTEXT_PACKAGE);
-#else
-  g_option_context_add_main_entries (ctx, options, NULL);
 #endif
 
   g_thread_init (NULL);
-  program = gnome_program_init ("evolution-webcal", VERSION,
-				LIBGNOME_MODULE,
-				argc, argv,
-				GNOME_PARAM_GOPTION_CONTEXT, ctx,
-				NULL);
 
-  gtk_init (&argc, &argv);
+  if (!gtk_init_with_args (&argc, &argv,
+			_("- Evolution webcal: URI Handler"),
+			options,
+			GETTEXT_PACKAGE,
+			&error)) {
+	g_printerr ("%s\n", error->message);
+	return 1;
+  }
 
   if (args != NULL) {
     const gchar ** p;



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