diff options
author | Stefano Karapetsas <[email protected]> | 2013-05-08 17:54:28 +0200 |
---|---|---|
committer | Stefano Karapetsas <[email protected]> | 2013-05-08 17:54:28 +0200 |
commit | a326673b17ec87689e71a33c8b50fdc226de07e3 (patch) | |
tree | 60f9e842443433c6f4e38be24abf120febefb52f | |
parent | 33ac2c8e15a6dbf22982fd469af1446d210eb2c8 (diff) | |
download | mate-settings-daemon-a326673b17ec87689e71a33c8b50fdc226de07e3.tar.bz2 mate-settings-daemon-a326673b17ec87689e71a33c8b50fdc226de07e3.tar.xz |
keyboard: Allow to disable indicators in GSettings
-rw-r--r-- | configure.ac | 3 | ||||
-rw-r--r-- | plugins/keyboard/msd-keyboard-xkb.c | 8 |
2 files changed, 6 insertions, 5 deletions
diff --git a/configure.ac b/configure.ac index aaa5be1..cbed95f 100644 --- a/configure.ac +++ b/configure.ac @@ -53,6 +53,7 @@ GLIB_REQUIRED_VERSION=2.17.3 GTK_REQUIRED_VERSION=2.24.0 GIO_REQUIRED_VERSION=2.26.0 MATE_DESKTOP_REQUIRED_VERSION=1.5.0 +LIBMATEKBD_REQUIRED_VERSION=1.6.1 LIBNOTIFY_REQUIRED_VERSION=0.7.0 EXTRA_COMPILE_WARNINGS(yes) @@ -224,7 +225,7 @@ AC_CHECK_X_LIB(Xxf86misc, XF86MiscQueryExtension, [ AC_SUBST(XF86MISC_LIBS) AC_CHECK_X_HEADERS([X11/extensions/XKB.h]) -PKG_CHECK_MODULES(LIBMATEKBDUI, [libmatekbdui >= 1.1.0 libmatekbd >= 1.1.0 libxklavier >= 5.0]) +PKG_CHECK_MODULES(LIBMATEKBDUI, [libmatekbdui >= $LIBMATEKBD_REQUIRED_VERSION libmatekbd >= $LIBMATEKBD_REQUIRED_VERSION libxklavier >= 5.0]) AC_SUBST(LIBMATEKBDUI_CFLAGS) AC_SUBST(LIBMATEKBDUI_LIBS) diff --git a/plugins/keyboard/msd-keyboard-xkb.c b/plugins/keyboard/msd-keyboard-xkb.c index d37ea05..5ce70bb 100644 --- a/plugins/keyboard/msd-keyboard-xkb.c +++ b/plugins/keyboard/msd-keyboard-xkb.c @@ -47,6 +47,8 @@ #define MATEKBD_KBD_SCHEMA "org.mate.peripherals-keyboard-xkb.kbd" #define KNOWN_FILES_KEY "known-file-list" +#define DISABLE_INDICATOR_KEY "disable-indicator" +#define DUPLICATE_LEDS_KEY "duplicate-leds" static MsdKeyboardManager* manager = NULL; @@ -173,8 +175,7 @@ apply_desktop_settings (void) before activating them */ matekbd_desktop_config_activate (¤t_config); - /* FIXME add an option to GSettings to duplicate leds? */ - show_leds = FALSE; + show_leds = g_settings_get_boolean (settings_desktop, DUPLICATE_LEDS_KEY); for (i = sizeof (indicator_icons) / sizeof (indicator_icons[0]); --i >= 0;) { gtk_status_icon_set_visible (indicator_icons[i], @@ -354,8 +355,7 @@ show_hide_icon () { if (g_strv_length (current_kbd_config.layouts_variants) > 1) { if (icon == NULL) { - /* FIXME add an option to GSettings to disable this? */ - gboolean disable = FALSE; + gboolean disable = g_settings_get_boolean (settings_desktop, DISABLE_INDICATOR_KEY); if (disable) return; |