Merge lp:~attente/gnome-control-center/lp1229367 into lp:~ubuntu-desktop/gnome-control-center/ubuntu

Proposed by William Hua on 2013-09-24
Status: Merged
Merged at revision: 602
Proposed branch: lp:~attente/gnome-control-center/lp1229367
Merge into: lp:~ubuntu-desktop/gnome-control-center/ubuntu
Diff against target: 250 lines (+69/-26)
3 files modified
debian/changelog (+7/-0)
debian/patches/git_show_per_window_input_settings.patch (+6/-10)
debian/patches/input-sources-text-entry.patch (+56/-16)
To merge this branch: bzr merge lp:~attente/gnome-control-center/lp1229367
Reviewer Review Type Date Requested Status
Ubuntu Desktop 2013-09-24 Pending
Review via email: mp+187351@code.launchpad.net

Commit message

Revert to upstream panel if indicator-keyboard schema is missing.

Description of the change

Revert to upstream panel if indicator-keyboard schema is missing.

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2013-09-19 19:15:42 +0000
3+++ debian/changelog 2013-09-24 21:02:10 +0000
4@@ -1,3 +1,10 @@
5+gnome-control-center (1:3.6.3-0ubuntu39) UNRELEASED; urgency=low
6+
7+ * debian/patches/input-sources-text-entry.patch:
8+ - Revert to upstream panel if indicator-keyboard schema is missing.
9+
10+ -- William Hua <william.hua@canonical.com> Tue, 24 Sep 2013 16:58:18 -0400
11+
12 gnome-control-center (1:3.6.3-0ubuntu38) saucy; urgency=low
13
14 * debian/patches/57_use_nonsymbolic_keyboard_icon.patch:
15
16=== modified file 'debian/patches/git_show_per_window_input_settings.patch'
17--- debian/patches/git_show_per_window_input_settings.patch 2013-09-11 15:11:05 +0000
18+++ debian/patches/git_show_per_window_input_settings.patch 2013-09-24 21:02:10 +0000
19@@ -5,10 +5,8 @@
20
21 https://bugzilla.gnome.org/show_bug.cgi?id=684210
22 ---
23-Index: gnome-control-center-3.6.3/panels/region/gnome-region-panel.ui
24-===================================================================
25---- gnome-control-center-3.6.3.orig/panels/region/gnome-region-panel.ui 2013-09-11 10:18:42.715555023 -0400
26-+++ gnome-control-center-3.6.3/panels/region/gnome-region-panel.ui 2013-09-11 10:18:42.707555024 -0400
27+--- a/panels/region/gnome-region-panel.ui
28++++ b/panels/region/gnome-region-panel.ui
29 @@ -862,111 +862,191 @@
30 </packing>
31 </child>
32@@ -285,11 +283,9 @@
33 </child>
34 </object>
35 <packing>
36-Index: gnome-control-center-3.6.3/panels/region/gnome-region-panel-input.c
37-===================================================================
38---- gnome-control-center-3.6.3.orig/panels/region/gnome-region-panel-input.c 2013-09-11 10:18:42.499555032 -0400
39-+++ gnome-control-center-3.6.3/panels/region/gnome-region-panel-input.c 2013-09-11 10:21:05.091549069 -0400
40-@@ -1741,6 +1741,18 @@
41+--- a/panels/region/gnome-region-panel-input.c
42++++ b/panels/region/gnome-region-panel-input.c
43+@@ -1760,6 +1760,18 @@
44 G_CALLBACK (input_sources_changed),
45 builder);
46
47@@ -305,6 +301,6 @@
48 + g_signal_connect_swapped (WID("per-window-radio-false"), "clicked",
49 + G_CALLBACK (g_settings_apply), input_sources_settings);
50 +
51- if (is_ubuntu ())
52+ if (has_indicator_keyboard ())
53 {
54 libgnomekbd_settings = g_settings_new (LIBGNOMEKBD_DESKTOP_SCHEMA_ID);
55
56=== modified file 'debian/patches/input-sources-text-entry.patch'
57--- debian/patches/input-sources-text-entry.patch 2013-09-09 14:28:59 +0000
58+++ debian/patches/input-sources-text-entry.patch 2013-09-24 21:02:10 +0000
59@@ -54,7 +54,7 @@
60
61 #ifdef HAVE_IBUS
62 static IBusBus *ibus = NULL;
63-@@ -279,6 +301,12 @@
64+@@ -279,6 +301,31 @@
65 };
66 #endif /* HAVE_IBUS */
67
68@@ -64,10 +64,29 @@
69 + return g_strcmp0 (g_getenv ("XDG_CURRENT_DESKTOP"), "Unity") == 0;
70 +}
71 +
72++static gboolean
73++has_indicator_keyboard (void)
74++{
75++ if (is_ubuntu ())
76++ {
77++ const gchar * const *schemas = g_settings_list_schemas ();
78++
79++ while (*schemas != NULL)
80++ {
81++ if (g_strcmp0 (*schemas, INDICATOR_KEYBOARD_SCHEMA_ID) == 0)
82++ return TRUE;
83++
84++ schemas++;
85++ }
86++ }
87++
88++ return FALSE;
89++}
90++
91 static void populate_model (GtkListStore *store,
92 GtkListStore *active_sources_store);
93 static GtkWidget *input_chooser_new (GtkWindow *main_window,
94-@@ -467,9 +495,6 @@
95+@@ -467,9 +514,6 @@
96 ibus_cancellable,
97 (GAsyncReadyCallback)fetch_ibus_engines_result,
98 builder);
99@@ -77,7 +96,7 @@
100 }
101
102 static void
103-@@ -488,6 +513,277 @@
104+@@ -488,6 +532,277 @@
105 }
106
107 static void
108@@ -340,7 +359,7 @@
109 +
110 + fetch_ibus_engines (builder);
111 +
112-+ if (is_ubuntu ())
113++ if (has_indicator_keyboard ())
114 + {
115 + update_source_radios (builder);
116 + update_orientation_combo (builder);
117@@ -355,7 +374,7 @@
118 on_shell_appeared (GDBusConnection *connection,
119 const gchar *name,
120 const gchar *name_owner,
121-@@ -499,10 +795,9 @@
122+@@ -499,10 +814,9 @@
123 {
124 ibus = ibus_bus_new_async ();
125 if (ibus_bus_is_connected (ibus))
126@@ -368,7 +387,7 @@
127 }
128 maybe_start_ibus ();
129 }
130-@@ -1150,6 +1445,8 @@
131+@@ -1150,6 +1464,8 @@
132 const gchar *argv[] = { "shortcuts", "Typing", NULL };
133 GError *error = NULL;
134
135@@ -377,7 +396,7 @@
136 shell = cc_panel_get_shell (CC_PANEL (panel));
137 if (!cc_shell_set_active_panel_from_id (shell, "keyboard", argv, &error))
138 {
139-@@ -1234,6 +1531,15 @@
140+@@ -1234,6 +1550,15 @@
141 g_free (next);
142 }
143
144@@ -393,7 +412,7 @@
145 static gboolean
146 active_sources_visible_func (GtkTreeModel *model,
147 GtkTreeIter *iter,
148-@@ -1251,8 +1557,99 @@
149+@@ -1251,8 +1576,99 @@
150 return TRUE;
151 }
152
153@@ -494,7 +513,7 @@
154 CcRegionPanel *panel)
155 {
156 GtkWidget *treeview;
157-@@ -1262,6 +1659,17 @@
158+@@ -1262,6 +1678,17 @@
159 GtkTreeModel *filtered_store;
160 GtkTreeSelection *selection;
161
162@@ -512,7 +531,7 @@
163 /* set up the list of active inputs */
164 treeview = WID("active_input_sources");
165 column = gtk_tree_view_column_new ();
166-@@ -1279,8 +1687,8 @@
167+@@ -1279,8 +1706,8 @@
168 gtk_tree_view_set_model (GTK_TREE_VIEW (treeview), GTK_TREE_MODEL (store));
169
170 input_sources_settings = g_settings_new (GNOME_DESKTOP_INPUT_SOURCES_DIR);
171@@ -522,7 +541,7 @@
172
173 if (!xkb_info)
174 xkb_info = gnome_xkb_info_new ();
175-@@ -1294,7 +1702,6 @@
176+@@ -1294,7 +1721,6 @@
177 NULL,
178 builder,
179 NULL);
180@@ -530,7 +549,7 @@
181 #endif
182
183 populate_with_active_sources (store);
184-@@ -1327,17 +1734,70 @@
185+@@ -1327,17 +1753,70 @@
186 G_CALLBACK (show_selected_layout), builder);
187 g_signal_connect (WID("input_source_settings"), "clicked",
188 G_CALLBACK (show_selected_settings), builder);
189@@ -546,7 +565,7 @@
190 G_CALLBACK (input_sources_changed),
191 builder);
192 +
193-+ if (is_ubuntu ())
194++ if (has_indicator_keyboard ())
195 + {
196 + libgnomekbd_settings = g_settings_new (LIBGNOMEKBD_DESKTOP_SCHEMA_ID);
197 + indicator_settings = g_settings_new (INDICATOR_KEYBOARD_SCHEMA_ID);
198@@ -1171,20 +1190,41 @@
199
200 CC_PANEL_REGISTER (CcRegionPanel, cc_region_panel)
201
202-@@ -47,6 +48,12 @@
203+@@ -47,6 +48,33 @@
204 SYSTEM_PAGE
205 };
206
207++#define INDICATOR_KEYBOARD_SCHEMA_ID "com.canonical.indicator.keyboard"
208++
209 +static gboolean
210 +is_ubuntu (void)
211 +{
212 + return g_strcmp0 (g_getenv ("XDG_CURRENT_DESKTOP"), "Unity") == 0;
213 +}
214 +
215++static gboolean
216++has_indicator_keyboard (void)
217++{
218++ if (is_ubuntu ())
219++ {
220++ const gchar * const *schemas = g_settings_list_schemas ();
221++
222++ while (*schemas != NULL)
223++ {
224++ if (g_strcmp0 (*schemas, INDICATOR_KEYBOARD_SCHEMA_ID) == 0)
225++ return TRUE;
226++
227++ schemas++;
228++ }
229++ }
230++
231++ return FALSE;
232++}
233++
234 static void
235 cc_region_panel_set_page (CcRegionPanel *panel,
236 const char *page)
237-@@ -136,13 +143,21 @@
238+@@ -136,13 +164,21 @@
239 GtkWidget *prefs_widget;
240 GError *error = NULL;
241
242@@ -1197,7 +1237,7 @@
243 - gtk_builder_add_from_file (priv->builder,
244 - GNOMECC_UI_DIR "/gnome-region-panel.ui",
245 - &error);
246-+ if (is_ubuntu ())
247++ if (has_indicator_keyboard ())
248 + gtk_builder_add_from_file (priv->builder,
249 + GNOMECC_UI_DIR "/ubuntu-region-panel.ui",
250 + &error);

Subscribers

People subscribed via source and target branches