X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2158f4d798650d7f8cc59ba36e115679b0effe1b..7612febb93cca7fd8f89137906b7ed9eae381f6c:/src/palmos/dialog.cpp?ds=sidebyside diff --git a/src/palmos/dialog.cpp b/src/palmos/dialog.cpp index 88c4620e43..4358cfef5f 100644 --- a/src/palmos/dialog.cpp +++ b/src/palmos/dialog.cpp @@ -36,7 +36,7 @@ #endif #include "wx/evtloop.h" -#include "wx/ptr_scpd.h" +#include "wx/scopedptr.h" // ---------------------------------------------------------------------------- // wxWin macros @@ -147,25 +147,26 @@ bool wxDialog::Create(wxWindow *parent, long style, const wxString& name) { - return false; + if ( !wxTopLevelWindow::Create(parent, id, title, pos, size, style, name) ) + return false; + return true; } wxDialog::~wxDialog() { + Show (false); } // ---------------------------------------------------------------------------- // showing the dialogs // ---------------------------------------------------------------------------- -wxWindow *wxDialog::FindSuitableParent() const -{ - return NULL; -} - bool wxDialog::Show(bool show) { - return false; + if (show && CanDoLayoutAdaptation()) + DoLayoutAdaptation(); + + return wxTopLevelWindowPalm::Show (show); } void wxDialog::Raise() @@ -175,6 +176,11 @@ void wxDialog::Raise() // show dialog modally int wxDialog::ShowModal() { + Show (true); + + if (errNone == FrmDoDialog ((FormType *)wxTopLevelWindow::GetForm())) { + return 0; + } return -1; }