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

merge with trunk and fix up changelog

Revision history for this message
James Westby (james-w) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'debian/changelog'
--- debian/changelog 2012-02-02 20:20:58 +0000
+++ debian/changelog 2012-02-02 20:53:19 +0000
@@ -32,8 +32,11 @@
32 * lp:~gary-lasker/software-center/recommends-ui-lobby:32 * lp:~gary-lasker/software-center/recommends-ui-lobby:
33 - initial recommends UI implementation, limited to non-personalized33 - initial recommends UI implementation, limited to non-personalized
34 recommends currently34 recommends currently
35 * lp:~gary-lasker/software-center/appdetailsview-button-focus-fix:
36 - make sure the action button in the applications details view
37 always gets the initial focus (LP: #925613)
3538
36 -- Gary Lasker <gary.lasker@canonical.com> Thu, 02 Feb 2012 15:19:14 -050039 -- Gary Lasker <gary.lasker@canonical.com> Thu, 02 Feb 2012 15:49:19 -0500
3740
38software-center (5.1.7) precise; urgency=low41software-center (5.1.7) precise; urgency=low
3942
4043
=== modified file 'softwarecenter/ui/gtk3/views/appdetailsview.py'
--- softwarecenter/ui/gtk3/views/appdetailsview.py 2012-02-02 13:05:06 +0000
+++ softwarecenter/ui/gtk3/views/appdetailsview.py 2012-02-02 20:53:19 +0000
@@ -1051,6 +1051,8 @@
10511051
1052 def _on_realize(self, widget):1052 def _on_realize(self, widget):
1053 self.addons_statusbar.hide()1053 self.addons_statusbar.hide()
1054 # the install button gets initial focus
1055 self.pkg_statusbar.button.grab_focus()
1054 return1056 return
10551057
1056 def _on_homepage_clicked(self, label, link):1058 def _on_homepage_clicked(self, label, link):
10571059
=== modified file 'test/gtk3/test_appdetailsview.py'
--- test/gtk3/test_appdetailsview.py 2012-02-02 13:31:14 +0000
+++ test/gtk3/test_appdetailsview.py 2012-02-02 20:53:19 +0000
@@ -56,6 +56,9 @@
56 app = Application("", "abiword")56 app = Application("", "abiword")
57 self.view.show_app(app)57 self.view.show_app(app)
58 do_events()58 do_events()
59
60 # check that the action bar is given initial focus in the view
61 self.assertTrue(self.view.pkg_statusbar.button.has_focus())
5962
60 # create mock app63 # create mock app
61 mock_app = get_mock_app_from_real_app(app)64 mock_app = get_mock_app_from_real_app(app)
@@ -226,6 +229,7 @@
226 self.view._submit_reviews_done_callback(None, 0)229 self.view._submit_reviews_done_callback(None, 0)
227230
228 self.assertTrue(button.is_sensitive())231 self.assertTrue(button.is_sensitive())
232
229233
230class HardwareRequirementsTestCase(unittest.TestCase):234class HardwareRequirementsTestCase(unittest.TestCase):
231 235

Subscribers

People subscribed via source and target branches