Exemple #1
0
    def init_preferences_values(self):
        self.lock()
        self.attach(
            self.devname,
            BtValueDescriptor.new_from('device_name',
                                       self.prefs['device_name']))
        # self.autostart.set_active(self.prefs[""]);
        self.autostart.set_sensitive(False)
        self.attach(
            self.listeningport,
            BtValueDescriptor.new_from('listening_port',
                                       self.prefs['listening_port']))
        self.attach(
            self.upnp,
            BtValueDescriptor.new_from('use_upnp', self.prefs['use_upnp']))
        self.attach(
            self.limitdnrate,
            BtValueDescriptor.new_from('download_limit',
                                       self.prefs['download_limit']))
        self.attach(
            self.limituprate,
            BtValueDescriptor.new_from('upload_limit',
                                       self.prefs['upload_limit']))

        self.limitdn.set_active(self.prefs['download_limit'] > 0)
        self.limitup.set_active(self.prefs['upload_limit'] > 0)
        self.unlock()
Exemple #2
0
	def init_preferences_values(self):
		self.lock()
		self.attach(self.devname,BtValueDescriptor.new_from('device_name',self.prefs['device_name']))
		# self.autostart.set_active(self.prefs[""]);
		self.autostart.set_sensitive(False)
		self.attach(self.listeningport,BtValueDescriptor.new_from('listening_port',self.prefs['listening_port']))
		self.attach(self.upnp,BtValueDescriptor.new_from('use_upnp',self.prefs['use_upnp']))
		self.attach(self.limitdnrate,BtValueDescriptor.new_from('download_limit',self.prefs['download_limit']))
		self.attach(self.limituprate,BtValueDescriptor.new_from('upload_limit',self.prefs['upload_limit']))

		self.limitdn.set_active(self.prefs['download_limit'] > 0)
		self.limitup.set_active(self.prefs['upload_limit'] > 0)
		self.unlock()
Exemple #3
0
 def init_values(self):
     self.lock()
     # fill with current values and specifications
     self.advancedprefs.clear()
     for key, value in self.prefs.items():
         valDesc = BtValueDescriptor.new_from(key, value)
         if valDesc.Advanced and not valDesc.Hidden:
             self.advancedprefs.append([
                 str(key),
                 str(value), 400 if valDesc.is_default(value) else 900,
                 valDesc
             ])
     self.unlock()
Exemple #4
0
	def init_values(self):
		self.lock()
		# fill with current values and specifications
		self.advancedprefs.clear()
		for key, value in self.prefs.items():
			valDesc = BtValueDescriptor.new_from(key,value)
			if valDesc.Advanced:
				self.advancedprefs.append([
					str(key), str(value),
					400 if valDesc.is_default(value) else 900,
					valDesc
				]);
		self.unlock()
	def init_settings_values(self):
		self.lock()
		self.attach(self.enableDarkIcons,BtValueDescriptor.new_from('dark',self.agent.dark))
		self.attach(self.enableFoldersMenu,BtValueDescriptor.new_from('foldersmenu',self.agent.foldersmenu))
		self.attach(self.enableWebUI,BtValueDescriptor.new_from('webui',self.agent.webui))
		self.unlock()