[alleyoop] Removed the last of the GNOME dependencies.



commit 0edffa512bc3798dbf6482c04a8226affd273751
Author: Jeffrey Stedfast <fejj gnome org>
Date:   Sat Dec 17 17:48:11 2011 -0500

    Removed the last of the GNOME dependencies.
    
    2011-12-17  Jeffrey Stedfast  <fejj gnome org>
    
    	* src/main.c: Removed GnomeProgram API usage.

 configure.ac    |   14 +++++---------
 src/Makefile.am |    5 ++---
 src/main.c      |   12 ++++--------
 3 files changed, 11 insertions(+), 20 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index a24ca6f..ffe2ada 100644
--- a/configure.ac
+++ b/configure.ac
@@ -71,9 +71,9 @@ fi
 
 AM_GCONF_SOURCE_2
 
-AC_ARG_ENABLE(deprecated, AC_HELP_STRING([--disable-deprecated], [Disable the usage of deprecated Gtk/GNOME widgets]), , enable_deprecated="yes")
+AC_ARG_ENABLE(deprecated, AC_HELP_STRING([--disable-deprecated], [Disable the usage of deprecated Gtk widgets]), , enable_deprecated="yes")
 if test "x$enable_deprecated" = "xno"; then
-  DISABLE_DEPRECATED="-DG_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED -DGNOME_DISABLE_DEPRECATED"
+  DISABLE_DEPRECATED="-DG_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED"
 else
   DISABLE_DEPRECATED=""
 fi
@@ -84,13 +84,9 @@ if test "x$enable_vgstrpool" = "xyes"; then
   AC_DEFINE(ENABLE_STRPOOL,1,[Enable the use of vgstrpool.c (an attempt at keeping memory usage down).])
 fi
 
-PKG_CHECK_MODULES(GNOME, glib-2.0 >= 2.14 gtk+-2.0 libgnomeui-2.0 gconf-2.0)
-AC_SUBST(GNOME_CFLAGS)
-AC_SUBST(GNOME_LIBS)
-
-dnl Compilation flags
-# GNOME_MAINTAINER_MODE_DEFINES # Uncomment when no deprecated API was used
-GNOME_COMPILE_WARNINGS([maximum])
+PKG_CHECK_MODULES(ALLEYOOP, glib-2.0 >= 2.14 gtk+-2.0 >= 2.14 gconf-2.0)
+AC_SUBST(ALLEYOOP_CFLAGS)
+AC_SUBST(ALLEYOOP_LIBS)
 
 CFLAGS="$CFLAGS -fno-strict-aliasing"
 AC_SUBST(CFLAGS)
diff --git a/src/Makefile.am b/src/Makefile.am
index c79cdb5..7788899 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -3,9 +3,8 @@
 INCLUDES = \
 	-DPACKAGE_DATA_DIR=\""$(datadir)"\" 				\
 	-DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" 	\
-	-DPACKAGE_GLADE_DIR=\""$(gladedir)"\"				\
 	@DISABLE_DEPRECATED@						\
-	@GNOME_CFLAGS@
+	@ALLEYOOP_CFLAGS@
 
 bin_PROGRAMS=alleyoop
 
@@ -60,7 +59,7 @@ alleyoop_SOURCES = 		\
 	vgtoolview.h		\
 	main.c
 
-alleyoop_LDADD = @GNOME_LIBS@ $(INTLLIBS)
+alleyoop_LDADD = @ALLEYOOP_LIBS@ $(INTLLIBS)
 
 vgmarshal.h: vgmarshal.list
 	( @GLIB_GENMARSHAL@ --prefix=vg_marshal $(srcdir)/vgmarshal.list --header > vgmarshal.h.tmp \
diff --git a/src/main.c b/src/main.c
index f3ad997..ee122f8 100644
--- a/src/main.c
+++ b/src/main.c
@@ -28,7 +28,8 @@
 #include <sys/stat.h>
 #include <dirent.h>
 
-#include <gnome.h>
+#include <glib.h>
+#include <glib/gi18n.h>
 #include <gconf/gconf.h>
 
 #include "getopts.h"
@@ -175,7 +176,6 @@ static GetOptsOption options[] = {
 
 int main (int argc, char **argv)
 {
-	GnomeProgram *program;
 	GetOptsContext *ctx;
 	GtkWidget *alleyoop;
 	const char **args;
@@ -188,6 +188,8 @@ int main (int argc, char **argv)
 	textdomain (GETTEXT_PACKAGE);
 #endif
 	
+	gtk_init (&argc, &argv);
+	
 	gc = g_ptr_array_new ();
 	srcdir = g_ptr_array_new ();
 	
@@ -202,11 +204,6 @@ int main (int argc, char **argv)
 	if (n == 0)
 		args = NULL;
 	
-	program = gnome_program_init (PACKAGE, VERSION, LIBGNOMEUI_MODULE, argc, argv,
-				      GNOME_PARAM_HUMAN_READABLE_NAME, _("Alleyoop"),
-				      GNOME_PARAM_APP_DATADIR, PACKAGE_DATA_DIR,
-				      NULL);
-	
 	if ((srcdir_env = getenv ("ALLEYOOP_INCLUDE_PATH"))) {
 		/* add our environment to the list of srcdir paths */
 		char *path, *p;
@@ -236,7 +233,6 @@ int main (int argc, char **argv)
 	gtk_main ();
 	
 	getopts_context_free (ctx, TRUE);
-	g_object_unref (program);
 	vg_strpool_shutdown ();
 	g_free (srcdir_env);
 	shutdown ();



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