]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/dirdlgg.cpp
Fixed GetIcon to keep up with return type change on all other platforms.
[wxWidgets.git] / src / generic / dirdlgg.cpp
index 9009fa3757e2387bc8c807ed1c6518ac4905a595..cca162da5d3b8768cd9b26d671df114ac76f1318 100644 (file)
@@ -9,11 +9,6 @@
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
-#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
-#pragma implementation "dirdlgg.h"
-#endif
-
-
 // For compilers that support precompilation, includes "wx.h".
 #include "wx/wxprec.h"
 
@@ -47,8 +42,6 @@
 
 static const int ID_DIRCTRL = 1000;
 static const int ID_TEXTCTRL = 1001;
-static const int ID_OK = 1002;
-static const int ID_CANCEL = 1003;
 static const int ID_NEW = 1004;
 static const int ID_SHOW_HIDDEN = 1005;
 static const int ID_GO_HOME = 1006;
@@ -152,9 +145,9 @@ wxGenericDirDialog::wxGenericDirDialog(wxWindow* parent, const wxString& title,
 #endif // __SMARTPHONE__/!__SMARTPHONE__
 
     // 1) dir ctrl
-    m_dirCtrl = NULL; // this is neccessary, event handler called from
+    m_dirCtrl = NULL; // this is necessary, 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)
@@ -199,10 +192,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))
@@ -214,7 +209,7 @@ void wxGenericDirDialog::OnOK(wxCommandEvent& WXUNUSED(event))
 {
     m_path = m_input->GetValue();
     // Does the path exist? (User may have typed anything in m_input)
-    if (wxPathExists(m_path)) {
+    if (wxDirExists(m_path)) {
         // OK, path exists, we're done.
         EndModal(wxID_OK);
         return;
@@ -277,7 +272,7 @@ void wxGenericDirDialog::OnTreeSelected( wxTreeEvent &event )
 
     if (data)
        m_input->SetValue( data->m_path );
-};
+}
 
 void wxGenericDirDialog::OnTreeKeyDown( wxTreeEvent &WXUNUSED(event) )
 {
@@ -287,7 +282,7 @@ void wxGenericDirDialog::OnTreeKeyDown( wxTreeEvent &WXUNUSED(event) )
     wxDirItemData *data = (wxDirItemData*)m_dirCtrl->GetTreeCtrl()->GetItemData(m_dirCtrl->GetTreeCtrl()->GetSelection());
     if (data)
         m_input->SetValue( data->m_path );
-};
+}
 
 void wxGenericDirDialog::OnShowHidden( wxCommandEvent& event )
 {
@@ -318,7 +313,7 @@ void wxGenericDirDialog::OnNew( wxCommandEvent& WXUNUSED(event) )
     if (!wxEndsWithPathSeparator(path))
         path += wxFILE_SEP_PATH;
     path += new_name;
-    if (wxPathExists(path))
+    if (wxDirExists(path))
     {
         // try NewName0, NewName1 etc.
         int i = 0;
@@ -333,7 +328,7 @@ void wxGenericDirDialog::OnNew( wxCommandEvent& WXUNUSED(event) )
                 path += wxFILE_SEP_PATH;
             path += new_name;
             i++;
-        } while (wxPathExists(path));
+        } while (wxDirExists(path));
     }
 
     wxLogNull log;