]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/generic/aboutdlgg.h
remove unused variable assignment, closes #14928
[wxWidgets.git] / include / wx / generic / aboutdlgg.h
index e45fc24d0dfad86ae9db78675ff6cb3ccd2065b7..9ad4a77e414d47012ab0b66fda1b95c015462835 100644 (file)
@@ -21,6 +21,16 @@ class WXDLLIMPEXP_FWD_ADV wxAboutDialogInfo;
 class WXDLLIMPEXP_FWD_CORE wxSizer;
 class WXDLLIMPEXP_FWD_CORE wxSizerFlags;
 
 class WXDLLIMPEXP_FWD_CORE wxSizer;
 class WXDLLIMPEXP_FWD_CORE wxSizerFlags;
 
+// Under GTK and OS X "About" dialogs are not supposed to be modal, unlike MSW
+// and, presumably, all the other platforms.
+#ifndef wxUSE_MODAL_ABOUT_DIALOG
+    #if defined(__WXGTK__) || defined(__WXMAC__)
+        #define wxUSE_MODAL_ABOUT_DIALOG 0
+    #else
+        #define wxUSE_MODAL_ABOUT_DIALOG 1
+    #endif
+#endif // wxUSE_MODAL_ABOUT_DIALOG not defined
+
 // ----------------------------------------------------------------------------
 // wxGenericAboutDialog: generic "About" dialog implementation
 // ----------------------------------------------------------------------------
 // ----------------------------------------------------------------------------
 // wxGenericAboutDialog: generic "About" dialog implementation
 // ----------------------------------------------------------------------------
@@ -73,6 +83,12 @@ private:
     // common part of all ctors
     void Init() { m_sizerText = NULL; }
 
     // common part of all ctors
     void Init() { m_sizerText = NULL; }
 
+#if !wxUSE_MODAL_ABOUT_DIALOG
+    // An explicit handler for deleting the dialog when it's closed is needed
+    // when we show it non-modally.
+    void OnCloseWindow(wxCloseEvent& event);
+    void OnOK(wxCommandEvent& event);
+#endif // !wxUSE_MODAL_ABOUT_DIALOG
 
     wxSizer *m_sizerText;
 };
 
     wxSizer *m_sizerText;
 };