Exemple #1
1
	def action(self, contexts, action):
		if (action in tuple(x[1] for x in getHotkeys()) and self.actions.has_key(action)):
			res = self.actions[action](action)
			if res is not None:
				return res
			return 1
		else:
			return ActionMap.action(self, contexts, action)
Exemple #2
0
			def action(self, contexts, action):
				if action == "cancel":
					self.csel.handleEditCancel()
					return 0 # fall-trough
				elif action == "ok":
					return 0 # fall-trough
				else:
					return ActionMap.action(self, contexts, action)
	def action(self, contexts, action):
		if action in tuple(x[1] for x in used_keys.getHotkeys()) and action in self.actions:
			res = self.actions[action](action)
			if res is not None:
				return res
			return 1
		else:
			return ActionMap.action(self, contexts, action)
Exemple #4
0
	def action(self, contexts, action):
		if action in tuple(x[1] for x in ButtonSetupKeys) and action in self.actions:
			res = self.actions[action](action)
			if res is not None:
				return res
			return 1
		else:
			return ActionMap.action(self, contexts, action)
 def action(self, contexts, action):
     if action in tuple(x[1]
                        for x in getHotkeys()) and action in self.actions:
         res = self.actions[action](action)
         if res is not None:
             return res
         return 1
     else:
         return ActionMap.action(self, contexts, action)
Exemple #6
0
 def action(self, contexts, action):
     if (action in tuple(x[1] for x in hotkeys)
             and self.actions.has_key(action)):
         res = self.actions[action](action)
         if res is not None:
             return res
         return 1
     else:
         return ActionMap.action(self, contexts, action)
Exemple #7
0
 def action(self, contexts, action):
     if (action in tuple(button[1] for button in BUTTON_SETUP_KEYS)
             and action in self.actions):
         res = self.actions[action](action)
         if res is not None:
             return res
         return 1
     else:
         return ActionMap.action(self, contexts, action)
	def action(self, contexts, action):
		quickSelection = ('red','green','yellow','blue','vformat','picasa','shoutcast','youtube','find','f1','f2','f3','f4','sleep','spark','sat','fav','info','epg','file','playmode','usb','tvradio','tvsat','recall')
		if (action in quickSelection and self.actions.has_key(action)):
			res = self.actions[action](action)
			if res is not None:
				return res
			return 1
		else:
			return ActionMap.action(self, contexts, action)
Exemple #9
0
 def action(self, contexts, action):
     if action in tuple(
         (x[1] for x in ButtonSetupKeys)) and self.actions.has_key(action):
         res = self.actions[action](action)
         if res is not None:
             return res
         return 1
     else:
         return ActionMap.action(self, contexts, action)
         return
Exemple #10
0
	def action(self, contexts, action):
		quickSelection = ("tv","mute","f1","f1_long","f2","f2_long","f3","f3_long","f4","f4_long","flist","glist","fav","aspect","previous","rewind","fforward","next","timeshift","stop","playpause","record","volup","voldown","guide","guide_long","exit","chnup","chndown","info","info_long","audio","audio_long","info","up","left","down","right","menu","menu_long","video","video_long","history","history_long","opt","opt_long","text","text_long","red","red_long","green","green_long","yellow","yellow_long","blue","blue_long")

		if (action in quickSelection and self.actions.has_key(action)):
			res = self.actions[action](action)
			if res is not None:
				return res
			return 1
		else:
			return ActionMap.action(self, contexts, action)
Exemple #11
0
	def action(self, contexts, action):
		for x in ButtonSetupKeys:
			if action in tuple(x[1]):
				print 'ACTION EXTSTS:'
		if (action in tuple(x[1] for x in ButtonSetupKeys) and self.actions.has_key(action)):
			res = self.actions[action](action)
			if res is not None:
				return res
			return 1
		else:
			return ActionMap.action(self, contexts, action)
Exemple #12
0
	def action(self, contexts, action):
		quickSelection = ("red", "red_long", "green", "green_long", "yellow", "yellow_long", "blue", "blue_long", "pvr", "pvr_long", "radio", "radio_long", \
				  "text", "text_long", "help_long", "info", "info_long", "end", "end_long", "home", "home_long", "cross_up", "cross_down", "cross_left", \
				  "cross_right", "previous", "next", "channelup", "channeldown", "f1", "f2", "f3", "audio", "exit", "ok", "play", "pause", "rewind", \
				  "fastforward", "stop", "tv", "subtitle", "mqb_volup", "mqb_voldown", "mqb_mute", "mqb_power", "mqb_power_long")
		if (action in quickSelection and self.actions.has_key(action)):
			res = self.actions[action](action)
			if res is not None:
				return res
			return 1
		else:
			return ActionMap.action(self, contexts, action)
 def action(self, contexts, action):
     quickSelection = ("guide_long","guide","filelist_long","filelist","red","red_long","green","green_long","yellow","yellow_long","blue","blue_long","pvr","pvr_long","radio","radio_long","text","text_long", \
         "subtitle","subtitle_long","info","info_long","list","list_long","playlist","playlist_long","epg","epg_long","cross_up","cross_down","cross_left","cross_right","previous","next","end","end_long","home","home_long", \
         "channelup","channeldown","audio","audio_long","ok","exit","play","pause","fastforward","stop","rewind","tv","tv_long","activatePiP","pip_long","timer","timer_long","back","back_long","timeshift","timeshift_long","portal","portal_long","search","search_long","displayHelp","help_long","mainMenu","menu_long","slow","slow_long"
         "f1","f1_long","f2","f2_long","f3","f3_long","f4","f4_long","favorites","favorites_long","sleep","sleep_long","media","media_long")
     if (action in quickSelection and self.actions.has_key(action)):
         res = self.actions[action](action)
         if res is not None:
             return res
         return 1
     else:
         return ActionMap.action(self, contexts, action)
	def action(self, contexts, action):
		quickSelection = ("guide_long","guide","filelist_long","filelist","red","red_long","green","green_long","yellow","yellow_long","blue","blue_long","pvr","pvr_long","radio","radio_long","text","text_long", \
						"subtitle","subtitle_long","info","info_long","list","list_long","playlist","playlist_long","epg","epg_long","cross_up","cross_down","cross_left","cross_right","previous","next","end","end_long","home","home_long", \
						"channelup","channeldown","audio","audio_long","ok","exit","play","pause","fastforward","stop","rewind","tv","tv_long","activatePiP","pip_long","timer","timer_long","back","back_long","timeshift","timeshift_long","portal","portal_long","search","search_long","displayHelp","help_long","mainMenu","menu_long","slow","slow_long"
						"f1","f1_long","f2","f2_long","f3","f3_long","f4","f4_long","favorites","favorites_long","sleep","sleep_long","media","media_long")
		if (action in quickSelection and self.actions.has_key(action)):
			res = self.actions[action](action)
			if res is not None:
				return res
			return 1
		else:
			return ActionMap.action(self, contexts, action)
Exemple #15
0
 def action(self, contexts, action):
     quickSelection = ("red", "red_long", "green", "green_long", "yellow", "yellow_long", "blue", "blue_long", "pvr", "pvr_long", "radio", "radio_long", \
         "text", "text_long", "help_long", "info", "info_long", "end", "end_long", "home", "home_long", "cross_up", "cross_down", "cross_left", \
         "cross_right", "previous", "next", "channelup", "channeldown", "f1", "f2", "f3", "audio", "exit", "ok", "play", "pause", "rewind", \
         "fastforward", "stop", "tv", "subtitle", "mqb_volup", "mqb_voldown", "mqb_mute", "mqb_power", "mqb_power_long")
     if (action in quickSelection and self.actions.has_key(action)):
         res = self.actions[action](action)
         if res is not None:
             return res
         return 1
     else:
         return ActionMap.action(self, contexts, action)
Exemple #16
0
			def action(self, contexts, action):
				if action[:5] == "seek:":
					time = int(action[5:])
					self.player.seekRelative(time)
					return 1
				elif action[:8] == "seekdef:":
					key = int(action[8:])
					time = [-config.seek.selfdefined_13.value, False, config.seek.selfdefined_13.value,
							-config.seek.selfdefined_46.value, False, config.seek.selfdefined_46.value,
							-config.seek.selfdefined_79.value, False, config.seek.selfdefined_79.value][key-1]
					self.player.seekRelative(time)
					return 1
				else:
					return ActionMap.action(self, contexts, action)
Exemple #17
0
	def action(self, contexts, action):
		quickSelection = ("red","red_long","green","green_long","yellow","yellow_long","blue","blue_long","pvr","pvr_long","radio","radio_long", \
				  "text","text_long","epg","epg_long","help","help_long","info","info_long","end","end_long","home","home_long","cross_up","cross_down","cross_left", \
				  "cross_right","previous","next","channelup","channeldown","f1","f2","f3","audio","exit","ok","play","pause","rewind","fastforward","stop","tv", \
				  "console","f4","web","mail","m1","m2","fav", "fav_long", "screen", "screen_long", "history", "history_long", \
				  "subtitle","subtitle_long","filelist","filelist_long","playlist","playlist_long","timer","timer_long", \
				  "timeshift","timeshift_long","mark","mark_long","search","search_long","slow","slow_long")
		if (action in quickSelection and self.actions.has_key(action)):
			res = self.actions[action](action)
			if res is not None:
				return res
			return 1
		else:
			return ActionMap.action(self, contexts, action)
			def action(self, contexts, action):
				if action[:5] == "seek:":
					time = int(action[5:])
					self.player.seekRelative(time * 90000)
					return 1
				elif action[:8] == "seekdef:":
					key = int(action[8:])
					time = [-config.seek.selfdefined_13.value, False, config.seek.selfdefined_13.value,
							-config.seek.selfdefined_46.value, False, config.seek.selfdefined_46.value,
							-config.seek.selfdefined_79.value, False, config.seek.selfdefined_79.value][key - 1]
					self.player.seekRelative(time * 90000)
					return 1
				else:
					return ActionMap.action(self, contexts, action)
Exemple #19
0
			self.session.openWithCallback(self.cancelCallback, MessageBox, _("are you sure you want to cancel all the changes"), default=False)
		else:
			self.close()

	def cancelCallback(self, answer):
		answer and self.close()

class ButtonSetupActionMap(ActionMap):
	def action(self, contexts, action):
		if action in tuple(x[1] for x in ButtonSetupKeys) and action in self.actions:
			res = self.actions[action](action)
			if res is not None:
				return res
			return 1
		else:
			return ActionMap.action(self, contexts, action)

class helpableButtonSetupActionMap(HelpableActionMap):
	def action(self, contexts, action):
		if action in tuple(x[1] for x in ButtonSetupKeys) and action in self.actions:
			res = self.actions[action](action)
			if res is not None:
				return res
			return 1
		else:
			return ActionMap.action(self, contexts, action)

class InfoBarButtonSetup():
	def __init__(self):
		self["ButtonSetupButtonActions"] = helpableButtonSetupActionMap(self, "ButtonSetupActions",
			dict((x[1],(self.ButtonSetupGlobal, boundFunction(self.getHelpText, x[1]))) for x in ButtonSetupKeys), -10)