diff options
author | pieh <grajen3@o2.pl> | 2011-07-15 23:11:33 +0200 |
---|---|---|
committer | pieh <grajen3@o2.pl> | 2011-07-15 23:11:33 +0200 |
commit | 5be812103b6ac3372c0ab510f938deff3129fbe3 (patch) | |
tree | 59704e157d87b58620ea055a4c628b2f4d4fda1d | |
parent | 249c9b9d8af3e423e1abc3622d04e48e95cb21a1 (diff) |
restored behaviour of python windows to pre jmarshallnz/ill_be_back merge
-rw-r--r-- | xbmc/interfaces/python/xbmcmodule/GUIPythonWindow.cpp | 8 | ||||
-rw-r--r-- | xbmc/interfaces/python/xbmcmodule/GUIPythonWindowXML.cpp | 7 |
2 files changed, 12 insertions, 3 deletions
diff --git a/xbmc/interfaces/python/xbmcmodule/GUIPythonWindow.cpp b/xbmc/interfaces/python/xbmcmodule/GUIPythonWindow.cpp index 52724a241e..d0f57eca59 100644 --- a/xbmc/interfaces/python/xbmcmodule/GUIPythonWindow.cpp +++ b/xbmc/interfaces/python/xbmcmodule/GUIPythonWindow.cpp @@ -69,9 +69,13 @@ CGUIPythonWindow::~CGUIPythonWindow(void) bool CGUIPythonWindow::OnAction(const CAction &action) { + bool ret = false; + // if we don't have callback window or we don't want to close window // do the base class window first, and the call to python after this - bool ret = CGUIWindow::OnAction(action); - + if (!pCallbackWindow || !(action.GetID() == ACTION_NAV_BACK || action.GetID() == ACTION_PREVIOUS_MENU)) + ret = CGUIWindow::OnAction(action); + else + ret = true; // workaround - for scripts which try to access the active control (focused) when there is none. // for example - the case when the mouse enters the screen. CGUIControl *pControl = GetFocusedControl(); diff --git a/xbmc/interfaces/python/xbmcmodule/GUIPythonWindowXML.cpp b/xbmc/interfaces/python/xbmcmodule/GUIPythonWindowXML.cpp index 86a77dd70f..30016fdd0d 100644 --- a/xbmc/interfaces/python/xbmcmodule/GUIPythonWindowXML.cpp +++ b/xbmc/interfaces/python/xbmcmodule/GUIPythonWindowXML.cpp @@ -64,8 +64,13 @@ bool CGUIPythonWindowXML::Update(const CStdString &strPath) bool CGUIPythonWindowXML::OnAction(const CAction &action) { + bool ret = false; + // if we don't have callback window or we don't want to close window // do the base class window first, and the call to python after this - bool ret = CGUIWindow::OnAction(action); // we don't currently want the mediawindow actions here + if (!pCallbackWindow || !(action.GetID() == ACTION_NAV_BACK || action.GetID() == ACTION_PREVIOUS_MENU)) + ret = CGUIWindow::OnAction(action); // we don't currently want the mediawindow actions here + else + ret = true; if(pCallbackWindow) { PyXBMCAction* inf = new PyXBMCAction(pCallbackWindow); |