~didrocks/software-center/smarter-app-filtering-level

« back to all changes in this revision

Viewing changes to softwarecenter/view/availablepane.py

  • Committer: Didier Roche
  • Date: 2010-10-02 21:06:25 UTC
  • Revision ID: didier.roche@canonical.com-20101002210625-w1aisustobal4dc1
Enhance to the AppStore model nonapp_visible state: (LP: #653787)

nonapp_visible was working on USC:
  if nonapp_visible is set to False and no result were found, nonapp_visible
  from AppStore is then set to true to wider search. This dramatically slow down

They can have a lot of cases were there is no match in case of synced
computer state (in either installed or removed package), for more than one view.

The proposal is to switch the True/False value to:
     NONAPPS_ALWAYS_VISIBLE (previous "True")
     NONAPPS_MAYBE_VISIBLE (previous "False")
     NONAPPS_NEVER_VISIBLE (New value used to be more strict)

Show diffs side-by-side

added added

removed removed

Lines of Context:
255
255
        # special case to disable hide nonapps for the "Featured Applications" category
256
256
        if (self.apps_category and 
257
257
            self.apps_category.untranslated_name) == "Featured":
258
 
            self.nonapps_visible = True
 
258
            self.nonapps_visible = AppStore.NONAPPS_ALWAYS_VISIBLE
259
259
        # In custom list mode, search should yield the exact package name.
260
260
        new_model = AppStore(self.cache,
261
261
                             self.db,