From ec506de1889f9837c946339ba4f7d14404776f4c Mon Sep 17 00:00:00 2001 From: Erik Faye-Lund Date: Tue, 14 Oct 2008 07:43:36 +0000 Subject: [PATCH] Adding files to MRU-list at "save as". --- editor/synctracker2.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/editor/synctracker2.cpp b/editor/synctracker2.cpp index c599ae4..21afb00 100644 --- a/editor/synctracker2.cpp +++ b/editor/synctracker2.cpp @@ -222,7 +222,11 @@ void mruListUpdate() for (i = 0, it = mruList.begin(); it != mruList.end(); ++it, ++i) { assert(i <= 5); - AppendMenu(mruFileMenu, MF_STRING, ID_RECENTFILES_FILE1 + i, it->c_str()); + std::string menuEntry = std::string("&"); + menuEntry += char('1' + i); + menuEntry += " "; + menuEntry += *it; + AppendMenu(mruFileMenu, MF_STRING, ID_RECENTFILES_FILE1 + i, menuEntry.c_str()); } DrawMenuBar(hwnd); } @@ -302,6 +306,9 @@ void fileSaveAs() { setWindowFileName(temp); fileName = temp; + + mruListInsert(temp); + mruListUpdate(); } else MessageBox(trackViewWin, _T("Failed to save file"), NULL, MB_OK | MB_ICONERROR | MB_SETFOREGROUND); }