~ubuntu-branches/ubuntu/lucid/software-center/lucid

« back to all changes in this revision

Viewing changes to softwarecenter/view/softwarepane.py

  • Committer: Bazaar Package Importer
  • Author(s): Michael Vogt, Michael Vogt, Gary Lasker
  • Date: 2010-02-17 10:13:41 UTC
  • Revision ID: james.westby@ubuntu.com-20100217101341-x134t7lm0bss3jxn
Tags: 1.1.12
[ Michael Vogt ]
* merged lp:~mmcg069/software-center/spinner  (many thanks)
* merged lp:~mmcg069/software-center/fixes-and-tweaks  (many thanks)

[ Gary Lasker ]
* implement standalone presentation of individual software
  repositories

[ Michael Vogt ]
* README:
  - document menu.d/ directory
* softwarecenter/view/catview.py:
  - add SCPkgname xml filter
* apt-xapian-index-plugin/software-center.py:
  - add custom apt-xapian-index plugins for indexing 
    "XB-Softwarecenter-Appname" in debian/control
* apt-xapian-index-plugin/origin.py:
  - add custom apt-xapian-index plugins for indexing the origins
* softwarecenter/distro/Ubuntu.py:
  - add abstraction for distro_channel_{name,description}
* softwarecenter/distro/__init__.py:
  - make get_distro() return a singleton
* softwarecenter/view/channelpane.py:
  - for the main distro channel, show only apps, not all packages
* data/featured.menu.in:
  - add a "Featured" category

Show diffs side-by-side

added added

removed removed

Lines of Context:
56
56
        f(*args, **kwargs)
57
57
        return False
58
58
    return wrapper
59
 
            
 
59
 
60
60
 
61
61
class SoftwarePane(gtk.VBox):
62
62
    """ Common base class for InstalledPane and AvailablePane """
65
65
        "app-list-changed" : (gobject.SIGNAL_RUN_LAST,
66
66
                              gobject.TYPE_NONE, 
67
67
                              (int, ),
68
 
                             )
 
68
                             ),
69
69
    }
70
70
    PADDING = 6
71
71
 
102
102
        self.scroll_details.set_policy(gtk.POLICY_AUTOMATIC, 
103
103
                                       gtk.POLICY_AUTOMATIC)
104
104
        self.scroll_details.add(self.app_details)
 
105
        self.app_details.backend.connect("transaction-finished", self.on_transaction_finished)
 
106
        self.app_details.backend.connect("transaction-stopped", self.on_transaction_stopped)
105
107
        # cursor
106
108
        self.busy_cursor = gtk.gdk.Cursor(gtk.gdk.WATCH)
107
109
        # when the cache changes, refresh the app list
150
152
            action_func()
151
153
        else:
152
154
            logging.error("can not find action '%s'" % action)
 
155
            
 
156
    def on_transaction_finished(self, backend, success):
 
157
        """ callback when an application install/remove transaction has finished """
 
158
        btns = self.app_view.buttons
 
159
        if btns.has_key('action'):
 
160
            btns['action'].set_sensitive(True)
 
161
 
 
162
    def on_transaction_stopped(self, backend):
 
163
        """ callback when an application install/remove transaction has stopped """
 
164
        btns = self.app_view.buttons
 
165
        if btns.has_key('action'):
 
166
            btns['action'].set_sensitive(True)
 
167
 
 
168
    def set_page(self, part):
 
169
        if part.name == "category":
 
170
            self.notebook.set_current_page(self.PAGE_CATEGORY)
 
171
        elif part.name in ("subcat", "search", "list"):
 
172
            self.notebook.set_current_page(self.PAGE_APPLIST)
 
173
        elif part.name == "details":
 
174
            self.notebook.set_current_page(self.PAGE_APP_DETAILS)
 
175
        else:
 
176
            logging.warn("'%s' not mapped to history" % part.name)
 
177
        return
153
178
 
154
179
    def update_app_view(self):
155
180
        """