]> git.saurik.com Git - wxWidgets.git/commitdiff
use generic dialogs under Palm (generic.diff part of patch 1894861)
authorVadim Zeitlin <vadim@wxwidgets.org>
Sun, 2 Mar 2008 01:20:08 +0000 (01:20 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sun, 2 Mar 2008 01:20:08 +0000 (01:20 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@52234 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/filedlg.h
include/wx/treectrl.h
src/generic/dirctrlg.cpp
src/generic/dirdlgg.cpp
src/generic/filectrlg.cpp
src/generic/filedlgg.cpp

index afe838b461d627fd4761d1da80a2a56ddf931d43..d30075401a2d6ad4cc7124546538e8ebe70363f1 100644 (file)
@@ -202,6 +202,9 @@ wxSaveFileSelector(const wxString& what,
     #include "wx/cocoa/filedlg.h"
 #elif defined(__WXPM__)
     #include "wx/os2/filedlg.h"
+#elif defined(__WXPALMOS__)
+    #define wxHAS_GENERIC_FILEDIALOG
+    #include "wx/generic/filedlgg.h"
 #endif
 
 #endif // wxUSE_FILEDLG
index a8693594b32175edd2e366bad2103c7ecc857031..cb808f43293f688331e998d9552c537846eabf9b 100644 (file)
@@ -435,7 +435,7 @@ protected:
 #if defined(__WXUNIVERSAL__)
     #include "wx/generic/treectlg.h"
 #elif defined(__WXPALMOS__)
-    #include "wx/palmos/treectrl.h"
+    #include "wx/generic/treectlg.h"
 #elif defined(__WXMSW__)
     #include "wx/msw/treectrl.h"
 #elif defined(__WXMOTIF__)
index e0be654170763aa68175bb34d8345b1a1fdf7bca..27ae4e40b1c61f99cb77b31e0ed814316474e524 100644 (file)
@@ -251,7 +251,7 @@ size_t wxGetAvailableDrives(wxArrayString &paths, wxArrayString &names, wxArrayI
         }
     }
 
-#elif defined(__UNIX__)
+#elif defined(__UNIX__) || defined(__WXPALMOS__)
     paths.Add(wxT("/"));
     names.Add(wxT("/"));
     icon_ids.Add(wxFileIconsTable::computer);
index bfe97a9cf94babd4a96b19fc1109bfbfea618f30..f3a8fd5a5cd50aa576d50f8ff722b30a2877dc40 100644 (file)
@@ -33,6 +33,7 @@
 #include "wx/dirctrl.h"
 #include "wx/generic/dirdlgg.h"
 #include "wx/artprov.h"
+#include "wx/menu.h"
 
 // ----------------------------------------------------------------------------
 // constants
index 66ee552da4dba9ae498823c05250d57ff6f6c2f0..e123e275a9c85df094e678a1dfd85b3d6e02f44e 100644 (file)
@@ -1178,9 +1178,11 @@ bool wxGenericFileCtrl::SetFilename( const wxString& name )
 
 void wxGenericFileCtrl::DoSetFilterIndex( int filterindex )
 {
-    const wxString& str = (wx_static_cast(wxStringClientData *,
-                            m_choice->GetClientObject( filterindex )))
-                            ->GetData();
+    wxClientData *pcd = m_choice->GetClientObject( filterindex );
+    if ( !pcd )
+        return;
+
+    const wxString& str = ((wx_static_cast(wxStringClientData *, pcd))->GetData());
     m_list->SetWild( str );
     m_filterIndex = filterindex;
     if ( str.Left( 2 ) == wxT( "*." ) )
index 066131180fcb4ff544ebfffba4b639c2c26d2ae2..b1308eb5bd7bdfd13f354b36c61f4d32f342227e 100644 (file)
@@ -19,7 +19,7 @@
 #if wxUSE_FILEDLG
 
 // NOTE : it probably also supports MAC, untested
-#if !defined(__UNIX__) && !defined(__DOS__) && !defined(__WIN32__) && !defined(__OS2__)
+#if !defined(__UNIX__) && !defined(__DOS__) && !defined(__WIN32__) && !defined(__OS2__) && !defined(__PALMOS__)
 #error wxGenericFileDialog currently only supports Unix, win32 and DOS
 #endif
 
 #if wxUSE_TOOLTIPS
     #include "wx/tooltip.h"
 #endif
+#if wxUSE_CONFIG
+    #include "wx/config.h"
+#endif
 
+#ifndef __WXPALMOS5__
 #ifndef __WXWINCE__
     #include <sys/types.h>
     #include <sys/stat.h>
@@ -82,6 +86,7 @@
 #if defined(__UNIX__) || defined(__DOS__)
 #include <unistd.h>
 #endif
+#endif // ! __WXPALMOS5__
 
 #if defined(__WXWINCE__)
 #define IsTopMostDir(dir) (dir == wxT("\\") || dir == wxT("/"))