| 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 1112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1123 miiSep.cbSize = sizeof(miiSep); | 1123 miiSep.cbSize = sizeof(miiSep); |
| 1124 miiSep.fMask = MIIM_TYPE | MIIM_FTYPE; | 1124 miiSep.fMask = MIIM_TYPE | MIIM_FTYPE; |
| 1125 miiSep.fType = MFT_SEPARATOR; | 1125 miiSep.fType = MFT_SEPARATOR; |
| 1126 | 1126 |
| 1127 CPluginClient* client = CPluginClient::GetInstance(); | 1127 CPluginClient* client = CPluginClient::GetInstance(); |
| 1128 CPluginSettings* settings = CPluginSettings::GetInstance(); | 1128 CPluginSettings* settings = CPluginSettings::GetInstance(); |
| 1129 { | 1129 { |
| 1130 ctext = dictionary->Lookup("menu", "menu-disable-on-site"); | 1130 ctext = dictionary->Lookup("menu", "menu-disable-on-site"); |
| 1131 // Is domain in white list? | 1131 // Is domain in white list? |
| 1132 ReplaceString(ctext, L"?1?", client->GetHostFromUrl(url)); | 1132 ReplaceString(ctext, L"?1?", client->GetHostFromUrl(url)); |
| 1133 if (client->IsWhitelistedUrl(GetTab()->GetDocumentUrl())) | 1133 if (!GetTab()->CanDisableOnSite()) |
| 1134 { |
| 1135 fmii.fState = MFS_UNCHECKED | MFS_DISABLED; |
| 1136 } |
| 1137 else if (client->IsWhitelistedUrl(GetTab()->GetDocumentUrl())) |
| 1134 { | 1138 { |
| 1135 fmii.fState = MFS_CHECKED | MFS_ENABLED; | 1139 fmii.fState = MFS_CHECKED | MFS_ENABLED; |
| 1136 } | 1140 } |
| 1137 else | 1141 else |
| 1138 { | 1142 { |
| 1139 fmii.fState = MFS_UNCHECKED | MFS_ENABLED; | 1143 fmii.fState = MFS_UNCHECKED | MFS_ENABLED; |
| 1140 } | 1144 } |
| 1141 fmii.fMask = MIIM_STRING | MIIM_STATE; | 1145 fmii.fMask = MIIM_STRING | MIIM_STATE; |
| 1142 fmii.dwTypeData = const_cast<LPWSTR>(ctext.c_str()); | 1146 fmii.dwTypeData = const_cast<LPWSTR>(ctext.c_str()); |
| 1143 fmii.cch = static_cast<UINT>(ctext.size()); | 1147 fmii.cch = static_cast<UINT>(ctext.size()); |
| (...skipping 489 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1633 s_criticalSectionLocal.Unlock(); | 1637 s_criticalSectionLocal.Unlock(); |
| 1634 | 1638 |
| 1635 return icon; | 1639 return icon; |
| 1636 } | 1640 } |
| 1637 | 1641 |
| 1638 ATOM CPluginClass::GetAtomPaneClass() | 1642 ATOM CPluginClass::GetAtomPaneClass() |
| 1639 { | 1643 { |
| 1640 return s_atomPaneClass; | 1644 return s_atomPaneClass; |
| 1641 } | 1645 } |
| 1642 | 1646 |
| OLD | NEW |