r16487 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:51 2011
New Revision: 16487

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

Modified:
    trunk/Scribus/scribus/prefsmanager.cpp
    trunk/Scribus/scribus/prefsmanager.h
    trunk/Scribus/scribus/scribus.cpp

Modified: trunk/Scribus/scribus/prefsmanager.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16487&path=/trunk/Scribus/scribus/prefsmanager.cpp
==============================================================================
--- trunk/Scribus/scribus/prefsmanager.cpp (original)
+++ trunk/Scribus/scribus/prefsmanager.cpp Wed Mar 23 23:13:51 2011
@@ -2650,3 +2650,24 @@
 {
 	return appPrefs.extToolPrefs.gs_Resolution;
 }
+
+void PrefsManager::languageChange()
+{
+	if (appPrefs.itemToolPrefs.textFillColor == CommonStrings::tr_NoneColor)
+		appPrefs.itemToolPrefs.textFillColor = CommonStrings::None;
+	if (appPrefs.itemToolPrefs.textLineColor == CommonStrings::tr_NoneColor)
+		appPrefs.itemToolPrefs.textLineColor = CommonStrings::None;
+	if (appPrefs.itemToolPrefs.shapeLineColor == CommonStrings::tr_NoneColor)
+		appPrefs.itemToolPrefs.shapeLineColor = CommonStrings::None;
+	if (appPrefs.itemToolPrefs.textColor == CommonStrings::tr_NoneColor)
+		appPrefs.itemToolPrefs.textColor = CommonStrings::None;
+	if (appPrefs.itemToolPrefs.textStrokeColor == CommonStrings::tr_NoneColor)
+		appPrefs.itemToolPrefs.textStrokeColor = CommonStrings::None;
+	if (appPrefs.itemToolPrefs.shapeFillColor == CommonStrings::tr_NoneColor)
+		appPrefs.itemToolPrefs.shapeFillColor = CommonStrings::None;
+	if (appPrefs.itemToolPrefs.lineColor == CommonStrings::tr_NoneColor)
+		appPrefs.itemToolPrefs.lineColor = CommonStrings::None;
+	if (appPrefs.itemToolPrefs.imageFillColor == CommonStrings::tr_NoneColor)
+		appPrefs.itemToolPrefs.imageFillColor = CommonStrings::None;
+}
+

Modified: trunk/Scribus/scribus/prefsmanager.h
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16487&path=/trunk/Scribus/scribus/prefsmanager.h
==============================================================================
--- trunk/Scribus/scribus/prefsmanager.h (original)
+++ trunk/Scribus/scribus/prefsmanager.h Wed Mar 23 23:13:51 2011
@@ -202,6 +202,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: trunk/Scribus/scribus/scribus.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16487&path=/trunk/Scribus/scribus/scribus.cpp
==============================================================================
--- trunk/Scribus/scribus/scribus.cpp (original)
+++ trunk/Scribus/scribus/scribus.cpp Wed Mar 23 23:13:51 2011
@@ -9651,6 +9651,9 @@
 {
 	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