From 29fda03a8c398acd90d129b5ae03ec04b47e54e3 Mon Sep 17 00:00:00 2001 From: vanhofen Date: Mon, 13 Jun 2016 19:17:01 +0200 Subject: [PATCH] defaults: better solution for 34877d97e924e2ebd8e409c61757be565ac53524 Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/83dcb4de657b885a52f7b3b4d97207e9d5290e61 Author: vanhofen Date: 2016-06-13 (Mon, 13 Jun 2016) Origin message was: ------------------ - defaults: better solution for 34877d97e924e2ebd8e409c61757be565ac53524 --- src/neutrino.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/neutrino.cpp b/src/neutrino.cpp index 95d66ee97..dfd9ad9ae 100644 --- a/src/neutrino.cpp +++ b/src/neutrino.cpp @@ -541,10 +541,17 @@ int CNeutrinoApp::loadSetup(const char * fname) g_settings.auto_subs = configfile.getInt32( "auto_subs", 0 ); for(int i = 0; i < 3; i++) { + //NI + std::string _lang = "none"; + switch (i) { + case 0: _lang = "German" ; break; + case 1: _lang = "English"; break; + case 2: _lang = "French" ; break; + } sprintf(cfg_key, "pref_lang_%d", i); - g_settings.pref_lang[i] = configfile.getString(cfg_key, (i == 0) ? "German" : "none"); //NI + g_settings.pref_lang[i] = configfile.getString(cfg_key, _lang); //NI sprintf(cfg_key, "pref_subs_%d", i); - g_settings.pref_subs[i] = configfile.getString(cfg_key, (i == 0) ? "German" : "none"); //NI + g_settings.pref_subs[i] = configfile.getString(cfg_key, _lang); //NI } g_settings.subs_charset = configfile.getString("subs_charset", "CP1252"); g_settings.zap_cycle = configfile.getInt32( "zap_cycle", 0 );