Merge lp:~attente/ubuntu/quantal/gnome-control-center/bug-1070905 into lp:~ubuntu-desktop/gnome-control-center/ubuntu

Proposed by William Hua
Status: Merged
Merged at revision: 500
Proposed branch: lp:~attente/ubuntu/quantal/gnome-control-center/bug-1070905
Merge into: lp:~ubuntu-desktop/gnome-control-center/ubuntu
Diff against target: 226 lines (+71/-39)
3 files modified
debian/changelog (+11/-0)
debian/patches/04_new_appearance_settings.patch (+17/-22)
debian/patches/63_normal_scrollbar_in_a11y.patch (+43/-17)
To merge this branch: bzr merge lp:~attente/ubuntu/quantal/gnome-control-center/bug-1070905
Reviewer Review Type Date Requested Status
Sebastien Bacher Pending
Review via email: mp+131401@code.launchpad.net

Description of the change

  * debian/patches/check_settings_schema.patch
    - don't crash in the a11y panel if the overlay scrollbars are not
      installed (lp: #1070905)

To post a comment you must log in.
Revision history for this message
Allison Karlitskaya (desrt) wrote :

In a case like this (where the original patch contained a bug) it's more usual to update that patch rather than add another patch on top of it...

I hope you enjoy quilt :)

501. By William Hua

* debian/patches/04_new_appearance_settings.patch
  - use g_settings_schema_source_lookup to determine availability
    of settings schema
* debian/patches/63_normal_scrollbar_in_a11y.patch
  - merge debian/patches/check_settings_schema.patch
* debian/patches/check_settings_schema.patch
  - removed, merged into above

502. By William Hua

Remove unnecessary entry in debian/changelog.

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 2012-10-09 15:03:43 +0000
3+++ debian/changelog 2012-10-25 15:08:21 +0000
4@@ -1,3 +1,14 @@
5+gnome-control-center (1:3.4.2-0ubuntu20) quantal; urgency=low
6+
7+ * debian/patches/04_new_appearance_settings.patch
8+ - use g_settings_schema_source_lookup to determine availability
9+ of settings schema
10+ * debian/patches/63_normal_scrollbar_in_a11y.patch
11+ - don't crash in the a11y panel if the overlay scrollbars are not
12+ installed (lp: #1070905)
13+
14+ -- William Hua <william.hua@canonical.com> Wed, 24 Oct 2012 23:50:07 -0400
15+
16 gnome-control-center (1:3.4.2-0ubuntu19) quantal; urgency=low
17
18 * debian/patches/clutter_init.patch:
19
20=== modified file 'debian/patches/04_new_appearance_settings.patch'
21--- debian/patches/04_new_appearance_settings.patch 2012-10-03 16:37:41 +0000
22+++ debian/patches/04_new_appearance_settings.patch 2012-10-25 15:08:21 +0000
23@@ -1,7 +1,7 @@
24 Index: gnome-control-center-3.4.2/panels/background/background.ui
25 ===================================================================
26---- gnome-control-center-3.4.2.orig/panels/background/background.ui 2012-10-03 18:22:42.180575065 +0200
27-+++ gnome-control-center-3.4.2/panels/background/background.ui 2012-10-03 18:22:44.832575073 +0200
28+--- gnome-control-center-3.4.2.orig/panels/background/background.ui 2012-10-25 10:02:13.498331007 -0400
29++++ gnome-control-center-3.4.2/panels/background/background.ui 2012-10-25 10:03:38.154335105 -0400
30 @@ -1,7 +1,6 @@
31 -<?xml version="1.0"?>
32 +<?xml version="1.0" encoding="UTF-8"?>
33@@ -1187,8 +1187,8 @@
34 </interface>
35 Index: gnome-control-center-3.4.2/panels/background/cc-background-panel.c
36 ===================================================================
37---- gnome-control-center-3.4.2.orig/panels/background/cc-background-panel.c 2012-10-03 18:22:42.180575065 +0200
38-+++ gnome-control-center-3.4.2/panels/background/cc-background-panel.c 2012-10-03 18:31:18.932576619 +0200
39+--- gnome-control-center-3.4.2.orig/panels/background/cc-background-panel.c 2012-10-25 10:02:13.498331007 -0400
40++++ gnome-control-center-3.4.2/panels/background/cc-background-panel.c 2012-10-25 10:10:48.714355945 -0400
41 @@ -69,6 +69,11 @@
42 #endif
43
44@@ -1291,7 +1291,7 @@
45
46 gdk_color_parse (cc_background_item_get_pcolor (priv->current_background), &pcolor);
47 gdk_color_parse (cc_background_item_get_scolor (priv->current_background), &scolor);
48-@@ -1162,12 +1228,503 @@
49+@@ -1162,12 +1228,498 @@
50 g_strfreev(uris);
51 }
52
53@@ -1349,7 +1349,9 @@
54 + return;
55 +
56 + g_settings_delay (self->priv->interface_settings);
57-+ g_settings_delay (self->priv->canonical_interface_settings);
58++
59++ if (self->priv->canonical_interface_settings != NULL)
60++ g_settings_delay (self->priv->canonical_interface_settings);
61 +
62 + g_settings_set_string (self->priv->interface_settings, "gtk-theme", gtk_theme);
63 + g_settings_set_string (self->priv->interface_settings, "icon-theme", icon_theme);
64@@ -1384,22 +1386,15 @@
65 + gint i, current_theme_index = 0;
66 + GtkWidget *widget;
67 + GtkWidget *liststore;
68-+ const gchar * const *schemas;
69++ GSettingsSchemaSource *source;
70 + CcBackgroundPanelPrivate *priv = self->priv;
71 + GSettings *defaults_settings = g_settings_new ("org.gnome.desktop.interface");
72 +
73 + priv->interface_settings = g_settings_new ("org.gnome.desktop.interface");
74 +
75-+ schemas = g_settings_list_schemas ();
76-+ while (*schemas != NULL)
77-+ {
78-+ if (g_strcmp0 (*schemas, CANONICAL_DESKTOP_INTERFACE) == 0)
79-+ {
80-+ priv->canonical_interface_settings = g_settings_new (CANONICAL_DESKTOP_INTERFACE);
81-+ break;
82-+ }
83-+ schemas++;
84-+ }
85++ source = g_settings_schema_source_get_default ();
86++ if (source != NULL && g_settings_schema_source_lookup (source, CANONICAL_DESKTOP_INTERFACE, TRUE) != NULL)
87++ priv->canonical_interface_settings = g_settings_new (CANONICAL_DESKTOP_INTERFACE);
88 +
89 + priv->wm_theme_settings = g_settings_new ("org.gnome.desktop.wm.preferences");
90 + current_gtk_theme = g_settings_get_string (priv->interface_settings, "gtk-theme");
91@@ -1796,7 +1791,7 @@
92 GError *err = NULL;
93 GtkWidget *widget;
94 GtkListStore *store;
95-@@ -1177,9 +1734,14 @@
96+@@ -1177,9 +1729,14 @@
97
98 priv->builder = gtk_builder_new ();
99
100@@ -1814,7 +1809,7 @@
101
102 if (err)
103 {
104-@@ -1230,7 +1792,10 @@
105+@@ -1230,7 +1787,10 @@
106
107
108 /* add the top level widget */
109@@ -1826,7 +1821,7 @@
110
111 gtk_container_add (GTK_CONTAINER (self), widget);
112 gtk_widget_show_all (GTK_WIDGET (self));
113-@@ -1301,6 +1866,18 @@
114+@@ -1301,6 +1861,18 @@
115
116 /* Setup the edit box with our current settings */
117 source_update_edit_box (priv, TRUE);
118@@ -1847,8 +1842,8 @@
119 void
120 Index: gnome-control-center-3.4.2/panels/background/gnome-background-panel.desktop.in.in
121 ===================================================================
122---- gnome-control-center-3.4.2.orig/panels/background/gnome-background-panel.desktop.in.in 2012-10-03 18:22:42.180575065 +0200
123-+++ gnome-control-center-3.4.2/panels/background/gnome-background-panel.desktop.in.in 2012-10-03 18:22:44.836575073 +0200
124+--- gnome-control-center-3.4.2.orig/panels/background/gnome-background-panel.desktop.in.in 2012-10-25 10:02:13.498331007 -0400
125++++ gnome-control-center-3.4.2/panels/background/gnome-background-panel.desktop.in.in 2012-10-25 10:03:38.158335105 -0400
126 @@ -1,6 +1,6 @@
127 [Desktop Entry]
128 -_Name=Background
129
130=== modified file 'debian/patches/63_normal_scrollbar_in_a11y.patch'
131--- debian/patches/63_normal_scrollbar_in_a11y.patch 2012-10-02 17:22:32 +0000
132+++ debian/patches/63_normal_scrollbar_in_a11y.patch 2012-10-25 15:08:21 +0000
133@@ -1,8 +1,19 @@
134 Index: gnome-control-center-3.4.2/panels/universal-access/cc-ua-panel.c
135 ===================================================================
136---- gnome-control-center-3.4.2.orig/panels/universal-access/cc-ua-panel.c 2012-04-10 17:01:29.000000000 +0200
137-+++ gnome-control-center-3.4.2/panels/universal-access/cc-ua-panel.c 2012-10-02 18:07:53.320752834 +0200
138-@@ -44,6 +44,7 @@
139+--- gnome-control-center-3.4.2.orig/panels/universal-access/cc-ua-panel.c 2012-10-25 10:02:11.890330931 -0400
140++++ gnome-control-center-3.4.2/panels/universal-access/cc-ua-panel.c 2012-10-25 10:21:20.182386505 -0400
141+@@ -31,8 +31,9 @@
142+
143+ #include "zoom-options.h"
144+
145+-#define WID(b, w) (GtkWidget *) gtk_builder_get_object (b, w)
146++#define CANONICAL_DESKTOP_INTERFACE "com.canonical.desktop.interface"
147+
148++#define WID(b, w) (GtkWidget *) gtk_builder_get_object (b, w)
149+
150+ G_DEFINE_DYNAMIC_TYPE (CcUaPanel, cc_ua_panel, CC_TYPE_PANEL)
151+
152+@@ -44,6 +45,7 @@
153 GtkBuilder *builder;
154 GSettings *wm_settings;
155 GSettings *interface_settings;
156@@ -10,7 +21,7 @@
157 GSettings *kb_settings;
158 GSettings *mouse_settings;
159 GSettings *application_settings;
160-@@ -109,6 +110,12 @@
161+@@ -109,6 +111,12 @@
162 priv->interface_settings = NULL;
163 }
164
165@@ -23,16 +34,19 @@
166 if (priv->kb_settings)
167 {
168 g_object_unref (priv->kb_settings);
169-@@ -423,11 +430,21 @@
170+@@ -423,11 +431,25 @@
171
172 if (g_strcmp0 (theme_name, ""))
173 {
174 + /* disable overlay scrollbars for a11y */
175-+ if (g_strcmp0 (theme_name, "HighContrast") == 0 ||
176-+ g_strcmp0 (theme_name, "HighContrastInverse") == 0)
177-+ g_settings_set_string (priv->canonical_interface_settings, "scrollbar-mode", "normal");
178-+ else
179-+ g_settings_reset (priv->canonical_interface_settings, "scrollbar-mode");
180++ if (priv->canonical_interface_settings != NULL)
181++ {
182++ if (g_strcmp0 (theme_name, "HighContrast") == 0 ||
183++ g_strcmp0 (theme_name, "HighContrastInverse") == 0)
184++ g_settings_set_string (priv->canonical_interface_settings, "scrollbar-mode", "normal");
185++ else
186++ g_settings_reset (priv->canonical_interface_settings, "scrollbar-mode");
187++ }
188 +
189 g_settings_set_string (priv->interface_settings, GTK_THEME_KEY, theme_name);
190 g_settings_set_string (priv->interface_settings, ICON_THEME_KEY, theme_name);
191@@ -40,16 +54,28 @@
192 else
193 {
194 + /* reset overlay scrollbars key */
195-+ g_settings_reset (priv->canonical_interface_settings, "scrollbar-mode");
196++ if (priv->canonical_interface_settings != NULL)
197++ g_settings_reset (priv->canonical_interface_settings, "scrollbar-mode");
198 +
199 g_settings_reset (priv->interface_settings, GTK_THEME_KEY);
200 g_settings_reset (priv->interface_settings, ICON_THEME_KEY);
201 }
202-@@ -772,6 +789,7 @@
203- }
204-
205- priv->interface_settings = g_settings_new ("org.gnome.desktop.interface");
206-+ priv->canonical_interface_settings = g_settings_new ("com.canonical.desktop.interface");
207- g_signal_connect (priv->interface_settings, "changed",
208+@@ -738,6 +760,7 @@
209+ static void
210+ cc_ua_panel_init (CcUaPanel *self)
211+ {
212++ GSettingsSchemaSource *source;
213+ CcUaPanelPrivate *priv;
214+ GtkWidget *widget;
215+ GError *err = NULL;
216+@@ -776,6 +799,10 @@
217 G_CALLBACK (interface_settings_changed_cb), self);
218 interface_settings_changed_cb (priv->interface_settings, "gtk-theme", self);
219+
220++ source = g_settings_schema_source_get_default ();
221++ if (source != NULL && g_settings_schema_source_lookup (source, CANONICAL_DESKTOP_INTERFACE, TRUE) != NULL)
222++ priv->canonical_interface_settings = g_settings_new (CANONICAL_DESKTOP_INTERFACE);
223++
224+ priv->wm_settings = g_settings_new ("org.gnome.desktop.wm.preferences");
225+ priv->kb_settings = g_settings_new ("org.gnome.desktop.a11y.keyboard");
226+ priv->mouse_settings = g_settings_new ("org.gnome.desktop.a11y.mouse");

Subscribers

People subscribed via source and target branches