def control_smartdevice(self): dm = self.gui.device_manager running = dm.is_running('smartdevice') if running: dm.stop_plugin('smartdevice') if dm.get_option('smartdevice', 'autostart'): if not question_dialog(self.gui, _('Disable autostart'), _('Do you want wireless device connections to be' ' started automatically when calibre starts?')): dm.set_option('smartdevice', 'autostart', False) else: sd_dialog = SmartdeviceDialog(self.gui) sd_dialog.exec_() self.set_smartdevice_action_state()
def control_smartdevice(self): dm = self.gui.device_manager running = dm.is_running("smartdevice") if running: dm.stop_plugin("smartdevice") if dm.get_option("smartdevice", "autostart"): if not question_dialog( self.gui, _("Disable autostart"), _("Do you want wireless device connections to be" " started automatically when calibre starts?"), ): dm.set_option("smartdevice", "autostart", False) else: sd_dialog = SmartdeviceDialog(self.gui) sd_dialog.exec_() self.set_smartdevice_action_state()