From a8c72db8630d343b3ad4dd8bc2be7b0b05e764c0 Mon Sep 17 00:00:00 2001 From: Alhaziel01 Date: Fri, 8 Jan 2021 10:54:30 +0100 Subject: [PATCH] Menu Rapido Fix Touch e mouse --- platformcode/keymaptools.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/platformcode/keymaptools.py b/platformcode/keymaptools.py index f28e2009..13d54178 100644 --- a/platformcode/keymaptools.py +++ b/platformcode/keymaptools.py @@ -35,7 +35,6 @@ class KeyListener(xbmcgui.WindowXMLDialog): def onInit(self): try: - logger.debug('ICONA',addon_icon) self.getControl(400).setImage(addon_icon) self.getControl(401).addLabel(config.get_localized_string(70698)) self.getControl(402).addLabel(config.get_localized_string(70699) % self.TIMEOUT) @@ -102,6 +101,7 @@ DOWN = 4 EXIT = 10 BACKSPACE = 92 RIGHTCLICK = 101 +MOUSEMOVE = 107 class Main(xbmcgui.WindowXMLDialog): def __init__(self, *args, **kwargs): @@ -148,10 +148,8 @@ class Main(xbmcgui.WindowXMLDialog): xbmc.executebuiltin('ActivateWindow(10025, "plugin://plugin.video.kod/?' + action + '")') elif control_id in [101]: - logger.debug('DOWN') self.setFocusId(2) elif control_id in [102]: - logger.debug('UP') self.setFocusId(1) @@ -167,7 +165,7 @@ class Main(xbmcgui.WindowXMLDialog): focus = self.getFocusId() - if action in [LEFT, RIGHT]: + if action in [LEFT, RIGHT, MOUSEMOVE] and self.getFocusId() in [1]: if focus in [1]: self.submenu() else: @@ -192,7 +190,6 @@ class Main(xbmcgui.WindowXMLDialog): focus = self.getFocusId() item_url = self.MENU.getSelectedItem().getProperty('run') item = Item().fromurl(item_url) - logger.debug(item) commands = platformtools.set_context_commands(item, item_url, Item()) context = [c[0] for c in commands] context_commands = [c[1].replace('Container.Refresh', 'RunPlugin').replace('Container.Update', 'RunPlugin') for c in commands] @@ -201,7 +198,6 @@ class Main(xbmcgui.WindowXMLDialog): def open_shortcut_menu(): - logger.debug('WID',xbmcgui.getCurrentWindowDialogId()) if xbmcgui.getCurrentWindowDialogId() == 9999: main = Main('ShortCutMenu.xml', config.get_runtime_path()) main.doModal()