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

Unified Diff: src/plugin/PluginClass.cpp

Issue 29332455: Issue #1596, #1720 - Make status bar menu consistent with plugin abilities (Closed)
Patch Set: address comments Created Dec. 9, 2015, 12:50 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/plugin/PluginTabBase.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/plugin/PluginClass.cpp
===================================================================
--- a/src/plugin/PluginClass.cpp
+++ b/src/plugin/PluginClass.cpp
@@ -1128,10 +1128,19 @@
CPluginSettings* settings = CPluginSettings::GetInstance();
{
ctext = dictionary->Lookup("menu", "menu-disable-on-site");
- // Is domain in white list?
ReplaceString(ctext, L"?1?", client->GetHostFromUrl(url));
- if (client->IsWhitelistedUrl(GetTab()->GetDocumentUrl()))
+ /*
+ * The display state of the "disable on this site" menu item depends upon tab content
+ */
+ if (!GetTab()->IsPossibleToDisableOnSite())
{
+ // Since we can't disable the present content,
+ // it makes no sense to offer the user an option to block it.
+ 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
+ }
+ else if (client->IsWhitelistedUrl(GetTab()->GetDocumentUrl()))
+ {
+ // Domain is in white list, indicated by a check mark
fmii.fState = MFS_CHECKED | MFS_ENABLED;
}
else
« no previous file with comments | « no previous file | src/plugin/PluginTabBase.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld