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

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

Issue 29332455: Issue #1596, #1720 - Make status bar menu consistent with plugin abilities (Closed)
Patch Set: Created Dec. 8, 2015, 6:58 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
« no previous file with comments | « no previous file | src/plugin/PluginTabBase.h » ('j') | src/plugin/PluginTabBase.h » ('J')
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 1112 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW
« no previous file with comments | « no previous file | src/plugin/PluginTabBase.h » ('j') | src/plugin/PluginTabBase.h » ('J')

Powered by Google App Engine
This is Rietveld