Merge lp:~gary-lasker/software-center/restore-screenshot-thumb-cursor into lp:software-center

Proposed by Gary Lasker
Status: Merged
Merged at revision: 2589
Proposed branch: lp:~gary-lasker/software-center/restore-screenshot-thumb-cursor
Merge into: lp:software-center
Diff against target: 49 lines (+16/-2)
2 files modified
debian/changelog (+4/-1)
softwarecenter/ui/gtk3/widgets/thumbnail.py (+12/-1)
To merge this branch: bzr merge lp:~gary-lasker/software-center/restore-screenshot-thumb-cursor
Reviewer Review Type Date Requested Status
Michael Vogt Approve
Review via email: mp+84867@code.launchpad.net

Description of the change

Just a tiny fix to restore the zoom cursor that we traditionally display when hovering over the screenshot thumbnail in the details view.

To post a comment you must log in.
Michael Vogt (mvo) wrote :

Thanks!

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 2011-12-06 14:22:20 +0000
3+++ debian/changelog 2011-12-08 00:11:50 +0000
4@@ -4,8 +4,11 @@
5 - update dependency from python-gobject-cairo to
6 python-gi-cairo
7 - update Vcs-Bzr to point to trunk
8+ * lp:~gary-lasker/software-center/restore-screenshot-thumb-cursor:
9+ - restore the zoom cursor when hovering over a screenshot thumbnail
10+ in the details view
11
12- -- Gary Lasker <gary.lasker@canonical.com> Tue, 06 Dec 2011 09:19:54 -0500
13+ -- Gary Lasker <gary.lasker@canonical.com> Wed, 07 Dec 2011 19:06:10 -0500
14
15 software-center (5.1.3) precise; urgency=low
16
17
18=== modified file 'softwarecenter/ui/gtk3/widgets/thumbnail.py'
19--- softwarecenter/ui/gtk3/widgets/thumbnail.py 2011-11-13 09:28:35 +0000
20+++ softwarecenter/ui/gtk3/widgets/thumbnail.py 2011-12-08 00:11:50 +0000
21@@ -145,7 +145,7 @@
22 except:
23 self._zoom_cursor = None
24
25- # convienience class for handling the downloading (or not) of
26+ # convenience class for handling the downloading (or not) of
27 # any screenshot
28 self.loader = SimpleFileDownloader()
29 self.loader.connect(
30@@ -219,8 +219,19 @@
31 self.thumbnails.connect(
32 "thumb-selected", self.on_thumbnail_selected)
33 self.button.connect("clicked", self.on_clicked)
34+ self.button.connect('enter-notify-event', self._on_enter)
35+ self.button.connect('leave-notify-event', self._on_leave)
36 self.show_all()
37 return
38+
39+ def _on_enter(self, widget, event):
40+ if self.get_is_actionable():
41+ self.get_window().set_cursor(self._zoom_cursor)
42+ return
43+
44+ def _on_leave(self, widget, event):
45+ self.get_window().set_cursor(None)
46+ return
47
48 def _on_key_press(self, widget, event):
49 # react to spacebar, enter, numpad-enter

Subscribers

People subscribed via source and target branches