]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/filectrlcmn.cpp
Make wxPORTRAIT and wxLANDSCAPE elements of wxPrintOrientation enum.
[wxWidgets.git] / src / common / filectrlcmn.cpp
index d6b4adb044c4d3030d79df8de0855d3c1e99cefe..dc9c7bb1e2b841a2d312841ac1ed2c86989b442b 100644 (file)
 #    include "wx/debug.h"
 #endif
 
 #    include "wx/debug.h"
 #endif
 
-const wxChar wxFileCtrlNameStr[] = wxT( "wxfilectrl" );
+const char wxFileCtrlNameStr[] = "wxfilectrl";
 
 
-DEFINE_EVENT_TYPE( wxEVT_FILECTRL_SELECTIONCHANGED );
-DEFINE_EVENT_TYPE( wxEVT_FILECTRL_FILEACTIVATED );
-DEFINE_EVENT_TYPE( wxEVT_FILECTRL_FOLDERCHANGED );
+wxDEFINE_EVENT( wxEVT_FILECTRL_SELECTIONCHANGED, wxFileCtrlEvent );
+wxDEFINE_EVENT( wxEVT_FILECTRL_FILEACTIVATED, wxFileCtrlEvent );
+wxDEFINE_EVENT( wxEVT_FILECTRL_FOLDERCHANGED, wxFileCtrlEvent );
 
 IMPLEMENT_DYNAMIC_CLASS( wxFileCtrlEvent, wxCommandEvent )
 
 
 IMPLEMENT_DYNAMIC_CLASS( wxFileCtrlEvent, wxCommandEvent )
 
@@ -84,10 +84,10 @@ wxString wxFileCtrlEvent::GetFile() const
     wxASSERT_MSG( !wxDynamicCast( GetEventObject(), wxFileCtrl )->HasMultipleFileSelection(),
                   wxT( "Please use GetFiles() to get all files instead of this function" ) );
 
     wxASSERT_MSG( !wxDynamicCast( GetEventObject(), wxFileCtrl )->HasMultipleFileSelection(),
                   wxT( "Please use GetFiles() to get all files instead of this function" ) );
 
-    if ( files.Count() == 0 )
-        return wxEmptyString;
-    else
-        return files[0];
+    wxString string;
+    if (m_files.Count() != 0)
+        string = m_files[0];
+    return string;
 }
 
 #endif // wxUSE_FILECTRL
 }
 
 #endif // wxUSE_FILECTRL