~evfool/software-center/lp626037

« back to all changes in this revision

Viewing changes to softwarecenter/ui/gtk3/panes/softwarepane.py

  • Committer: Gary Lasker
  • Date: 2012-04-30 22:27:29 UTC
  • mfrom: (2990.3.5 whatsnew-leak-lp985389)
  • Revision ID: gary.lasker@canonical.com-20120430222729-k3kqvmyi6p7dbdwm
* lp:~mvo/software-center/whatsnew-leak-lp985389:
  - search filter fix for the case when the "installed-only"
    filter leaks into subsequent searches (LP: #985389)

Show diffs side-by-side

added added

removed removed

Lines of Context:
123
123
        self.search_term = ""
124
124
        self.application = None
125
125
        self.limit = 0
126
 
        #~ self.filter = None
 
126
        if self.filter:
 
127
            self.filter.reset()
127
128
        self.vadjustment = 0.0
128
129
 
129
130
 
368
369
            self.action_bar.set_label(
369
370
                        label, link_result=self._show_nonapp_pkgs)
370
371
 
371
 
    def _on_label_app_list_header_activate_link(self, link, uri):
372
 
        #print "actiavte: ", link, uri
373
 
        if uri.startswith("search:"):
374
 
            self.searchentry.set_text(uri[len("search:"):])
375
 
        elif uri.startswith("search-all:"):
376
 
            self.unset_current_category()
377
 
            self.refresh_apps()
378
 
        elif uri.startswith("search-parent:"):
379
 
            self.apps_subcategory = None
380
 
            self.refresh_apps()
381
 
        elif uri.startswith("search-unsupported:"):
382
 
            self.apps_filter.set_supported_only(False)
383
 
            self.refresh_apps()
384
 
        # FIXME: add ability to remove categories restriction here
385
 
        # True stops event propergation
386
 
        return True
387
 
 
388
372
    def _show_nonapp_pkgs(self):
389
373
        self.nonapps_visible = NonAppVisibility.ALWAYS_VISIBLE
390
374
        self.refresh_apps()