~mvo/software-center/apptiles-view-widget

« back to all changes in this revision

Viewing changes to softwarecenter/ui/gtk3/widgets/recommendations.py

  • Committer: Michael Vogt
  • Date: 2012-08-17 06:51:05 UTC
  • mfrom: (3098.1.1 software-center)
  • Revision ID: michael.vogt@ubuntu.com-20120817065105-ev0b0i9263kl80hx
merged lp:~gary-lasker/software-center/rec-tiny-cleanup 

Show diffs side-by-side

added added

removed removed

Lines of Context:
68
68
        # this can happen if:
69
69
        #  - there is a real error from the agent
70
70
        #  - no cached data is available
71
 
        self._hide_panel()
72
 
 
73
 
    def _hide_panel(self):
74
 
        # and hide the pane
 
71
        # hide the panel on an error
75
72
        self.hide()
76
73
 
77
74
 
90
87
        if self.recommender_agent.is_opted_in():
91
88
            self._update_recommended_for_you_content()
92
89
        else:
93
 
            self._hide_panel()
 
90
            self.hide()
94
91
 
95
92
    def _update_recommended_for_you_content(self):
96
93
        # destroy the old content to ensure we don't see it twice
125
122
            self.show_all()
126
123
        else:
127
124
            # hide the panel if we have no recommendations to show
128
 
            self._hide_panel()
 
125
            self.hide()
129
126
 
130
127
 
131
128
class RecommendationsPanelLobby(RecommendationsPanelCategory):
343
340
        # detect the very first profile upload as that indicates
344
341
        # the user's initial opt-in
345
342
        self._disconnect_recommender_listeners()
346
 
        self._hide_panel()
 
343
        self.hide()
347
344
 
348
345
    def _disconnect_recommender_listeners(self):
349
346
        try:
391
388
            self.show_all()
392
389
            self.spinner_notebook.hide_spinner()
393
390
        else:
394
 
            self._hide_panel()
 
391
            self.hide()
395
392
 
396
393
 
397
394
class RecommendationsOptInDialog(Gtk.MessageDialog):