def _choose_editor(self, action, cb):
     if isinstance(action, ModeModifier):
         from scc.gui.modeshift_editor import ModeshiftEditor  # Cannot be imported @ top
         e = ModeshiftEditor(self.app, cb)
         e.set_title(_("Edit Action"))
     else:
         from scc.gui.action_editor import ActionEditor  # Cannot be imported @ top
         e = ActionEditor(self.app, cb)
         e.set_title(_("Edit Action"))
         e.hide_macro()
         e.hide_ring()
     return e
Example #2
0
	def _choose_editor(self, action, cb):
		if isinstance(action, ModeModifier):
			from scc.gui.modeshift_editor import ModeshiftEditor	# Cannot be imported @ top
			e = ModeshiftEditor(self.app, cb)
			e.set_title(_("Edit Action"))
		else:
			from scc.gui.action_editor import ActionEditor	# Cannot be imported @ top
			e = ActionEditor(self.app, cb)
			e.set_title(_("Edit Action"))
			e.hide_macro()
			e.hide_ring()
		return e
Example #3
0
	def choose_editor(self, action, title):
		""" Chooses apropripate Editor instance for edited action """
		if isinstance(action, SensitivityModifier):
			action = action.action
		if isinstance(action, (ModeModifier, DoubleclickModifier, HoldModifier)) and not is_gyro_enable(action):
			e = ModeshiftEditor(self.app, self.on_action_chosen)
			e.set_title(_("Mode Shift for %s") % (title,))
		elif isinstance(action, Type):
			# Type is subclass of Macro
			e = ActionEditor(self.app, self.on_action_chosen)
			e.set_title(title)
		elif isinstance(action, Macro):
			e = MacroEditor(self.app, self.on_action_chosen)
			e.set_title(_("Macro for %s") % (title,))
		else:
			e = ActionEditor(self.app, self.on_action_chosen)
			e.set_title(title)
		return e
Example #4
0
 def choose_editor(self, action, title):
     """ Chooses apropripate Editor instance for edited action """
     if isinstance(action, SensitivityModifier):
         action = action.action
     if isinstance(action, (ModeModifier, DoubleclickModifier,
                            HoldModifier)) and not is_gyro_enable(action):
         e = ModeshiftEditor(self.app, self.on_action_chosen)
         e.set_title(_("Mode Shift for %s") % (title, ))
     elif isinstance(action, Type):
         # Type is subclass of Macro
         e = ActionEditor(self.app, self.on_action_chosen)
         e.set_title(title)
     elif isinstance(action, Macro):
         e = MacroEditor(self.app, self.on_action_chosen)
         e.set_title(_("Macro for %s") % (title, ))
     else:
         e = ActionEditor(self.app, self.on_action_chosen)
         e.set_title(title)
     return e
Example #5
0
	def _choose_editor(self, action, title):
		if isinstance(action, SensitivityModifier):
			action = action.action
		if isinstance(action, ModeModifier) and not is_gyro_enable(action):
			e = ModeshiftEditor(self, self.on_action_chosen)
			e.set_title(_("Mode Shift for %s") % (title,))
		elif isinstance(action, Macro):
			e = MacroEditor(self, self.on_action_chosen)
			e.set_title(_("Macro for %s") % (title,))
		else:
			e = ActionEditor(self, self.on_action_chosen)
			e.set_title(title)
		return e