~mvo/software-center/improve-debug-in-piston-generic-helper

« back to all changes in this revision

Viewing changes to softwarecenter/backend/oneconfhandler/core.py

  • Committer: Michael Vogt
  • Date: 2012-01-06 09:24:05 UTC
  • mfrom: (2628.1.1 software-center)
  • Revision ID: michael.vogt@ubuntu.com-20120106092405-rzdfgeiuemgjz971
* lp:~didrocks/software-center/oneconf-remove-computers-from-share
  - Enable (from the new spec) removing a host which isn't the 
    current one from the gui. 

Show diffs side-by-side

added added

removed removed

Lines of Context:
138
138
        self.get_latest_oneconf_sync()
139
139
        self.emit("show-oneconf-changed", share_inventory)
140
140
 
141
 
    def sync_between_computers(self, sync_on):
142
 
        '''toggle the sync on and off if needed between computers'''
 
141
    def sync_between_computers(self, sync_on, hostid=None):
 
142
        '''toggle the sync on and off if needed between computers.
 
143
        
 
144
        If hostid is not None, sync_between_computer can be used to stop
 
145
        sharing for other computers'''
143
146
        LOG.debug("Toggle sync between computers: %s", sync_on)
144
147
        
145
148
        if sync_on:
146
149
            self._try_login()
147
150
        else:
148
 
            self._share_inventory(False)
 
151
            if hostid:
 
152
                self.oneconf.set_share_inventory(False, hostid=hostid)
 
153
            else: # localhost
 
154
                self._share_inventory(False)
149
155
            
150
156
    def _on_store_packagelist_changed(self, hostid):
151
157
        '''pass the message to the view controller'''