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
=== modified file 'softwarecenter/ui/gtk3/widgets/recommendations.py'
--- softwarecenter/ui/gtk3/widgets/recommendations.py 2012-08-16 07:03:58 +0000
+++ softwarecenter/ui/gtk3/widgets/recommendations.py 2012-08-16 23:55:00 +0000
@@ -68,10 +68,7 @@
68 # this can happen if:68 # this can happen if:
69 # - there is a real error from the agent69 # - there is a real error from the agent
70 # - no cached data is available70 # - no cached data is available
71 self._hide_panel()71 # hide the panel on an error
72
73 def _hide_panel(self):
74 # and hide the pane
75 self.hide()72 self.hide()
7673
7774
@@ -90,7 +87,7 @@
90 if self.recommender_agent.is_opted_in():87 if self.recommender_agent.is_opted_in():
91 self._update_recommended_for_you_content()88 self._update_recommended_for_you_content()
92 else:89 else:
93 self._hide_panel()90 self.hide()
9491
95 def _update_recommended_for_you_content(self):92 def _update_recommended_for_you_content(self):
96 # destroy the old content to ensure we don't see it twice93 # destroy the old content to ensure we don't see it twice
@@ -125,7 +122,7 @@
125 self.show_all()122 self.show_all()
126 else:123 else:
127 # hide the panel if we have no recommendations to show124 # hide the panel if we have no recommendations to show
128 self._hide_panel()125 self.hide()
129126
130127
131class RecommendationsPanelLobby(RecommendationsPanelCategory):128class RecommendationsPanelLobby(RecommendationsPanelCategory):
@@ -343,7 +340,7 @@
343 # detect the very first profile upload as that indicates340 # detect the very first profile upload as that indicates
344 # the user's initial opt-in341 # the user's initial opt-in
345 self._disconnect_recommender_listeners()342 self._disconnect_recommender_listeners()
346 self._hide_panel()343 self.hide()
347344
348 def _disconnect_recommender_listeners(self):345 def _disconnect_recommender_listeners(self):
349 try:346 try:
@@ -391,7 +388,7 @@
391 self.show_all()388 self.show_all()
392 self.spinner_notebook.hide_spinner()389 self.spinner_notebook.hide_spinner()
393 else:390 else:
394 self._hide_panel()391 self.hide()
395392
396393
397class RecommendationsOptInDialog(Gtk.MessageDialog):394class RecommendationsOptInDialog(Gtk.MessageDialog):

Subscribers

People subscribed via source and target branches