Merge lp:~kiwinote/software-center/lp877130 into lp:software-center

Proposed by Kiwinote
Status: Merged
Merged at revision: 2965
Proposed branch: lp:~kiwinote/software-center/lp877130
Merge into: lp:software-center
Diff against target: 45 lines (+22/-2)
2 files modified
debian/changelog (+6/-1)
softwarecenter/ui/gtk3/widgets/apptreeview.py (+16/-1)
To merge this branch: bzr merge lp:~kiwinote/software-center/lp877130
Reviewer Review Type Date Requested Status
Michael Vogt Approve
Review via email: mp+101709@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Michael Vogt (mvo) wrote :

Thanks for your work on this! That is very nice and works like a charm.

I would love to tweak it a little bit to remove some of the duplication in the code, if you don't
mind I will do that and ask you for review again.

Revision history for this message
Michael Vogt (mvo) wrote :

Setting this to approve as it fixes the issue nicely, I put up a additional MP that tweaks it slighly.

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-04-11 21:05:07 +0000
3+++ debian/changelog 2012-04-12 10:12:18 +0000
4@@ -15,7 +15,12 @@
5 * lp:~davmor2/software-center/remove_two_lines:
6 - small fixes for test script USC-start-stop-times.py
7
8- -- Gary Lasker <gary.lasker@canonical.com> Wed, 11 Apr 2012 17:03:44 -0400
9+ [ Kiwinote ]
10+ * sc/ui/gtk3/widgets/apptreeview.py:
11+ - everyone tries to expand a category in the installed pane by clicking
12+ on the text rather than the expander arrow (LP: #877130)
13+
14+ -- Kiwinote <kiwinote@gmail.com> Thu, 12 Apr 2012 11:00:48 +0100
15
16 software-center (5.1.14.2) precise; urgency=low
17
18
19=== modified file 'softwarecenter/ui/gtk3/widgets/apptreeview.py'
20--- softwarecenter/ui/gtk3/widgets/apptreeview.py 2012-04-10 05:05:22 +0000
21+++ softwarecenter/ui/gtk3/widgets/apptreeview.py 2012-04-12 10:12:18 +0000
22@@ -397,7 +397,22 @@
23 return path
24
25 def _on_button_press_event(self, view, event, tr):
26- if not self._on_button_event_get_path(view, event):
27+ path = self._on_button_event_get_path(view, event)
28+ if not path:
29+ # ^path has too much filtered out, so check it properly here
30+ res = view.get_path_at_pos(int(event.x), int(event.y))
31+ if not res or event.button != 1:
32+ return
33+ path = res[0]
34+ is_cat = self.rowref_is_category(self.get_rowref(view.get_model(),
35+ path))
36+ if is_cat:
37+ if view.row_expanded(path):
38+ view.collapse_row(path)
39+ else:
40+ view.expand_row(path, True)
41+ return True # swallow event to avoid double action when
42+ # clicking on the expander arrow itself
43 return
44
45 self.pressed = True

Subscribers

People subscribed via source and target branches