Add convenient wxFileName::GetAbsolutePath() wrapper and use it
This wrapper simply combines the calls to MakeAbsolute() and GetFullPath(), but using it results in shorter and more clear code, so it seems to be worth having.
This commit is contained in:
parent
3539a81a8a
commit
f37d449208
14 changed files with 38 additions and 49 deletions
|
|
@ -574,17 +574,9 @@ MyFrame::MyFrame()
|
|||
m_fileHistory = new wxFileHistory();
|
||||
m_fileHistory->UseMenu(m_fileHistoryMenu);
|
||||
|
||||
wxFileName fn( "menu.cpp" );
|
||||
fn.MakeAbsolute();
|
||||
m_fileHistory->AddFileToHistory( fn.GetFullPath() );
|
||||
|
||||
fn = "Makefile.in";
|
||||
fn.MakeAbsolute();
|
||||
m_fileHistory->AddFileToHistory( fn.GetFullPath() );
|
||||
|
||||
fn.Assign("minimal", "minimal", "cpp");
|
||||
fn.MakeAbsolute();
|
||||
m_fileHistory->AddFileToHistory( fn.GetFullPath() );
|
||||
m_fileHistory->AddFileToHistory( wxFileName("menu.cpp").GetAbsolutePath() );
|
||||
m_fileHistory->AddFileToHistory( wxFileName("Makefile.in").GetAbsolutePath() );
|
||||
m_fileHistory->AddFileToHistory( wxFileName("minimal", "minimal", "cpp").GetAbsolutePath() );
|
||||
|
||||
fileMenu->AppendSubMenu(m_fileHistoryMenu, "Sample file history");
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue