From 7124df9b59f2627c083b1fecaaa3e93c7088e3d0 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 31 Dec 2000 15:23:43 +0000 Subject: [PATCH] readded back SetFullName git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@9028 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/filename.h | 5 ++++- src/common/filename.cpp | 5 +++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/include/wx/filename.h b/include/wx/filename.h index 76f9e2169e..67a153d895 100644 --- a/include/wx/filename.h +++ b/include/wx/filename.h @@ -224,12 +224,15 @@ public: wxString GetName() const { return m_name; } bool HasName() const { return !m_name.IsEmpty(); } + // full name is the file name + extension (but without the path) + void SetFullName(const wxString& fullname); wxString GetFullName() const; const wxArrayString &GetDirs() const { return m_dirs; } // Construct path only - possibly with the trailing separator - wxString GetPath( bool add_separator = FALSE, wxPathFormat format = wxPATH_NATIVE ) const; + wxString GetPath( bool add_separator = FALSE, + wxPathFormat format = wxPATH_NATIVE ) const; // more readable synonym wxString GetPathWithSep(wxPathFormat format = wxPATH_NATIVE ) const diff --git a/src/common/filename.cpp b/src/common/filename.cpp index e0c45c36ff..ef07caccef 100644 --- a/src/common/filename.cpp +++ b/src/common/filename.cpp @@ -432,6 +432,11 @@ void wxFileName::RemoveDir( int pos ) // accessors // ---------------------------------------------------------------------------- +void wxFileName::SetFullName(const wxString& fullname) +{ + SplitPath(fullname, NULL /* no path */, &m_name, &m_ext); +} + wxString wxFileName::GetFullName() const { wxString fullname = m_name; -- 2.45.2