]> git.saurik.com Git - wxWidgets.git/commitdiff
Deprecate wxWindow::MakeModal().
authorVadim Zeitlin <vadim@wxwidgets.org>
Wed, 7 Mar 2012 23:50:21 +0000 (23:50 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Wed, 7 Mar 2012 23:50:21 +0000 (23:50 +0000)
Using this function was never the right way to show a modal window and it
didn't really work correctly. Instead of futilely trying to fix it, just
deprecate it.

Closes #1561.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70838 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

docs/changes.txt
include/wx/window.h
interface/wx/window.h
src/common/wincmn.cpp

index 389cb414ac42697ccbe9b2dbfbdeff93b52eabd2..37d089fc32e4186eb480f386b15683d76348d9f2 100644 (file)
@@ -423,6 +423,8 @@ Deprecated methods and their replacements
   you use these functions.
 - wxDataViewCtrl::StartEditor(item, n) taking column index is now deprecated,
   use EditItem(item, GetColumn(n)), which takes the column itself, instead.
+- wxWindow::MakeModal() is deprecated, use wxDialog::ShowModal() instead if
+  possible or wxWindowDisabler otherwise.
 
 
 Major new features in this release
index c4442b21414c9153e745871ca4b3e9e0fa0f86db..774be3539d61f03bfd1a7fccfd999c76b8183a71 100644 (file)
@@ -623,9 +623,10 @@ public:
 
     bool HasExtraStyle(int exFlag) const { return (m_exStyle & exFlag) != 0; }
 
+#if WXWIN_COMPATIBILITY_2_8
         // make the window modal (all other windows unresponsive)
-    virtual void MakeModal(bool modal = true);
-
+    wxDEPRECATED( virtual void MakeModal(bool modal = true) );
+#endif
 
     // (primitive) theming support
     // ---------------------------
index 524605b00411608811b084d2405475e8ea8e0712..83725acb3365c92719033deba44234cf7f739df8 100644 (file)
@@ -3172,17 +3172,6 @@ public:
     */
     virtual bool IsTopLevel() const;
 
-    /**
-        Disables all other windows in the application so that
-        the user can only interact with this window.
-
-        @param modal
-            If @true, this call disables all other windows in the application so that
-            the user can only interact with this window. If @false, the effect is
-            reversed.
-    */
-    virtual void MakeModal(bool modal = true);
-
     
     /**
         This virtual function is normally only used internally, but
index ecc4aa88320254cabed2bb34b32af847d3c00f49..068a15bc40515ea88a61601e252d6eb05650773d 100644 (file)
@@ -1916,6 +1916,7 @@ wxWindowBase::FindWindowById( long id, const wxWindow* parent )
 // dialog oriented functions
 // ----------------------------------------------------------------------------
 
+#if WXWIN_COMPATIBILITY_2_8
 void wxWindowBase::MakeModal(bool modal)
 {
     // Disable all other windows
@@ -1932,6 +1933,7 @@ void wxWindowBase::MakeModal(bool modal)
         }
     }
 }
+#endif // WXWIN_COMPATIBILITY_2_8
 
 bool wxWindowBase::Validate()
 {