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
commit 8b331ee3a4
8 changed files with 71 additions and 14 deletions

View file

@ -28,6 +28,7 @@ using Greenshot.IniFile;
using Microsoft.Win32;
namespace GreenshotPlugin.Core {
public delegate void LanguageChangedHandler();
/// <summary>
/// This class supplies the GUI with translations, based upon keys.
/// The language resources are loaded from the language files found on fixed or supplied paths
@ -49,6 +50,8 @@ namespace GreenshotPlugin.Core {
private static string currentLanguage = null;
private static CoreConfiguration coreConfig = null;
public static event LanguageChangedHandler LanguageChanged;
/// <summary>
/// Static initializer for the language code
/// </summary>
@ -197,6 +200,12 @@ namespace GreenshotPlugin.Core {
if (currentLanguage == null || !currentLanguage.Equals(ietf)) {
currentLanguage = ietf;
Reload();
if (LanguageChanged != null) {
try {
LanguageChanged();
} catch {
}
}
return;
}
}