Merge lp:~darkxst/unity-control-center/gsettings3.16 into lp:unity-control-center

Proposed by Tim Lunn
Status: Merged
Approved by: Tim Lunn
Approved revision: 12819
Merged at revision: 12825
Proposed branch: lp:~darkxst/unity-control-center/gsettings3.16
Merge into: lp:unity-control-center
Diff against target: 323 lines (+81/-77)
5 files modified
configure.ac (+1/-1)
debian/control (+3/-2)
panels/keyboard/keyboard-general.c (+1/-1)
panels/mouse/gnome-mouse-properties.c (+62/-36)
panels/mouse/gnome-mouse-properties.ui (+14/-37)
To merge this branch: bzr merge lp:~darkxst/unity-control-center/gsettings3.16
Reviewer Review Type Date Requested Status
Unity Control Center development team Pending
Review via email: mp+265204@code.launchpad.net

Commit message

Cherry-pick upstream changes for relocated peripheral settings

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
=== modified file 'configure.ac'
--- configure.ac 2015-02-12 14:09:23 +0000
+++ configure.ac 2015-07-19 03:33:47 +0000
@@ -116,7 +116,7 @@
116NETWORK_MANAGER_REQUIRED_VERSION=0.8.992116NETWORK_MANAGER_REQUIRED_VERSION=0.8.992
117LIBNOTIFY_REQUIRED_VERSION=0.7.3117LIBNOTIFY_REQUIRED_VERSION=0.7.3
118GNOME_DESKTOP_REQUIRED_VERSION=3.5.91118GNOME_DESKTOP_REQUIRED_VERSION=3.5.91
119SCHEMAS_REQUIRED_VERSION=3.7.2.2119SCHEMAS_REQUIRED_VERSION=3.15.4
120LIBWACOM_REQUIRED_VERSION=0.7120LIBWACOM_REQUIRED_VERSION=0.7
121CLUTTER_REQUIRED_VERSION=1.11.3121CLUTTER_REQUIRED_VERSION=1.11.3
122GOA_REQUIRED_VERSION=3.5.90122GOA_REQUIRED_VERSION=3.5.90
123123
=== modified file 'debian/control'
--- debian/control 2015-03-12 19:18:11 +0000
+++ debian/control 2015-07-19 03:33:47 +0000
@@ -14,7 +14,7 @@
14 gnome-pkg-tools (>= 0.10),14 gnome-pkg-tools (>= 0.10),
15 unity-settings-daemon-dev,15 unity-settings-daemon-dev,
16 libunity-settings-daemon-dev,16 libunity-settings-daemon-dev,
17 gsettings-desktop-schemas-dev (>= 3.7.2.2),17 gsettings-desktop-schemas-dev (>= 3.15.4),
18 hardening-wrapper,18 hardening-wrapper,
19 intltool (>= 0.37.1),19 intltool (>= 0.37.1),
20 libaccountsservice-dev (>= 0.6.30),20 libaccountsservice-dev (>= 0.6.30),
@@ -73,7 +73,8 @@
73 adwaita-icon-theme,73 adwaita-icon-theme,
74 gnome-menus (>= 2.12.0),74 gnome-menus (>= 2.12.0),
75 unity-settings-daemon,75 unity-settings-daemon,
76 gsettings-desktop-schemas (>= 3.5.91),76 gnome-settings-daemon-schemas (>= 3.16),
77 gsettings-desktop-schemas (>= 3.15.4),
77 gsettings-ubuntu-schemas (>= 0.0.1+14.04.20140224),78 gsettings-ubuntu-schemas (>= 0.0.1+14.04.20140224),
78 ibus,79 ibus,
79 indicator-bluetooth,80 indicator-bluetooth,
8081
=== modified file 'panels/keyboard/keyboard-general.c'
--- panels/keyboard/keyboard-general.c 2011-09-08 16:23:22 +0000
+++ panels/keyboard/keyboard-general.c 2015-07-19 03:33:47 +0000
@@ -76,7 +76,7 @@
76keyboard_general_init (CcPanel *panel, GtkBuilder *builder)76keyboard_general_init (CcPanel *panel, GtkBuilder *builder)
77{77{
78 if (keyboard_settings == NULL)78 if (keyboard_settings == NULL)
79 keyboard_settings = g_settings_new ("org.gnome.settings-daemon.peripherals.keyboard");79 keyboard_settings = g_settings_new ("org.gnome.desktop.peripherals.keyboard");
8080
81 if (interface_settings == NULL)81 if (interface_settings == NULL)
82 interface_settings = g_settings_new ("org.gnome.desktop.interface");82 interface_settings = g_settings_new ("org.gnome.desktop.interface");
8383
=== modified file 'panels/mouse/gnome-mouse-properties.c'
--- panels/mouse/gnome-mouse-properties.c 2014-02-07 16:40:25 +0000
+++ panels/mouse/gnome-mouse-properties.c 2015-07-19 03:33:47 +0000
@@ -32,6 +32,8 @@
32#include <unity-settings-daemon/gsd-enums.h>32#include <unity-settings-daemon/gsd-enums.h>
33#include <math.h>33#include <math.h>
3434
35#include <gdesktop-enums.h>
36
35#include "gnome-mouse-properties.h"37#include "gnome-mouse-properties.h"
36#include "gsd-input-helper.h"38#include "gsd-input-helper.h"
3739
@@ -45,6 +47,7 @@
45#define WID(x) (GtkWidget*) gtk_builder_get_object (dialog, x)47#define WID(x) (GtkWidget*) gtk_builder_get_object (dialog, x)
4648
47static GSettings *mouse_settings = NULL;49static GSettings *mouse_settings = NULL;
50static GSettings *gsd_mouse_settings = NULL;
48static GSettings *touchpad_settings = NULL;51static GSettings *touchpad_settings = NULL;
49static GdkDeviceManager *device_manager = NULL;52static GdkDeviceManager *device_manager = NULL;
50static guint device_added_id = 0;53static guint device_added_id = 0;
@@ -134,23 +137,38 @@
134 XFreeDeviceList (devicelist);137 XFreeDeviceList (devicelist);
135}138}
136139
137static void140static gboolean
138pointer_speed_scale_event (GtkRange *scale, GtkBuilder *dialog)141get_touchpad_enabled (GSettings *settings)
139{142 {
140 gdouble value;143 GDesktopDeviceSendEvents send_events;
141 GSettings *settings;144
142 GtkAdjustment *adjustment;145 send_events = g_settings_get_enum (settings, "send-events");
143146
144 if (GTK_WIDGET (scale) == WID ("pointer_speed_scale"))147 return send_events == G_DESKTOP_DEVICE_SEND_EVENTS_ENABLED;
145 settings = mouse_settings;148}
146 else149
147 settings = touchpad_settings;150static gboolean
148151touchpad_enabled_get_mapping (GValue *value,
149 g_settings_set_double (settings, "motion-acceleration", gtk_range_get_value (scale));152 GVariant *variant,
150153 gpointer user_data)
151 adjustment = gtk_range_get_adjustment (scale);154{
152 value = gtk_adjustment_get_upper (adjustment) - gtk_range_get_value (scale) + 1;155 gboolean enabled;
153 g_settings_set_int (settings, "motion-threshold", value);156
157 enabled = g_strcmp0 (g_variant_get_string (variant, NULL), "enabled") == 0;
158 g_value_set_boolean (value, enabled);
159 return TRUE;
160}
161
162static GVariant *
163touchpad_enabled_set_mapping (const GValue *value,
164 const GVariantType *type,
165 gpointer user_data)
166{
167 gboolean enabled;
168
169 enabled = g_value_get_boolean (value);
170
171 return g_variant_new_string (enabled ? "enabled" : "disabled");
154}172}
155173
156/* Set up the property editors in the dialog. */174/* Set up the property editors in the dialog. */
@@ -171,7 +189,7 @@
171 G_CALLBACK (orientation_radio_button_release_event), NULL);189 G_CALLBACK (orientation_radio_button_release_event), NULL);
172190
173 /* Double-click time */191 /* Double-click time */
174 g_settings_bind (mouse_settings, "double-click",192 g_settings_bind (gsd_mouse_settings, "double-click",
175 gtk_range_get_adjustment (GTK_RANGE (WID ("double_click_scale"))), "value",193 gtk_range_get_adjustment (GTK_RANGE (WID ("double_click_scale"))), "value",
176 G_SETTINGS_BIND_DEFAULT);194 G_SETTINGS_BIND_DEFAULT);
177195
@@ -179,9 +197,9 @@
179 mouse_present = mouse_is_present ();197 mouse_present = mouse_is_present ();
180 gtk_widget_set_visible (WID ("mouse_vbox"), mouse_present);198 gtk_widget_set_visible (WID ("mouse_vbox"), mouse_present);
181199
182 g_signal_connect (WID ("pointer_speed_scale"), "value-changed",200 gtk_scale_add_mark (GTK_SCALE (WID ("pointer_speed_scale")), 0,
183 G_CALLBACK (pointer_speed_scale_event), dialog);201 GTK_POS_TOP, NULL);
184 g_settings_bind (mouse_settings, "motion-acceleration",202 g_settings_bind (mouse_settings, "speed",
185 gtk_range_get_adjustment (GTK_RANGE (WID ("pointer_speed_scale"))), "value",203 gtk_range_get_adjustment (GTK_RANGE (WID ("pointer_speed_scale"))), "value",
186 G_SETTINGS_BIND_DEFAULT);204 G_SETTINGS_BIND_DEFAULT);
187205
@@ -189,29 +207,31 @@
189 touchpad_present = touchpad_is_present ();207 touchpad_present = touchpad_is_present ();
190 gtk_widget_set_visible (WID ("touchpad_vbox"), touchpad_present);208 gtk_widget_set_visible (WID ("touchpad_vbox"), touchpad_present);
191209
192 g_settings_bind (touchpad_settings, "touchpad-enabled",210 g_settings_bind_with_mapping (touchpad_settings, "send-events",
193 WID ("touchpad_enabled_switch"), "active",211 WID ("touchpad_enabled_switch"), "active",
194 G_SETTINGS_BIND_DEFAULT);212 G_SETTINGS_BIND_DEFAULT,
195 g_settings_bind (touchpad_settings, "touchpad-enabled",213 touchpad_enabled_get_mapping,
196 WID ("touchpad_options_box"), "sensitive",214 touchpad_enabled_set_mapping,
197 G_SETTINGS_BIND_GET);215 NULL, NULL);
216 g_settings_bind_with_mapping (touchpad_settings, "send-events",
217 WID ("touchpad_options_box"), "sensitive",
218 G_SETTINGS_BIND_GET,
219 touchpad_enabled_get_mapping,
220 touchpad_enabled_set_mapping,
221 NULL, NULL);
198222
199 g_settings_bind (touchpad_settings, "disable-while-typing",
200 WID ("disable_w_typing_toggle"), "active",
201 G_SETTINGS_BIND_DEFAULT);
202 g_settings_bind (touchpad_settings, "tap-to-click",223 g_settings_bind (touchpad_settings, "tap-to-click",
203 WID ("tap_to_click_toggle"), "active",224 WID ("tap_to_click_toggle"), "active",
204 G_SETTINGS_BIND_DEFAULT);225 G_SETTINGS_BIND_DEFAULT);
205 g_settings_bind (touchpad_settings, "natural-scroll",226 g_settings_bind (touchpad_settings, "natural-scroll",
206 WID ("natural_scroll_toggle"), "active",227 WID ("natural_scroll_toggle"), "active",
207 G_SETTINGS_BIND_DEFAULT);228 G_SETTINGS_BIND_DEFAULT);
208 g_settings_bind (touchpad_settings, "motion-acceleration",229 gtk_scale_add_mark (GTK_SCALE (WID ("touchpad_pointer_speed_scale")), 0,
230 GTK_POS_TOP, NULL);
231 g_settings_bind (touchpad_settings, "speed",
209 gtk_range_get_adjustment (GTK_RANGE (WID ("touchpad_pointer_speed_scale"))), "value",232 gtk_range_get_adjustment (GTK_RANGE (WID ("touchpad_pointer_speed_scale"))), "value",
210 G_SETTINGS_BIND_DEFAULT);233 G_SETTINGS_BIND_DEFAULT);
211234
212 g_signal_connect (WID ("touchpad_pointer_speed_scale"), "value-changed",
213 G_CALLBACK (pointer_speed_scale_event), dialog);
214
215 if (touchpad_present) {235 if (touchpad_present) {
216 synaptics_check_capabilities (dialog);236 synaptics_check_capabilities (dialog);
217 setup_scrollmethod_radios (dialog);237 setup_scrollmethod_radios (dialog);
@@ -273,8 +293,10 @@
273GtkWidget *293GtkWidget *
274gnome_mouse_properties_init (GtkBuilder *dialog)294gnome_mouse_properties_init (GtkBuilder *dialog)
275{295{
276 mouse_settings = g_settings_new ("org.gnome.settings-daemon.peripherals.mouse");296
277 touchpad_settings = g_settings_new ("org.gnome.settings-daemon.peripherals.touchpad");297 mouse_settings = g_settings_new ("org.gnome.desktop.peripherals.mouse");
298 gsd_mouse_settings = g_settings_new ("org.gnome.settings-daemon.peripherals.mouse");
299 touchpad_settings = g_settings_new ("org.gnome.desktop.peripherals.touchpad");
278300
279 device_manager = gdk_display_get_device_manager (gdk_display_get_default ());301 device_manager = gdk_display_get_device_manager (gdk_display_get_default ());
280 device_added_id = g_signal_connect (device_manager, "device-added",302 device_added_id = g_signal_connect (device_manager, "device-added",
@@ -295,6 +317,10 @@
295 g_object_unref (mouse_settings);317 g_object_unref (mouse_settings);
296 mouse_settings = NULL;318 mouse_settings = NULL;
297 }319 }
320 if (gsd_mouse_settings != NULL) {
321 g_object_unref (gsd_mouse_settings);
322 mouse_settings = NULL;
323 }
298 if (touchpad_settings != NULL) {324 if (touchpad_settings != NULL) {
299 g_object_unref (touchpad_settings);325 g_object_unref (touchpad_settings);
300 touchpad_settings = NULL;326 touchpad_settings = NULL;
301327
=== modified file 'panels/mouse/gnome-mouse-properties.ui'
--- panels/mouse/gnome-mouse-properties.ui 2013-11-28 06:07:03 +0000
+++ panels/mouse/gnome-mouse-properties.ui 2015-07-19 03:33:47 +0000
@@ -2,18 +2,16 @@
2<interface>2<interface>
3 <!-- interface-requires gtk+ 3.0 -->3 <!-- interface-requires gtk+ 3.0 -->
4 <object class="GtkAdjustment" id="adjustment1">4 <object class="GtkAdjustment" id="adjustment1">
5 <property name="lower">1</property>5 <property name="lower">-1</property>
6 <property name="upper">10</property>6 <property name="upper">1</property>
7 <property name="value">6</property>7 <property name="step_increment">0.2</property>
8 <property name="step_increment">1</property>8 <property name="page_increment">0.2</property>
9 <property name="page_increment">1</property>
10 </object>9 </object>
11 <object class="GtkAdjustment" id="adjustment11">10 <object class="GtkAdjustment" id="adjustment11">
12 <property name="lower">1</property>11 <property name="lower">-1</property>
13 <property name="upper">10</property>12 <property name="upper">1</property>
14 <property name="value">6</property>13 <property name="step_increment">0.2</property>
15 <property name="step_increment">1</property>14 <property name="page_increment">0.2</property>
16 <property name="page_increment">1</property>
17 </object>15 </object>
18 <object class="GtkAdjustment" id="adjustment4">16 <object class="GtkAdjustment" id="adjustment4">
19 <property name="lower">100</property>17 <property name="lower">100</property>
@@ -72,6 +70,7 @@
72 <packing>70 <packing>
73 <property name="expand">True</property>71 <property name="expand">True</property>
74 <property name="fill">True</property>72 <property name="fill">True</property>
73
75 <property name="position">0</property>74 <property name="position">0</property>
76 </packing>75 </packing>
77 </child>76 </child>
@@ -356,12 +355,12 @@
356 </packing>355 </packing>
357 </child>356 </child>
358 <child>357 <child>
359 <object class="GtkHScale" id="pointer_speed_scale">358 <object class="GtkScale" id="pointer_speed_scale">
359 <property name="orientation">horizontal</property>
360 <property name="visible">True</property>360 <property name="visible">True</property>
361 <property name="can_focus">True</property>361 <property name="can_focus">True</property>
362 <property name="adjustment">adjustment1</property>362 <property name="adjustment">adjustment1</property>
363 <property name="draw_value">False</property>363 <property name="draw_value">False</property>
364 <property name="value_pos">right</property>
365 </object>364 </object>
366 <packing>365 <packing>
367 <property name="expand">True</property>366 <property name="expand">True</property>
@@ -540,12 +539,12 @@
540 </packing>539 </packing>
541 </child>540 </child>
542 <child>541 <child>
543 <object class="GtkHScale" id="touchpad_pointer_speed_scale">542 <object class="GtkScale" id="touchpad_pointer_speed_scale">
543 <property name="orientation">horizontal</property>
544 <property name="visible">True</property>544 <property name="visible">True</property>
545 <property name="can_focus">True</property>545 <property name="can_focus">True</property>
546 <property name="adjustment">adjustment11</property>546 <property name="adjustment">adjustment11</property>
547 <property name="draw_value">False</property>547 <property name="draw_value">False</property>
548 <property name="value_pos">right</property>
549 </object>548 </object>
550 <packing>549 <packing>
551 <property name="expand">True</property>550 <property name="expand">True</property>
@@ -592,28 +591,6 @@
592 <property name="row_spacing">5</property>591 <property name="row_spacing">5</property>
593 <property name="column_spacing">10</property>592 <property name="column_spacing">10</property>
594 <child>593 <child>
595 <object class="GtkCheckButton" id="disable_w_typing_toggle">
596 <property name="label" translatable="yes">Disable while _typing</property>
597 <property name="use_action_appearance">False</property>
598 <property name="visible">True</property>
599 <property name="can_focus">True</property>
600 <property name="receives_default">False</property>
601 <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
602 <property name="use_action_appearance">False</property>
603 <property name="relief">none</property>
604 <property name="use_underline">True</property>
605 <property name="xalign">0</property>
606 <property name="active">True</property>
607 <property name="draw_indicator">True</property>
608 </object>
609 <packing>
610 <property name="left_attach">0</property>
611 <property name="top_attach">0</property>
612 <property name="width">1</property>
613 <property name="height">1</property>
614 </packing>
615 </child>
616 <child>
617 <object class="GtkCheckButton" id="tap_to_click_toggle">594 <object class="GtkCheckButton" id="tap_to_click_toggle">
618 <property name="label" translatable="yes">Tap to _click</property>595 <property name="label" translatable="yes">Tap to _click</property>
619 <property name="use_action_appearance">False</property>596 <property name="use_action_appearance">False</property>
@@ -629,7 +606,7 @@
629 </object>606 </object>
630 <packing>607 <packing>
631 <property name="left_attach">0</property>608 <property name="left_attach">0</property>
632 <property name="top_attach">1</property>609 <property name="top_attach">0</property>
633 <property name="width">1</property>610 <property name="width">1</property>
634 <property name="height">1</property>611 <property name="height">1</property>
635 </packing>612 </packing>

Subscribers

People subscribed via source and target branches