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

Unified Diff: src/plugin/PluginClass.cpp

Issue 11276031: FRP wrappers. "Update" menu item. (Closed)
Patch Set: Created Aug. 1, 2013, 2:29 a.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
Index: src/plugin/PluginClass.cpp
===================================================================
--- a/src/plugin/PluginClass.cpp
+++ b/src/plugin/PluginClass.cpp
@@ -1260,6 +1260,12 @@
switch (nCommand)
{
+ case ID_PLUGIN_UPDATE:
+ {
+ CPluginClient* client = CPluginClient::GetInstance();
+ client->CheckForUpdates();
+ }
+ break;
case ID_PLUGIN_ENABLE:
{
CPluginSettings* settings = CPluginSettings::GetInstance();
@@ -1388,6 +1394,15 @@
}
#endif // SUPPORT_WHITELIST
+ // Plugin update
+ ctext = dictionary->Lookup("menu", "update");
+ fmii.fMask = MIIM_STATE | MIIM_STRING;
+ fmii.fState = client ? MFS_ENABLED : MFS_DISABLED;
+ fmii.dwTypeData = const_cast<LPWSTR>(ctext.c_str());
+ fmii.cch = ctext.size();
+ ::SetMenuItemInfoW(hMenu, ID_PLUGIN_UPDATE, FALSE, &fmii);
+
+
// Plugin enable
if (settings->GetPluginEnabled())
{

Powered by Google App Engine
This is Rietveld