mirror of
https://github.com/correl/Transmission-XBMC.git
synced 2024-11-25 03:00:15 +00:00
added Apple TV remote MENU key support to close dialogs
This commit is contained in:
parent
5b43cda96e
commit
3edb61da6b
1 changed files with 3 additions and 3 deletions
|
@ -15,11 +15,11 @@ __settings__ = sys.modules[ "__main__" ].__settings__
|
|||
|
||||
KEY_BUTTON_BACK = 275
|
||||
KEY_KEYBOARD_ESC = 61467
|
||||
KEY_MENU_ID = 92
|
||||
|
||||
EXIT_SCRIPT = ( 6, 10, 247, 275, 61467, 216, 257, 61448, )
|
||||
CANCEL_DIALOG = EXIT_SCRIPT + ( 216, 257, 61448, )
|
||||
|
||||
|
||||
class TransmissionGUI(xbmcgui.WindowXMLDialog):
|
||||
def __init__(self, strXMLname, strFallbackPath, strDefaultName, bforeFallback=0):
|
||||
self.list = {}
|
||||
|
@ -191,7 +191,7 @@ class TransmissionGUI(xbmcgui.WindowXMLDialog):
|
|||
pass
|
||||
|
||||
def onAction( self, action ):
|
||||
if ( action.getButtonCode() in CANCEL_DIALOG ):
|
||||
if ( action.getButtonCode() in CANCEL_DIALOG ) or (action.getId() == KEY_MENU_ID):
|
||||
self.close()
|
||||
def close(self):
|
||||
if self.repeater:
|
||||
|
@ -245,7 +245,7 @@ class TorrentInfoGUI(xbmcgui.WindowXMLDialog):
|
|||
self.repeater.stop()
|
||||
super(TorrentInfoGUI, self).close()
|
||||
def onAction(self, action):
|
||||
if (action.getButtonCode() in CANCEL_DIALOG):
|
||||
if (action.getButtonCode() in CANCEL_DIALOG) or (action.getId() == KEY_MENU_ID):
|
||||
self.close()
|
||||
pass
|
||||
def onClick(self, controlID):
|
||||
|
|
Loading…
Reference in a new issue