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

Unified Diff: src/plugin/PluginSettings.cpp

Issue 5338025085108224: Support Acceptable Ads (Closed)
Patch Set: Missing negation fix Created July 18, 2014, 7:39 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
« no previous file with comments | « src/plugin/PluginClass.cpp ('k') | src/plugin/Resource.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/plugin/PluginSettings.cpp
===================================================================
--- a/src/plugin/PluginSettings.cpp
+++ b/src/plugin/PluginSettings.cpp
@@ -319,10 +319,16 @@
CString CPluginSettings::GetSubscription()
{
std::vector<SubscriptionDescription> subscriptions = CPluginClient::GetInstance()->GetListedSubscriptions();
- if (subscriptions.size() > 0)
- return CString(subscriptions.front().url.c_str());
- else
- return CString(L"");
+ std::wstring aaUrl = CPluginClient::GetInstance()->GetPref(L"subscriptions_exceptionsurl", L"");
+
+ for (std::vector<SubscriptionDescription>::iterator subscription = subscriptions.begin(); subscription != subscriptions.end(); subscription++)
+ {
+ if (subscription->url != aaUrl)
+ {
+ return CString(subscription->url.c_str());
+ }
+ }
+ return CString(L"");
}
CString CPluginSettings::GetAppLocale()
« no previous file with comments | « src/plugin/PluginClass.cpp ('k') | src/plugin/Resource.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld