Merge lp:~gary-lasker/software-center/rec-tiny-cleanup into lp:software-center

Proposed by Gary Lasker
Status: Merged
Merged at revision: 3101
Proposed branch: lp:~gary-lasker/software-center/rec-tiny-cleanup
Merge into: lp:software-center
Diff against target: 51 lines (+5/-8)
1 file modified
softwarecenter/ui/gtk3/widgets/recommendations.py (+5/-8)
To merge this branch: bzr merge lp:~gary-lasker/software-center/rec-tiny-cleanup
Reviewer Review Type Date Requested Status
software-store-developers Pending
Review via email: mp+120029@code.launchpad.net

Commit message

 * lp:~gary-lasker/software-center/rec-tiny-cleanup:
   - additional bit of cleanup in the recommendations UI code

Description of the change

This branch took about 1 minute to make, so my hope is that it will not take much longer than that to review/merge. :)

Basically, it seemed silly to rename self.hide() in the superclass of the various recommender elements, so I removed that and just call self.hide() directly. That's it!

Many thanks as always for your review!

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'softwarecenter/ui/gtk3/widgets/recommendations.py'
2--- softwarecenter/ui/gtk3/widgets/recommendations.py 2012-08-16 07:03:58 +0000
3+++ softwarecenter/ui/gtk3/widgets/recommendations.py 2012-08-16 23:55:00 +0000
4@@ -68,10 +68,7 @@
5 # this can happen if:
6 # - there is a real error from the agent
7 # - no cached data is available
8- self._hide_panel()
9-
10- def _hide_panel(self):
11- # and hide the pane
12+ # hide the panel on an error
13 self.hide()
14
15
16@@ -90,7 +87,7 @@
17 if self.recommender_agent.is_opted_in():
18 self._update_recommended_for_you_content()
19 else:
20- self._hide_panel()
21+ self.hide()
22
23 def _update_recommended_for_you_content(self):
24 # destroy the old content to ensure we don't see it twice
25@@ -125,7 +122,7 @@
26 self.show_all()
27 else:
28 # hide the panel if we have no recommendations to show
29- self._hide_panel()
30+ self.hide()
31
32
33 class RecommendationsPanelLobby(RecommendationsPanelCategory):
34@@ -343,7 +340,7 @@
35 # detect the very first profile upload as that indicates
36 # the user's initial opt-in
37 self._disconnect_recommender_listeners()
38- self._hide_panel()
39+ self.hide()
40
41 def _disconnect_recommender_listeners(self):
42 try:
43@@ -391,7 +388,7 @@
44 self.show_all()
45 self.spinner_notebook.hide_spinner()
46 else:
47- self._hide_panel()
48+ self.hide()
49
50
51 class RecommendationsOptInDialog(Gtk.MessageDialog):

Subscribers

People subscribed via source and target branches