mirror of
https://github.com/greenshot/greenshot
synced 2025-07-16 10:03:44 -07:00
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:
parent
eeca9ec0de
commit
8b331ee3a4
8 changed files with 71 additions and 14 deletions
|
@ -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.");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue