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: change the interface Created March 5, 2015, 11:30 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/plugin/AdblockPlusClient.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 std::string filterText;
1276 if (client->IsWhitelistedUrl(urlString, filterText))
Oleksandr 2015/03/11 13:10:38 Felix has pointed out that we are actually leaking
sergei 2015/03/11 13:16:06 Has Felix seen the previous approach, which is muc
1276 { 1277 {
1277 settings->RemoveWhiteListedDomain(ToCString(client->GetHostFromUrl(urlSt ring))); 1278 client->RemoveFilter(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
« no previous file with comments | « src/plugin/AdblockPlusClient.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld