From cc640bfbaf6f64821e85b2ed795b01bccd03d831 Mon Sep 17 00:00:00 2001 From: WrinklyNinja Date: Sat, 26 Oct 2013 11:13:04 +0100 Subject: [PATCH] Fixes for issue #69, closing it. Fixed only the first plugin getting redated, and added a confirmation of completion dialog. --- src/gui/main.cpp | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/gui/main.cpp b/src/gui/main.cpp index 50bb5080..61a7520f 100644 --- a/src/gui/main.cpp +++ b/src/gui/main.cpp @@ -986,16 +986,19 @@ void Launcher::OnRedatePlugins(wxCommandEvent& event) { for (list::const_iterator it=loadorder.begin(), itend=loadorder.end(); it != itend; ++it) { - filepath = _game.DataPath() / loadorder.begin()->Name(); + filepath = _game.DataPath() / it->Name(); if (!fs::exists(filepath) && fs::exists(filepath.string() + ".ghost")) filepath += ".ghost"; time_t thisTime = fs::last_write_time(filepath); - if (thisTime > lastTime) + BOOST_LOG_TRIVIAL(info) << "Current timestamp for \"" << filepath.filename().string() << "\": " << thisTime; + if (thisTime >= lastTime) { lastTime = thisTime; - else { + BOOST_LOG_TRIVIAL(trace) << "No need to redate \"" << filepath.filename().string() << "\"."; + } else { lastTime += 60; fs::last_write_time(filepath, lastTime); //Space timestamps by a minute. + BOOST_LOG_TRIVIAL(info) << "Redated \"" << filepath.filename().string() << "\" to: " << lastTime; } } } @@ -1007,6 +1010,12 @@ void Launcher::OnRedatePlugins(wxCommandEvent& event) { wxOK | wxICON_ERROR, this); } + + wxMessageBox( + translate("Plugins were successfully redated."), + translate("BOSS: Plugin Redate"), + wxOK|wxCENTRE, + this); } }