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

Side by Side Diff: src/plugin/PluginClass.cpp

Issue 5115380229996544: Issue 1104 - Cannot uncheck Disable on website option in tool bar (Closed)
Patch Set: Created March 4, 2015, 12:24 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * This file is part of Adblock Plus <https://adblockplus.org/>, 2 * This file is part of Adblock Plus <https://adblockplus.org/>,
3 * Copyright (C) 2006-2015 Eyeo GmbH 3 * Copyright (C) 2006-2015 Eyeo GmbH
4 * 4 *
5 * Adblock Plus is free software: you can redistribute it and/or modify 5 * Adblock Plus is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 3 as 6 * it under the terms of the GNU General Public License version 3 as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
8 * 8 *
9 * Adblock Plus is distributed in the hope that it will be useful, 9 * Adblock Plus is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 1254 matching lines...) Expand 10 before | Expand all | Expand 10 after
1265 DEBUG_ERROR_LOG(hr, PLUGIN_ERROR_NAVIGATION, PLUGIN_ERROR_NAVIGATION _SETTINGS, "Navigation::Failed") 1265 DEBUG_ERROR_LOG(hr, PLUGIN_ERROR_NAVIGATION, PLUGIN_ERROR_NAVIGATION _SETTINGS, "Navigation::Failed")
1266 } 1266 }
1267 } 1267 }
1268 } 1268 }
1269 break; 1269 break;
1270 } 1270 }
1271 case ID_MENU_DISABLE_ON_SITE: 1271 case ID_MENU_DISABLE_ON_SITE:
1272 { 1272 {
1273 CPluginSettings* settings = CPluginSettings::GetInstance(); 1273 CPluginSettings* settings = CPluginSettings::GetInstance();
1274 std::wstring urlString = GetTab()->GetDocumentUrl(); 1274 std::wstring urlString = GetTab()->GetDocumentUrl();
1275 if (client->IsWhitelistedUrl(urlString)) 1275 auto exceptionFilter = client->IsWhitelistedUrl(urlString);
1276 if (exceptionFilter)
1276 { 1277 {
1277 settings->RemoveWhiteListedDomain(ToCString(client->GetHostFromUrl(urlSt ring))); 1278 client->RemoveFilter(exceptionFilter.filterText);
1278 } 1279 }
1279 else 1280 else
1280 { 1281 {
1281 settings->AddWhiteListedDomain(ToCString(client->GetHostFromUrl(urlStrin g))); 1282 settings->AddWhiteListedDomain(ToCString(client->GetHostFromUrl(urlStrin g)));
1282 } 1283 }
1283 GetBrowser()->Refresh(); 1284 GetBrowser()->Refresh();
1284 } 1285 }
1285 default: 1286 default:
1286 break; 1287 break;
1287 } 1288 }
(...skipping 596 matching lines...) Expand 10 before | Expand all | Expand 10 after
1884 } 1885 }
1885 } 1886 }
1886 } 1887 }
1887 1888
1888 hTabWnd = ::GetWindow(hTabWnd, GW_HWNDNEXT); 1889 hTabWnd = ::GetWindow(hTabWnd, GW_HWNDNEXT);
1889 } 1890 }
1890 1891
1891 return hTabWnd; 1892 return hTabWnd;
1892 1893
1893 } 1894 }
OLDNEW
« src/plugin/AdblockPlusClient.h ('K') | « src/plugin/AdblockPlusClient.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld