Merge lp:~gary-lasker/software-center/appdetailsview-button-focus-fix into lp:software-center

Proposed by Gary Lasker
Status: Merged
Merged at revision: 2715
Proposed branch: lp:~gary-lasker/software-center/appdetailsview-button-focus-fix
Merge into: lp:software-center
Diff against target: 50 lines (+10/-1)
3 files modified
debian/changelog (+4/-1)
softwarecenter/ui/gtk3/views/appdetailsview.py (+2/-0)
test/gtk3/test_appdetailsview.py (+4/-0)
To merge this branch: bzr merge lp:~gary-lasker/software-center/appdetailsview-button-focus-fix
Reviewer Review Type Date Requested Status
James Westby (community) Approve
software-store-developers Pending
Review via email: mp+91329@code.launchpad.net

Description of the change

This branch grabs the initial focus to the action button ("Install"/"Remove") when showing the detailsview for an application.

Thanks!

To post a comment you must log in.
2716. By Gary Lasker on 2012-02-02

merge with trunk and fix up changelog

James Westby (james-w) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2012-02-02 20:20:58 +0000
3+++ debian/changelog 2012-02-02 20:53:19 +0000
4@@ -32,8 +32,11 @@
5 * lp:~gary-lasker/software-center/recommends-ui-lobby:
6 - initial recommends UI implementation, limited to non-personalized
7 recommends currently
8+ * lp:~gary-lasker/software-center/appdetailsview-button-focus-fix:
9+ - make sure the action button in the applications details view
10+ always gets the initial focus (LP: #925613)
11
12- -- Gary Lasker <gary.lasker@canonical.com> Thu, 02 Feb 2012 15:19:14 -0500
13+ -- Gary Lasker <gary.lasker@canonical.com> Thu, 02 Feb 2012 15:49:19 -0500
14
15 software-center (5.1.7) precise; urgency=low
16
17
18=== modified file 'softwarecenter/ui/gtk3/views/appdetailsview.py'
19--- softwarecenter/ui/gtk3/views/appdetailsview.py 2012-02-02 13:05:06 +0000
20+++ softwarecenter/ui/gtk3/views/appdetailsview.py 2012-02-02 20:53:19 +0000
21@@ -1051,6 +1051,8 @@
22
23 def _on_realize(self, widget):
24 self.addons_statusbar.hide()
25+ # the install button gets initial focus
26+ self.pkg_statusbar.button.grab_focus()
27 return
28
29 def _on_homepage_clicked(self, label, link):
30
31=== modified file 'test/gtk3/test_appdetailsview.py'
32--- test/gtk3/test_appdetailsview.py 2012-02-02 13:31:14 +0000
33+++ test/gtk3/test_appdetailsview.py 2012-02-02 20:53:19 +0000
34@@ -56,6 +56,9 @@
35 app = Application("", "abiword")
36 self.view.show_app(app)
37 do_events()
38+
39+ # check that the action bar is given initial focus in the view
40+ self.assertTrue(self.view.pkg_statusbar.button.has_focus())
41
42 # create mock app
43 mock_app = get_mock_app_from_real_app(app)
44@@ -226,6 +229,7 @@
45 self.view._submit_reviews_done_callback(None, 0)
46
47 self.assertTrue(button.is_sensitive())
48+
49
50 class HardwareRequirementsTestCase(unittest.TestCase):
51

Subscribers

People subscribed via source and target branches