[gdm] Allow building without libxklavier. Fixes bug #606808.
- From: Brian Cameron <bcameron src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gdm] Allow building without libxklavier. Fixes bug #606808.
- Date: Tue, 26 Jan 2010 15:54:06 +0000 (UTC)
commit fc241d25e93599d9566fa878a57e62e5c23ac6a8
Author: Brian Cameron <Brian Cameron sun com>
Date: Tue Jan 26 09:52:36 2010 -0600
Allow building without libxklavier. Fixes bug #606808.
daemon/gdm-session-direct.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/daemon/gdm-session-direct.c b/daemon/gdm-session-direct.c
index 203261b..bb85393 100644
--- a/daemon/gdm-session-direct.c
+++ b/daemon/gdm-session-direct.c
@@ -42,8 +42,10 @@
#include <glib/gstdio.h>
#include <glib-object.h>
+#ifdef HAVE_LIBXKLAVIER
#include <libxklavier/xklavier.h>
#include <X11/Xlib.h> /* for Display */
+#endif
#include <dbus/dbus-glib.h>
#include <dbus/dbus-glib-lowlevel.h>
@@ -603,6 +605,7 @@ static char *
get_system_default_layout (GdmSessionDirect *session)
{
char *result = NULL;
+#ifdef HAVE_LIBXKLAVIER
static XklEngine *engine = NULL;
if (engine == NULL) {
@@ -618,12 +621,13 @@ get_system_default_layout (GdmSessionDirect *session)
XklConfigRec *config = xkl_config_rec_new ();
if (xkl_config_rec_get_from_server (config, engine) && config->layouts && config->layouts[0]) {
if (config->variants && config->variants[0] && config->variants[0][0])
- result = g_strdup_printf("%s\t%s", config->layouts[0], config->variants[0]);
+ result = g_strdup_printf("%s\t%s", config->layouts[0], config->variants[0]);
else
- result = g_strdup (config->layouts[0]);
+ result = g_strdup (config->layouts[0]);
}
g_object_unref (config);
}
+#endif
if (!result)
result = g_strdup ("us");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]