mirror of
https://github.com/greenshot/greenshot
synced 2025-08-19 13:10:00 -07:00
Fixed problem when invalid language was specified in the ini file.
git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@2066 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4
This commit is contained in:
parent
7e3b7de25e
commit
752fe42aae
1 changed files with 17 additions and 3 deletions
|
@ -100,10 +100,24 @@ namespace GreenshotPlugin.Core {
|
||||||
ScanFiles();
|
ScanFiles();
|
||||||
if (!string.IsNullOrEmpty(coreConfig.Language)) {
|
if (!string.IsNullOrEmpty(coreConfig.Language)) {
|
||||||
CurrentLanguage = coreConfig.Language;
|
CurrentLanguage = coreConfig.Language;
|
||||||
} else {
|
if (CurrentLanguage != null && CurrentLanguage != coreConfig.Language) {
|
||||||
CurrentLanguage = DEFAULT_LANGUAGE;
|
coreConfig.Language = CurrentLanguage;
|
||||||
|
IniConfig.Save();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (CurrentLanguage == null) {
|
||||||
|
LOG.Warn("Couldn't set language from configuration, changing to default. Installation problem?");
|
||||||
|
CurrentLanguage = DEFAULT_LANGUAGE;
|
||||||
|
if (CurrentLanguage != null) {
|
||||||
|
coreConfig.Language = CurrentLanguage;
|
||||||
|
IniConfig.Save();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (CurrentLanguage == null) {
|
||||||
|
LOG.Error("Couldn't set language, installation problem?");
|
||||||
}
|
}
|
||||||
LOG.Error("Couldn't set language, installation problem?");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue