def _make_action(self): """ Generates and returns Action instance """ cbMode = self.builder.get_object("cbMode") key = cbMode.get_model().get_value(cbMode.get_active_iter(), 0) if key == "inner": return MultiAction( self.actions[1], RingAction(self.radius, self.actions[0], NoAction())) elif key == "outer": return MultiAction( self.actions[0], RingAction(self.radius, NoAction(), self.actions[1])) else: return RingAction(self.radius, *self.actions)
def on_btInnerRing_clicked(self, *a): """ Convert current action into ring bindings and send it to RingEditor """ e = RingEditor(self.app, self.ac_callback) action = RingAction(self.generate_modifiers(self._action, self._selected_component.NAME=="custom")) e.set_input(self.id, action, mode=self._mode) self.send_added_widget(e) self.close() e.show(self.get_transient_for())
def _make_action(self): """ Generates and returns Action instance """ return RingAction(self.radius, *self.actions)