mirror of
https://github.com/greenshot/greenshot
synced 2025-08-14 02:37:03 -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 GreenshotDropboxPlugin {
|
|||
public static PluginAttribute Attributes;
|
||||
private IGreenshotHost host;
|
||||
private ComponentResourceManager resources;
|
||||
private ToolStripMenuItem itemPlugInConfig;
|
||||
|
||||
public DropboxPlugin() {
|
||||
}
|
||||
|
@ -65,17 +66,23 @@ namespace GreenshotDropboxPlugin {
|
|||
config = IniConfig.GetIniSection<DropboxPluginConfiguration>();
|
||||
resources = new ComponentResourceManager(typeof(DropboxPlugin));
|
||||
|
||||
ToolStripMenuItem itemPlugInConfig = new ToolStripMenuItem();
|
||||
itemPlugInConfig = new ToolStripMenuItem();
|
||||
itemPlugInConfig.Text = Language.GetString("dropbox", LangKey.Configure);
|
||||
itemPlugInConfig.Tag = host;
|
||||
itemPlugInConfig.Click += new System.EventHandler(ConfigMenuClick);
|
||||
itemPlugInConfig.Image = (Image)resources.GetObject("Dropbox");
|
||||
|
||||
PluginUtils.AddToContextMenu(host, itemPlugInConfig);
|
||||
|
||||
Language.LanguageChanged += new LanguageChangedHandler(OnLanguageChanged);
|
||||
return true;
|
||||
}
|
||||
|
||||
public void OnLanguageChanged() {
|
||||
if (itemPlugInConfig != null) {
|
||||
itemPlugInConfig.Text = Language.GetString("dropbox", LangKey.Configure);
|
||||
}
|
||||
}
|
||||
|
||||
public virtual void Shutdown() {
|
||||
LOG.Debug("Dropbox Plugin shutdown.");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue