r20484 by jghali -
scribus-commit
scribus-commit at lists.scribus.net
Thu Oct 22 11:59:58 UTC 2015
Author: jghali
Date: Thu Oct 22 11:59:57 2015
New Revision: 20484
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=20484
Log:
#13444, second part: fix non-switching translations in table and cell styles widgets
Modified:
trunk/Scribus/scribus/ui/smcellstylewidget.cpp
trunk/Scribus/scribus/ui/smcellstylewidget.ui
trunk/Scribus/scribus/ui/smcstylewidget.cpp
trunk/Scribus/scribus/ui/smtablestylewidget.cpp
trunk/Scribus/scribus/ui/smtablestylewidget.ui
Modified: trunk/Scribus/scribus/ui/smcellstylewidget.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=20484&path=/trunk/Scribus/scribus/ui/smcellstylewidget.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/smcellstylewidget.cpp (original)
+++ trunk/Scribus/scribus/ui/smcellstylewidget.cpp Thu Oct 22 11:59:57 2015
@@ -17,7 +17,6 @@
fillColorIcon->setPixmap(IconManager::instance()->loadPixmap("16/color-fill.png"));
fillColor->addItem(CommonStrings::tr_NoneColor);
fillShadeLabel->setPixmap(IconManager::instance()->loadPixmap("shade.png") );
- fillShade->setToolTip( tr("Fill Shade"));
}
SMCellStyleWidget::~SMCellStyleWidget()
@@ -133,7 +132,14 @@
void SMCellStyleWidget::languageChange()
{
- fillColor->setToolTip(tr("Fill Color"));
+ retranslateUi(this);
+
+ if (fillColor->count() > 0)
+ {
+ bool fillColorBlocked = fillColor->blockSignals(true);
+ fillColor->setItemText(0, CommonStrings::tr_NoneColor);
+ fillColor->blockSignals(fillColorBlocked);
+ }
}
void SMCellStyleWidget::fillFillColorCombo(ColorList &colors)
Modified: trunk/Scribus/scribus/ui/smcellstylewidget.ui
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=20484&path=/trunk/Scribus/scribus/ui/smcellstylewidget.ui
==============================================================================
--- trunk/Scribus/scribus/ui/smcellstylewidget.ui (original)
+++ trunk/Scribus/scribus/ui/smcellstylewidget.ui Thu Oct 22 11:59:57 2015
@@ -63,7 +63,11 @@
</widget>
</item>
<item>
- <widget class="SMColorCombo" name="fillColor"/>
+ <widget class="SMColorCombo" name="fillColor">
+ <property name="toolTip">
+ <string>Fill Color</string>
+ </property>
+ </widget>
</item>
<item>
<widget class="QLabel" name="fillShadeLabel">
@@ -80,6 +84,9 @@
</item>
<item>
<widget class="SMShadeButton" name="fillShade">
+ <property name="toolTip">
+ <string>Fill Shade</string>
+ </property>
<property name="text">
<string/>
</property>
Modified: trunk/Scribus/scribus/ui/smcstylewidget.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=20484&path=/trunk/Scribus/scribus/ui/smcstylewidget.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/smcstylewidget.cpp (original)
+++ trunk/Scribus/scribus/ui/smcstylewidget.cpp Thu Oct 22 11:59:57 2015
@@ -58,6 +58,20 @@
QStringList languageList;
LanguageManager::instance()->fillInstalledHyphStringList(&languageList);
fillLangComboFromList(languageList);
+
+ if (fillColor_->count() > 0)
+ {
+ bool sigBlocked = fillColor_->blockSignals(true);
+ fillColor_->setItemText(0, CommonStrings::tr_NoneColor);
+ fillColor_->blockSignals(sigBlocked);
+ }
+
+ if (strokeColor_->count() > 0)
+ {
+ bool sigBlocked = strokeColor_->blockSignals(true);
+ strokeColor_->setItemText(0, CommonStrings::tr_NoneColor);
+ strokeColor_->blockSignals(sigBlocked);
+ }
/***********************************/
/* Begin Tooltips */
Modified: trunk/Scribus/scribus/ui/smtablestylewidget.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=20484&path=/trunk/Scribus/scribus/ui/smtablestylewidget.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/smtablestylewidget.cpp (original)
+++ trunk/Scribus/scribus/ui/smtablestylewidget.cpp Thu Oct 22 11:59:57 2015
@@ -131,8 +131,14 @@
void SMTableStyleWidget::languageChange()
{
- fillColor->setToolTip( tr("Fill Color"));
- fillShade->setToolTip( tr("Fill Shade"));
+ retranslateUi(this);
+
+ if (fillColor->count() > 0)
+ {
+ bool fillColorBlocked = fillColor->blockSignals(true);
+ fillColor->setItemText(0, CommonStrings::tr_NoneColor);
+ fillColor->blockSignals(fillColorBlocked);
+ }
}
void SMTableStyleWidget::fillFillColorCombo(ColorList &colors)
Modified: trunk/Scribus/scribus/ui/smtablestylewidget.ui
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=20484&path=/trunk/Scribus/scribus/ui/smtablestylewidget.ui
==============================================================================
--- trunk/Scribus/scribus/ui/smtablestylewidget.ui (original)
+++ trunk/Scribus/scribus/ui/smtablestylewidget.ui Thu Oct 22 11:59:57 2015
@@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>378</width>
- <height>478</height>
+ <height>486</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
@@ -49,7 +49,7 @@
</size>
</property>
<property name="text">
- <string>TextLabel</string>
+ <string/>
</property>
<property name="buddy">
<cstring>fillColor</cstring>
@@ -57,17 +57,24 @@
</widget>
</item>
<item>
- <widget class="SMColorCombo" name="fillColor"/>
+ <widget class="SMColorCombo" name="fillColor">
+ <property name="toolTip">
+ <string>Fill Color</string>
+ </property>
+ </widget>
</item>
<item>
<widget class="QLabel" name="fillShadeLabel">
<property name="text">
- <string>Text</string>
+ <string/>
</property>
</widget>
</item>
<item>
<widget class="SMShadeButton" name="fillShade">
+ <property name="toolTip">
+ <string>Fill Shade</string>
+ </property>
<property name="text">
<string/>
</property>
More information about the scribus-commit
mailing list