X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/37fd1c97bd9ad4fde140c9d5cc7213c923af6b9e..45647dcf1059cc6515a0c6157f7c077cfc2abd31:/src/generic/filedlgg.cpp diff --git a/src/generic/filedlgg.cpp b/src/generic/filedlgg.cpp index 3132890a00..9e43121fbc 100644 --- a/src/generic/filedlgg.cpp +++ b/src/generic/filedlgg.cpp @@ -69,6 +69,9 @@ # include #include +// XPM hack: make the arrays const +#define static static const + #ifndef __DOS__ #include "wx/generic/home.xpm" #endif @@ -80,6 +83,8 @@ #include "wx/generic/deffile.xpm" #include "wx/generic/exefile.xpm" +#undef static + //----------------------------------------------------------------------------- // wxFileData //----------------------------------------------------------------------------- @@ -139,7 +144,7 @@ public: void ChangeToIconMode(); void ShowHidden( bool show = TRUE ); long Add( wxFileData *fd, wxListItem &item ); - void Update(); + void UpdateFiles(); virtual void StatusbarText( wxChar *WXUNUSED(text) ) {}; void MakeDir(); void GoToParentDir(); @@ -624,31 +629,31 @@ wxFileCtrl::wxFileCtrl(wxWindow *win, wxWindowID id, m_dirName = dirName; m_wild = wild; m_showHidden = FALSE; - Update(); + UpdateFiles(); } void wxFileCtrl::ChangeToListMode() { SetSingleStyle( wxLC_LIST ); - Update(); + UpdateFiles(); } void wxFileCtrl::ChangeToReportMode() { SetSingleStyle( wxLC_REPORT ); - Update(); + UpdateFiles(); } void wxFileCtrl::ChangeToIconMode() { SetSingleStyle( wxLC_ICON ); - Update(); + UpdateFiles(); } void wxFileCtrl::ShowHidden( bool show ) { m_showHidden = show; - Update(); + UpdateFiles(); } long wxFileCtrl::Add( wxFileData *fd, wxListItem &item ) @@ -675,7 +680,7 @@ long wxFileCtrl::Add( wxFileData *fd, wxListItem &item ) return ret; } -void wxFileCtrl::Update() +void wxFileCtrl::UpdateFiles() { wxBusyCursor bcur; // this may take a while... @@ -800,7 +805,7 @@ void wxFileCtrl::Update() void wxFileCtrl::SetWild( const wxString &wild ) { m_wild = wild; - Update(); + UpdateFiles(); } void wxFileCtrl::MakeDir() @@ -862,7 +867,7 @@ void wxFileCtrl::GoToParentDir() if (m_dirName.IsEmpty()) m_dirName = wxT("/"); #endif - Update(); + UpdateFiles(); long id = FindItem( 0, fname ); if (id != -1) { @@ -881,7 +886,7 @@ void wxFileCtrl::GoToHomeDir() void wxFileCtrl::GoToDir( const wxString &dir ) { m_dirName = dir; - Update(); + UpdateFiles(); SetItemState( 0, wxLIST_STATE_SELECTED, wxLIST_STATE_SELECTED ); EnsureVisible( 0 ); } @@ -1209,8 +1214,6 @@ void wxFileDialog::OnTextEnter( wxCommandEvent &WXUNUSED(event) ) void wxFileDialog::OnSelected( wxListEvent &event ) { - if (FindFocus() != m_list) return; - wxString filename( event.m_item.m_text ); if (filename == wxT("..")) return;