gnome-settings-daemon r615 - in trunk: . plugins/keyboard
- From: svu svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-settings-daemon r615 - in trunk: . plugins/keyboard
- Date: Thu, 27 Nov 2008 00:24:42 +0000 (UTC)
Author: svu
Date: Thu Nov 27 00:24:42 2008
New Revision: 615
URL: http://svn.gnome.org/viewvc/gnome-settings-daemon?rev=615&view=rev
Log:
Use new-device notification (in libxklavier 3.8) to reload XKB config
Modified:
trunk/ChangeLog
trunk/configure.ac
trunk/plugins/keyboard/gsd-keyboard-xkb.c
Modified: trunk/configure.ac
==============================================================================
--- trunk/configure.ac (original)
+++ trunk/configure.ac Thu Nov 27 00:24:42 2008
@@ -210,7 +210,7 @@
AC_SUBST(XF86MISC_LIBS)
AC_CHECK_HEADERS(X11/extensions/XKB.h)
-PKG_CHECK_MODULES(LIBGNOMEKBD, [libgnomekbd >= 2.21.4 libxklavier >= 3.3])
+PKG_CHECK_MODULES(LIBGNOMEKBD, [libgnomekbd >= 2.21.4 libxklavier >= 3.8])
AC_SUBST(LIBGNOMEKBD_CFLAGS)
AC_SUBST(LIBGNOMEKBD_LIBS)
Modified: trunk/plugins/keyboard/gsd-keyboard-xkb.c
==============================================================================
--- trunk/plugins/keyboard/gsd-keyboard-xkb.c (original)
+++ trunk/plugins/keyboard/gsd-keyboard-xkb.c Thu Nov 27 00:24:42 2008
@@ -343,6 +343,14 @@
return gconf_client_notify_add (client, path, func, NULL, NULL, NULL);
}
+/* When new Keyboard is plugged in - reload the settings */
+static void
+gsd_keyboard_new_device (XklEngine * engine)
+{
+ apply_settings ();
+ apply_xkb_settings ();
+}
+
void
gsd_keyboard_xkb_init (GConfClient *client)
{
@@ -386,6 +394,12 @@
gsd_keyboard_xkb_evt_filter,
NULL);
+ if (xkl_engine_get_features (xkl_engine) |
+ XKLF_DEVICE_DISCOVERY)
+ g_signal_connect (xkl_engine, "X-new-device",
+ G_CALLBACK
+ (gsd_keyboard_new_device), NULL);
+
gnome_settings_profile_start ("xkl_engine_start_listen");
xkl_engine_start_listen (xkl_engine,
XKLL_MANAGE_LAYOUTS |
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]