[gdm-list] Re: build selected modules without gnome deps



Hi Brian,

Here's the patch using g_spawn_command_line_sync() to call a hardcoded
gnome_open.
It works just like before with gnome_help_display().
Also a minor warning fix for an unused var, and the removal of gnome
libs from configure.ac and vicious/Makefile.am.

Jani
=== modified file 'configure.ac'
--- configure.ac
+++ configure.ac
@@ -14,8 +14,6 @@
 GTK_REQUIRED=2.6.0
 PANGO_REQUIRED=1.3.0
 LIBGLADE_REQUIRED=1.99.2
-LIBGNOME_REQUIRED=1.96.0
-LIBGNOMEUI_REQUIRED=1.96.0
 LIBGNOMECANVAS_REQUIRED=1.109.0
 LIBRSVG_REQUIRED=1.1.1
 LIBXML_REQUIRED=2.4.12
@@ -140,7 +138,7 @@
 GNOME_COMPILE_WARNINGS
 CFLAGS="$CFLAGS $WARN_CFLAGS"
 
-PKG_CHECK_MODULES(VICIOUS, gtk+-2.0 >= $GTK_REQUIRED libglade-2.0 >= $LIBGLADE_REQUIRED libgnome-2.0 >= $LIBGNOME_REQUIRED)
+PKG_CHECK_MODULES(VICIOUS, gtk+-2.0 >= $GTK_REQUIRED libglade-2.0 >= $LIBGLADE_REQUIRED )
 AC_SUBST(VICIOUS_CFLAGS)
 AC_SUBST(VICIOUS_LIBS)
 
@@ -191,14 +189,6 @@
 PKG_CHECK_MODULES(GDKPIXBUF, gdk-pixbuf-2.0 >= $GTK_REQUIRED)
 AC_SUBST(GDKPIXBUF_CFLAGS)
 AC_SUBST(GDKPIXBUF_LIBS)
-
-PKG_CHECK_MODULES(LIBGNOME, libgnome-2.0 >= $LIBGNOME_REQUIRED)
-AC_SUBST(LIBGNOME_CFLAGS)
-AC_SUBST(LIBGNOME_LIBS)
-
-PKG_CHECK_MODULES(LIBGNOMEUI, libgnomeui-2.0 >= $LIBGNOMEUI_REQUIRED)
-AC_SUBST(LIBGNOMEUI_CFLAGS)
-AC_SUBST(LIBGNOMEUI_LIBS)
 
 dnl Allow users to run gdmsetup using the console helper PAM stuff.
 if test "x$enable_console_helper" = "xyes"; then
@@ -245,8 +235,7 @@
 	      AC_CHECK_LIB(resolv,inet_aton, [
 			   EXTRA_CHOOSER_LIBS="$EXTRA_CHOOSER_LIBS -lresolv"])])
 
-VICIOUS_GNOME_LIBS="libviciousui.a libviciousui-gnome.a \
-       libviciousui-minimal.a libvicious-gnome.a"
+VICIOUS_GNOME_LIBS="libviciousui.a  libviciousui-minimal.a "
 AC_SUBST(VICIOUS_GNOME_LIBS)
 
 dnl *****************************

=== modified file 'gui/gdmsetup.c'
--- gui/gdmsetup.c
+++ gui/gdmsetup.c
@@ -37,12 +37,6 @@
 #include <gdk/gdkx.h>
 #include <glade/glade.h>
 #include <glib/gi18n.h>
-/*
- * libgnomeui is needed for gnome_help_display_uri (), once we find a way
- * to replace this function, we can completely get rid of libgnomeui from
- * GDM
- */
-#include <libgnomeui-2.0/gnome.h>
 
 #include "vicious.h"
 #include "viciousui.h"
@@ -559,7 +553,7 @@
 	VeConfig *cfg        = ve_config_get (config_file);
 	GList *list;
 	GSList *li;
-	gchar *server, *options, *cpy;
+	gchar *server, *options;
 
 	/* Fill list with all the active displays */
 	if (custom_cfg) {
@@ -4958,7 +4952,8 @@
 	do {
 		response = gtk_dialog_run (GTK_DIALOG (dialog));
 		if (response == GTK_RESPONSE_HELP) {
-			gnome_help_display_uri ("ghelp:gdm", NULL);
+			g_spawn_command_line_sync ("gnome-open ghelp:gdm", NULL, NULL,
+							NULL, NULL);
 		}
 	} while (response != GTK_RESPONSE_CLOSE);
 
@@ -5293,7 +5288,6 @@
 		timeout_remove_all ();
 		gtk_main_quit ();
 	} else if (response == GTK_RESPONSE_HELP) {
-		GError *error = NULL;
 		GtkWidget *setup_dialog = glade_helper_get
 			(xml, "setup_dialog", GTK_TYPE_WINDOW);
 		static GtkWidget *dlg = NULL;
@@ -5304,11 +5298,10 @@
 		}
 
 		if ( ! RUNNING_UNDER_GDM) {
-			gnome_help_display_uri ("ghelp:gdm", &error);
-			/* FIXME: handle errors nicer */
-			if (error == NULL)
+			gint exit_status;
+			if (g_spawn_command_line_sync ("gnome-open ghelp:gdm", NULL, NULL,
+							&exit_status, NULL) && exit_status == 0)
 				return;
-			g_error_free (error);
 		}
 
 		/* fallback help dialogue */

=== modified file 'vicious-extensions/Makefile.am'
--- vicious-extensions/Makefile.am
+++ vicious-extensions/Makefile.am
@@ -21,9 +21,7 @@
 
 EXTRA_LIBRARIES = \
 	libviciousui.a		\
-	libviciousui-gnome.a	\
-	libviciousui-minimal.a	\
-	libvicious-gnome.a
+	libviciousui-minimal.a
 
 noinst_PROGRAMS = test-ve-config
 
@@ -38,27 +36,8 @@
 	ve-nongnome.c	\
 	vicious.h
 
-libvicious_gnome_a_SOURCES = \
-	ve-i18n.h	\
-	ve-misc.c	\
-	ve-misc.h	\
-	ve-config.c	\
-	ve-config.h	\
-	ve-signal.c	\
-	ve-signal.h	\
-	ve-gnome.c	\
-	vicious.h
-
 libviciousui_a_SOURCES = \
 	$(libvicious_a_SOURCES) \
-	glade-helper.c	\
-	glade-helper.h	\
-	ve-miscui.c	\
-	ve-miscui.h	\
-	viciousui.h
-
-libviciousui_gnome_a_SOURCES = \
-	$(libvicious_gnome_a_SOURCES) \
 	glade-helper.c	\
 	glade-helper.h	\
 	ve-miscui.c	\



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