def select_device(self, need_to_confirm=True):
model = self.load_this_model()
if not model:
sublime.message_dialog(STR_MODEL_NOT_ASSIGNED)
return
device_ids = model.get("devices")
if not device_ids or not len(device_ids):
sublime.message_dialog(STR_MODEL_HAS_NO_DEVICES)
return
if need_to_confirm and not sublime.ok_cancel_dialog(STR_SELECT_DEVICE): return
(Env.For(self.window).tmp_device_ids, device_names) = self.load_devices(input_device_ids=device_ids)
self.window.show_quick_panel(device_names, self.on_device_selected)
评论列表
文章目录