[gdm-list] build selected modules without gnome deps



Your Majesty,

I am trying to build gdm - or at least some core parts of it - without
gnome dependencies. It seems that utils, daemon, gui/modules and
gui/greeter do not actually rely on gnome libs (besides canvas) so the
use of libgnomeui.h can be replaced with the headers that are actually
needed, such as glib/gi18n.h, popt.h, stdlib.h or unistd.h. IMHO this
also makes the code cleaner by including only what you actually use and
including it directly. The bulk of this patch is swithing to gi18n.h to
get the gettext functions instead of getting them brought in by libgnomeui.h

I hope at least a part of this can be considered for inclusion in CVS.
If so I can follow up with further patches, when I make more progress.

And a somewhat related question: do gdm plans include making use of new
gnome libs/functionality in the 2.14 timeframe?

thanks
Jani
=== modified file 'configure.ac'
--- configure.ac
+++ configure.ac
@@ -164,7 +164,7 @@
 AC_SUBST(GREETER_CFLAGS)
 AC_SUBST(GREETER_LIBS)
 
-PKG_CHECK_MODULES(UTILS, gtk+-2.0 >= $GTK_REQUIRED libgnomeui-2.0 >= $LIBGNOMEUI_REQUIRED libglade-2.0 >= $LIBGLADE_REQUIRED)
+PKG_CHECK_MODULES(UTILS, gtk+-2.0 >= $GTK_REQUIRED libglade-2.0 >= $LIBGLADE_REQUIRED)
 AC_SUBST(UTILS_CFLAGS)
 AC_SUBST(UTILS_LIBS)
 

=== modified file 'daemon/Makefile.am'
--- daemon/Makefile.am
+++ daemon/Makefile.am
@@ -9,10 +9,8 @@
 	-I$(top_srcdir)/vicious-extensions		\
 	-DGNOMELOCALEDIR=\""$(datadir)/locale"\"	\
 	-DLOCALEDIR=\"$(datadir)/locale\"		\
-	$(GUI_CFLAGS)					\
 	$(DAEMON_CFLAGS)				\
 	-DPAM_PREFIX=\"$(PAM_PREFIX)\"			\
-	$(GNOME_INCLUDEDIR)				\
 	-DGREETERTHEMEDIR=\""$(datadir)/gdm/themes"\"
 
 #

=== modified file 'daemon/misc.c'
--- 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"

=== 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/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/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>
@@ -37,6 +35,7 @@
 #include <dirent.h>
 #include <locale.h>
 #include <gdk/gdkx.h>
+#include <gdk/gdkkeysyms.h>
 #include <X11/X.h>
 #include <X11/Xlib.h>
 #include <X11/XKBlib.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/Makefile.am'
--- gui/greeter/Makefile.am
+++ gui/greeter/Makefile.am
@@ -8,7 +8,7 @@
 	-I$(top_srcdir)/vicious-extensions		\
 	-DGDM_CONFIG_FILE=\"@sysconfdir@/gdm/gdm.conf\" \
 	-DGNOMELOCALEDIR=\""$(datadir)/locale"\" 	\
-	$(GUI_CFLAGS)					\
+	$(GUIGLADE_CFLAGS)					\
 	$(GREETER_CFLAGS)
 
 #

=== 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/modules/Makefile.am'
--- gui/modules/Makefile.am
+++ gui/modules/Makefile.am
@@ -4,7 +4,7 @@
 	-I.						\
 	-I..						\
 	-DGNOMELOCALEDIR=\""$(datadir)/locale"\" 	\
-	$(GUI_CFLAGS)
+	$(GREETER_CFLAGS)
 
 #
 #	-DG_DISABLE_DEPRECATED				\
@@ -19,7 +19,7 @@
 
 libkeymouselistener_la_LDFLAGS =	\
 	-rpath $(moduledir) -module -avoid-version \
-	$(GUI_LIBS)	\
+	$(GREETER_LIBS)	\
 	$(X_LIBS)	\
 	$(X_EXTRA_LIBS)
 
@@ -28,7 +28,7 @@
 
 libdwellmouselistener_la_LDFLAGS =	\
 	-rpath $(moduledir) -module -avoid-version \
-	$(GUI_LIBS)	\
+	$(GREETER_LIBS)	\
 	$(X_LIBS)	\
 	$(X_EXTRA_LIBS)
 

=== 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/Makefile.am'
--- utils/Makefile.am
+++ utils/Makefile.am
@@ -7,7 +7,6 @@
 	-I.						\
 	-I..						\
 	-I$(top_srcdir)/daemon				\
-	-I$(top_srcdir)/vicious-extensions		\
 	-DGNOMELOCALEDIR=\""$(datadir)/locale"\" 	\
 	$(UTILS_CFLAGS)
 

=== 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]