]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/dialogs/dialogs.cpp
fixed bugs in icons handling introduced in 1.227
[wxWidgets.git] / samples / dialogs / dialogs.cpp
index 14bfa3554976034576acc5e43f2bbf6ca544c65c..13a84b1546fe065e6264a27b2d896fbe639dfa44 100644 (file)
@@ -369,9 +369,14 @@ bool MyApp::OnInit()
     wxMenu *sheet_menu = new wxMenu;
     sheet_menu->Append(DIALOGS_PROPERTY_SHEET, _T("&Standard property sheet\tShift-Ctrl-P"));
     sheet_menu->Append(DIALOGS_PROPERTY_SHEET_TOOLBOOK, _T("&Toolbook sheet\tShift-Ctrl-T"));
+    
+    if (wxPlatformIs(wxMac))
+        sheet_menu->Append(DIALOGS_PROPERTY_SHEET_BUTTONTOOLBOOK, _T("Button &Toolbook sheet\tShift-Ctrl-U"));
+/*
 #ifdef __WXMAC__
     sheet_menu->Append(DIALOGS_PROPERTY_SHEET_BUTTONTOOLBOOK, _T("Button &Toolbook sheet\tShift-Ctrl-U"));
 #endif
+*/
     file_menu->Append(wxID_ANY, _T("&Property sheets"), sheet_menu);
 #endif // USE_SETTINGS_DIALOG
 
@@ -691,8 +696,8 @@ void MyFrame::FileOpen(wxCommandEvent& WXUNUSED(event) )
 #endif
                  );
 
-    dialog.SetDirectory(wxGetHomeDir());
     dialog.CentreOnParent();
+    dialog.SetDirectory(wxGetHomeDir());
 
     if (dialog.ShowModal() == wxID_OK)
     {
@@ -963,7 +968,7 @@ void MyFrame::DlgCenteredScreen(wxCommandEvent& WXUNUSED(event))
 {
     wxDialog dlg(this, wxID_ANY, _T("Dialog centered on screen"),
                  wxDefaultPosition, wxSize(200, 100));
-    new wxButton(&dlg, wxID_OK, _T("Close"), wxPoint(10, 10));
+    (new wxButton(&dlg, wxID_OK, _T("Close")))->Centre();
     dlg.CentreOnScreen();
     dlg.ShowModal();
 }
@@ -972,7 +977,7 @@ void MyFrame::DlgCenteredParent(wxCommandEvent& WXUNUSED(event))
 {
     wxDialog dlg(this, wxID_ANY, _T("Dialog centered on parent"),
                  wxDefaultPosition, wxSize(200, 100));
-    new wxButton(&dlg, wxID_OK, _T("Close"), wxPoint(10, 10));
+    (new wxButton(&dlg, wxID_OK, _T("Close")))->Centre();
     dlg.CentreOnParent();
     dlg.ShowModal();
 }
@@ -1455,18 +1460,22 @@ SettingsDialog::SettingsDialog(wxWindow* win, int dialogType)
         m_imageList = NULL;
 
     Create(win, wxID_ANY, _("Preferences"), wxDefaultPosition, wxDefaultSize,
-        wxDEFAULT_DIALOG_STYLE
+        wxDEFAULT_DIALOG_STYLE| (int)wxPlatform::IfNot(wxWinCE, resizeBorder)
+/*
 #ifndef __WXWINCE__
         |resizeBorder
 #endif
+*/
     );
 
     // If using a toolbook, also follow Mac style and don't create buttons
     if (!useToolBook)
-        CreateButtons(wxOK|wxCANCEL
+        CreateButtons(wxOK|wxCANCEL| (int)wxPlatform::IfNot(wxWinPocketPC, wxHELP)
+/*
 #ifndef __POCKETPC__
                       |wxHELP
 #endif
+*/
     );
 
     wxBookCtrlBase* notebook = GetBookCtrl();