Fixes for Bug #3579467, context menu entries are updated when changing the language / hotkeys.

git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@2200 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4
This commit is contained in:
RKrom 2012-10-25 12:43:44 +00:00
parent eeca9ec0de
commit 8b331ee3a4
8 changed files with 71 additions and 14 deletions

View file

@ -35,6 +35,7 @@ namespace ExternalCommand {
private static ExternalCommandConfiguration config = IniConfig.GetIniSection<ExternalCommandConfiguration>();
private IGreenshotHost host;
private PluginAttribute myAttributes;
private ToolStripMenuItem itemPlugInRoot;
public ExternalCommandPlugin() {
}
@ -68,7 +69,7 @@ namespace ExternalCommand {
this.myAttributes = myAttributes;
ToolStripMenuItem itemPlugInRoot = new ToolStripMenuItem();
itemPlugInRoot = new ToolStripMenuItem();
itemPlugInRoot.Text = Language.GetString("externalcommand", "contextmenu_configure");
itemPlugInRoot.Tag = host;
string exePath = PluginUtils.GetExePath("cmd.exe");
@ -78,9 +79,16 @@ namespace ExternalCommand {
itemPlugInRoot.Click += new System.EventHandler(ConfigMenuClick);
PluginUtils.AddToContextMenu(host, itemPlugInRoot);
Language.LanguageChanged += new LanguageChangedHandler(OnLanguageChanged);
return true;
}
public void OnLanguageChanged() {
if (itemPlugInRoot != null) {
itemPlugInRoot.Text = Language.GetString("externalcommand", "contextmenu_configure");
}
}
public virtual void Shutdown() {
LOG.Debug("Shutdown of " + myAttributes.Name);
}