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
1=== modified file 'checkbox-old/debian/changelog'
2--- checkbox-old/debian/changelog 2013-12-06 01:36:30 +0000
3+++ checkbox-old/debian/changelog 2013-12-11 16:41:38 +0000
4@@ -7,6 +7,9 @@
5 [ Daniel Manrique ]
6 * Removed suspend_test script which hasn't been touched in over 3 years
7 and is not used in any jobs. (LP: #752881)
8+ * Changed touchpad_test to use default scrolling method, and added a switch
9+ to force edge scrolling if desired. Updated legacy tests to use edge
10+ scrolling when the test description makes that appropriate. (LP: #1259987)
11
12 -- Sylvain Pineau <sylvain.pineau@canonical.com> Fri, 29 Nov 2013 22:30:45 +0100
13
14
15=== modified file 'checkbox-old/jobs/touchpad.txt.in'
16--- checkbox-old/jobs/touchpad.txt.in 2013-12-06 19:58:15 +0000
17+++ checkbox-old/jobs/touchpad.txt.in 2013-12-11 16:41:38 +0000
18@@ -15,7 +15,7 @@
19 name: touchpad/horizontal
20 requires:
21 'Button Horiz Wheel Left' in xinput.button_labels and 'Button Horiz Wheel Right' in xinput.button_labels
22-command: touchpad_test right left
23+command: touchpad_test right left --edge-scroll
24 estimated_duration: 120.0
25 _description:
26 PURPOSE:
27@@ -30,7 +30,7 @@
28 name: touchpad/vertical
29 requires:
30 'Button Wheel Up' in xinput.button_labels and 'Button Wheel Down' in xinput.button_labels
31-command: touchpad_test up down
32+command: touchpad_test up down --edge-scroll
33 estimated_duration: 120.0
34 _description:
35 PURPOSE:
36
37=== modified file 'checkbox-old/scripts/touchpad_test'
38--- checkbox-old/scripts/touchpad_test 2013-05-29 07:50:30 +0000
39+++ checkbox-old/scripts/touchpad_test 2013-12-11 16:41:38 +0000
40@@ -28,8 +28,9 @@
41 touchpad_key = "org.gnome.settings-daemon.peripherals.touchpad"
42 exit_code = EXIT_WITH_FAILURE
43
44- def __init__(self, directions):
45+ def __init__(self, directions, edge_scroll=False):
46 self.directions = directions
47+ self.edge_scroll = edge_scroll
48
49 # Initialize GTK constants
50 self.ICON_SIZE = Gtk.IconSize.BUTTON
51@@ -123,7 +124,8 @@
52
53 # Set touchpad settings.
54 touchpad_settings.set_boolean("horiz-scroll-enabled", True)
55- touchpad_settings.set_string("scroll-method", "edge-scrolling")
56+ if self.edge_scroll:
57+ touchpad_settings.set_string("scroll-method", "edge-scrolling")
58
59 Gtk.main()
60
61@@ -167,8 +169,10 @@
62 def main(args):
63 gettext.textdomain("checkbox")
64
65- usage = """Usage: %prog DIRECTION..."""
66+ usage = """Usage: %prog DIRECTION... [--edge-scroll]"""
67 parser = OptionParser(usage=usage)
68+ parser.add_option("--edge-scroll", action="store_true", default=False,
69+ help="Force touchpad to use edge scrolling only")
70 (options, args) = parser.parse_args(args)
71
72 if not args:
73@@ -182,7 +186,7 @@
74 parser.error("Unsupported direction: %s" % arg)
75 directions.append(direction)
76
77- scroller = GtkScroller(directions)
78+ scroller = GtkScroller(directions, edge_scroll=options.edge_scroll)
79 try:
80 scroller.run()
81 except KeyboardInterrupt:

Subscribers

People subscribed via source and target branches