| OLD | NEW |
| 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 1107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1118 if (FAILED(hr)) | 1118 if (FAILED(hr)) |
| 1119 { | 1119 { |
| 1120 DEBUG_ERROR_LOG(hr, PLUGIN_ERROR_NAVIGATION, PLUGIN_ERROR_NAVIGATION
_SETTINGS, "Navigation::Failed") | 1120 DEBUG_ERROR_LOG(hr, PLUGIN_ERROR_NAVIGATION, PLUGIN_ERROR_NAVIGATION
_SETTINGS, "Navigation::Failed") |
| 1121 } | 1121 } |
| 1122 } | 1122 } |
| 1123 } | 1123 } |
| 1124 break; | 1124 break; |
| 1125 } | 1125 } |
| 1126 case ID_MENU_DISABLE_ON_SITE: | 1126 case ID_MENU_DISABLE_ON_SITE: |
| 1127 { | 1127 { |
| 1128 CPluginSettings* settings = CPluginSettings::GetInstance(); | |
| 1129 std::wstring urlString = GetTab()->GetDocumentUrl(); | 1128 std::wstring urlString = GetTab()->GetDocumentUrl(); |
| 1130 std::string filterText = client->GetWhitelistingFilter(urlString); | 1129 std::string filterText = client->GetWhitelistingFilter(urlString); |
| 1131 if (!filterText.empty()) | 1130 if (!filterText.empty()) |
| 1132 { | 1131 { |
| 1133 client->RemoveFilter(filterText); | 1132 client->RemoveFilter(filterText); |
| 1134 } | 1133 } |
| 1135 else | 1134 else |
| 1136 { | 1135 { |
| 1137 settings->AddWhiteListedDomain(ToCString(client->GetHostFromUrl(urlStrin
g))); | 1136 CPluginSettings::GetInstance()->AddWhiteListedDomain(client->GetHostFrom
Url(urlString)); |
| 1138 } | 1137 } |
| 1139 } | 1138 } |
| 1140 default: | 1139 default: |
| 1141 break; | 1140 break; |
| 1142 } | 1141 } |
| 1143 | 1142 |
| 1144 // Invalidate and redraw the control | 1143 // Invalidate and redraw the control |
| 1145 UpdateStatusBar(); | 1144 UpdateStatusBar(); |
| 1146 } | 1145 } |
| 1147 | 1146 |
| (...skipping 584 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1732 s_criticalSectionLocal.Unlock(); | 1731 s_criticalSectionLocal.Unlock(); |
| 1733 | 1732 |
| 1734 } | 1733 } |
| 1735 } | 1734 } |
| 1736 } | 1735 } |
| 1737 | 1736 |
| 1738 hTabWnd = ::GetWindow(hTabWnd, GW_HWNDNEXT); | 1737 hTabWnd = ::GetWindow(hTabWnd, GW_HWNDNEXT); |
| 1739 } | 1738 } |
| 1740 return hTabWnd; | 1739 return hTabWnd; |
| 1741 } | 1740 } |
| OLD | NEW |