示例#1
0
 def on_port_pref_profile_changed(self, cbox: Gtk.ComboBox):
     """Signal handler: Port preferred profile combobox selection changed."""
     if self.updating_widgets > 0:
         return
     val = cbox.get_active_id()
     logging.debug('PreferencesDialog.on_port_pref_profile_changed(`%s`)', val)
     cfg = self.get_current_port_config()
     if cfg is not None:
         cfg['preferred_profile'] = val or None
         self.schedule_refresh()
示例#2
0
 def _fast_set_comboxbox_store(cb: Gtk.ComboBox, store: Gtk.ListStore, col):
     cb.set_model(store)
     renderer_text = Gtk.CellRendererText()
     cb.pack_start(renderer_text, True)
     cb.add_attribute(renderer_text, "text", col)
示例#3
0
 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])
示例#4
0
 def on_cb_direction_changed(self, w: Gtk.ComboBox, *args):
     self.restrictions.direction = DungeonRestrictionDirection(int(w.get_active_id()))
     self._save_dungeon_restrictions()
示例#5
0
 def on_cb_reference_changed(self, cb: Gtk.ComboBox):
     model, cbiter = cb.get_model(), cb.get_active_iter()
     if model is not None and cbiter is not None and cbiter != []:
         if self.dialog_drawer:
             self.dialog_drawer.set_editing(self._markers[model[cbiter][0]], hide=self._edited_marker)
示例#6
0
 def on_data_combo_box_changed(self, cb: Gtk.ComboBox):
     if self.drawer:
         self.drawer.set_interaction_dat_value(cb.get_active())
示例#7
0
 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])
示例#8
0
 def on_cb_map_changed(self, cb: Gtk.ComboBox):
     model, cbiter = cb.get_model(), cb.get_active_iter()
     if model is not None and cbiter is not None and cbiter != []:
         self._change_map_bg(model[cbiter][0], self.builder.get_object('diag_draw'), self.dialog_drawer)
示例#9
0
 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)
示例#10
0
 def on_sector_chooser_changed (self: 'Handler', combobox: Gtk.ComboBox,
                                user_data: Any = None) -> None:
     value = combobox.get_model ().get (combobox.get_active_iter (), 0)[0]
     print ("Sector chooser changed to '{}'".format (value))
示例#11
0
 def on_tool_choose_tileset_cb_changed(self, w: Gtk.ComboBox):
     idx = w.get_active()
     self.tileset_id = idx
     self._init_tileset()
示例#12
0
 def on_combo_box_palettes_changed(self, wdg: Gtk.ComboBox):
     self.edited_mappings[self.current_tile_id].pal_idx = wdg.get_active()
示例#13
0
 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
示例#14
0
 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
示例#15
0
 def on_sector_chooser_changed(self: 'Handler',
                               combobox: Gtk.ComboBox,
                               user_data: Any = None) -> None:
     value = combobox.get_model().get(combobox.get_active_iter(), 0)[0]
     print("Sector chooser changed to '{}'".format(value))