Example #1
0
	def load(self):
		if self.loaded : return
		AEComponent.load(self)
		cbConfirmWith = self.builder.get_object("cbConfirmWith")
		cbCancelWith = self.builder.get_object("cbCancelWith")
		cbConfirmWith.set_row_separator_func( lambda model, iter : model.get_value(iter, 0) == "-" )
		cbCancelWith.set_row_separator_func( lambda model, iter : model.get_value(iter, 0)  == "-" )
	def load(self):
		if self.loaded : return
		AEComponent.load(self)
		self._recursing = True
		cbGyroButton = self.builder.get_object("cbGyroButton")
		fill_buttons(cbGyroButton)
		self._recursing = False
Example #3
0
	def load(self):
		if not self.loaded:
			AEComponent.load(self)
			self.setup_image()
			if self.app.osd_mode:
				self.builder.get_object('btnGrabKey').set_sensitive(False)
				self.builder.get_object('btnGrabAnother').set_sensitive(False)
Example #4
0
	def load(self):
		if self.loaded : return
		AEComponent.load(self)
		cbAreaType = self.builder.get_object("cbAreaType")
		cbAreaType.set_row_separator_func( lambda model, iter : model.get_value(iter, 0) == "-" )
		self.on_wayland = "WAYLAND_DISPLAY" in os.environ or not isinstance(Gdk.Display.get_default(), GdkX11.X11Display)
		if self.on_wayland:
			self.builder.get_object("lblArea").set_text(_("Note: Mouse Region option is not available with Wayland-based display server"))
			self.builder.get_object("grArea").set_sensitive(False)
		
		# Remove options that are not applicable to currently editted input
		if self.editor.get_id() in STICKS:
			# Remove "Mouse Region", "Mouse" and "Mouse (Emulate Stick)" options
			# when editing stick bindings
			cb = self.builder.get_object("cbAxisOutput")
			for row in cb.get_model():
				if row[2] in ("wheel_pad", "area", "mouse", "mouse_pad"):
					cb.get_model().remove(row.iter)
		else:
			# Remove "Mouse" option when editing pads
			# (it's effectivelly same as Trackpad)
			cb = self.builder.get_object("cbAxisOutput")
			for row in cb.get_model():
				if row[2] in ("wheel_stick", "mouse_stick"):
					cb.get_model().remove(row.iter)
Example #5
0
	def load(self):
		if self.loaded : return
		AEComponent.load(self)
		try:
			txCustomAction = self.builder.get_object("txCustomAction")
			txCustomAction.set_monospace(True)
		except: pass
Example #6
0
	def load(self):
		if self.loaded : return
		AEComponent.load(self)
		cbGyroButton = self.builder.get_object("cbGyroButton")
		self._recursing = True
		cbGyroButton = self.builder.get_object("cbGyroButton")
		fill_buttons(cbGyroButton)
		self._recursing = False
		self.buttons = [ self.builder.get_object(x) for x in ("btPitch", "btYaw", "btRoll") ]
		self.cbs = [ self.builder.get_object(x) for x in ("cbPitchAbs", "cbYawAbs", "cbRollAbs") ]
		self.labels = [ self.builder.get_object(x) for x in ("lblPitch", "lblYaw", "lblRoll") ]
Example #7
0
	def load(self):
		if AEComponent.load(self):
			markup = ""
			if self.editor.get_mode() == Action.AC_PAD:
				markup = MARKUP_PAD
			elif self.editor.get_mode() == Action.AC_STICK:
				markup = MARKUP_STICK
			elif self.editor.get_mode() == Action.AC_GYRO:
				markup = MARKUP_GYRO
			elif self.editor.get_mode() == Action.AC_TRIGGER:
				markup = MARKUP_TRIGGER
			else:
				markup = MARKUP_BUTTON
			
			long_names = {
				'LPAD' : _("Left Pad"),
				'RPAD' : _("Right Pad"),
				'LGRIP' : _("Left Grip"),
				'RGRIP' : _("Right Grip"),
				'LB' : _("Left Bumper"),
				'RB' : _("Right Bumper"),
				'LEFT' : _("Left Trigger"),
				'RIGHT' : _("Right Trigger"),
				'STICK' : _("Stick"),
			}
			
			markup = markup % {
				'what' : long_names.get(nameof(self.editor.get_id()),
								nameof(self.editor.get_id()).title())
			}
			self.builder.get_object("lblMarkup").set_markup(markup.strip(" \r\n\t"))
			return True
Example #8
0
    def load(self):
        if AEComponent.load(self):
            # Unlike mose region, gesutres kinda work with XWayland
            markup = ""
            if self.editor.get_mode() == Action.AC_PAD:
                markup = MARKUP_PAD
            elif self.editor.get_mode() == Action.AC_STICK:
                markup = MARKUP_STICK
            elif self.editor.get_mode() == Action.AC_GYRO:
                markup = MARKUP_GYRO
            elif self.editor.get_mode() == Action.AC_TRIGGER:
                markup = MARKUP_TRIGGER
            else:
                markup = MARKUP_BUTTON

            long_names = {
                'LPAD': _("Left Pad"),
                'RPAD': _("Right Pad"),
                'LGRIP': _("Left Grip"),
                'RGRIP': _("Right Grip"),
                'LB': _("Left Bumper"),
                'RB': _("Right Bumper"),
                'LEFT': _("Left Trigger"),
                'RIGHT': _("Right Trigger"),
                'STICK': _("Stick"),
            }

            markup = markup % {
                'what':
                long_names.get(nameof(self.editor.get_id()),
                               nameof(self.editor.get_id()).title())
            }
            self.builder.get_object("lblMarkup").set_markup(
                markup.strip(" \r\n\t"))
            return True
Example #9
0
 def load(self):
     if self.loaded: return
     AEComponent.load(self)
     cbGyroButton = self.builder.get_object("cbGyroButton")
     self._recursing = True
     cbGyroButton = self.builder.get_object("cbGyroButton")
     fill_buttons(cbGyroButton)
     self._recursing = False
     self.buttons = [
         self.builder.get_object(x) for x in ("btPitch", "btYaw", "btRoll")
     ]
     self.cbs = [
         self.builder.get_object(x)
         for x in ("cbPitchAbs", "cbYawAbs", "cbRollAbs")
     ]
     self.labels = [
         self.builder.get_object(x)
         for x in ("lblPitch", "lblYaw", "lblRoll")
     ]
Example #10
0
 def load(self):
     if not self.loaded:
         AEComponent.load(self)
         self.setup_image()
Example #11
0
	def load(self):
		if not self.loaded:
			AEComponent.load(self)
			self.setup_image(grid_columns=2)
Example #12
0
 def load(self):
     if self.loaded: return
     AEComponent.load(self)
     cbAreaType = self.builder.get_object("cbAreaType")
     cbAreaType.set_row_separator_func(
         lambda model, iter: model.get_value(iter, 0) == "-")
	def load(self):
		if self.loaded : return
		AEComponent.load(self)
Example #14
0
	def load(self):
		if self.loaded : return
		AEComponent.load(self)
		cbAreaType = self.builder.get_object("cbAreaType")
		cbAreaType.set_row_separator_func( lambda model, iter : model.get_value(iter, 0) == "-" )
Example #15
0
 def load(self):
     if self.loaded: return
     AEComponent.load(self)
Example #16
0
	def load(self):
		if not self.loaded:
			AEComponent.load(self)
			self.setup_image()
	def load(self):
		if not self.loaded:
			AEComponent.load(self)
			self.builder.get_object("lblClickAnyButton").set_visible(False)