Merge lp:~elopio/gallery-app/workaround1324556-get_header into lp:gallery-app

Proposed by Leo Arias
Status: Rejected
Rejected by: Bill Filler
Proposed branch: lp:~elopio/gallery-app/workaround1324556-get_header
Merge into: lp:gallery-app
Diff against target: 31 lines (+16/-2)
1 file modified
tests/autopilot/gallery_app/emulators/main_screen.py (+16/-2)
To merge this branch: bzr merge lp:~elopio/gallery-app/workaround1324556-get_header
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Approve
Ubuntu Phablet Team Pending
Review via email: mp+221415@code.launchpad.net

Commit message

Added a workaround for bug 1324556.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Leo Arias (elopio) wrote :

The proper fix has already landed on the toolkit.

Unmerged revisions

990. By Leo Arias

Added a workaround for bug 1324556.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'tests/autopilot/gallery_app/emulators/main_screen.py'
2--- tests/autopilot/gallery_app/emulators/main_screen.py 2014-04-01 19:18:50 +0000
3+++ tests/autopilot/gallery_app/emulators/main_screen.py 2014-05-29 15:44:23 +0000
4@@ -5,11 +5,25 @@
5 # under the terms of the GNU General Public License version 3, as published
6 # by the Free Software Foundation.
7
8-from ubuntuuitoolkit import emulators as toolkit_emulators
9+
10+import ubuntuuitoolkit
11+
12 from gallery_app.emulators import toolbar
13
14
15-class MainScreen(toolkit_emulators.MainView):
16+# XXX workaround for bug http://pad.lv/1324556
17+# This is really ugly. A proper fix is in progress and should land with the
18+# next toolkit release. --elopio - 2014-05-29
19+
20+ubuntuuitoolkit.Header.__init__ = lambda *args: fixed_init(*args)
21+
22+def fixed_init(instance, *args):
23+ ubuntuuitoolkit.UbuntuUIToolkitCustomProxyObjectBase.__init__(
24+ instance, *args)
25+ instance.main_view = instance.get_root_instance().select_single(MainScreen)
26+
27+
28+class MainScreen(ubuntuuitoolkit.MainView):
29 """An emulator class that makes it easy to interact with the gallery app"""
30
31 def get_toolbar(self):

Subscribers

People subscribed via source and target branches

to all changes: