r20482 by jghali -

scribus-commit scribus-commit at lists.scribus.net
Wed Oct 21 22:49:36 UTC 2015


Author: jghali
Date: Wed Oct 21 22:49:36 2015
New Revision: 20482

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=20482
Log:
#13444, first part: fix non-switching translations in text styles widgets

Modified:
    trunk/Scribus/scribus/ui/smcstylewidget.cpp
    trunk/Scribus/scribus/ui/smpstylewidget.cpp
    trunk/Scribus/scribus/ui/tabruler.cpp
    trunk/Scribus/scribus/ui/tabruler.h

Modified: trunk/Scribus/scribus/ui/smcstylewidget.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=20482&path=/trunk/Scribus/scribus/ui/smcstylewidget.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/smcstylewidget.cpp	(original)
+++ trunk/Scribus/scribus/ui/smcstylewidget.cpp	Wed Oct 21 22:49:36 2015
@@ -93,6 +93,10 @@
 /***********************************/
 /*        End Tooltips             */
 /***********************************/
+
+	basicGroup->setTitle( tr("Basic Formatting"));
+	advGroup->setTitle( tr("Advanced Formatting"));
+	smColorGroup->setTitle( tr("Colors"));
 
 	parentLabel->setText( tr("Based On:"));
 	languageLabel_->setText( tr("Language:"));

Modified: trunk/Scribus/scribus/ui/smpstylewidget.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=20482&path=/trunk/Scribus/scribus/ui/smpstylewidget.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/smpstylewidget.cpp	(original)
+++ trunk/Scribus/scribus/ui/smpstylewidget.cpp	Wed Oct 21 22:49:36 2015
@@ -139,10 +139,14 @@
 /*      End Tooltips               */
 /***********************************/
 
+	int  oldLineSpacingModeIndex = lineSpacingMode->currentIndex();
+	bool lineSpacingModeBlocked = lineSpacingMode->blockSignals(true);
 	lineSpacingMode->clear();
 	lineSpacingMode->addItem( tr("Fixed Linespacing"));
 	lineSpacingMode->addItem( tr("Automatic Linespacing"));
 	lineSpacingMode->addItem( tr("Align to Baseline Grid"));
+	lineSpacingMode->setCurrentIndex(oldLineSpacingModeIndex);
+	lineSpacingMode->blockSignals(lineSpacingModeBlocked);
 
 //	optMarginCombo->clear();
 //	optMarginCombo->addItem(tr("None"), ParagraphStyle::OM_None);
@@ -160,6 +164,14 @@
 	parentLabel->setText( tr("Based On:"));
 	distancesBox->setTitle( tr("Alignment and Distances"));
 
+	textFlowBox->setTitle( tr("Orphans and Widows"));
+	keepLabelStart->setText( tr("Don't separate first"));
+	keepLinesStart->setSuffix( tr(" lines"));
+	keepLabelEnd->setText( tr("Don't separate last"));
+	keepLinesEnd->setSuffix( tr(" lines"));
+	keepTogether->setText( tr("Do not split paragraph"));
+	keepWithNext->setText( tr("Keep with next paragraph"));
+
 	//parEffectsBox->setTitle(tr("Paragraph Effects"));
 	bulletBox->setTitle(           tr("Bullets"));
 	bulletCharLabel->setText(      tr("Bullet Char/String"));
@@ -167,12 +179,20 @@
 
 	numBox->setTitle(       tr("Numeration"));
 	numLevelLabel->setText( tr("Level"));
+	numNewLabel->setText( tr("Create New Set:"));
 	numFormatLabel->setText(tr("Numbering Style"));
 	numStartLabel->setText( tr("Start with"));
 	numPrefixLabel->setText(tr("Prefix"));
 	numSuffixLabel->setText(tr("Suffix"));
+	numRestartLabel->setText( tr("Restart"));
 	numRestartOtherBox->setText( tr("Restart after other format"));
 	numRestartHigherBox->setText(tr("Restart after higher level"));
+
+	int  oldNumRestartIndex = numRestartCombo->currentIndex();
+	bool numRestartComboBlocked = numRestartCombo->blockSignals(true);
+	fillNumRestartCombo();
+	numRestartCombo->setCurrentIndex(oldNumRestartIndex);
+	numRestartCombo->blockSignals(numRestartComboBlocked);
 
 	dropCapsBox->setTitle( tr("Drop Caps"));
 	dropCapsLineLabel->setText( tr("Lines:"));

Modified: trunk/Scribus/scribus/ui/tabruler.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=20482&path=/trunk/Scribus/scribus/ui/tabruler.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/tabruler.cpp	(original)
+++ trunk/Scribus/scribus/ui/tabruler.cpp	Wed Oct 21 22:49:36 2015
@@ -664,6 +664,73 @@
 	haveF = haveFirst;
 }
 
+void Tabruler::changeEvent(QEvent *e)
+{
+	if (e->type() == QEvent::LanguageChange)
+	{
+		languageChange();
+		return;
+	}
+	QWidget::changeEvent(e);
+}
+
+void Tabruler::languageChange()
+{
+	int  oldTypeComboIndex = typeCombo->currentIndex();
+	bool typeComboBlocked = typeCombo->blockSignals(true);
+	typeCombo->clear();
+	typeCombo->addItem( tr( "Left" ) );
+	typeCombo->addItem( tr( "Right" ) );
+	typeCombo->addItem( tr( "Period" ) );
+	typeCombo->addItem( tr( "Comma" ) );
+	typeCombo->addItem( tr( "Center" ) );
+	typeCombo->setCurrentIndex(oldTypeComboIndex);
+	typeCombo->blockSignals(typeComboBlocked);
+
+	positionLabel->setText( tr("&Position:"));
+
+	int  oldTabFillComboIndex = tabFillCombo->currentIndex();
+	bool tabFillComboBlocked = tabFillCombo->blockSignals(true);
+	tabFillCombo->clear();
+	tabFillCombo->addItem( tr("None", "tab fill"));
+	tabFillCombo->addItem( tr("Dot"));
+	tabFillCombo->addItem( tr("Hyphen"));
+	tabFillCombo->addItem( tr("Underscore"));
+	tabFillCombo->addItem( tr("Custom"));
+	tabFillCombo->setCurrentIndex(oldTabFillComboIndex);
+	tabFillCombo->blockSignals(tabFillComboBlocked);
+
+	tabFillComboT->setText( tr( "Fill Char:" ));
+
+	clearButton->setText( tr( "Delete All" ) );
+	clearOneButton->setText( tr( "Delete Selected" ) );
+
+	tabFillCombo->setToolTip( tr( "Fill Character of Tab" ) );
+	typeCombo->setToolTip( tr( "Type/Orientation of Tab" ) );
+	tabData->setToolTip( tr( "Position of Tab" ) );
+
+	if (haveF)
+	{
+		firstLineData->setToolTip( tr( "Indentation for first line of the paragraph" ) );
+		leftIndentData->setToolTip( tr( "Indentation from the left for the whole paragraph" ) );
+		rightIndentData->setToolTip( tr( "Indentation from the right for the whole paragraph" ) );
+		firstLineLabel->setToolTip(firstLineData->toolTip());
+		leftIndentLabel->setToolTip(leftIndentData->toolTip());
+		rightIndentLabel->setToolTip(rightIndentData->toolTip());
+	}
+	clearButton->setToolTip( tr( "Delete all Tabulators" ) );
+	clearOneButton->setToolTip( tr("Delete selected Tabulator"));
+
+	QString unitSuffix = unitGetSuffixFromIndex(tabData->unitIndex());
+	if (haveF)
+	{
+		firstLineData->setSuffix(unitSuffix);
+		leftIndentData->setSuffix(unitSuffix);
+		rightIndentData->setSuffix(unitSuffix);
+	}
+	tabData->setSuffix(unitSuffix);
+}
+
 void Tabruler::setTabs(QList<ParagraphStyle::TabRecord> Tabs, int dEin)
 {
 	docUnitRatio=unitGetRatioFromIndex(dEin);

Modified: trunk/Scribus/scribus/ui/tabruler.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=20482&path=/trunk/Scribus/scribus/ui/tabruler.h
==============================================================================
--- trunk/Scribus/scribus/ui/tabruler.h	(original)
+++ trunk/Scribus/scribus/ui/tabruler.h	Wed Oct 21 22:49:36 2015
@@ -32,8 +32,10 @@
 public:
 	RulerT(QWidget* parent, int ein, QList<ParagraphStyle::TabRecord> Tabs, bool ind, double wid);
 	~RulerT() {};
+
 	void setTabs(QList<ParagraphStyle::TabRecord> Tabs, int dEin);
 	void updateTabList();
+
 	bool mousePressed;
 	QList<ParagraphStyle::TabRecord> tabValues;
 	bool haveInd;
@@ -92,6 +94,9 @@
 	          double wid = -1);
 	~Tabruler() {};
 
+	virtual void changeEvent(QEvent *e);
+
+	void languageChange();
 	virtual void setTabs(QList<ParagraphStyle::TabRecord> Tabs, int dEin);
 
 	QList<ParagraphStyle::TabRecord> getTabVals();




More information about the scribus-commit mailing list