mirror of
https://github.com/greenshot/greenshot
synced 2025-08-20 21:43:24 -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
|
@ -38,6 +38,7 @@ namespace GreenshotPicasaPlugin {
|
|||
public static PluginAttribute Attributes;
|
||||
private IGreenshotHost host;
|
||||
private ComponentResourceManager resources;
|
||||
private ToolStripMenuItem itemPlugInRoot;
|
||||
|
||||
public PicasaPlugin() {
|
||||
}
|
||||
|
@ -65,18 +66,25 @@ namespace GreenshotPicasaPlugin {
|
|||
config = IniConfig.GetIniSection<PicasaConfiguration>();
|
||||
resources = new ComponentResourceManager(typeof(PicasaPlugin));
|
||||
|
||||
ToolStripMenuItem itemPlugInRoot = new ToolStripMenuItem();
|
||||
itemPlugInRoot = new ToolStripMenuItem();
|
||||
itemPlugInRoot.Text = Language.GetString("picasa", LangKey.Configure);
|
||||
itemPlugInRoot.Tag = host;
|
||||
itemPlugInRoot.Image = (Image)resources.GetObject("Picasa");
|
||||
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("picasa", LangKey.Configure);
|
||||
}
|
||||
}
|
||||
|
||||
public virtual void Shutdown() {
|
||||
LOG.Debug("Picasa Plugin shutdown.");
|
||||
Language.LanguageChanged -= new LanguageChangedHandler(OnLanguageChanged);
|
||||
//host.OnImageEditorOpen -= new OnImageEditorOpenHandler(ImageEditorOpened);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue