diff options
author | Jim Carroll <thecarrolls@jiminger.com> | 2012-09-11 16:22:20 -0400 |
---|---|---|
committer | Jim Carroll <thecarrolls@jiminger.com> | 2012-09-11 17:57:20 -0400 |
commit | 14e4dac2df78038a5361f035de15658c34397311 (patch) | |
tree | b8153f1e89321d660123e0a12ed95ba92343cf76 | |
parent | 703a94090beb1e459c26d204dfdf0f38b482fede (diff) |
[fix] thanks to @pieh for figuring this one out. This resolves a number of issues with Dialogs not drawing.
-rw-r--r-- | xbmc/interfaces/legacy/Window.h | 1 | ||||
-rw-r--r-- | xbmc/interfaces/legacy/WindowDialog.h | 1 | ||||
-rw-r--r-- | xbmc/interfaces/legacy/WindowDialogMixin.cpp | 3 | ||||
-rw-r--r-- | xbmc/interfaces/legacy/WindowDialogMixin.h | 4 | ||||
-rw-r--r-- | xbmc/interfaces/legacy/WindowInterceptor.h | 9 | ||||
-rw-r--r-- | xbmc/interfaces/legacy/WindowXML.cpp | 17 | ||||
-rw-r--r-- | xbmc/interfaces/legacy/WindowXML.h | 7 |
7 files changed, 28 insertions, 14 deletions
diff --git a/xbmc/interfaces/legacy/Window.h b/xbmc/interfaces/legacy/Window.h index 590e8812b7..14f088ab83 100644 --- a/xbmc/interfaces/legacy/Window.h +++ b/xbmc/interfaces/legacy/Window.h @@ -141,6 +141,7 @@ namespace XBMCAddon SWIGHIDDENVIRTUAL bool OnBack(int actionId); SWIGHIDDENVIRTUAL void OnDeinitWindow(int nextWindowID); + SWIGHIDDENVIRTUAL bool IsDialogRunning() const { TRACE; return false; }; SWIGHIDDENVIRTUAL bool IsDialog() const { TRACE; return false; }; SWIGHIDDENVIRTUAL bool IsModalDialog() const { TRACE; return false; }; SWIGHIDDENVIRTUAL bool IsMediaWindow() const { TRACE; return false; }; diff --git a/xbmc/interfaces/legacy/WindowDialog.h b/xbmc/interfaces/legacy/WindowDialog.h index b9dc62386c..e4ff384162 100644 --- a/xbmc/interfaces/legacy/WindowDialog.h +++ b/xbmc/interfaces/legacy/WindowDialog.h @@ -41,6 +41,7 @@ namespace XBMCAddon SWIGHIDDENVIRTUAL bool OnAction(const CAction &action); SWIGHIDDENVIRTUAL void OnDeinitWindow(int nextWindowID); + SWIGHIDDENVIRTUAL bool IsDialogRunning() const { return WindowDialogMixin::IsDialogRunning(); } SWIGHIDDENVIRTUAL bool IsModalDialog() const { TRACE; return true; }; SWIGHIDDENVIRTUAL bool IsDialog() const { TRACE; return true; }; #endif diff --git a/xbmc/interfaces/legacy/WindowDialogMixin.cpp b/xbmc/interfaces/legacy/WindowDialogMixin.cpp index 207d6ccd72..0d3b62c0d1 100644 --- a/xbmc/interfaces/legacy/WindowDialogMixin.cpp +++ b/xbmc/interfaces/legacy/WindowDialogMixin.cpp @@ -50,6 +50,9 @@ namespace XBMCAddon CApplicationMessenger::Get().SendMessage(tMsg, true); } + + bool WindowDialogMixin::IsDialogRunning() const { return w->window->isActive(); } + } } diff --git a/xbmc/interfaces/legacy/WindowDialogMixin.h b/xbmc/interfaces/legacy/WindowDialogMixin.h index b13cc7fb72..1cee844937 100644 --- a/xbmc/interfaces/legacy/WindowDialogMixin.h +++ b/xbmc/interfaces/legacy/WindowDialogMixin.h @@ -44,6 +44,10 @@ namespace XBMCAddon public: SWIGHIDDENVIRTUAL void show(); SWIGHIDDENVIRTUAL void close(); + +#ifndef SWIG + SWIGHIDDENVIRTUAL bool IsDialogRunning() const; +#endif }; } } diff --git a/xbmc/interfaces/legacy/WindowInterceptor.h b/xbmc/interfaces/legacy/WindowInterceptor.h index ac00eba648..d4bd660e2c 100644 --- a/xbmc/interfaces/legacy/WindowInterceptor.h +++ b/xbmc/interfaces/legacy/WindowInterceptor.h @@ -89,10 +89,10 @@ namespace XBMCAddon { InterceptorBase* w; public: - ref(InterceptorBase* b) : w(b) { w->upcallTls.set(this); } - ~ref() { w->upcallTls.set(NULL); } - CGUIWindow* operator->() { return w->get(); } - CGUIWindow* get() { return w->get(); } + inline ref(InterceptorBase* b) : w(b) { w->upcallTls.set(this); } + inline ~ref() { w->upcallTls.set(NULL); } + inline CGUIWindow* operator->() { return w->get(); } + inline CGUIWindow* get() { return w->get(); } }; /** @@ -158,6 +158,7 @@ namespace XBMCAddon virtual bool IsModalDialog() const { TRACE; return checkedb(IsModalDialog()); }; + virtual bool IsDialogRunning() const { TRACE; return checkedb(IsDialogRunning()); }; virtual bool IsDialog() const { TRACE; return checkedb(IsDialog()); }; virtual bool IsMediaWindow() const { return checkedb(IsMediaWindow());; }; diff --git a/xbmc/interfaces/legacy/WindowXML.cpp b/xbmc/interfaces/legacy/WindowXML.cpp index 248babdc66..6d31465dc4 100644 --- a/xbmc/interfaces/legacy/WindowXML.cpp +++ b/xbmc/interfaces/legacy/WindowXML.cpp @@ -65,6 +65,9 @@ namespace XBMCAddon { TRACE; if(up()) CGUIMediaWindow::FreeResources(forceUnLoad); else checkedv(FreeResources(forceUnLoad)); } virtual bool OnClick(int iItem) { TRACE; return up() ? CGUIMediaWindow::OnClick(iItem) : checkedb(OnClick(iItem)); } + virtual void Process(unsigned int currentTime, CDirtyRegionList &dirtyregions) + { TRACE; if(up()) CGUIMediaWindow::Process(currentTime,dirtyregions); else checkedv(Process(currentTime,dirtyregions)); } + // this is a hack to SKIP the CGUIMediaWindow virtual bool OnAction(const CAction &action) { TRACE; return up() ? CGUIWindow::OnAction(action) : checkedb(OnAction(action)); } @@ -79,6 +82,7 @@ namespace XBMCAddon { TRACE; if (up()) CGUIMediaWindow::GetContextButtons(itemNumber,buttons); else xwin->GetContextButtons(itemNumber,buttons); } virtual bool Update(const CStdString &strPath) { TRACE; return up() ? CGUIMediaWindow::Update(strPath) : xwin->Update(strPath); } + virtual void SetupShares() { TRACE; if(up()) CGUIMediaWindow::SetupShares(); else checkedv(SetupShares()); } friend class WindowXML; friend class WindowXMLDialog; @@ -515,15 +519,16 @@ namespace XBMCAddon g_localizeStrings.ClearBlock(m_scriptPath); } - bool WindowXML::Update(const String &strPath) + void WindowXML::SetupShares() { TRACE; - return true; + A(UpdateButtons()); } - bool WindowXML::IsDialogRunning() const - { - return window->isActive(); + bool WindowXML::Update(const String &strPath) + { + TRACE; + return true; } WindowXMLDialog::WindowXMLDialog(const String& xmlFilename, const String& scriptPath, @@ -557,7 +562,7 @@ namespace XBMCAddon case HACK_CUSTOM_ACTION_OPENING: { // This is from the CGUIPythonWindowXMLDialog::Show_Internal - g_windowManager.RouteToWindow(ref(window).get()); + g_windowManager.RouteToWindow(window->get()); // active this dialog... CGUIMessage msg(GUI_MSG_WINDOW_INIT,0,0); OnMessage(msg); diff --git a/xbmc/interfaces/legacy/WindowXML.h b/xbmc/interfaces/legacy/WindowXML.h index 9b3b249ca8..c6e44712cc 100644 --- a/xbmc/interfaces/legacy/WindowXML.h +++ b/xbmc/interfaces/legacy/WindowXML.h @@ -85,11 +85,10 @@ namespace XBMCAddon SWIGHIDDENVIRTUAL bool OnAction(const CAction &action); SWIGHIDDENVIRTUAL void AllocResources(bool forceLoad = false); SWIGHIDDENVIRTUAL void FreeResources(bool forceUnLoad = false); - void Process(unsigned int currentTime, CDirtyRegionList ®ions); SWIGHIDDENVIRTUAL bool OnClick(int iItem); + SWIGHIDDENVIRTUAL void Process(unsigned int currentTime, CDirtyRegionList &dirtyregions); SWIGHIDDENVIRTUAL bool IsMediaWindow() const { TRACE; return true; }; - SWIGHIDDENVIRTUAL bool IsDialogRunning() const; protected: // CGUIWindow @@ -101,8 +100,7 @@ namespace XBMCAddon unsigned int LoadScriptStrings(); void ClearScriptStrings(); -// see bug #10575. -// void SetupShares(); + void SetupShares(); String m_scriptPath; String m_mediaDir; @@ -136,6 +134,7 @@ namespace XBMCAddon #ifndef SWIG SWIGHIDDENVIRTUAL bool OnMessage(CGUIMessage &message); + SWIGHIDDENVIRTUAL bool IsDialogRunning() const { return WindowDialogMixin::IsDialogRunning(); } SWIGHIDDENVIRTUAL bool IsDialog() const { TRACE; return true;}; SWIGHIDDENVIRTUAL bool IsModalDialog() const { TRACE; return true; }; SWIGHIDDENVIRTUAL bool IsMediaWindow() const { TRACE; return false; }; |