Merge lp:~roadmr/checkbox/1259987-scroll-method into lp:checkbox

Proposed by Daniel Manrique
Status: Merged
Approved by: Daniel Manrique
Approved revision: 2551
Merged at revision: 2552
Proposed branch: lp:~roadmr/checkbox/1259987-scroll-method
Merge into: lp:checkbox
Diff against target: 81 lines (+13/-6)
3 files modified
checkbox-old/debian/changelog (+3/-0)
checkbox-old/jobs/touchpad.txt.in (+2/-2)
checkbox-old/scripts/touchpad_test (+8/-4)
To merge this branch: bzr merge lp:~roadmr/checkbox/1259987-scroll-method
Reviewer Review Type Date Requested Status
Chris Gregan (community) Approve
Checkbox Developers Pending
Review via email: mp+198607@code.launchpad.net

Commit message

Makes use of edge scrolling by the script explicit (via commandline switch), and updates tests for edge scrolling to use this switch. Other tests should use the user's preferred scrolling method.

Description of the change

Makes use of edge scrolling by the script explicit (via commandline switch), and updates tests for edge scrolling to use this switch. Other tests should use the user's preferred scrolling method.

To post a comment you must log in.
Revision history for this message
Chris Gregan (cgregan) wrote :

Command line switch is a solid and simple solution. Approved

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'checkbox-old/debian/changelog'
--- checkbox-old/debian/changelog 2013-12-06 01:36:30 +0000
+++ checkbox-old/debian/changelog 2013-12-11 16:41:38 +0000
@@ -7,6 +7,9 @@
7 [ Daniel Manrique ]7 [ Daniel Manrique ]
8 * Removed suspend_test script which hasn't been touched in over 3 years8 * Removed suspend_test script which hasn't been touched in over 3 years
9 and is not used in any jobs. (LP: #752881)9 and is not used in any jobs. (LP: #752881)
10 * Changed touchpad_test to use default scrolling method, and added a switch
11 to force edge scrolling if desired. Updated legacy tests to use edge
12 scrolling when the test description makes that appropriate. (LP: #1259987)
1013
11 -- Sylvain Pineau <sylvain.pineau@canonical.com> Fri, 29 Nov 2013 22:30:45 +010014 -- Sylvain Pineau <sylvain.pineau@canonical.com> Fri, 29 Nov 2013 22:30:45 +0100
1215
1316
=== modified file 'checkbox-old/jobs/touchpad.txt.in'
--- checkbox-old/jobs/touchpad.txt.in 2013-12-06 19:58:15 +0000
+++ checkbox-old/jobs/touchpad.txt.in 2013-12-11 16:41:38 +0000
@@ -15,7 +15,7 @@
15name: touchpad/horizontal15name: touchpad/horizontal
16requires:16requires:
17 'Button Horiz Wheel Left' in xinput.button_labels and 'Button Horiz Wheel Right' in xinput.button_labels17 'Button Horiz Wheel Left' in xinput.button_labels and 'Button Horiz Wheel Right' in xinput.button_labels
18command: touchpad_test right left18command: touchpad_test right left --edge-scroll
19estimated_duration: 120.019estimated_duration: 120.0
20_description:20_description:
21 PURPOSE:21 PURPOSE:
@@ -30,7 +30,7 @@
30name: touchpad/vertical30name: touchpad/vertical
31requires:31requires:
32 'Button Wheel Up' in xinput.button_labels and 'Button Wheel Down' in xinput.button_labels32 'Button Wheel Up' in xinput.button_labels and 'Button Wheel Down' in xinput.button_labels
33command: touchpad_test up down33command: touchpad_test up down --edge-scroll
34estimated_duration: 120.034estimated_duration: 120.0
35_description:35_description:
36 PURPOSE:36 PURPOSE:
3737
=== modified file 'checkbox-old/scripts/touchpad_test'
--- checkbox-old/scripts/touchpad_test 2013-05-29 07:50:30 +0000
+++ checkbox-old/scripts/touchpad_test 2013-12-11 16:41:38 +0000
@@ -28,8 +28,9 @@
28 touchpad_key = "org.gnome.settings-daemon.peripherals.touchpad"28 touchpad_key = "org.gnome.settings-daemon.peripherals.touchpad"
29 exit_code = EXIT_WITH_FAILURE29 exit_code = EXIT_WITH_FAILURE
3030
31 def __init__(self, directions):31 def __init__(self, directions, edge_scroll=False):
32 self.directions = directions32 self.directions = directions
33 self.edge_scroll = edge_scroll
3334
34 # Initialize GTK constants35 # Initialize GTK constants
35 self.ICON_SIZE = Gtk.IconSize.BUTTON36 self.ICON_SIZE = Gtk.IconSize.BUTTON
@@ -123,7 +124,8 @@
123124
124 # Set touchpad settings.125 # Set touchpad settings.
125 touchpad_settings.set_boolean("horiz-scroll-enabled", True)126 touchpad_settings.set_boolean("horiz-scroll-enabled", True)
126 touchpad_settings.set_string("scroll-method", "edge-scrolling")127 if self.edge_scroll:
128 touchpad_settings.set_string("scroll-method", "edge-scrolling")
127129
128 Gtk.main()130 Gtk.main()
129131
@@ -167,8 +169,10 @@
167def main(args):169def main(args):
168 gettext.textdomain("checkbox")170 gettext.textdomain("checkbox")
169171
170 usage = """Usage: %prog DIRECTION..."""172 usage = """Usage: %prog DIRECTION... [--edge-scroll]"""
171 parser = OptionParser(usage=usage)173 parser = OptionParser(usage=usage)
174 parser.add_option("--edge-scroll", action="store_true", default=False,
175 help="Force touchpad to use edge scrolling only")
172 (options, args) = parser.parse_args(args)176 (options, args) = parser.parse_args(args)
173177
174 if not args:178 if not args:
@@ -182,7 +186,7 @@
182 parser.error("Unsupported direction: %s" % arg)186 parser.error("Unsupported direction: %s" % arg)
183 directions.append(direction)187 directions.append(direction)
184188
185 scroller = GtkScroller(directions)189 scroller = GtkScroller(directions, edge_scroll=options.edge_scroll)
186 try:190 try:
187 scroller.run()191 scroller.run()
188 except KeyboardInterrupt:192 except KeyboardInterrupt:

Subscribers

People subscribed via source and target branches