fix wxGenericFileDialog::Get{Path,Directory,Filename}() functions which were completely broken by wxFileCtrl patch
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@49058 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
#include "wx/panel.h"
|
||||
#include "wx/listctrl.h"
|
||||
#include "wx/filectrl.h"
|
||||
#include "wx/filename.h"
|
||||
|
||||
class WXDLLIMPEXP_FWD_CORE wxCheckBox;
|
||||
class WXDLLIMPEXP_FWD_CORE wxChoice;
|
||||
@@ -247,6 +248,12 @@ public:
|
||||
void GoToParentDir();
|
||||
void GoToHomeDir();
|
||||
|
||||
// get the directory currently shown in the control: this can be different
|
||||
// from GetDirectory() if the user entered a full path (with a path other
|
||||
// than the one currently shown in the control) in the text control
|
||||
// manually
|
||||
wxString GetShownDirectory() const { return m_list->GetDir(); }
|
||||
|
||||
wxFileListCtrl *GetFileList() { return m_list; }
|
||||
|
||||
void ChangeToReportMode() { m_list->ChangeToReportMode(); }
|
||||
@@ -264,9 +271,11 @@ private:
|
||||
|
||||
void DoSetFilterIndex( int filterindex );
|
||||
void UpdateControls();
|
||||
wxString DoGetFilename( const bool fullPath ) const;
|
||||
|
||||
// the first of these methods can only be used for the controls with single
|
||||
// selection (i.e. without wxFC_MULTIPLE style), the second one in any case
|
||||
wxFileName DoGetFileName() const;
|
||||
void DoGetFilenames( wxArrayString& filenames, const bool fullPath ) const;
|
||||
wxString GetProperFileListDir() const;
|
||||
|
||||
int m_style;
|
||||
|
||||
|
@@ -61,13 +61,27 @@ public:
|
||||
virtual ~wxGenericFileDialog();
|
||||
|
||||
virtual void SetMessage(const wxString& message) { SetTitle(message); }
|
||||
virtual void SetPath(const wxString& path);
|
||||
virtual void SetFilterIndex(int filterIndex);
|
||||
virtual void SetWildcard(const wxString& wildCard);
|
||||
virtual void SetPath(const wxString& path)
|
||||
{ m_filectrl->SetPath(path); }
|
||||
virtual void SetFilterIndex(int filterIndex)
|
||||
{ m_filectrl->SetFilterIndex(filterIndex); }
|
||||
virtual void SetWildcard(const wxString& wildCard)
|
||||
{ m_filectrl->SetWildcard(wildCard); }
|
||||
|
||||
// for multiple file selection
|
||||
virtual void GetPaths(wxArrayString& paths) const;
|
||||
virtual void GetFilenames(wxArrayString& files) const;
|
||||
virtual wxString GetPath() const
|
||||
{ return m_filectrl->GetPath(); }
|
||||
virtual void GetPaths(wxArrayString& paths) const
|
||||
{ return m_filectrl->GetPaths(paths); }
|
||||
virtual wxString GetDirectory() const
|
||||
{ return m_filectrl->GetDirectory(); }
|
||||
virtual wxString GetFilename() const
|
||||
{ return m_filectrl->GetFilename(); }
|
||||
virtual void GetFilenames(wxArrayString& files) const
|
||||
{ return m_filectrl->GetFilenames(files); }
|
||||
virtual wxString GetWildcard() const
|
||||
{ return m_filectrl->GetWildcard(); }
|
||||
virtual int GetFilterIndex() const
|
||||
{ return m_filectrl->GetFilterIndex(); }
|
||||
|
||||
// implementation only from now on
|
||||
// -------------------------------
|
||||
|
Reference in New Issue
Block a user