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 677206 - New mouse and touchpad design
New mouse and touchpad design
Status: RESOLVED FIXED
Product: gnome-control-center
Classification: Core
Component: Mouse
3.4.x
Other Linux
: Normal normal
: ---
Assigned To: Control-Center Maintainers
Control-Center Maintainers
: 640076 (view as bug list)
Depends on: 659498
Blocks:
 
 
Reported: 2012-05-31 16:10 UTC by Allan Day
Modified: 2012-08-23 08:58 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
reorganize widget according to mockup (110.60 KB, patch)
2012-07-26 12:57 UTC, Ondrej Holy
none Details | Review
screenshot of reorganized panel (42.61 KB, image/png)
2012-07-26 12:58 UTC, Ondrej Holy
  Details
limit slider width as in mockup (2.11 KB, patch)
2012-08-01 08:43 UTC, Ondrej Holy
none Details | Review
add new touchpad options to panel (10.65 KB, patch)
2012-08-03 13:24 UTC, Ondrej Holy
none Details | Review
add new touchpad options into gnome-setting-daemon schema (1.51 KB, patch)
2012-08-03 13:25 UTC, Ondrej Holy
none Details | Review
screenshot with limited sliders and new options (47.74 KB, image/png)
2012-08-03 13:27 UTC, Ondrej Holy
  Details
sensitivity and acceleration sliders merge (27.95 KB, patch)
2012-08-07 15:37 UTC, Ondrej Holy
none Details | Review
add touchpad natural scroll implementation (3.62 KB, patch)
2012-08-07 15:39 UTC, Ondrej Holy
none Details | Review
screenshot with merged acceleration and sensitivity sliders (42.71 KB, image/png)
2012-08-07 15:42 UTC, Ondrej Holy
  Details
add touchpad natural scroll implementation using synaptics scrolling distance (3.89 KB, patch)
2012-08-08 11:32 UTC, Ondrej Holy
none Details | Review
reorganize widgets according to mockup (113.39 KB, patch)
2012-08-09 15:40 UTC, Ondrej Holy
reviewed Details | Review
sensitivity and acceleration sliders merge (26.17 KB, patch)
2012-08-09 15:41 UTC, Ondrej Holy
reviewed Details | Review
add natural scroll toggle (3.85 KB, patch)
2012-08-09 15:42 UTC, Ondrej Holy
reviewed Details | Review
show mouse section only if mouse device is present (3.38 KB, patch)
2012-08-09 15:43 UTC, Ondrej Holy
reviewed Details | Review
screenshot after mockup change (42.70 KB, image/png)
2012-08-09 15:45 UTC, Ondrej Holy
  Details
add test your settings widget (15.49 KB, patch)
2012-08-10 10:43 UTC, Ondrej Holy
needs-work Details | Review
test your settings widget screenshot (67.16 KB, image/png)
2012-08-10 10:44 UTC, Ondrej Holy
  Details
reorganize widgets according to mockup (113.34 KB, patch)
2012-08-20 13:16 UTC, Ondrej Holy
committed Details | Review
sensitivity and acceleration sliders merge (26.10 KB, patch)
2012-08-20 13:17 UTC, Ondrej Holy
committed Details | Review
add natural scroll toggle (3.84 KB, patch)
2012-08-20 13:18 UTC, Ondrej Holy
committed Details | Review
add mouse present detection for gnome-settings-daemon (2.16 KB, patch)
2012-08-20 13:20 UTC, Ondrej Holy
committed Details | Review
show mouse section only if mouse device is present (1.52 KB, patch)
2012-08-20 13:21 UTC, Ondrej Holy
committed Details | Review
add test your settings widget (12.03 KB, patch)
2012-08-20 17:55 UTC, Ondrej Holy
committed Details | Review
add test your settings widget toggle (5.69 KB, patch)
2012-08-20 17:55 UTC, Ondrej Holy
committed Details | Review

Description Allan Day 2012-05-31 16:10:47 UTC
The mouse and touchpad panel needs some love. Here are some mockups for an updated design:

https://github.com/gnome-design-team/gnome-mockups/raw/master/system-settings/mouse-and-touchpad/mouse-and-touchpad.png
Comment 1 Ondrej Holy 2012-07-19 14:14:12 UTC
There are additional information: 

https://live.gnome.org/Design/SystemSettings/Mouse
Comment 2 Ondrej Holy 2012-07-26 12:57:20 UTC
Created attachment 219686 [details] [review]
reorganize widget according to mockup

I reorganized widget according to the mockup and removed unnecessary options. 

How can I calculate the pointer speed from the acceleration and the sensitivity? 

Where can I set the new options from mockup (touchpad double click, content sticks to fingers)? Are there any d-conf options for that?

Please review attached patch.
Comment 3 Ondrej Holy 2012-07-26 12:58:25 UTC
Created attachment 219687 [details]
screenshot of reorganized panel
Comment 4 Matthias Clasen 2012-07-27 08:28:35 UTC
(In reply to comment #2)

> 
> Where can I set the new options from mockup (touchpad double click, content
> sticks to fingers)? Are there any d-conf options for that?

It doesn't look like we do have these currently. 
They should go in org.gnome.settings-daemon.peripherals.touchpad.
The source file for this schema is in 
gnome-settings-daemon/data/org.gnome.settings-daemon.peripherals.gschema.xml.in.in
You should add new settings there.
Comment 5 Christian Giordano 2012-07-27 08:40:23 UTC
@Ondrej, The sliders are too long (too unpractical to use). It would be great if you could limit their width as in Allan design.
Comment 6 Matthias Clasen 2012-07-27 09:03:47 UTC
Information for how to implement 'content sticks to finger' (aka 'natural scrolling') can be found in bug 674716
Comment 7 Ondrej Holy 2012-08-01 08:31:43 UTC
Hi,

thank you for your comments.

(In reply to comment #4)
> (In reply to comment #2)
> 
> > 
> > Where can I set the new options from mockup (touchpad double click, content
> > sticks to fingers)? Are there any d-conf options for that?
> 
> It doesn't look like we do have these currently. 
> They should go in org.gnome.settings-daemon.peripherals.touchpad.
> The source file for this schema is in 
> gnome-settings-daemon/data/org.gnome.settings-daemon.peripherals.gschema.xml.in.in
> You should add new settings there.

Yes, I will add them.

(In reply to comment #6)
> Information for how to implement 'content sticks to finger' (aka 'natural
> scrolling') can be found in bug 674716

I will look at this.

(In reply to comment #5)
> @Ondrej, The sliders are too long (too unpractical to use). It would be great
> if you could limit their width as in Allan design.

I will fix this.
Comment 8 Ondrej Holy 2012-08-01 08:43:29 UTC
Created attachment 220042 [details] [review]
limit slider width as in mockup
Comment 9 Ondrej Holy 2012-08-03 13:24:30 UTC
Created attachment 220242 [details] [review]
add new touchpad options to panel
Comment 10 Ondrej Holy 2012-08-03 13:25:32 UTC
Created attachment 220243 [details] [review]
add new touchpad options into gnome-setting-daemon schema
Comment 11 Ondrej Holy 2012-08-03 13:27:00 UTC
Created attachment 220244 [details]
screenshot with limited sliders and new options
Comment 12 Ondrej Holy 2012-08-07 15:37:09 UTC
Created attachment 220570 [details] [review]
sensitivity and acceleration sliders merge
Comment 13 Ondrej Holy 2012-08-07 15:39:56 UTC
Created attachment 220571 [details] [review]
add touchpad natural scroll implementation
Comment 14 Ondrej Holy 2012-08-07 15:42:57 UTC
Created attachment 220574 [details]
screenshot with merged acceleration and sensitivity sliders
Comment 15 Ondrej Holy 2012-08-08 11:32:27 UTC
Created attachment 220662 [details] [review]
add touchpad natural scroll implementation using synaptics scrolling distance

I attached an implementation for natural scrolling using synaptics scrolling distance. Previous version was misunderstanding using set button map.
Comment 16 Ondrej Holy 2012-08-09 15:40:17 UTC
Created attachment 220797 [details] [review]
reorganize widgets according to mockup

Hi!

Mockup was slightly changed, so there are new patches. I have also fixed commiter e-mail and added the bug address into the commit messages.

Please review attached patches.
Comment 17 Ondrej Holy 2012-08-09 15:41:19 UTC
Created attachment 220798 [details] [review]
sensitivity and acceleration sliders merge
Comment 18 Ondrej Holy 2012-08-09 15:42:12 UTC
Created attachment 220799 [details] [review]
add natural scroll toggle
Comment 19 Ondrej Holy 2012-08-09 15:43:10 UTC
Created attachment 220800 [details] [review]
show mouse section only if mouse device is present
Comment 20 Ondrej Holy 2012-08-09 15:45:28 UTC
Created attachment 220801 [details]
screenshot after mockup change
Comment 21 Ondrej Holy 2012-08-09 15:59:44 UTC
Necessary fixed patches for gnome-settings-daemon are at https://bugzilla.gnome.org/show_bug.cgi?id=659498 .
Comment 22 Ondrej Holy 2012-08-10 10:43:05 UTC
Created attachment 220864 [details] [review]
add test your settings widget
Comment 23 Ondrej Holy 2012-08-10 10:44:13 UTC
Created attachment 220865 [details]
test your settings widget screenshot
Comment 24 Bastien Nocera 2012-08-15 17:22:50 UTC
I can't test this:
(gnome-control-center:17419): GLib-GIO-ERROR **: Settings schema 'org.gnome.settings-daemon.peripherals.touchpad' does not contain a key named 'natural-scroll-enabled'

Where's the related gnome-settings-daemon changes?
Comment 25 Bastien Nocera 2012-08-15 17:26:09 UTC
Review of attachment 220797 [details] [review]:

That looks alright, can't test the UI though.

::: panels/mouse/gnome-mouse-properties.c
@@ +66,3 @@
         method = g_settings_get_enum (touchpad_settings, "scroll-method");
 
+        if (method == GSD_TOUCHPAD_SCROLL_METHOD_TWO_FINGER_SCROLLING)

I'd prefer:
active = (method == GSD_TOUCHPAD_SCROLL_METHOD_TWO_FINGER_SCROLLING));
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (WID ("two_finger_scroll_toggle")), active);
Comment 26 Bastien Nocera 2012-08-15 17:28:36 UTC
Review of attachment 220798 [details] [review]:

This looks fine, though did you check that particular code with somebody?

::: panels/mouse/gnome-mouse-properties.c
@@ +150,3 @@
+		
+	value = g_variant_new_double (gtk_range_get_value (scale));
+	g_settings_set_value (settings, "motion-acceleration", value);

Why not g_settings_set_double()?

@@ +154,3 @@
+	adjustment = gtk_range_get_adjustment (scale);
+	value = g_variant_new_int32 (gtk_adjustment_get_upper (adjustment) - gtk_range_get_value (scale) + 1);
+	g_settings_set_value (settings, "motion-threshold", value);

Why not g_settings_set_int()?
Comment 27 Bastien Nocera 2012-08-15 17:29:41 UTC
Review of attachment 220799 [details] [review]:

::: panels/mouse/gnome-mouse-properties.c
@@ +200,3 @@
 			 WID ("tap_to_click_toggle"), "active",
 			 G_SETTINGS_BIND_DEFAULT);
+	g_settings_bind (touchpad_settings, "natural-scroll-enabled",

This also means that you'll need to bump the dependency on gnome-settings-daemon, and upload the g-s-d patch somewhere.
Comment 28 Bastien Nocera 2012-08-15 17:30:42 UTC
Review of attachment 220800 [details] [review]:

The gsd-input-helper.[ch] code lives in gnome-settings-daemon, so that's where the changes need to be made.
Comment 29 Bastien Nocera 2012-08-15 17:32:52 UTC
Review of attachment 220864 [details] [review]:

Add the gnome-mouse-test.* files separately, and make sure it comes with a test-application (so that it can be debugged and tested separately from the rest of the panel).

::: panels/mouse/cc-mouse-panel.c
@@ +227,3 @@
   gtk_widget_reparent (prefs_widget, GTK_WIDGET (self));
+
+  g_idle_add (add_shell_test_button_cb, self);

This is pretty gross, and shouldn't be needed.
Comment 30 Bastien Nocera 2012-08-17 17:10:21 UTC
(In reply to comment #24)
> I can't test this:
> (gnome-control-center:17419): GLib-GIO-ERROR **: Settings schema
> 'org.gnome.settings-daemon.peripherals.touchpad' does not contain a key named
> 'natural-scroll-enabled'
> 
> Where's the related gnome-settings-daemon changes?

It was in bug 659498. Note that I've changed the key name to "natural-scroll". The enabled was redundant.
Comment 31 Bastien Nocera 2012-08-18 16:19:02 UTC
Review of attachment 220864 [details] [review]:

::: panels/mouse/cc-mouse-panel.c
@@ +83,3 @@
+    }
+
+  if (priv->prefs_widget)

This and...

@@ +89,3 @@
+    }
+
+  if (priv->test_widget)

... this won't be needed if you stuff both widgets inside a GtkNotebook.

@@ +138,3 @@
+  if (gtk_toggle_button_get_active (button))
+    {
+      gtk_container_remove (GTK_CONTAINER (panel), WID ("prefs_widget"));

Don't do that. Use a GtkNotebook without tabs, and switch the current page when needed.

@@ +180,3 @@
+  GtkWidget *parent;
+
+  size_group = gtk_size_group_new (GTK_SIZE_GROUP_BOTH);

And not removing/adding the widgets means you can remove this code.

@@ +227,3 @@
   gtk_widget_reparent (prefs_widget, GTK_WIDGET (self));
+
+  g_idle_add (add_shell_test_button_cb, self);

I see that the network panel does the same thing. Please file a bug and we'll try and fix it later.
Comment 32 Bastien Nocera 2012-08-18 16:19:41 UTC
Also note that the panel is centered instead of aligned to the top when you only have a mouse.
Comment 33 Ondrej Holy 2012-08-20 10:33:25 UTC
Hi!

Thank you for reviews.

(In reply to comment #24)
> I can't test this:
> (gnome-control-center:17419): GLib-GIO-ERROR **: Settings schema
> 'org.gnome.settings-daemon.peripherals.touchpad' does not contain a key named
> 'natural-scroll-enabled'
> 
> Where's the related gnome-settings-daemon changes?

I am sorry, I don't have right for adding bug dependencies.

(In reply to comment #25)
> Review of attachment 220797 [details] [review]:
> 
> That looks alright, can't test the UI though.
> 
> ::: panels/mouse/gnome-mouse-properties.c
> @@ +66,3 @@
>          method = g_settings_get_enum (touchpad_settings, "scroll-method");
> 
> +        if (method == GSD_TOUCHPAD_SCROLL_METHOD_TWO_FINGER_SCROLLING)
> 
> I'd prefer:
> active = (method == GSD_TOUCHPAD_SCROLL_METHOD_TWO_FINGER_SCROLLING));
> gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (WID
> ("two_finger_scroll_toggle")), active);

I'll fix this.

(In reply to comment #26)
> Review of attachment 220798 [details] [review]:
> 
> This looks fine, though did you check that particular code with somebody?

I didn't check the code with anybody, though I discussed way of computing pointer speed with aday only.

> ::: panels/mouse/gnome-mouse-properties.c
> @@ +150,3 @@
> +        
> +    value = g_variant_new_double (gtk_range_get_value (scale));
> +    g_settings_set_value (settings, "motion-acceleration", value);
> 
> Why not g_settings_set_double()?
> 
> @@ +154,3 @@
> +    adjustment = gtk_range_get_adjustment (scale);
> +    value = g_variant_new_int32 (gtk_adjustment_get_upper (adjustment) -
> gtk_range_get_value (scale) + 1);
> +    g_settings_set_value (settings, "motion-threshold", value);
> 
> Why not g_settings_set_int()?

I'll fix these functions.
Comment 34 Ondrej Holy 2012-08-20 13:16:12 UTC
Created attachment 221833 [details] [review]
reorganize widgets according to mockup
Comment 35 Ondrej Holy 2012-08-20 13:17:21 UTC
Created attachment 221834 [details] [review]
sensitivity and acceleration sliders merge
Comment 36 Ondrej Holy 2012-08-20 13:18:14 UTC
Created attachment 221835 [details] [review]
add natural scroll toggle
Comment 37 Ondrej Holy 2012-08-20 13:20:31 UTC
Created attachment 221836 [details] [review]
add mouse present detection for gnome-settings-daemon
Comment 38 Ondrej Holy 2012-08-20 13:21:31 UTC
Created attachment 221837 [details] [review]
show mouse section only if mouse device is present
Comment 39 Bastien Nocera 2012-08-20 15:08:52 UTC
A lot of the problems I mentioned in my earlier reviews still stand. Use a Notebook and stop reparenting the widgets, this will cleanup a lot of code already, then fix the widgets being centered when there's only a mouse present.
Comment 40 Ondrej Holy 2012-08-20 15:54:21 UTC
(In reply to comment #31)
> Review of attachment 220864 [details] [review]:
> 
> ::: panels/mouse/cc-mouse-panel.c
> @@ +83,3 @@
> +    }
> +
> +  if (priv->prefs_widget)
> 
> This and...
> 
> @@ +89,3 @@
> +    }
> +
> +  if (priv->test_widget)
> 
> ... this won't be needed if you stuff both widgets inside a GtkNotebook.

I don't understand, why this code won't be needed. Still we need to call gnome_mouse_properties_dispose and gnome_mouse_properties_test, didn't we?

> 
> @@ +138,3 @@
> +  if (gtk_toggle_button_get_active (button))
> +    {
> +      gtk_container_remove (GTK_CONTAINER (panel), WID ("prefs_widget"));
> 
> Don't do that. Use a GtkNotebook without tabs, and switch the current page when
> needed.

Ok, I'll use GtkNotebook.

(In reply to comment #39)
> A lot of the problems I mentioned in my earlier reviews still stand. Use a
> Notebook and stop reparenting the widgets, this will cleanup a lot of code
> already, then fix the widgets being centered when there's only a mouse present.

Sorry, I am working on it. I forget to mention it.
Comment 41 Bastien Nocera 2012-08-20 16:27:17 UTC
(In reply to comment #40)
> (In reply to comment #31)
> > Review of attachment 220864 [details] [review] [details]:
> > 
> > ::: panels/mouse/cc-mouse-panel.c
> > @@ +83,3 @@
> > +    }
> > +
> > +  if (priv->prefs_widget)
> > 
> > This and...
> > 
> > @@ +89,3 @@
> > +    }
> > +
> > +  if (priv->test_widget)
> > 
> > ... this won't be needed if you stuff both widgets inside a GtkNotebook.
> 
> I don't understand, why this code won't be needed. Still we need to call
> gnome_mouse_properties_dispose and gnome_mouse_properties_test, didn't we?

You're right. Please use g_clear_object() though.
Comment 42 Ondrej Holy 2012-08-20 17:55:05 UTC
Created attachment 221864 [details] [review]
add test your settings widget
Comment 43 Ondrej Holy 2012-08-20 17:55:35 UTC
Created attachment 221865 [details] [review]
add test your settings widget toggle
Comment 44 Allan Day 2012-08-21 10:05:44 UTC
Congratulations on getting this finished for GNOME 3.6, Ondrej! This will be a great new feature, and I know that a lot of people in the GNOME community are really happy about it. I've been really impressed with your work so far.
Comment 45 Ondrej Holy 2012-08-21 11:55:42 UTC
(In reply to comment #44)
> Congratulations on getting this finished for GNOME 3.6, Ondrej! This will be a
> great new feature, and I know that a lot of people in the GNOME community are
> really happy about it. I've been really impressed with your work so far.

Thank you, I enjoy working on Gnome :-)
Comment 46 Ondrej Holy 2012-08-21 12:01:15 UTC
(In reply to comment #31)
> Review of attachment 220864 [details] [review]:
> 
> @@ +227,3 @@
>    gtk_widget_reparent (prefs_widget, GTK_WIDGET (self));
> +
> +  g_idle_add (add_shell_test_button_cb, self);
> 
> I see that the network panel does the same thing. Please file a bug and we'll
> try and fix it later.

Sorry, I don't know what is wrong with that actually, so I'm not able to file a bug.
Comment 47 Bastien Nocera 2012-08-21 13:50:46 UTC
(In reply to comment #46)
> (In reply to comment #31)
> > Review of attachment 220864 [details] [review] [details]:
> > 
> > @@ +227,3 @@
> >    gtk_widget_reparent (prefs_widget, GTK_WIDGET (self));
> > +
> > +  g_idle_add (add_shell_test_button_cb, self);
> > 
> > I see that the network panel does the same thing. Please file a bug and we'll
> > try and fix it later.
> 
> Sorry, I don't know what is wrong with that actually, so I'm not able to file a
> bug.

You shouldn't need to have that code in an idle handler.
Comment 48 Bastien Nocera 2012-08-23 08:58:39 UTC
*** Bug 640076 has been marked as a duplicate of this bug. ***