~dpm/qreator/snap

« back to all changes in this revision

Viewing changes to qreator/qrcodes/QRCodeSoftwareCenterAppGtk.py

  • Committer: Stefan Schwarzburg
  • Date: 2012-11-12 16:16:18 UTC
  • Revision ID: stefan.schwarzburg@googlemail.com-20121112161618-uds4s122oo0zbpgn
after recreating cache, use it as well

Show diffs side-by-side

added added

removed removed

Lines of Context:
144
144
        GObject.idle_add(self._recreate_cache, apps)
145
145
 
146
146
    def _recreate_cache(self, apps):
147
 
        print "recreate cache"
148
147
        # after everything is done:
149
148
        # recreate the sprite map for the next time
150
149
        icontheme = IconThemeSprite(apps, 16)
151
150
        icontheme.create_sprite(apps)
152
 
 
 
151
        model = Gtk.ListStore(str, GdkPixbuf.Pixbuf, str)
 
152
        icons = [icontheme[app.name] for app in apps]
 
153
        for app, icon in zip(apps, pixbufs):
 
154
            self.model.append([app.package, icon, app.name])
 
155
        self.model = model
 
156
        self.completion.set_model(self.model)
153
157
 
154
158
class IconThemeSprite(object):
155
159
    """The sprite is divided into two parts,