def change_observing_player(self, combo: Gtk.ComboBox): observing_player = combo.get_active() if observing_player == 0: self.observing_player = None else: self.observing_player = observing_player - 1 self.update_observer()
def on_stt_combobox_changed(self, combo: Gtk.ComboBox): selection = combo.get_active() if selection == 0: susicfg.set('stt', 'google') elif selection == 1: credential_dialog = WatsonCredentialsDialog( self.config_window.window) response = credential_dialog.run() if response == Gtk.ResponseType.OK: username = credential_dialog.username_field.get_text() password = credential_dialog.password_field.get_text() susicfg.set('stt', 'watson') susicfg.set('watson.stt.user', username) susicfg.set('watson.stt.pass', password) else: self.config_window.init_stt_combobox() credential_dialog.destroy() elif selection == 2: credential_dialog = BingCredentialDialog( self.config_window.window) response = credential_dialog.run() if response == Gtk.ResponseType.OK: api_key = credential_dialog.api_key_field.get_text() susicfg.set('stt', 'bing') susicfg.set('bing.api', api_key) else: self.config_window.init_stt_combobox() credential_dialog.destroy()
def on_stt_combobox_changed(self, combo: Gtk.ComboBox): selection = combo.get_active() if selection == 0: config['default_stt'] = 'google' elif selection == 1: credential_dialog = WatsonCredentialsDialog( self.config_window.window) response = credential_dialog.run() if response == Gtk.ResponseType.OK: username = credential_dialog.username_field.get_text() password = credential_dialog.password_field.get_text() config['default_stt'] = 'watson' config['watson_stt_config']['username'] = username config['watson_stt_config']['password'] = password else: self.config_window.init_stt_combobox() credential_dialog.destroy() elif selection == 2: credential_dialog = BingCredentialDialog( self.config_window.window) response = credential_dialog.run() if response == Gtk.ResponseType.OK: api_key = credential_dialog.api_key_field.get_text() config['default_stt'] = 'bing' config['bing_speech_api_key']['username'] = api_key else: self.config_window.init_stt_combobox() credential_dialog.destroy()
def on_hotword_combobox_changed(self, combo: Gtk.ComboBox): selection = combo.get_active() if selection == HOTWORD_SNOWBOY: susicfg.set('hotword.engine', 'Snowboy') elif selection == HOTWORD_POCKETSPHINX: susicfg.set('hotword.engine', 'PocketSphinx') elif selection == HOTWORD_NONE: susicfg.set('hotword.engine', 'None')
def on_secondary_terrain_type_changed(self, w: Gtk.ComboBox): idx = w.get_active() static = self.module.project.get_rom_module().get_static_data() secondary_terrains = HardcodedDungeons.get_secondary_terrains( self.module.project.get_binary(BinaryName.ARM9), static ) secondary_terrains[self.item_id] = SecondaryTerrainTableEntry(idx) def update(arm9): HardcodedDungeons.set_secondary_terrains(secondary_terrains, arm9, static) self.module.project.modify_binary(BinaryName.ARM9, update) self.mark_as_modified()
def on_settings_override_changed(self, w: Gtk.ComboBox, *args): self.override_id = w.get_active() self.module.save_fixed_floor_override(self.floor_id, self.override_id)
def on_tool_choose_tileset_cb_changed(self, w: Gtk.ComboBox): idx = w.get_active() self.tileset_id = idx self._init_tileset()
def on_combo_box_palettes_changed(self, wdg: Gtk.ComboBox): self.edited_mappings[self.current_tile_id].pal_idx = wdg.get_active()
def on_combo_box_palettes_preview_changed(self, wdg: Gtk.ComboBox): self.current_tile_picker_palette = wdg.get_active() for m in self.dummy_tile_map: m.pal_idx = self.current_tile_picker_palette
def combo_box_changed(self, combo: Gtk.ComboBox) -> None: model = combo.get_model() if len(model) > 0: row = combo.get_model()[combo.get_active()][:] self.emit('changed', row[FileGroupComboBox.COLUMN_GROUP], row[FileGroupComboBox.COLUMN_MIME])
def on_data_combo_box_changed(self, cb: Gtk.ComboBox): if self.drawer: self.drawer.set_interaction_dat_value(cb.get_active())
def combo_box_changed(self, combo: Gtk.ComboBox) -> None: if len(self.versions) > 0: row = self.versions[combo.get_active()][:] self.emit('changed', row[self.COLUMN_PATH], row[self.COLUMN_FEATURES])
def on_tool_choose_tileset_cb_changed(self, w: Gtk.ComboBox): idx = w.get_active() self.tileset_id = idx self.on_tool_fullmap_toggled(self.builder.get_object('tool_fullmap'), ignore_scaling=True) # type: ignore