[gnome-settings-daemon/gnome-3-6] main: Don't set IBus envvars if keyboard plugin is disabled
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-settings-daemon/gnome-3-6] main: Don't set IBus envvars if keyboard plugin is disabled
- Date: Fri, 30 Nov 2012 06:43:46 +0000 (UTC)
commit 973b6f37bea2b70d21a1505ff3d233f207ceb91b
Author: Bastien Nocera <hadess hadess net>
Date: Fri Nov 30 07:38:19 2012 +0100
main: Don't set IBus envvars if keyboard plugin is disabled
https://bugzilla.gnome.org/show_bug.cgi?id=689070
Conflicts:
gnome-settings-daemon/main.c
gnome-settings-daemon/main.c | 16 +++++++++++++++-
1 files changed, 15 insertions(+), 1 deletions(-)
---
diff --git a/gnome-settings-daemon/main.c b/gnome-settings-daemon/main.c
index 62c5aa5..d251fb8 100644
--- a/gnome-settings-daemon/main.c
+++ b/gnome-settings-daemon/main.c
@@ -250,6 +250,19 @@ is_program_in_path (const char *binary)
return TRUE;
}
+static gboolean
+keyboard_plugin_is_enabled (void)
+{
+ GSettings *settings;
+ gboolean enabled;
+
+ settings = g_settings_new ("org.gnome.settings-daemon.plugins.keyboard");
+ enabled = g_settings_get_boolean (settings, "active");
+ g_object_unref (settings);
+
+ return enabled;
+}
+
static void
got_session_name (GObject *object,
GAsyncResult *res,
@@ -276,7 +289,8 @@ got_session_name (GObject *object,
g_variant_get (variant, "&s", &session_name);
if (g_strcmp0 (session_name, "gnome") == 0 &&
- is_program_in_path ("ibus-daemon")) {
+ is_program_in_path ("ibus-daemon") &&
+ keyboard_plugin_is_enabled ()) {
set_session_env (proxy, "QT_IM_MODULE", "ibus");
set_session_env (proxy, "XMODIFIERS", "@im=ibus");
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]