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

Delta Between Two Patch Sets: src/plugin/PluginClass.cpp

Issue 29332455: Issue #1596, #1720 - Make status bar menu consistent with plugin abilities (Closed)
Left Patch Set: Created Dec. 8, 2015, 6:58 p.m.
Right Patch Set: address comments Created Dec. 9, 2015, 12:50 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « no previous file | src/plugin/PluginTabBase.h » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
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 1110 matching lines...) Expand 10 before | Expand all | Expand 10 after
1121 1121
1122 MENUITEMINFOW miiSep = {}; 1122 MENUITEMINFOW miiSep = {};
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?
1132 ReplaceString(ctext, L"?1?", client->GetHostFromUrl(url)); 1131 ReplaceString(ctext, L"?1?", client->GetHostFromUrl(url));
1133 if (!GetTab()->CanDisableOnSite()) 1132 /*
1134 { 1133 * The display state of the "disable on this site" menu item depends upon ta b content
1134 */
1135 if (!GetTab()->IsPossibleToDisableOnSite())
1136 {
1137 // Since we can't disable the present content,
1138 // it makes no sense to offer the user an option to block it.
1135 fmii.fState = MFS_UNCHECKED | MFS_DISABLED; 1139 fmii.fState = MFS_UNCHECKED | MFS_DISABLED;
Oleksandr 2015/12/17 12:59:38 If it is not possible to disable on site, it also
Eric 2015/12/17 13:40:39 The meaning of the check mark to me is "there is a
sergei 2015/12/21 10:26:23 I agree, it should be rather checked.
Eric 2015/12/21 13:11:41 Please feel free to bring up these points as comme
1136 } 1140 }
1137 else if (client->IsWhitelistedUrl(GetTab()->GetDocumentUrl())) 1141 else if (client->IsWhitelistedUrl(GetTab()->GetDocumentUrl()))
1138 { 1142 {
1143 // Domain is in white list, indicated by a check mark
1139 fmii.fState = MFS_CHECKED | MFS_ENABLED; 1144 fmii.fState = MFS_CHECKED | MFS_ENABLED;
1140 } 1145 }
1141 else 1146 else
1142 { 1147 {
1143 fmii.fState = MFS_UNCHECKED | MFS_ENABLED; 1148 fmii.fState = MFS_UNCHECKED | MFS_ENABLED;
1144 } 1149 }
1145 fmii.fMask = MIIM_STRING | MIIM_STATE; 1150 fmii.fMask = MIIM_STRING | MIIM_STATE;
1146 fmii.dwTypeData = const_cast<LPWSTR>(ctext.c_str()); 1151 fmii.dwTypeData = const_cast<LPWSTR>(ctext.c_str());
1147 fmii.cch = static_cast<UINT>(ctext.size()); 1152 fmii.cch = static_cast<UINT>(ctext.size());
1148 1153
(...skipping 488 matching lines...) Expand 10 before | Expand all | Expand 10 after
1637 s_criticalSectionLocal.Unlock(); 1642 s_criticalSectionLocal.Unlock();
1638 1643
1639 return icon; 1644 return icon;
1640 } 1645 }
1641 1646
1642 ATOM CPluginClass::GetAtomPaneClass() 1647 ATOM CPluginClass::GetAtomPaneClass()
1643 { 1648 {
1644 return s_atomPaneClass; 1649 return s_atomPaneClass;
1645 } 1650 }
1646 1651
LEFTRIGHT

Powered by Google App Engine
This is Rietveld