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



Follow up: I managed to build the most of gdm without gnome with the
following exceptions:
1) flexiserver still uses the old gnomeui config mechanism so it was not
converted but once it uses the new config it should be ok
2) gdmsetup uses gnome_help_display_uri(), apparently the only gnome
function used in gdm which has no gtk implementation I know of
3) a nit: gdmlogin includes libgnomeui to get the GNOME_PAD_SMALL
constant, so I defined it locally (it is 4)

Uses of gnome_program_init() were converted to gkt_init() + explicit
popt parsing, the rest is similar to the previous patch, only header
cleanups.

I only include the code changes in the patch, since autoconf/make
changes distract from the essence.
With these changes libvicious-gnome is not needed either.

Not linking to the additional ~29 gnome libraries should improve startup
time as well I think, but did not actually got around to measure.

thanks
Jani
--- daemon/misc.c
+++ daemon/misc.c
@@ -20,6 +20,7 @@
 
 #include <syslog.h>
 #include <unistd.h>
+#include <stdlib.h>
 #include <dirent.h>
 #include <signal.h>
 #include <string.h>
@@ -48,7 +49,7 @@
 
 #include <X11/Xlib.h>
 
-#include <libgnome/libgnome.h>
+#include <glib/gi18n.h>
 
 #include "gdm.h"
 #include "misc.h"

=== modified file 'daemon/server.c'
--- daemon/server.c
+++ daemon/server.c
@@ -19,7 +19,7 @@
 /* This file contains functions for controlling local X servers */
 
 #include <config.h>
-#include <libgnome/libgnome.h>
+#include <glib/gi18n.h>
 #include <stdio.h>
 #include <unistd.h>
 #include <stdlib.h>

=== modified file 'daemon/verify-crypt.c'
--- daemon/verify-crypt.c
+++ daemon/verify-crypt.c
@@ -17,7 +17,7 @@
  */
 
 #include <config.h>
-#include <libgnome/libgnome.h>
+#include <glib/gi18n.h>
 #include <syslog.h>
 #include <pwd.h>
 #include <grp.h>

=== modified file 'daemon/verify-pam.c'
--- daemon/verify-pam.c
+++ daemon/verify-pam.c
@@ -22,6 +22,7 @@
 #include <sys/stat.h>
 #include <sys/types.h>
 #include <unistd.h>
+#include <stdlib.h>
 #include <syslog.h>
 #include <security/pam_appl.h>
 #include <pwd.h>
@@ -29,7 +30,7 @@
 #include <fcntl.h>
 #endif
 
-#include <libgnome/libgnome.h>
+#include <glib/gi18n.h>
 
 #include "gdm.h"
 #include "misc.h"

=== modified file 'daemon/verify-shadow.c'
--- daemon/verify-shadow.c
+++ daemon/verify-shadow.c
@@ -17,7 +17,7 @@
  */
 
 #include <config.h>
-#include <libgnome/libgnome.h>
+#include <glib/gi18n.h>
 #include <syslog.h>
 #include <pwd.h>
 #include <shadow.h>

=== modified file 'daemon/xdmcp.c'
--- daemon/xdmcp.c
+++ daemon/xdmcp.c
@@ -89,7 +89,7 @@
 #endif
 #endif /* HAVE_LIBXDMCP */
 
-#include <libgnome/libgnome.h>
+#include <glib/gi18n.h>
 
 #ifdef HAVE_LIBXDMCP
 #include "gdm.h"

--- gui/gdmXnestchooser.c
+++ gui/gdmXnestchooser.c
@@ -20,11 +20,11 @@
  */
 
 #include "config.h"
-#include <libgnome/libgnome.h>
-#include <libgnomeui/libgnomeui.h>
+#include <glib/gi18n.h>
 #include <stdlib.h>
 #include <unistd.h>
 #include <stdio.h>
+#include <popt.h>
 #include <sys/types.h>
 #include <sys/wait.h>
 #include <fcntl.h>
@@ -469,33 +469,22 @@
 	char *xnest;
 	char **execvec;
 	struct sigaction term;
+	int nextopt;
 
 	bindtextdomain (GETTEXT_PACKAGE, GNOMELOCALEDIR);
 	bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
 	textdomain (GETTEXT_PACKAGE);
 
 	if (strcmp (base (argv[0]), "gdmXnest") == 0) {
-		GnomeProgram *program = gnome_program_init
-			("gdmXnest", VERSION, 
-			 LIBGNOMEUI_MODULE /* module_info */,
-			 argc, argv,
-			 GNOME_PARAM_POPT_TABLE, xnest_only_options,
-			 NULL);
-		g_object_get (G_OBJECT (program),
-			      GNOME_PARAM_POPT_CONTEXT, &ctx,
-			      NULL);	
+		gtk_init(&argc, &argv);
+		ctx = poptGetContext(NULL, argc, (const char**)argv, xnest_only_options, 0);
+		while ((nextopt = poptGetNextOpt(ctx)) > 0 || nextopt == POPT_ERROR_BADOPT);
 		no_query = TRUE;
 		no_gdm_check = TRUE;
 	} else {
-		GnomeProgram *program = gnome_program_init
-			("gdmXnestchooser", VERSION, 
-			 LIBGNOMEUI_MODULE /* module_info */,
-			 argc, argv,
-			 GNOME_PARAM_POPT_TABLE, options,
-			 NULL);
-		g_object_get (G_OBJECT (program),
-			      GNOME_PARAM_POPT_CONTEXT, &ctx,
-			      NULL);	
+		gtk_init(&argc, &argv);
+		ctx = poptGetContext(NULL, argc, (const char**)argv, options, 0);
+		while ((nextopt = poptGetNextOpt(ctx)) > 0 || nextopt == POPT_ERROR_BADOPT);
 	}
 
 	args = poptGetArgs (ctx);

=== modified file 'gui/gdmchooser.c'
--- gui/gdmchooser.c
+++ gui/gdmchooser.c
@@ -27,6 +27,7 @@
 #include <dirent.h>
 #include <string.h>
 #include <unistd.h>
+#include <popt.h>
 #include <ctype.h>
 #include <gdk/gdkx.h>
 #include <X11/Xmd.h>
@@ -46,8 +47,7 @@
 #include <sys/sockio.h>
 #endif
 
-#include <libgnome/libgnome.h>
-#include <libgnomeui/libgnomeui.h>
+#include <glib/gi18n.h>
 #include <glade/glade.h>
 
 #include "gdm.h"

=== modified file 'gui/gdmcomm.c'
--- gui/gdmcomm.c
+++ gui/gdmcomm.c
@@ -19,7 +19,7 @@
  */
 
 #include "config.h"
-#include <libgnome/libgnome.h>
+#include <glib/gi18n.h>
 #include <gtk/gtk.h>
 #include <gdk/gdkx.h>
 #include <X11/Xauth.h>

=== modified file 'gui/gdmcommon.h'
--- gui/gdmcommon.h
+++ gui/gdmcommon.h
@@ -23,6 +23,7 @@
 #define GDM_COMMON_H
 
 #include "misc.h"
+#include <gtk/gtk.h> 
 
 void    gdm_common_show_info_msg        (const gchar *msg_file,
                                          const gchar *msg_font);

=== modified file 'gui/gdmdynamic.c'
--- gui/gdmdynamic.c
+++ gui/gdmdynamic.c
@@ -19,8 +19,6 @@
  */
 
 #include "config.h"
-#include <libgnome/libgnome.h>
-#include <libgnomeui/libgnomeui.h>
 #include <gdk/gdkx.h>
 #include <X11/Xauth.h>
 

=== modified file 'gui/gdmlanguages.c'
--- gui/gdmlanguages.c
+++ gui/gdmlanguages.c
@@ -19,10 +19,11 @@
  */
 
 #include "config.h"
+#include <gtk/gtk.h>
+#include <glib/gi18n.h>
 #include <locale.h>
-#include <libgnome/libgnome.h>
-#include <libgnomeui/libgnomeui.h>
 #include <string.h>
+#include <stdio.h>
 
 #include "gdmlanguages.h"
 #include "gdmconfig.h"

=== modified file 'gui/gdmlogin.c'
--- gui/gdmlogin.c
+++ gui/gdmlogin.c
@@ -20,8 +20,6 @@
 
 #include <config.h>
 
-#include <libgnome/libgnome.h>
-#include <libgnomeui/libgnomeui.h>
 #include <math.h>
 #include <stdio.h>
 #include <stdlib.h>
@@ -36,7 +34,9 @@
 #include <signal.h>
 #include <dirent.h>
 #include <locale.h>
+#include <glib/gi18n.h>
 #include <gdk/gdkx.h>
+#include <gdk/gdkkeysyms.h>
 #include <X11/X.h>
 #include <X11/Xlib.h>
 #include <X11/XKBlib.h>
@@ -2325,7 +2325,7 @@
 
 	hbox = gtk_hbox_new (FALSE, 0);
 	gtk_container_add (GTK_CONTAINER (title_box), hbox);
-
+#define GNOME_PAD_SMALL 4
 	w = gtk_label_new (_("GNOME Desktop Manager"));
 	gtk_misc_set_padding (GTK_MISC (w),
 			      GNOME_PAD_SMALL, GNOME_PAD_SMALL);

=== modified file 'gui/gdmphotosetup.c'
--- gui/gdmphotosetup.c
+++ gui/gdmphotosetup.c
@@ -26,13 +26,13 @@
 #include <signal.h>
 #include <fcntl.h>
 #include <errno.h>
+#include <unistd.h>
 
 #include <glib.h>
 #include <glib/gi18n.h>
 #include <glib/gstdio.h>
 #include <gtk/gtk.h>
 #include <glade/glade.h>
-#include <libgnomeui/libgnomeui.h>
 
 #include "gdm.h"
 #include "gdmcommon.h"
@@ -303,12 +303,7 @@
 	bindtextdomain (GETTEXT_PACKAGE, GNOMELOCALEDIR);
 	bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
 	textdomain (GETTEXT_PACKAGE);
-
-	gnome_program_init ("gdmphotosetup", VERSION, 
-			    LIBGNOMEUI_MODULE /* module_info */,
-			    argc, argv,
-			    NULL);
-
+	gtk_init(&argc, &argv);
 	photofile = g_build_filename (g_get_home_dir (), ".face", NULL);
 
 	face_browser = gdm_config_get_bool (GDM_KEY_BROWSER);

=== modified file 'gui/gdmsession.c'
--- gui/gdmsession.c
+++ gui/gdmsession.c
@@ -24,9 +24,8 @@
 #include <unistd.h>
 #include <dirent.h>
 #include <syslog.h>
-
-#include <libgnome/libgnome.h>
-#include <libgnomeui/libgnomeui.h>
+#include <gtk/gtk.h>
+#include <glib/gi18n.h>
 
 #include "vicious.h"
 

=== modified file 'gui/gdmuser.c'
--- gui/gdmuser.c
+++ gui/gdmuser.c
@@ -23,9 +23,9 @@
 
 #include "config.h"
 #include <locale.h>
-#include <libgnome/libgnome.h>
-#include <libgnomeui/libgnomeui.h>
+#include <glib/gi18n.h>
 #include <string.h>
+#include <unistd.h>
 
 #include <pwd.h>
 

=== modified file 'gui/gdmwm.c'
--- gui/gdmwm.c
+++ gui/gdmwm.c
@@ -33,8 +33,6 @@
 #include <syslog.h>
 
 #include <gdk/gdkx.h>
-#include <libgnome/libgnome.h>
-#include <libgnomeui/libgnomeui.h>
 
 #include "gdmwm.h"
 #include "gdm.h"

=== modified file 'gui/gdmwm.h'
--- gui/gdmwm.h
+++ gui/gdmwm.h
@@ -21,7 +21,7 @@
 #ifndef GDM_WM_H
 #define GDM_WM_H
 
-#include <libgnome/libgnome.h>
+#include <gtk/gtk.h>
 #include <gdk/gdkx.h>
 #include <X11/X.h>
 #include <X11/Xlib.h>

=== modified file 'gui/greeter/greeter.c'
--- gui/greeter/greeter.c
+++ gui/greeter/greeter.c
@@ -32,6 +32,7 @@
 #define PW_ENTRY_SIZE GDM_MAX_PASS
 #endif
 
+#include <glib/gi18n.h>
 #include <gtk/gtk.h>
 #include <gdk/gdkkeysyms.h>
 #include <libgnomecanvas/libgnomecanvas.h>

=== modified file 'gui/greeter/greeter_action_language.c'
--- gui/greeter/greeter_action_language.c
+++ gui/greeter/greeter_action_language.c
@@ -18,7 +18,7 @@
 
 #include "config.h"
 
-#include <libgnome/libgnome.h>
+#include <glib/gi18n.h>
 #include <gtk/gtk.h>
 #include <string.h>
 

=== modified file 'gui/greeter/greeter_canvas_item.c'
--- gui/greeter/greeter_canvas_item.c
+++ gui/greeter/greeter_canvas_item.c
@@ -21,7 +21,7 @@
 #include <math.h>
 #include <string.h>
 #include <gtk/gtk.h>
-#include <libgnome/libgnome.h>
+#include <glib/gi18n.h>
 #include <librsvg/rsvg.h>
 
 #include "gdm.h"

=== modified file 'gui/greeter/greeter_item.c'
--- gui/greeter/greeter_item.c
+++ gui/greeter/greeter_item.c
@@ -18,7 +18,7 @@
 
 #include "config.h"
 
-#include <libgnome/libgnome.h>
+#include <glib/gi18n.h>
 #include <gtk/gtk.h>
 #include <string.h>
 #include <stdlib.h>

=== modified file 'gui/greeter/greeter_item_capslock.c'
--- gui/greeter/greeter_item_capslock.c
+++ gui/greeter/greeter_item_capslock.c
@@ -19,7 +19,7 @@
 #include "config.h"
 
 #include <gtk/gtk.h>
-#include <libgnome/libgnome.h>
+#include <glib/gi18n.h>
 #include <gdk/gdkkeysyms.h>
 #include <string.h>
 #include <gdk/gdkx.h>

=== modified file 'gui/greeter/greeter_item_pam.c'
--- gui/greeter/greeter_item_pam.c
+++ gui/greeter/greeter_item_pam.c
@@ -20,7 +20,7 @@
 
 #include <string.h>
 #include <gtk/gtk.h>
-#include <libgnome/libgnome.h>
+#include <glib/gi18n.h>
 #include <gdk/gdkkeysyms.h>
 
 #include "viciousui.h"

=== modified file 'gui/greeter/greeter_item_timed.c'
--- gui/greeter/greeter_item_timed.c
+++ gui/greeter/greeter_item_timed.c
@@ -19,7 +19,7 @@
 #include "config.h"
 
 #include <gtk/gtk.h>
-#include <libgnome/libgnome.h>
+#include <glib/gi18n.h>
 
 #include "gdm.h"
 #include "gdmconfig.h"

=== modified file 'gui/greeter/greeter_item_ulist.c'
--- gui/greeter/greeter_item_ulist.c
+++ gui/greeter/greeter_item_ulist.c
@@ -31,7 +31,7 @@
 #include <math.h>
 #include <string.h>
 #include <gtk/gtk.h>
-#include <libgnome/libgnome.h>
+#include <glib/gi18n.h>
 #include <librsvg/rsvg.h>
 
 #include "gdm.h"

=== modified file 'gui/greeter/greeter_parser.c'
--- gui/greeter/greeter_parser.c
+++ gui/greeter/greeter_parser.c
@@ -26,7 +26,7 @@
 #include <math.h>
 #include <gdk/gdkx.h>
 #include <locale.h>
-#include <libgnome/gnome-i18n.h>
+#include <glib/gi18n.h>
 
 #include "gdmwm.h"
 #include "gdmcommon.h"

=== modified file 'gui/greeter/greeter_session.c'
--- gui/greeter/greeter_session.c
+++ gui/greeter/greeter_session.c
@@ -26,7 +26,7 @@
 #include <string.h>
 
 #include <gtk/gtk.h>
-#include <libgnome/libgnome.h>
+#include <glib/gi18n.h>
 
 #include "gdm.h"
 #include "gdmwm.h"

=== modified file 'gui/greeter/greeter_system.c'
--- gui/greeter/greeter_system.c
+++ gui/greeter/greeter_system.c
@@ -19,7 +19,7 @@
 #include "config.h"
 
 #include <gtk/gtk.h>
-#include <libgnome/libgnome.h>
+#include <glib/gi18n.h>
 #include "greeter.h"
 #include "greeter_configuration.h"
 #include "greeter_system.h"

=== modified file 'gui/misc.c'
--- gui/misc.c
+++ gui/misc.c
@@ -17,9 +17,9 @@
  */
 
 #include <config.h>
-#include <libgnome/libgnome.h>
-#include <libgnomeui/libgnomeui.h>
+#include <gtk/gtk.h>
 #include <glade/glade.h>
+#include <string.h>
 
 #include "misc.h"
 #include "gdmconfig.h"

=== modified file 'gui/modules/dwellmouselistener.c'
--- gui/modules/dwellmouselistener.c
+++ gui/modules/dwellmouselistener.c
@@ -20,6 +20,7 @@
 
 #include <ctype.h>
 #include <string.h>
+#include <stdlib.h>
 #include <syslog.h>
 #include <math.h>
 
@@ -28,7 +29,7 @@
 #include <gdk/gdk.h>
 #include <gdk/gdkx.h>
 #include <gtk/gtk.h>
-#include <gnome.h>
+#include <glib/gi18n.h>
 
 #include <X11/Xlib.h>
 #include <config.h>

=== modified file 'gui/modules/keymouselistener.c'
--- gui/modules/keymouselistener.c
+++ gui/modules/keymouselistener.c
@@ -33,7 +33,7 @@
 #include <gdk/gdk.h>
 #include <gdk/gdkx.h>
 #include <gtk/gtk.h>
-#include <gnome.h>
+#include <glib/gi18n.h>
 
 #include <config.h>
 

=== modified file 'utils/gdm-dmx-reconnect-proxy.c'
--- utils/gdm-dmx-reconnect-proxy.c
+++ utils/gdm-dmx-reconnect-proxy.c
@@ -26,7 +26,6 @@
 #include <X11/Xlib.h>
 #include <X11/extensions/dmxext.h>
 
-#include <ve-misc.h>
 
 static char *to_display = NULL;
 static char *backend_display = NULL;

=== modified file 'utils/gdmaskpass.c'
--- utils/gdmaskpass.c
+++ utils/gdmaskpass.c
@@ -1,7 +1,7 @@
 /* Simple pam thingie to ask the root password, for use in XKeepsCrashing
  * script. */
 #include "config.h"
-#include <libgnome/libgnome.h>
+#include <glib/gi18n.h>
 #include <stdio.h>
 #include <locale.h>
 #include <unistd.h>



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