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
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue