Merge lp:~khurshid-alam/unity-settings-daemon/gds-to-usd-impish into lp:unity-settings-daemon

Proposed by Khurshid Alam
Status: Needs review
Proposed branch: lp:~khurshid-alam/unity-settings-daemon/gds-to-usd-impish
Merge into: lp:unity-settings-daemon
Diff against target: 306 lines (+57/-22)
7 files modified
configure.ac (+4/-0)
data/com.canonical.unity.settings-daemon.peripherals.gschema.xml.in.in (+8/-5)
debian/control (+2/-0)
gnome-settings-daemon/gsd-bg.c (+6/-2)
plugins/background/gsd-background-manager.c (+15/-2)
plugins/mouse/gsd-mouse-manager.c (+12/-6)
plugins/xsettings/gsd-xsettings-manager.c (+10/-7)
To merge this branch: bzr merge lp:~khurshid-alam/unity-settings-daemon/gds-to-usd-impish
Reviewer Review Type Date Requested Status
Unity Settings Daemon Development Team Pending
Review via email: mp+404808@code.launchpad.net

Commit message

* Touchpad scroll-methos was migrated back to gsettings-desktop-schema from u-s-d. Now that g-d-s dropped those keys, move it back to u-s-d.

* Port other removed gsettings-desktop-schemas into usd schemas. LP: #1933646

To post a comment you must log in.
4207. By Khurshid Alam

Fix gsd-bg.c

4208. By Khurshid Alam

Fix2 gsd-bg.c

4209. By Khurshid Alam

Fix gsignal

4210. By Khurshid Alam

Use gesttings-unity-schema instead

4211. By Khurshid Alam

Fix-dependency

Unmerged revisions

4211. By Khurshid Alam

Fix-dependency

4210. By Khurshid Alam

Use gesttings-unity-schema instead

4209. By Khurshid Alam

Fix gsignal

4208. By Khurshid Alam

Fix2 gsd-bg.c

4207. By Khurshid Alam

Fix gsd-bg.c

4206. By Khurshid Alam

Port removed gsettings-desktop-schemas into usd schemas. LP: #1933646

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'configure.ac'
2--- configure.ac 2020-02-23 15:03:25 +0000
3+++ configure.ac 2021-06-30 16:49:02 +0000
4@@ -57,6 +57,7 @@
5 UPOWER_REQUIRED_VERSION=0.9.11
6 IBUS_REQUIRED_VERSION=1.4.99
7 GSETTINGS_DESKTOP_SCHEMAS_REQUIRED_VERSION=3.7.2.1
8+GSETTINGS_UNITY_SCHEMAS_REQUIRED_VERSION=0.0.1
9 XRANDR_REQUIRED_VERSION=1.3
10 XEXT_REQUIRED_VERSION=1.1
11 NM_REQUIRED_VERSION=1.0
12@@ -69,6 +70,7 @@
13 gmodule-2.0
14 gthread-2.0
15 gsettings-desktop-schemas >= $GSETTINGS_DESKTOP_SCHEMAS_REQUIRED_VERSION
16+ gsettings-unity-schemas >= $GSETTINGS_UNITY_SCHEMAS_REQUIRED_VERSION
17 )
18
19 PKG_CHECK_MODULES(SETTINGS_PLUGIN,
20@@ -76,6 +78,7 @@
21 gio-2.0 >= $GIO_REQUIRED_VERSION
22 libnotify >= $LIBNOTIFY_REQUIRED_VERSION
23 gsettings-desktop-schemas >= $GSETTINGS_DESKTOP_SCHEMAS_REQUIRED_VERSION
24+ gsettings-unity-schemas >= $GSETTINGS_UNITY_SCHEMAS_REQUIRED_VERSION
25 x11
26 )
27
28@@ -154,6 +157,7 @@
29 gio-2.0 >= $GIO_REQUIRED_VERSION
30 gnome-desktop-3.0 >= $GNOME_DESKTOP_REQUIRED_VERSION
31 gsettings-desktop-schemas >= $GSETTINGS_DESKTOP_SCHEMAS_REQUIRED_VERSION
32+ gsettings-unity-schemas >= $GSETTINGS_UNITY_SCHEMAS_REQUIRED_VERSION
33 gdk-pixbuf-2.0 >= $GDK_PIXBUF_REQUIRED_VERSION
34 xrandr >= $XRANDR_REQUIRED_VERSION
35 xext >= $XEXT_REQUIRED_VERSION
36
37=== modified file 'data/com.canonical.unity.settings-daemon.peripherals.gschema.xml.in.in'
38--- data/com.canonical.unity.settings-daemon.peripherals.gschema.xml.in.in 2020-03-06 20:22:12 +0000
39+++ data/com.canonical.unity.settings-daemon.peripherals.gschema.xml.in.in 2021-06-30 16:49:02 +0000
40@@ -14,6 +14,7 @@
41 <child name="smartcard" schema="com.canonical.unity.settings-daemon.peripherals.smartcard"/>
42 <child name="keyboard" schema="com.canonical.unity.settings-daemon.peripherals.keyboard"/>
43 <child name="mouse" schema="com.canonical.unity.settings-daemon.peripherals.mouse"/>
44+ <child name="touchpad" schema="com.canonical.unity.settings-daemon.peripherals.touchpad"/>
45 <child name="touchscreen" schema="com.canonical.unity.settings-daemon.peripherals.touchscreen"/>
46 <child name="input-devices" schema="com.canonical.unity.settings-daemon.peripherals.input-devices"/>
47 </schema>
48@@ -73,6 +74,13 @@
49 <description>Distance before a drag is started.</description>
50 </key>
51 </schema>
52+ <schema gettext-domain="@GETTEXT_PACKAGE@" id="com.canonical.unity.settings-daemon.peripherals.touchpad" path="/com/canonical/unity/settings-daemon/peripherals/touchpad/">
53+ <key name="scroll-method" enum="com.canonical.unity.settings-daemon.GsdTouchpadScrollMethod">
54+ <default>'two-finger-scrolling'</default>
55+ <summary>Select the touchpad scroll method</summary>
56+ <description>Select the touchpad scroll method. Supported values are: “disabled”, “edge-scrolling”, “two-finger-scrolling”.</description>
57+ </key>
58+ </schema>
59 <schema gettext-domain="@GETTEXT_PACKAGE@" id="com.canonical.unity.settings-daemon.peripherals.touchscreen" path="/com/canonical/unity/settings-daemon/peripherals/touchscreen/">
60 <key name="orientation-lock" type="b">
61 <default>false</default>
62@@ -136,11 +144,6 @@
63 <summary>Enable horizontal scrolling</summary>
64 <description>Set this to TRUE to allow horizontal scrolling by the same method selected with the scroll_method key.</description>
65 </key>
66- <key name="scroll-method" enum="com.canonical.unity.settings-daemon.GsdTouchpadScrollMethod">
67- <default>'two-finger-scrolling'</default>
68- <summary>Select the touchpad scroll method</summary>
69- <description>Select the touchpad scroll method. Supported values are: “disabled”, “edge-scrolling”, “two-finger-scrolling”.</description>
70- </key>
71 <key name="tap-to-click" type="b">
72 <default>false</default>
73 <summary>Enable mouse clicks with touchpad</summary>
74
75=== modified file 'debian/control'
76--- debian/control 2020-03-06 20:22:12 +0000
77+++ debian/control 2021-06-30 16:49:02 +0000
78@@ -23,6 +23,7 @@
79 libx11-dev,
80 libxtst-dev,
81 gsettings-desktop-schemas-dev (>= 3.15.4),
82+ gsettings-unity-schemas-dev (>= 0.0.7),
83 libgnome-desktop-3-dev (>= 3.7.90),
84 libpulse-dev (>= 1:2.0),
85 libasound2-dev,
86@@ -58,6 +59,7 @@
87 ${misc:Depends},
88 accountsservice (>= 0.6.34),
89 gsettings-desktop-schemas (>= 3.15.4),
90+ gsettings-unity-schemas (>= 0.0.7),
91 nautilus-data (>= 2.91.3-1),
92 unity-settings-daemon-schemas (>= ${source:Version}),
93 gsettings-ubuntu-schemas (>= 0.0.7+17.10.20170922),
94
95=== modified file 'gnome-settings-daemon/gsd-bg.c'
96--- gnome-settings-daemon/gsd-bg.c 2020-02-23 15:03:25 +0000
97+++ gnome-settings-daemon/gsd-bg.c 2021-06-30 16:49:02 +0000
98@@ -320,7 +320,7 @@
99 g_return_if_fail (GSD_IS_BG (bg));
100 g_return_if_fail (G_IS_SETTINGS (settings));
101
102- background_settings = g_settings_new ("org.gnome.desktop.background");
103+ background_settings = g_settings_new ("com.canonical.unity.desktop.background");
104 bg->is_enabled = g_settings_get_boolean (background_settings, BG_KEY_DRAW_BACKGROUND);
105 g_object_unref (background_settings);
106
107@@ -357,6 +357,8 @@
108 gchar *secondary;
109 gchar *uri;
110
111+ GSettings *background_settings;
112+
113 g_return_if_fail (GSD_IS_BG (bg));
114 g_return_if_fail (G_IS_SETTINGS (settings));
115
116@@ -370,7 +372,9 @@
117 uri = g_filename_to_uri (bg->filename, NULL, NULL);
118 if (uri == NULL)
119 uri = g_strdup ("");
120- g_settings_set_boolean (settings, BG_KEY_DRAW_BACKGROUND, bg->is_enabled);
121+ background_settings = g_settings_new ("com.canonical.unity.desktop.background");
122+ g_settings_set_boolean (background_settings, BG_KEY_DRAW_BACKGROUND, bg->is_enabled);
123+ g_object_unref (background_settings);
124 g_settings_set_string (settings, BG_KEY_PICTURE_URI, uri);
125 g_settings_set_string (settings, BG_KEY_PRIMARY_COLOR, primary);
126 g_settings_set_string (settings, BG_KEY_SECONDARY_COLOR, secondary);
127
128=== modified file 'plugins/background/gsd-background-manager.c'
129--- plugins/background/gsd-background-manager.c 2020-02-23 15:03:25 +0000
130+++ plugins/background/gsd-background-manager.c 2021-06-30 16:49:02 +0000
131@@ -50,6 +50,7 @@
132 struct GsdBackgroundManagerPrivate
133 {
134 GSettings *settings;
135+ GSettings *usettings;
136 GsdBG *bg;
137
138 GsdBGCrossfade *fade;
139@@ -72,7 +73,7 @@
140 static gboolean
141 dont_draw_background (GsdBackgroundManager *manager)
142 {
143- return !g_settings_get_boolean (manager->priv->settings,
144+ return !g_settings_get_boolean (manager->priv->usettings,
145 "draw-background");
146 }
147
148@@ -497,8 +498,11 @@
149 gnome_settings_profile_start (NULL);
150
151 manager->priv->settings = g_settings_new ("org.gnome.desktop.background");
152- g_signal_connect (manager->priv->settings, "changed::draw-background",
153+ manager->priv->usettings = g_settings_new ("com.canonical.unity.desktop.background");
154+
155+ g_signal_connect (manager->priv->usettings, "changed::draw-background",
156 G_CALLBACK (draw_background_changed), manager);
157+
158 g_signal_connect (manager->priv->settings, "changed::picture-uri",
159 G_CALLBACK (picture_uri_changed), manager);
160
161@@ -541,11 +545,20 @@
162 settings_change_event_cb,
163 manager);
164
165+ g_signal_handlers_disconnect_by_func (manager->priv->usettings,
166+ settings_change_event_cb,
167+ manager);
168+
169 if (p->settings != NULL) {
170 g_object_unref (p->settings);
171 p->settings = NULL;
172 }
173
174+ if (p->usettings != NULL) {
175+ g_object_unref (p->usettings);
176+ p->usettings = NULL;
177+ }
178+
179 if (p->bg != NULL) {
180 g_object_unref (p->bg);
181 p->bg = NULL;
182
183=== modified file 'plugins/mouse/gsd-mouse-manager.c'
184--- plugins/mouse/gsd-mouse-manager.c 2020-03-06 20:22:12 +0000
185+++ plugins/mouse/gsd-mouse-manager.c 2021-06-30 16:49:02 +0000
186@@ -60,6 +60,7 @@
187 #define GNOME_DESKTOP_INTERFACE_DIR "org.gnome.desktop.interface"
188 #define GSETTINGS_MOUSE_SCHEMA "org.gnome.desktop.peripherals.mouse"
189 #define GSETTINGS_TOUCHPAD_SCHEMA "org.gnome.desktop.peripherals.touchpad"
190+#define USD_TOUCHPAD_SCHEMA "com.canonical.unity.settings-daemon.peripherals.touchpad"
191
192 /* Keys for both touchpad and mouse */
193 #define KEY_LEFT_HANDED "left-handed" /* a boolean for mouse, an enum for touchpad */
194@@ -80,6 +81,7 @@
195 {
196 guint start_idle_id;
197 GSettings *touchpad_settings;
198+ GSettings *usd_touchpad_settings;
199 GSettings *mouse_settings;
200 GSettings *mouse_a11y_settings;
201 GSettings *interface_settings;
202@@ -737,7 +739,7 @@
203 if (!(data[3]) && method == GSD_TOUCHPAD_SCROLL_METHOD_TWO_FINGER_SCROLLING) {
204 g_warning ("Two finger scroll is not supported by %s", gdk_device_get_name (device));
205 method = GSD_TOUCHPAD_SCROLL_METHOD_EDGE_SCROLLING;
206- g_settings_set_enum (manager->priv->touchpad_settings, KEY_SCROLL_METHOD, method);
207+ g_settings_set_enum (manager->priv->usd_touchpad_settings, KEY_SCROLL_METHOD, method);
208 }
209
210 XFree (data);
211@@ -954,7 +956,7 @@
212 set_motion (manager, device);
213
214 set_tap_to_click (device, g_settings_get_boolean (manager->priv->touchpad_settings, KEY_TAP_TO_CLICK), touchpad_left_handed);
215- set_scroll_method (manager, device, g_settings_get_enum (manager->priv->touchpad_settings, KEY_SCROLL_METHOD));
216+ set_scroll_method (manager, device, g_settings_get_enum (manager->priv->usd_touchpad_settings, KEY_SCROLL_METHOD));
217 set_horiz_scroll (device, TRUE);
218 set_natural_scroll (manager, device, g_settings_get_boolean (manager->priv->touchpad_settings, KEY_NATURAL_SCROLL_ENABLED));
219 if (!get_touchpad_enabled (manager))
220@@ -1077,10 +1079,10 @@
221 if (g_str_equal (key, KEY_TAP_TO_CLICK)) {
222 gboolean mouse_left_handed;
223 mouse_left_handed = g_settings_get_boolean (manager->priv->mouse_settings, KEY_LEFT_HANDED);
224- set_tap_to_click (device, g_settings_get_boolean (settings, key),
225+ set_tap_to_click (device, g_settings_get_boolean (manager->priv->touchpad_settings, key),
226 get_touchpad_handedness (manager, mouse_left_handed));
227 } else if (g_str_equal (key, KEY_SCROLL_METHOD)) {
228- set_scroll_method (manager, device, g_settings_get_enum (settings, key));
229+ set_scroll_method (manager, device, g_settings_get_enum (manager->priv->usd_touchpad_settings, key));
230 set_horiz_scroll (device, TRUE);
231 } else if (g_str_equal (key, KEY_SEND_EVENTS)) {
232 if (!get_touchpad_enabled (manager))
233@@ -1094,7 +1096,7 @@
234 mouse_left_handed = g_settings_get_boolean (manager->priv->mouse_settings, KEY_LEFT_HANDED);
235 set_left_handed (manager, device, mouse_left_handed, get_touchpad_handedness (manager, mouse_left_handed));
236 } else if (g_str_equal (key, KEY_NATURAL_SCROLL_ENABLED)) {
237- set_natural_scroll (manager, device, g_settings_get_boolean (settings, key));
238+ set_natural_scroll (manager, device, g_settings_get_boolean (manager->priv->touchpad_settings, key));
239 }
240 }
241 g_list_free (devices);
242@@ -1239,6 +1241,10 @@
243 g_signal_connect (manager->priv->touchpad_settings, "changed",
244 G_CALLBACK (touchpad_callback), manager);
245
246+ manager->priv->usd_touchpad_settings = g_settings_new (USD_TOUCHPAD_SCHEMA);
247+ g_signal_connect (manager->priv->usd_touchpad_settings, "changed",
248+ G_CALLBACK (touchpad_callback), manager);
249+
250 manager->priv->syndaemon_spawned = FALSE;
251
252 set_locate_pointer (manager, g_settings_get_boolean (manager->priv->interface_settings, KEY_LOCATE_POINTER));
253@@ -1324,6 +1330,7 @@
254 g_clear_object (&p->mouse_a11y_settings);
255 g_clear_object (&p->mouse_settings);
256 g_clear_object (&p->touchpad_settings);
257+ g_clear_object (&p->usd_touchpad_settings);
258
259 set_locate_pointer (manager, FALSE);
260
261@@ -1392,7 +1399,6 @@
262 GsdSettingsMigrateEntry touchpad_entries[] = {
263 { "disable-while-typing", NULL, NULL },
264 { "horiz-scroll-enabled", NULL, NULL },
265- { "scroll-method", "scroll-method", NULL },
266 { "tap-to-click", "tap-to-click", NULL },
267 { "touchpad-enabled", "send-events", map_send_events },
268 { "left-handed", "left-handed", NULL },
269
270=== modified file 'plugins/xsettings/gsd-xsettings-manager.c'
271--- plugins/xsettings/gsd-xsettings-manager.c 2020-03-06 20:22:12 +0000
272+++ plugins/xsettings/gsd-xsettings-manager.c 2021-06-30 16:49:02 +0000
273@@ -387,23 +387,26 @@
274 { "org.gnome.desktop.interface", "gtk-im-status-style", "Gtk/IMStatusStyle", translate_string_string },
275 { "org.gnome.desktop.interface", "gtk-im-module", "Gtk/IMModule", translate_string_string },
276 { "org.gnome.desktop.interface", "icon-theme", "Net/IconThemeName", translate_string_string },
277- { "org.gnome.desktop.interface", "menus-have-icons", "Gtk/MenuImages", translate_bool_int },
278- { "org.gnome.desktop.interface", "buttons-have-icons", "Gtk/ButtonImages", translate_bool_int },
279 { "org.gnome.desktop.interface", "menubar-accel", "Gtk/MenuBarAccel", translate_string_string },
280 { "org.gnome.desktop.interface", "enable-animations", "Gtk/EnableAnimations", translate_bool_int },
281 { "org.gnome.desktop.interface", "cursor-theme", "Gtk/CursorThemeName", translate_string_string },
282+
283 /* cursor-size is handled via the Xft side as it needs the scaling factor */
284- { "org.gnome.desktop.interface", "show-input-method-menu", "Gtk/ShowInputMethodMenu", translate_bool_int },
285- { "org.gnome.desktop.interface", "show-unicode-menu", "Gtk/ShowUnicodeMenu", translate_bool_int },
286- { "org.gnome.desktop.interface", "automatic-mnemonics", "Gtk/AutoMnemonics", translate_bool_int },
287-
288 { "org.gnome.desktop.sound", "theme-name", "Net/SoundThemeName", translate_string_string },
289 { "org.gnome.desktop.sound", "event-sounds", "Net/EnableEventSounds" , translate_bool_int },
290 { "org.gnome.desktop.sound", "input-feedback-sounds", "Net/EnableInputFeedbackSounds", translate_bool_int },
291
292 { "org.gnome.desktop.privacy", "recent-files-max-age", "Gtk/RecentFilesMaxAge", translate_int_int },
293 { "org.gnome.desktop.privacy", "remember-recent-files", "Gtk/RecentFilesEnabled", translate_bool_int },
294- { "org.gnome.desktop.wm.preferences", "button-layout", "Gtk/DecorationLayout", translate_button_layout }
295+ { "org.gnome.desktop.wm.preferences", "button-layout", "Gtk/DecorationLayout", translate_button_layout },
296+
297+ /* Moved from gsettings-desktop-schemas */
298+ { "com.canonical.unity.desktop.interface", "menus-have-icons", "Gtk/MenuImages", translate_bool_int },
299+ { "com.canonical.unity.desktop.interface", "buttons-have-icons", "Gtk/ButtonImages", translate_bool_int },
300+
301+ { "com.canonical.unity.desktop.interface", "show-input-method-menu", "Gtk/ShowInputMethodMenu", translate_bool_int },
302+ { "com.canonical.unity.desktop.interface", "show-unicode-menu", "Gtk/ShowUnicodeMenu", translate_bool_int },
303+ { "com.canonical.unity.desktop.interface", "automatic-mnemonics", "Gtk/AutoMnemonics", translate_bool_int }
304 };
305
306 static gboolean

Subscribers

People subscribed via source and target branches