Merge lp:~diegoprovinciani/switchboard-plug-mouse-touchpad/1487958 into lp:~elementary-pantheon/switchboard-plug-mouse-touchpad/trunk

Proposed by Diego Provinciani
Status: Merged
Approved by: Felipe Escoto
Approved revision: 120
Merged at revision: 128
Proposed branch: lp:~diegoprovinciani/switchboard-plug-mouse-touchpad/1487958
Merge into: lp:~elementary-pantheon/switchboard-plug-mouse-touchpad/trunk
Diff against target: 21 lines (+11/-0)
1 file modified
src/Widgets/TouchpadSection.vala (+11/-0)
To merge this branch: bzr merge lp:~diegoprovinciani/switchboard-plug-mouse-touchpad/1487958
Reviewer Review Type Date Requested Status
Felipe Escoto (community) Approve
Review via email: mp+309633@code.launchpad.net

Commit message

Horizontal and natural scrolling options insensitive when scrolling is disabled

Description of the change

Added a connection to the emitted signal when the scrolling_combobox change.
When the signal is emitted, is checked the scrolling_combobox active id, if it is "disabled", the horizontal and natural scrolling switches will be disabled. Otherwise will be enabled.

To post a comment you must log in.
Revision history for this message
Felipe Escoto (philip.scott) wrote :

Nice change :) I'm for it! Just a nitpick, the if-else braces should be on the same line like
} else {

review: Needs Fixing
120. By Diego Provinciani

Horizontal and natural scrolling options insensitive when scrolling is disabled

Revision history for this message
Diego Provinciani (diegoprovinciani) wrote :

> Nice change :) I'm for it! Just a nitpick, the if-else braces should be on the
> same line like
> } else {

Done

Revision history for this message
Felipe Escoto (philip.scott) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/Widgets/TouchpadSection.vala'
2--- src/Widgets/TouchpadSection.vala 2016-10-24 19:14:48 +0000
3+++ src/Widgets/TouchpadSection.vala 2016-11-15 22:40:01 +0000
4@@ -101,6 +101,17 @@
5 touchpad_settings.click_method = "none";
6 }
7 });
8+
9+ scrolling_combobox.changed.connect (() => {
10+ string active_text = scrolling_combobox.get_active_id ();
11+ if (active_text == "disabled") {
12+ horizontal_scrolling_switch.sensitive = false;
13+ natural_scrolling_switch.sensitive = false;
14+ } else {
15+ horizontal_scrolling_switch.sensitive = true;
16+ natural_scrolling_switch.sensitive = true;
17+ }
18+ });
19
20 touchpad_settings.bind_property ("scroll-method",
21 scrolling_combobox,

Subscribers

People subscribed via source and target branches