After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 743194 - Switch to new peripherals settings schema
Switch to new peripherals settings schema
Status: RESOLVED FIXED
Product: gnome-control-center
Classification: Core
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: Control-Center Maintainers
Control-Center Maintainers
Depends on:
Blocks:
 
 
Reported: 2015-01-19 17:55 UTC by Rui Matos
Modified: 2015-01-20 14:03 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
keyboard: Switch to new peripherals settings schema (1.51 KB, patch)
2015-01-19 17:55 UTC, Rui Matos
committed Details | Review
mouse: Switch to new peripherals settings schema (10.86 KB, patch)
2015-01-19 17:55 UTC, Rui Matos
needs-work Details | Review
mouse: Switch to new peripherals settings schema (14.12 KB, patch)
2015-01-19 19:08 UTC, Rui Matos
committed Details | Review

Description Rui Matos 2015-01-19 17:55:19 UTC
Still missing the wacom panel.
Comment 1 Rui Matos 2015-01-19 17:55:22 UTC
Created attachment 294905 [details] [review]
keyboard: Switch to new peripherals settings schema

Most peripherals settings have been moved to
gsettings-desktop-schemas.
Comment 2 Rui Matos 2015-01-19 17:55:29 UTC
Created attachment 294906 [details] [review]
mouse: Switch to new peripherals settings schema

Most peripherals settings have been moved to
gsettings-desktop-schemas.

There are some semantic differences:

* pointer and touchpad speed is now a single value in the [-1..1]
  range (from "unaccelerated" to "fast"). A value of 0 is the default;

* touchpad enabled is now an enum which can be enabled, disabled or
  disabled-on-external-mouse. This patch keeps the same UI so the last
  value is the same as disabled in the UI and can't be set for now.
Comment 3 Rui Matos 2015-01-19 18:02:37 UTC
Hi Allan, do you have ideas for how to re-work the UI to expose the disabled-on-external-mouse value for touchpads. Basically it means that the touchpad is enabled/disabled automagically depending on whether we find an external mouse attached.
Comment 4 Rui Matos 2015-01-19 18:03:50 UTC
Just to be clear, re-working the UI doesn't need to block this.
Comment 5 Bastien Nocera 2015-01-19 18:04:52 UTC
Review of attachment 294905 [details] [review]:

Looks good.
Comment 6 Bastien Nocera 2015-01-19 18:10:05 UTC
Review of attachment 294906 [details] [review]:

::: panels/mouse/gnome-mouse-properties.c
@@ +157,1 @@
+        return send_events == G_DESKTOP_DEVICE_SEND_EVENTS_ENABLED ? TRUE : FALSE;

return send_events == G_DESKTOP_DEVICE_SEND_EVENTS_ENABLED;
should be enough, no?

@@ +167,3 @@
 	if (mouse_is_present() || touchscreen_is_present())
 		return TRUE;
+

whitespace changes?

@@ +172,2 @@
 		return TRUE;
+

whitespace changes?

@@ +197,3 @@
+	enabled = g_value_get_boolean (value);
+
+        if (enabled) {

No need for the braces for one-line conditionals.

return g_variant_new_string (enabled ? "enabled" : "disabled");
might be easier?

@@ +223,2 @@
 	/* Double-click time */
+	g_settings_bind (d->gsd_mouse_settings, "double-click",

Could you please file a bug about GTK+ using the GSettings directly, and moving that to gsettings-desktop-schemas?
Comment 7 Rui Matos 2015-01-19 18:50:08 UTC
(In reply to comment #3)
> Hi Allan, do you have ideas for how to re-work the UI to expose the
> disabled-on-external-mouse value for touchpads. Basically it means that the
> touchpad is enabled/disabled automagically depending on whether we find an
> external mouse attached.

I filed bug 743198 for this so that I can close this one after landing the patches.
Comment 8 Rui Matos 2015-01-19 18:53:48 UTC
(In reply to comment #6)
> return send_events == G_DESKTOP_DEVICE_SEND_EVENTS_ENABLED;
> should be enough, no?

yes

> whitespace changes?

those were ugly trailing whitespaces. I can't help it since my editor shows them in red and since I edited the surrounding lines...

> return g_variant_new_string (enabled ? "enabled" : "disabled");
> might be easier?

sure

> @@ +223,2 @@
>      /* Double-click time */
> +    g_settings_bind (d->gsd_mouse_settings, "double-click",
> 
> Could you please file a bug about GTK+ using the GSettings directly, and moving
> that to gsettings-desktop-schemas?

As agreed on IRC we'll move this setting after 3.15.4. It needs to change here, in g-s-d's xsettings plugin and in gdk's wayland backend, at least.
Comment 9 Rui Matos 2015-01-19 19:08:33 UTC
Created attachment 294914 [details] [review]
mouse: Switch to new peripherals settings schema

Most peripherals settings have been moved to
gsettings-desktop-schemas.

There are some semantic differences:

* pointer and touchpad speed is now a single value in the [-1..1]
  range (from "unaccelerated" to "fast"). A value of 0 is the default;

* touchpad enabled is now an enum which can be enabled, disabled or
  disabled-on-external-mouse. This patch keeps the same UI so the last
  value is the same as disabled in the UI and can't be set for now;

* disable while typing is now always enabled so the checkbox has been
  removed;

* horizontal scrolling is always enabled when two finger scroll is
  disabled. It wasn't in the UI but we no longer need to set it since
  it doesn't exist anymore.
--

addressed the comments and fixed two more issues.
Comment 10 Rui Matos 2015-01-20 13:10:57 UTC
Comment on attachment 294905 [details] [review]
keyboard: Switch to new peripherals settings schema

Attachment 294905 [details] pushed as 2a36a4c - keyboard: Switch to new peripherals settings schema
Comment 11 Bastien Nocera 2015-01-20 13:49:39 UTC
Review of attachment 294914 [details] [review]:

Looks good.
Comment 12 Rui Matos 2015-01-20 14:03:04 UTC
Attachment 294914 [details] pushed as f5eb204 - mouse: Switch to new peripherals settings schema