Merge lp:~attente/unity-control-center/non-gnome-unity-ibus-support into lp:unity-control-center

Proposed by William Hua
Status: Merged
Approved by: Iain Lane
Approved revision: 12787
Merged at revision: 12827
Proposed branch: lp:~attente/unity-control-center/non-gnome-unity-ibus-support
Merge into: lp:unity-control-center
Diff against target: 95 lines (+15/-34)
1 file modified
panels/region/gnome-region-panel-input.c (+15/-34)
To merge this branch: bzr merge lp:~attente/unity-control-center/non-gnome-unity-ibus-support
Reviewer Review Type Date Requested Status
Iain Lane Approve
PS Jenkins bot (community) continuous-integration Approve
Review via email: mp+238293@code.launchpad.net

Commit message

Take upstream commit e0260ac5de221e0829085467ff0305b72fd8e854 by Bastien Nocera.

Loads IBus so we can list engines in non-GNOME/Unity desktops.

Description of the change

Take upstream commit e0260ac5de221e0829085467ff0305b72fd8e854 by Bastien Nocera.

Loads IBus so we can list engines in non-GNOME/Unity desktops.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Iain Lane (laney) wrote :

This makes sense, sorry for the extreme delay

review: Approve
Revision history for this message
Iain Lane (laney) wrote :

bah, can you fix the merge conflict please?

let me know when it's done and I will hit build

  https://ci-train.ubuntu.com/job/ubuntu-landing-002-1-build/

12788. By William Hua

Merge trunk.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'panels/region/gnome-region-panel-input.c'
2--- panels/region/gnome-region-panel-input.c 2015-03-27 14:19:28 +0000
3+++ panels/region/gnome-region-panel-input.c 2015-09-02 13:31:02 +0000
4@@ -106,7 +106,6 @@
5 static IBusBus *ibus = NULL;
6 static GHashTable *ibus_engines = NULL;
7 static GCancellable *ibus_cancellable = NULL;
8-static guint shell_name_watch_id = 0;
9 static gboolean is_ibus_active = FALSE;
10 #endif /* HAVE_IBUS */
11
12@@ -183,11 +182,6 @@
13 static void
14 clear_ibus (void)
15 {
16- if (shell_name_watch_id > 0)
17- {
18- g_bus_unwatch_name (shell_name_watch_id);
19- shell_name_watch_id = 0;
20- }
21 g_cancellable_cancel (ibus_cancellable);
22 g_clear_object (&ibus_cancellable);
23 g_clear_pointer (&ibus_engines, g_hash_table_destroy);
24@@ -651,25 +645,6 @@
25 /* We've got everything we needed, don't want to be called again. */
26 g_signal_handlers_disconnect_by_func (ibus, ibus_connected, builder);
27 }
28-
29-static void
30-on_shell_appeared (GDBusConnection *connection,
31- const gchar *name,
32- const gchar *name_owner,
33- gpointer data)
34-{
35- GtkBuilder *builder = data;
36-
37- if (!ibus)
38- {
39- ibus = ibus_bus_new_async ();
40- if (ibus_bus_is_connected (ibus))
41- ibus_connected (ibus, builder);
42- else
43- g_signal_connect (ibus, "connected", G_CALLBACK (ibus_connected), builder);
44- }
45- maybe_start_ibus ();
46-}
47 #endif /* HAVE_IBUS */
48
49 static gboolean
50@@ -1840,6 +1815,7 @@
51 gtk_tree_view_set_model (GTK_TREE_VIEW (treeview), GTK_TREE_MODEL (store));
52
53 input_sources_settings = g_settings_new (GNOME_DESKTOP_INPUT_SOURCES_DIR);
54+ libgnomekbd_settings = g_settings_new (LIBGNOMEKBD_DESKTOP_SCHEMA_ID);
55
56 g_settings_delay (input_sources_settings);
57
58@@ -1853,15 +1829,21 @@
59 module = g_getenv (ENV_GTK_IM_MODULE);
60
61 #ifdef HAVE_IBUS
62- ibus_init ();
63 is_ibus_active = g_strcmp0 (module, GTK_IM_MODULE_IBUS) == 0;
64- shell_name_watch_id = g_bus_watch_name (G_BUS_TYPE_SESSION,
65- "org.gnome.Shell",
66- G_BUS_NAME_WATCHER_FLAGS_NONE,
67- on_shell_appeared,
68- NULL,
69- builder,
70- NULL);
71+
72+ if (is_ibus_active)
73+ {
74+ ibus_init ();
75+ if (!ibus)
76+ {
77+ ibus = ibus_bus_new_async ();
78+ if (ibus_bus_is_connected (ibus))
79+ ibus_connected (ibus, builder);
80+ else
81+ g_signal_connect (ibus, "connected", G_CALLBACK (ibus_connected), builder);
82+ }
83+ maybe_start_ibus ();
84+ }
85 #endif
86
87 #ifdef HAVE_FCITX
88@@ -1910,7 +1892,6 @@
89
90 if (has_indicator_keyboard ())
91 {
92- libgnomekbd_settings = g_settings_new (LIBGNOMEKBD_DESKTOP_SCHEMA_ID);
93 ibus_panel_settings = g_settings_new (IBUS_PANEL_SCHEMA_ID);
94 media_key_settings = g_settings_new (MEDIA_KEYS_SCHEMA_ID);
95 indicator_settings = g_settings_new (INDICATOR_KEYBOARD_SCHEMA_ID);

Subscribers

People subscribed via source and target branches