X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c173e541b8ffb01ad0992a4f4c991be9e95db2ba..1948ff5f89188afabbe0d538ab33545e3c94cbac:/include/wx/generic/aboutdlgg.h?ds=sidebyside diff --git a/include/wx/generic/aboutdlgg.h b/include/wx/generic/aboutdlgg.h index e45fc24d0d..36e0cad438 100644 --- a/include/wx/generic/aboutdlgg.h +++ b/include/wx/generic/aboutdlgg.h @@ -3,7 +3,6 @@ // Purpose: generic wxAboutBox() implementation // Author: Vadim Zeitlin // Created: 2006-10-07 -// RCS-ID: $Id$ // Copyright: (c) 2006 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -21,6 +20,16 @@ class WXDLLIMPEXP_FWD_ADV wxAboutDialogInfo; 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 // ---------------------------------------------------------------------------- @@ -73,6 +82,12 @@ private: // 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; };