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:
@@ -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
|
||||
|
Reference in New Issue
Block a user