r20487 by jghali -

scribus-commit scribus-commit at lists.scribus.net
Thu Oct 22 19:06:54 UTC 2015


Author: jghali
Date: Thu Oct 22 19:06:54 2015
New Revision: 20487

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=20487
Log:
#13444, third part: fix non-switching translations in line style widget

Modified:
    trunk/Scribus/scribus/ui/smlinestyle.cpp
    trunk/Scribus/scribus/ui/smlinestylewidget.cpp
    trunk/Scribus/scribus/ui/smlinestylewidget.h
    trunk/Scribus/scribus/ui/smpstylewidget.cpp

Modified: trunk/Scribus/scribus/ui/smlinestyle.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=20487&path=/trunk/Scribus/scribus/ui/smlinestyle.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/smlinestyle.cpp	(original)
+++ trunk/Scribus/scribus/ui/smlinestyle.cpp	Thu Oct 22 19:06:54 2015
@@ -376,7 +376,10 @@
 
 void SMLineStyle::languageChange()
 {
-	
+	if (m_twidget && m_widget)
+	{
+		m_twidget->addTab(m_widget, tr("Properties"));
+	}
 }
 
 void SMLineStyle::unitChange()

Modified: trunk/Scribus/scribus/ui/smlinestylewidget.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=20487&path=/trunk/Scribus/scribus/ui/smlinestylewidget.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/smlinestylewidget.cpp	(original)
+++ trunk/Scribus/scribus/ui/smlinestylewidget.cpp	Thu Oct 22 19:06:54 2015
@@ -28,13 +28,8 @@
 	lineWidth->setMinimum(0.0);
 	lineWidth->setMaximum(300.0);
 
-	endCombo->addItem(im->loadIcon("ButtCap.png"), tr( "Flat Cap" ) );
-	endCombo->addItem(im->loadIcon("SquareCap.png"), tr( "Square Cap" ) );
-	endCombo->addItem(im->loadIcon("RoundCap.png"), tr( "Round Cap" ) );
-
-	joinCombo->addItem(im->loadIcon("MiterJoin.png"), tr( "Miter Join" ) );
-	joinCombo->addItem(im->loadIcon("BevelJoin.png"), tr( "Bevel Join" ) );
-	joinCombo->addItem(im->loadIcon("RoundJoin.png"), tr( "Round Join" ) );
+	fillEndCombo();
+	fillJoinCombo();
 
 	languageChange();
 }
@@ -49,29 +44,55 @@
 
 void SMLineStyleWidget::languageChange()
 {
-/***********************************/
-/*      Begin Tooltips             */
-/***********************************/
-// These are for the line style page
+	int  oldEndComboIndex = endCombo->currentIndex();
+	bool endComboBlocked  = endCombo->blockSignals(true);
 
-	addButton->setToolTip(    tr("Add a new line"));
-	removeButton->setToolTip( tr("Remove a line"));
-	dashCombo->setToolTip(    tr("Line style"));
-	lineWidth->setToolTip(    tr("Line width"));
-	endCombo->setToolTip(     tr("End style"));
-	joinCombo->setToolTip(    tr("Join style"));
-	colorCombo->setToolTip(   tr("Line color"));
-	shadeBox->setToolTip(     tr("Line shade"));
+	int  oldJoinComboIndex = joinCombo->currentIndex();
+	bool joinComboBlocked  = joinCombo->blockSignals(true);
 
-/***********************************/
-/*      End Tooltips               */
-/***********************************/
+	int  oldLineListRow  = lineStyles->currentRow();
+	bool lineListBlocked = lineStyles->blockSignals(true);
+
+	retranslateUi(this);
+	fillEndCombo();
+	fillJoinCombo();
+	updateLineList();
+
+	endCombo->setCurrentIndex(oldEndComboIndex);
+	endCombo->blockSignals(endComboBlocked);
+
+	joinCombo->setCurrentIndex(oldJoinComboIndex);
+	joinCombo->blockSignals(joinComboBlocked);
+
+	if (oldLineListRow >= 0)
+		lineStyles->setCurrentRow(oldLineListRow);
+	lineStyles->blockSignals(lineListBlocked);
 }
 
 
 void SMLineStyleWidget::unitChange(int unitIndex)
 {
 	lineWidth->setNewUnit(unitIndex);
+}
+
+void SMLineStyleWidget::fillEndCombo()
+{
+	IconManager* im  = IconManager::instance();
+
+	endCombo->clear();
+	endCombo->addItem(im->loadIcon("ButtCap.png"), tr( "Flat Cap" ) );
+	endCombo->addItem(im->loadIcon("SquareCap.png"), tr( "Square Cap" ) );
+	endCombo->addItem(im->loadIcon("RoundCap.png"), tr( "Round Cap" ) );
+}
+
+void SMLineStyleWidget::fillJoinCombo()
+{
+	IconManager* im  = IconManager::instance();
+
+	joinCombo->clear();
+	joinCombo->addItem(im->loadIcon("MiterJoin.png"), tr( "Miter Join" ) );
+	joinCombo->addItem(im->loadIcon("BevelJoin.png"), tr( "Bevel Join" ) );
+	joinCombo->addItem(im->loadIcon("RoundJoin.png"), tr( "Round Join" ) );
 }
 
 void SMLineStyleWidget::showStyle(const multiLine &lineStyle, ColorList &colorList, int subLine)

Modified: trunk/Scribus/scribus/ui/smlinestylewidget.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=20487&path=/trunk/Scribus/scribus/ui/smlinestylewidget.h
==============================================================================
--- trunk/Scribus/scribus/ui/smlinestylewidget.h	(original)
+++ trunk/Scribus/scribus/ui/smlinestylewidget.h	Thu Oct 22 19:06:54 2015
@@ -35,6 +35,9 @@
 	multiLine  m_currentStyle;
 	ColorList  m_colors;
 
+	void fillEndCombo();
+	void fillJoinCombo();
+
 	void updateLineList();
 	QColor getColor(const QString &name, int shade);
 

Modified: trunk/Scribus/scribus/ui/smpstylewidget.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=20487&path=/trunk/Scribus/scribus/ui/smpstylewidget.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/smpstylewidget.cpp	(original)
+++ trunk/Scribus/scribus/ui/smpstylewidget.cpp	Thu Oct 22 19:06:54 2015
@@ -199,6 +199,7 @@
 
 	parEffectCharStyleComboLabel->setText(tr("Character Style for Effect:"));
 	distFromTextLabel->setText(tr("Distance from Text:"));
+	parEffectIndentBox->setText(tr("AutoIndent"));
 	parentParEffectsButton->setText(tr("Use Parent`s Values"));
 
 	QFont font1;




More information about the scribus-commit mailing list