xbmc: fix search dialogs behaviour. tryfix #740

This commit is contained in:
newphreak 2012-08-05 14:31:57 +03:00 committed by Stefan Saraev
parent 76dd7bf53c
commit 2fe2e34465
2 changed files with 54 additions and 0 deletions

View File

@ -0,0 +1,27 @@
diff --git a/xbmc/filesystem/PluginDirectory.cpp b/xbmc/filesystem/PluginDirectory.cpp
index 9e519fb..b64267b 100644
--- a/xbmc/filesystem/PluginDirectory.cpp
+++ b/xbmc/filesystem/PluginDirectory.cpp
@@ -479,7 +479,7 @@ bool CPluginDirectory::WaitOnScriptResult(const CStdString &scriptPath, const CS
}
// check whether we should pop up the progress dialog
- if (!progressBar && XbmcThreads::SystemClockMillis() - startTime > timeBeforeProgressBar)
+ if (!progressBar && XbmcThreads::SystemClockMillis() - startTime > timeBeforeProgressBar && !g_windowManager.HasModalDialog())
{ // loading takes more then 1.5 secs, show a progress dialog
progressBar = (CGUIDialogProgress *)g_windowManager.GetWindow(WINDOW_DIALOG_PROGRESS);
diff --git a/xbmc/interfaces/python/xbmcmodule/keyboard.cpp b/xbmc/interfaces/python/xbmcmodule/keyboard.cpp
index 0330215..0604a65 100644
--- a/xbmc/interfaces/python/xbmcmodule/keyboard.cpp
+++ b/xbmc/interfaces/python/xbmcmodule/keyboard.cpp
@@ -92,6 +92,9 @@ namespace PYXBMC
if (!PyArg_ParseTuple(args, (char*)"|i", &autoClose)) return NULL;
+ if (g_windowManager.IsWindowActive(WINDOW_DIALOG_PROGRESS))
+ g_windowManager.CloseDialogs();
+
PyXBMCGUILock();
pKeyboard->Initialize();
pKeyboard->SetHeading(self->strHeading);

View File

@ -0,0 +1,27 @@
diff --git a/xbmc/filesystem/PluginDirectory.cpp b/xbmc/filesystem/PluginDirectory.cpp
index 9e519fb..b64267b 100644
--- a/xbmc/filesystem/PluginDirectory.cpp
+++ b/xbmc/filesystem/PluginDirectory.cpp
@@ -479,7 +479,7 @@ bool CPluginDirectory::WaitOnScriptResult(const CStdString &scriptPath, const CS
}
// check whether we should pop up the progress dialog
- if (!progressBar && XbmcThreads::SystemClockMillis() - startTime > timeBeforeProgressBar)
+ if (!progressBar && XbmcThreads::SystemClockMillis() - startTime > timeBeforeProgressBar && !g_windowManager.HasModalDialog())
{ // loading takes more then 1.5 secs, show a progress dialog
progressBar = (CGUIDialogProgress *)g_windowManager.GetWindow(WINDOW_DIALOG_PROGRESS);
diff --git a/xbmc/interfaces/python/xbmcmodule/keyboard.cpp b/xbmc/interfaces/python/xbmcmodule/keyboard.cpp
index 0330215..0604a65 100644
--- a/xbmc/interfaces/python/xbmcmodule/keyboard.cpp
+++ b/xbmc/interfaces/python/xbmcmodule/keyboard.cpp
@@ -92,6 +92,9 @@ namespace PYXBMC
if (!PyArg_ParseTuple(args, (char*)"|i", &autoClose)) return NULL;
+ if (g_windowManager.IsWindowActive(WINDOW_DIALOG_PROGRESS))
+ g_windowManager.CloseDialogs();
+
PyXBMCGUILock();
pKeyboard->Initialize();
pKeyboard->SetHeading(self->strHeading);