~osomon/software-center/button_release

« back to all changes in this revision

Viewing changes to softwarecenter/view/channelpane.py

  • Committer: Michael Vogt
  • Date: 2010-04-16 19:33:38 UTC
  • Revision ID: michael.vogt@ubuntu.com-20100416193338-zuqek9avwhi34b31
* softwarecenter/view/availablepane.py, 
  softwarecenter/view/channelpane.py,
  softwarecenter/view/installedpane.py:
  - only send size information signals if we actually have a model
    (LP: #564756)
  

Show diffs side-by-side

added added

removed removed

Lines of Context:
186
186
        model = self.app_view.get_model()
187
187
        if model:
188
188
            length = len(self.app_view.get_model())
189
 
        else:
190
 
            length = 0
191
 
        self.emit("app-list-changed", length)
 
189
            self.emit("app-list-changed", length)
192
190
        self.searchentry.show()
193
191
    
194
192
    def get_status_text(self):
198
196
            return ""
199
197
        # otherwise, show status based on search or not
200
198
        model = self.app_view.get_model()
201
 
        if model:
202
 
            length = len(self.app_view.get_model())
203
 
        else:
204
 
            length = 0
 
199
        if not model:
 
200
            return ""
 
201
        length = len(self.app_view.get_model())
205
202
        if len(self.searchentry.get_text()) > 0:
206
203
            return gettext.ngettext("%s matching item",
207
204
                                    "%s matching items",