~gary-lasker/software-center/fix-crash-lp968988

« back to all changes in this revision

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

  • Committer: Gary Lasker
  • Date: 2012-03-30 07:26:46 UTC
  • mfrom: (2929.4.7 treeview-state)
  • Revision ID: gary.lasker@canonical.com-20120330072646-dk8m2shdry1iktu8
* lp:~mvo/software-center/treeview-keep-state-on-db-cache-change:
 - restore the state of the installed view treeview when the
   the db or cache changes, such as on an app install or remove

Show diffs side-by-side

added added

removed removed

Lines of Context:
254
254
    def on_cache_ready(self, cache):
255
255
        " refresh the application list when the cache is re-opened "
256
256
        LOG.debug("on_cache_ready")
257
 
        # it only makes sense to refresh if there is something to
258
 
        # refresh, otherwise we create a bunch of (not yet needed)
259
 
        # AppStore objects on startup when the cache sends its
260
 
        # initial "cache-ready" signal
261
 
        model = self.app_view.tree_view.get_model()
262
 
        if model is None:
263
 
            return
264
 
        # FIXME: preserve selection too
265
 
        self.refresh_apps()
266
257
 
267
258
    @wait_for_apt_cache_ready
268
259
    def on_application_activated(self, appview, app):