X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/44d60c0b26303c2b72bb4445fc9df270ffdaf429..8add533eb22ba0756f5b426f77ee593bc1aa6fcd:/src/generic/dirdlgg.cpp diff --git a/src/generic/dirdlgg.cpp b/src/generic/dirdlgg.cpp index a07fbd497e..124e7ae055 100644 --- a/src/generic/dirdlgg.cpp +++ b/src/generic/dirdlgg.cpp @@ -154,7 +154,7 @@ wxGenericDirDialog::wxGenericDirDialog(wxWindow* parent, const wxString& title, // 1) dir ctrl m_dirCtrl = NULL; // this is neccessary, event handler called from // wxGenericDirCtrl would crash otherwise! - long dirStyle = wxDIRCTRL_DIR_ONLY|wxSUNKEN_BORDER; + long dirStyle = wxDIRCTRL_DIR_ONLY | wxDEFAULT_CONTROL_BORDER; #ifdef __WXMSW__ if (style & wxDD_NEW_DIR_BUTTON) @@ -190,17 +190,7 @@ wxGenericDirDialog::wxGenericDirDialog(wxWindow* parent, const wxString& title, #endif // 4) Buttons - buttonsizer = new wxBoxSizer( wxHORIZONTAL ); - - // OK and Cancel button should be at the right bottom - wxButton* okButton = new wxButton(this, wxID_OK); - buttonsizer->Add( okButton, 0, wxLEFT|wxRIGHT, 10 ); - wxButton* cancelButton = new wxButton(this, wxID_CANCEL); - buttonsizer->Add( cancelButton, 0, wxLEFT|wxRIGHT, 10 ); - - topsizer->Add( buttonsizer, 0, wxLEFT|wxTOP|wxBOTTOM | wxALIGN_RIGHT, 10 ); - - okButton->SetDefault(); + topsizer->Add( CreateButtonSizer( wxOK|wxCANCEL ), 0, wxEXPAND | wxALL, 10 ); #endif // !__SMARTPHONE__ @@ -209,10 +199,12 @@ wxGenericDirDialog::wxGenericDirDialog(wxWindow* parent, const wxString& title, SetAutoLayout( true ); SetSizer( topsizer ); +#if !defined(__SMARTPHONE__) && !defined(__POCKETPC__) topsizer->SetSizeHints( this ); topsizer->Fit( this ); Centre( wxBOTH ); +#endif } void wxGenericDirDialog::OnCloseWindow(wxCloseEvent& WXUNUSED(event)) @@ -328,7 +320,7 @@ void wxGenericDirDialog::OnNew( wxCommandEvent& WXUNUSED(event) ) if (!wxEndsWithPathSeparator(path)) path += wxFILE_SEP_PATH; path += new_name; - if (wxFileExists(path)) + if (wxPathExists(path)) { // try NewName0, NewName1 etc. int i = 0; @@ -343,7 +335,7 @@ void wxGenericDirDialog::OnNew( wxCommandEvent& WXUNUSED(event) ) path += wxFILE_SEP_PATH; path += new_name; i++; - } while (wxFileExists(path)); + } while (wxPathExists(path)); } wxLogNull log;