r21371 by craig -

scribus-commit scribus-commit at lists.scribus.net
Wed Jun 8 21:31:46 UTC 2016


Author: craig
Date: Wed Jun  8 21:31:46 2016
New Revision: 21371

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=21371
Log:
#14086: Fix English language selection by adding plain English back to language list and rewrite combobox selection code

Modified:
    trunk/Scribus/scribus/langmgr.cpp
    trunk/Scribus/scribus/plugins/tools/hunspellcheck/hunspelldialog.cpp

Modified: trunk/Scribus/scribus/langmgr.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21371&path=/trunk/Scribus/scribus/langmgr.cpp
==============================================================================
--- trunk/Scribus/scribus/langmgr.cpp	(original)
+++ trunk/Scribus/scribus/langmgr.cpp	Wed Jun  8 21:31:46 2016
@@ -215,6 +215,7 @@
 	m_langTable.append(LangDef("en_ZA",    "",         "English (South Africa)",  QObject::tr("English (South Africa)")));
 	m_langTable.append(LangDef("en_GB",    "en",       "English (UK)",            QObject::tr("English (UK)")));
 	m_langTable.append(LangDef("en_US",    "",         "English (US)",            QObject::tr("English (US)")));
+	m_langTable.append(LangDef("en_US",    "",         "English",                 QObject::tr("English")));
 	m_langTable.append(LangDef("ang",      "",         "English (Old 450-1100)",  QObject::tr("English (Old 450-1100)")));
 	m_langTable.append(LangDef("eo",       "",         "Esperanto",               QObject::tr("Esperanto")));
 	m_langTable.append(LangDef("myv",      "",         "Erzya",                   QObject::tr("Erzya")));
@@ -548,6 +549,7 @@
 	m_langTable.append(LangDef("nso",      "",         "Sotho Northern",          QObject::tr("Sotho Northern")));
 	m_langTable.append(LangDef("st",       "",         "Sotho Southern",          QObject::tr("Sotho Southern")));
 	m_langTable.append(LangDef("es",       "es_ES",    "Spanish",                 QObject::tr("Spanish")));
+	m_langTable.append(LangDef("es",       "es_ANY",   "Spanish",                 QObject::tr("Spanish")));
 	m_langTable.append(LangDef("es_AR",    "",         "Spanish (Argentina)",     QObject::tr("Spanish (Argentina)")));
 	m_langTable.append(LangDef("es_LA",    "",         "Spanish (Latin)",         QObject::tr("Spanish (Latin)")));
 	m_langTable.append(LangDef("aii",      "",         "Swadaya Aramaic",         QObject::tr("Swadaya Aramaic")));

Modified: trunk/Scribus/scribus/plugins/tools/hunspellcheck/hunspelldialog.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21371&path=/trunk/Scribus/scribus/plugins/tools/hunspellcheck/hunspelldialog.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/tools/hunspellcheck/hunspelldialog.cpp	(original)
+++ trunk/Scribus/scribus/plugins/tools/hunspellcheck/hunspelldialog.cpp	Wed Jun  8 21:31:46 2016
@@ -185,14 +185,19 @@
 void HunspellDialog::setLanguageCombo(const QString &newLangAbbrev)
 {
 	QMap<QString, QString>::iterator it = m_dictionaryMap->begin();
+	bool found=false;
+	while (it != m_dictionaryMap->end())
+	{
+		if (it.key()==newLangAbbrev)
+		{
+			found=true;
+			break;
+		}
+		++it;
+	}
 	int i=0;
-	while (it != m_dictionaryMap->end())
-	{
-		if (it.key()==newLangAbbrev)
-			break;
-		++i;
-		++it;
-	}
+	if (found)
+		i=languagesComboBox->findText(LanguageManager::instance()->getLangFromAbbrev(newLangAbbrev,true));
 	bool b=languagesComboBox->blockSignals(true);
 	languagesComboBox->setCurrentIndex(i);
 	languagesComboBox->blockSignals(b);




More information about the scribus-commit mailing list