def set_update_automation_level(self, widget, state): '''Call the backend to set the update automation level to the given value''' if widget.get_active() == True: self.vbox_auto_updates.foreach(lambda b: b.set_inconsistent(False)) SoftwareProperties.set_update_automation_level(self, state) self.set_modified_config()
def set_update_automation_level(self, widget, state): '''Call the backend to set the update automation level to the given value''' if widget.get_active() == True: self.vbox_auto_updates.foreach(lambda b: b.set_inconsistent(False)) SoftwareProperties.set_update_automation_level(self, state) self.set_modified_config()
def on_auto_update_toggled(self, widget): """Enable or disable automatic updates and modify the user interface accordingly""" if self.checkbutton_auto_update.get_active(): self.combobox_update_interval.set_sensitive(True) self.vbox_auto_updates.set_sensitive(True) # if no frequency was specified use daily i = self.combobox_update_interval.get_active() if i == -1: i = 0 self.combobox_update_interval.set_active(i) value = self.combobox_interval_mapping[i] # A little hack to re-set the former selected update automation level self.vbox_auto_updates.foreach(lambda b: b.toggled()) else: self.combobox_update_interval.set_sensitive(False) self.vbox_auto_updates.set_sensitive(False) SoftwareProperties.set_update_automation_level(self, None) value = 0 self.set_update_interval(str(value))
def on_auto_update_toggled(self, widget): """Enable or disable automatic updates and modify the user interface accordingly""" if self.checkbutton_auto_update.get_active(): self.combobox_update_interval.set_sensitive(True) self.vbox_auto_updates.set_sensitive(True) # if no frequency was specified use daily i = self.combobox_update_interval.get_active() if i == -1: i = 0 self.combobox_update_interval.set_active(i) value = self.combobox_interval_mapping[i] # A little hack to re-set the former selected update automation level self.vbox_auto_updates.foreach(lambda b: b.toggled()) else: self.combobox_update_interval.set_sensitive(False) self.vbox_auto_updates.set_sensitive(False) SoftwareProperties.set_update_automation_level(self, None) value = 0 self.set_update_interval(str(value))
def on_auto_update_toggled(self): """Enable or disable automatic updates and modify the user interface accordingly""" if self.userinterface.checkbutton_auto_update.checkState() == Qt.Checked: self.userinterface.combobox_update_interval.setEnabled(True) self.userinterface.radiobutton_updates_inst_sec.setEnabled(True) self.userinterface.radiobutton_updates_download.setEnabled(True) self.userinterface.radiobutton_updates_notify.setEnabled(True) # if no frequency was specified use daily i = self.userinterface.combobox_update_interval.currentIndex() if i == -1: i = 0 self.userinterface.combobox_update_interval.setCurrentIndex(i) value = self.combobox_interval_mapping[i] else: self.userinterface.combobox_update_interval.setEnabled(False) self.userinterface.radiobutton_updates_inst_sec.setEnabled(False) self.userinterface.radiobutton_updates_download.setEnabled(False) self.userinterface.radiobutton_updates_notify.setEnabled(False) SoftwareProperties.set_update_automation_level(self, None) value = 0 self.set_update_interval(str(value))
def on_auto_update_toggled(self): """Enable or disable automatic updates and modify the user interface accordingly""" if self.userinterface.checkbutton_auto_update.checkState( ) == Qt.Checked: self.userinterface.combobox_update_interval.setEnabled(True) self.userinterface.radiobutton_updates_inst_sec.setEnabled(True) self.userinterface.radiobutton_updates_download.setEnabled(True) self.userinterface.radiobutton_updates_notify.setEnabled(True) # if no frequency was specified use daily i = self.userinterface.combobox_update_interval.currentIndex() if i == -1: i = 0 self.userinterface.combobox_update_interval.setCurrentIndex(i) value = self.combobox_interval_mapping[i] else: self.userinterface.combobox_update_interval.setEnabled(False) self.userinterface.radiobutton_updates_inst_sec.setEnabled(False) self.userinterface.radiobutton_updates_download.setEnabled(False) self.userinterface.radiobutton_updates_notify.setEnabled(False) SoftwareProperties.set_update_automation_level(self, None) value = 0 self.set_update_interval(str(value))
def set_update_automation_level(self, selected): """Call the backend to set the update automation level to the given value""" if self.userinterface.radiobutton_updates_download.isChecked(): SoftwareProperties.set_update_automation_level(self, softwareproperties.UPDATE_DOWNLOAD) elif self.userinterface.radiobutton_updates_inst_sec.isChecked(): SoftwareProperties.set_update_automation_level(self, softwareproperties.UPDATE_INST_SEC) elif self.userinterface.radiobutton_updates_notify.isChecked(): SoftwareProperties.set_update_automation_level(self, softwareproperties.UPDATE_NOTIFY) self.set_modified_config()
def set_update_automation_level(self, selected): """Call the backend to set the update automation level to the given value""" if self.userinterface.radiobutton_updates_download.isChecked(): SoftwareProperties.set_update_automation_level( self, softwareproperties.UPDATE_DOWNLOAD) elif self.userinterface.radiobutton_updates_inst_sec.isChecked(): SoftwareProperties.set_update_automation_level( self, softwareproperties.UPDATE_INST_SEC) elif self.userinterface.radiobutton_updates_notify.isChecked(): SoftwareProperties.set_update_automation_level( self, softwareproperties.UPDATE_NOTIFY) self.set_modified_config()