r16486 by craig - #9267, #5529: Fix translation issues with None colour when switching GUI language

scribus-commit scribus-commit at lists.scribus.net
Thu Mar 24 00:13:51 CET 2011


Author: craig
Date: Wed Mar 23 23:13:50 2011
New Revision: 16486

URL: http://scribus.info/websvn/listing.php?repname=Scribus&sc=1&rev=16486
Log:
#9267, #5529: Fix translation issues with None colour when switching GUI language

Modified:
    branches/Version135/Scribus/scribus/prefsmanager.cpp
    branches/Version135/Scribus/scribus/prefsmanager.h
    branches/Version135/Scribus/scribus/scribus.cpp

Modified: branches/Version135/Scribus/scribus/prefsmanager.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16486&path=/branches/Version135/Scribus/scribus/prefsmanager.cpp
==============================================================================
--- branches/Version135/Scribus/scribus/prefsmanager.cpp (original)
+++ branches/Version135/Scribus/scribus/prefsmanager.cpp Wed Mar 23 23:13:50 2011
@@ -2475,3 +2475,23 @@
 {
 	return appPrefs.gs_Resolution;
 }
+
+void PrefsManager::languageChange()
+{
+	if (appPrefs.toolSettings.dTextBackGround == CommonStrings::tr_NoneColor)
+		appPrefs.toolSettings.dTextBackGround = CommonStrings::None;
+	if (appPrefs.toolSettings.dTextLineColor == CommonStrings::tr_NoneColor)
+		appPrefs.toolSettings.dTextLineColor = CommonStrings::None;
+	if (appPrefs.toolSettings.dPen == CommonStrings::tr_NoneColor)
+		appPrefs.toolSettings.dPen = CommonStrings::None;
+	if (appPrefs.toolSettings.dPenText == CommonStrings::tr_NoneColor)
+		appPrefs.toolSettings.dPenText = CommonStrings::None;
+	if (appPrefs.toolSettings.dStrokeText == CommonStrings::tr_NoneColor)
+		appPrefs.toolSettings.dStrokeText = CommonStrings::None;
+	if (appPrefs.toolSettings.dBrush == CommonStrings::tr_NoneColor)
+		appPrefs.toolSettings.dBrush = CommonStrings::None;
+	if (appPrefs.toolSettings.dPenLine == CommonStrings::tr_NoneColor)
+		appPrefs.toolSettings.dPenLine = CommonStrings::None;
+	if (appPrefs.toolSettings.dBrushPict == CommonStrings::tr_NoneColor)
+		appPrefs.toolSettings.dBrushPict = CommonStrings::None;
+}

Modified: branches/Version135/Scribus/scribus/prefsmanager.h
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16486&path=/branches/Version135/Scribus/scribus/prefsmanager.h
==============================================================================
--- branches/Version135/Scribus/scribus/prefsmanager.h (original)
+++ branches/Version135/Scribus/scribus/prefsmanager.h Wed Mar 23 23:13:50 2011
@@ -198,6 +198,10 @@
 	//! \brief Temporarily public while this class takes shape so progress can happen and cvs can build
 	struct ApplicationPrefs appPrefs;
 	PrefsFile* prefsFile;
+	
+public slots:
+	void languageChange();
+	
 private:
 	/**
 	* @brief The only instance of PrefsManager available.

Modified: branches/Version135/Scribus/scribus/scribus.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16486&path=/branches/Version135/Scribus/scribus/scribus.cpp
==============================================================================
--- branches/Version135/Scribus/scribus/scribus.cpp (original)
+++ branches/Version135/Scribus/scribus/scribus.cpp Wed Mar 23 23:13:50 2011
@@ -9420,9 +9420,11 @@
 
 void ScribusMainWindow::languageChange()
 {
-//	qDebug() << "void ScribusMainWindow::languageChange()";
 	if (ScCore->initialized())
 	{
+		//Update colours in case someone has a translated None colour in their preference settings
+		//before changing the tr_NoneColor to the new value. See #9267, #5529
+		prefsManager->languageChange();
 		CommonStrings::languageChange();
 		//Update actions
 		if (actionManager!=NULL)




More information about the scribus-commit mailing list