Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: src/engine/NotificationWindow.cpp

Issue 6567422169448448: Issue 119 - Switch to injecting CSS for element hiding (Closed)
Patch Set: rebase, improve memory handling (OnQuit) and improve code organizing Created April 27, 2016, 1:10 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/engine/NotificationWindow.cpp
diff --git a/src/engine/NotificationWindow.cpp b/src/engine/NotificationWindow.cpp
index 069e4942aaf939def9f70030e9398ff20c545b10..eabede6d05c683374358f14e7695c418052048c2 100644
--- a/src/engine/NotificationWindow.cpp
+++ b/src/engine/NotificationWindow.cpp
@@ -126,14 +126,14 @@ NotificationWindow::NotificationWindow(const AdblockPlus::Notification& notifica
m_htmlPage.assign((std::istreambuf_iterator<wchar_t>(ifs)), std::istreambuf_iterator<wchar_t>());
m_links = ToUtf16Strings(notification.GetLinks());
- auto body = ToUtf16String(notification.GetMessageString());
+ auto body = ToUtf16String(notification.GetTexts().message);
uint32_t linkIDCounter = 0;
body = ReplaceMulti(body, L"<a>", [this, &linkIDCounter]()->std::wstring
{
return L"<a href=\"#\" data-linkID=\"" + std::to_wstring(linkIDCounter++) + L"\">";
});
assert(linkIDCounter == m_links.size() && "The amount of links in the text is different from the amount of provided links");
- m_htmlPage = ReplaceMulti(m_htmlPage, L"<!--Title-->", ToUtf16String(notification.GetTitle()));
+ m_htmlPage = ReplaceMulti(m_htmlPage, L"<!--Title-->", ToUtf16String(notification.GetTexts().title));
m_htmlPage = ReplaceMulti(m_htmlPage, L"<!--Body-->", body);
}

Powered by Google App Engine
This is Rietveld