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

@ -39,6 +39,7 @@ namespace GreenshotBoxPlugin {
public static PluginAttribute Attributes;
private IGreenshotHost host;
private ComponentResourceManager resources;
private ToolStripMenuItem itemPlugInConfig;
public BoxPlugin() {
}
@ -65,16 +66,22 @@ namespace GreenshotBoxPlugin {
config = IniConfig.GetIniSection<BoxConfiguration>();
resources = new ComponentResourceManager(typeof(BoxPlugin));
ToolStripMenuItem itemPlugInConfig = new ToolStripMenuItem();
itemPlugInConfig = new ToolStripMenuItem();
itemPlugInConfig.Image = (Image)resources.GetObject("Box");
itemPlugInConfig.Text = Language.GetString("box", LangKey.Configure);
itemPlugInConfig.Click += new System.EventHandler(ConfigMenuClick);
PluginUtils.AddToContextMenu(host, itemPlugInConfig);
Language.LanguageChanged += new LanguageChangedHandler(OnLanguageChanged);
return true;
}
public void OnLanguageChanged() {
if (itemPlugInConfig != null) {
itemPlugInConfig.Text = Language.GetString("box", LangKey.Configure);
}
}
public virtual void Shutdown() {
LOG.Debug("Box Plugin shutdown.");
}