Fixed issue #100.

This commit is contained in:
WrinklyNinja
2014-02-01 17:58:11 +00:00
parent bed172ecfd
commit a64d895ce0
2 changed files with 12 additions and 11 deletions
+7 -5
View File
@@ -202,7 +202,7 @@ namespace boss {
int messageNo,
int warnNo,
int errorNo,
const std::list<Message>& messages) {
std::list<Message>& messages) {
BOOST_LOG_TRIVIAL(trace) << "Appending summary tab to BOSS report.";
@@ -256,10 +256,12 @@ namespace boss {
if (!hasChanged) {
BOOST_LOG_TRIVIAL(info) << "No changes in the BOSS report details tab since the last run.";
pugi::xml_node note = summary.append_child();
/*pugi::xml_node note = summary.append_child();
note.set_name("div");
note.append_attribute("id").set_value("noChanges");
note.text().set(boost::locale::translate("No change in details since last run.").str().c_str());
*/
messages.push_front(boss::Message(boss::g_message_say, "There have been no changes in the Details tab since BOSS was last run."));
}
if (!messages.empty()) {
@@ -400,7 +402,7 @@ namespace boss {
}
xml_string_writer writer;
details.print(writer, "\t", pugi::format_default | pugi::format_no_declaration);
details.print(writer, "", pugi::format_default | pugi::format_no_declaration | pugi::format_raw);
return writer.result != oldDetails;
}
@@ -409,7 +411,7 @@ namespace boss {
const std::string& oldDetails,
const std::string& masterlistVersion,
bool masterlistUpdateEnabled,
const std::list<Message>& messages,
std::list<Message>& messages,
const std::list<Plugin>& plugins,
int& pluginMessageNo
) {
@@ -538,7 +540,7 @@ namespace boss {
}
inline void GenerateReport(const boost::filesystem::path& file,
const std::list<Message>& messages,
std::list<Message>& messages,
const std::list<Plugin>& plugins,
const std::string& oldDetails,
const std::string& masterlistVersion,
+5 -6
View File
@@ -787,14 +787,13 @@ void Launcher::OnSortPlugins(wxCommandEvent& event) {
if (pos1 != string::npos) {
pos1 = oldDetails.find("<ul>", pos1);
if (pos1 != string::npos) {
size_t pos2 = oldDetails.find("</div>", pos1);
pos2 = oldDetails.rfind("</ul>", pos2) - 3; //Remove the 3 tabs preceding the closing tag.
oldDetails = oldDetails.substr(pos1, pos2 - pos1);
size_t pos2 = oldDetails.find("<div id=\"summary\">", pos1);
if (pos2 != string::npos) {
pos2 -= 6; // "</div>"
oldDetails = oldDetails.substr(pos1, pos2 - pos1);
}
}
}
boost::replace_all(oldDetails, "\t\t\t\t", "\t");
oldDetails += "</ul>\n";
}
BOOST_LOG_TRIVIAL(debug) << "Generating report...";