r21611 by jghali - #14426: Fix non switching translation in TP hyphenation tab and cleanup duplicated strings <FirasH>

scribus-commit scribus-commit at lists.scribus.net
Thu Dec 8 08:12:45 UTC 2016


Author: jghali
Date: Thu Dec  8 08:12:45 2016
New Revision: 21611

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=21611
Log:
#14426: Fix non switching translation in TP hyphenation tab and cleanup duplicated strings <FirasH>

Modified:
    trunk/Scribus/scribus/ui/propertiespalette_text.cpp
    trunk/Scribus/scribus/ui/propertiespalette_textbase.ui
    trunk/Scribus/scribus/ui/propertywidget_advanced.cpp
    trunk/Scribus/scribus/ui/propertywidget_advancedbase.ui
    trunk/Scribus/scribus/ui/propertywidget_distance.cpp
    trunk/Scribus/scribus/ui/propertywidget_distancebase.ui
    trunk/Scribus/scribus/ui/propertywidget_flop.cpp
    trunk/Scribus/scribus/ui/propertywidget_flopbase.ui
    trunk/Scribus/scribus/ui/propertywidget_hyphenation.cpp
    trunk/Scribus/scribus/ui/propertywidget_optmargins.cpp
    trunk/Scribus/scribus/ui/propertywidget_textcolor.cpp
    trunk/Scribus/scribus/ui/propertywidget_textcolorbase.ui

Modified: trunk/Scribus/scribus/ui/propertiespalette_text.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21611&path=/trunk/Scribus/scribus/ui/propertiespalette_text.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/propertiespalette_text.cpp	(original)
+++ trunk/Scribus/scribus/ui/propertiespalette_text.cpp	Thu Dec  8 08:12:45 2016
@@ -727,8 +727,7 @@
 
 void PropertiesPalette_Text::languageChange()
 {
-	paraStyleLabel->setText( tr("Paragraph St&yle:"));
-	charStyleLabel->setText( tr("Character St&yle:"));
+	retranslateUi(this);
 
 //	colorWidgetsItem->setText(0, tr("Color && Effects"));
 //	flopItem->setText(0, tr("First Line Offset"));
@@ -755,10 +754,6 @@
 	langCombo->addItems(languageList);
 	langCombo->setCurrentIndex(oldLang);
 
-	QString ptSuffix = tr(" pt");
-	fontSize->setSuffix(ptSuffix);
-	lineSpacing->setSuffix(ptSuffix);
-
 	colorWidgets->languageChange();
 	flopBox->languageChange();
 	orphanBox->languageChange();
@@ -771,15 +766,6 @@
 
 	textAlignment->languageChange();
 	textDirection->languageChange();
-
-	fontSize->setToolTip( tr("Font Size"));
-	langCombo->setToolTip( tr("Text language"));
-	lineSpacing->setToolTip( tr("Line Spacing"));
-	lineSpacingModeCombo->setToolTip( tr("Select the line spacing mode") );
-	paraStyleCombo->setToolTip( tr("Paragraph style of currently selected text or paragraph"));
-	charStyleCombo->setToolTip( tr("Character style of currently selected text or paragraph"));
-	paraStyleClear->setToolTip( tr("Remove Direct Paragraph Formatting"));
-	charStyleClear->setToolTip( tr("Remove Direct Character Formatting"));
 }
 
 void PropertiesPalette_Text::handleFirstLinePolicy(int radioFlop)

Modified: trunk/Scribus/scribus/ui/propertiespalette_textbase.ui
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21611&path=/trunk/Scribus/scribus/ui/propertiespalette_textbase.ui
==============================================================================
--- trunk/Scribus/scribus/ui/propertiespalette_textbase.ui	(original)
+++ trunk/Scribus/scribus/ui/propertiespalette_textbase.ui	Thu Dec  8 08:12:45 2016
@@ -61,6 +61,12 @@
          <verstretch>0</verstretch>
         </sizepolicy>
        </property>
+       <property name="toolTip">
+        <string>Font Size</string>
+       </property>
+       <property name="suffix">
+        <string> pt</string>
+       </property>
       </widget>
      </item>
     </layout>
@@ -98,6 +104,9 @@
          <verstretch>0</verstretch>
         </sizepolicy>
        </property>
+       <property name="toolTip">
+        <string>Select the line spacing mode</string>
+       </property>
       </widget>
      </item>
      <item>
@@ -107,6 +116,12 @@
          <horstretch>0</horstretch>
          <verstretch>0</verstretch>
         </sizepolicy>
+       </property>
+       <property name="toolTip">
+        <string>Line Spacing</string>
+       </property>
+       <property name="suffix">
+        <string> pt</string>
        </property>
       </widget>
      </item>
@@ -135,6 +150,9 @@
      </item>
      <item>
       <widget class="QComboBox" name="langCombo">
+       <property name="toolTip">
+        <string>Text Language</string>
+       </property>
        <property name="editable">
         <bool>true</bool>
        </property>
@@ -163,7 +181,7 @@
         </sizepolicy>
        </property>
        <property name="text">
-        <string/>
+        <string>Paragraph St&yle:</string>
        </property>
        <property name="pixmap">
         <pixmap>../../resources/icons/Zeichen.xpm</pixmap>
@@ -177,6 +195,9 @@
          <horstretch>0</horstretch>
          <verstretch>0</verstretch>
         </sizepolicy>
+       </property>
+       <property name="toolTip">
+        <string>Paragraph style of currently selected text or paragraph</string>
        </property>
       </widget>
      </item>
@@ -188,6 +209,9 @@
          <height>22</height>
         </size>
        </property>
+       <property name="toolTip">
+        <string>Remove Direct Paragraph Formatting</string>
+       </property>
        <property name="text">
         <string/>
        </property>
@@ -210,7 +234,7 @@
         </sizepolicy>
        </property>
        <property name="text">
-        <string/>
+        <string>Character St&yle:</string>
        </property>
        <property name="pixmap">
         <pixmap>../../resources/icons/Zeichen.xpm</pixmap>
@@ -224,6 +248,9 @@
          <horstretch>0</horstretch>
          <verstretch>0</verstretch>
         </sizepolicy>
+       </property>
+       <property name="toolTip">
+        <string>Character style of currently selected text or paragraph</string>
        </property>
       </widget>
      </item>
@@ -234,6 +261,9 @@
          <width>22</width>
          <height>22</height>
         </size>
+       </property>
+       <property name="toolTip">
+        <string>Remove Direct Character Formatting</string>
        </property>
        <property name="text">
         <string/>

Modified: trunk/Scribus/scribus/ui/propertywidget_advanced.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21611&path=/trunk/Scribus/scribus/ui/propertywidget_advanced.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/propertywidget_advanced.cpp	(original)
+++ trunk/Scribus/scribus/ui/propertywidget_advanced.cpp	Thu Dec  8 08:12:45 2016
@@ -368,30 +368,5 @@
 
 void PropertyWidget_Advanced::languageChange()
 {
-	wordTrackingLabel->setText( tr("Word Tracking"));
-	minWordTrackingLabel->setText( tr("Min:"));
-	normWordTrackingLabel->setText( tr("Norm:"));
-	glyphExtensionLabel->setText( tr("Glyph Extension"));
-	minGlyphExtensionLabel->setText( tr("Min:"));
-	maxGlyphExtensionLabel->setText( tr("Max:"));
-
-	QString pctSuffix=tr(" %");
-	textBase->setSuffix(pctSuffix);
-	scaleH->setSuffix(pctSuffix);
-	scaleV->setSuffix(pctSuffix);
-	tracking->setSuffix(pctSuffix);
-	minWordTrackingSpinBox->setSuffix(pctSuffix);
-	normWordTrackingSpinBox->setSuffix(pctSuffix);
-	minGlyphExtSpinBox->setSuffix(pctSuffix);
-	maxGlyphExtSpinBox->setSuffix(pctSuffix);
-
-	textBase->setToolTip( tr("Offset to baseline of characters"));
-	tracking->setToolTip( tr("Manual Tracking"));
-	scaleH->setToolTip( tr("Scaling width of characters"));
-	scaleV->setToolTip( tr("Scaling height of characters"));
-
-	minWordTrackingSpinBox->setToolTip( tr("Minimal width of spaces between words"));
-	normWordTrackingSpinBox->setToolTip( tr("Normal width of spaces between words"));
-	minGlyphExtSpinBox->setToolTip( tr("Minimal shrinkage of glyphs for justification"));
-	maxGlyphExtSpinBox->setToolTip( tr("Maximal extension of glyphs for justification"));
-}
+	retranslateUi(this);
+}

Modified: trunk/Scribus/scribus/ui/propertywidget_advancedbase.ui
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21611&path=/trunk/Scribus/scribus/ui/propertywidget_advancedbase.ui
==============================================================================
--- trunk/Scribus/scribus/ui/propertywidget_advancedbase.ui	(original)
+++ trunk/Scribus/scribus/ui/propertywidget_advancedbase.ui	Thu Dec  8 08:12:45 2016
@@ -20,7 +20,16 @@
    <enum>QFrame::Raised</enum>
   </property>
   <layout class="QGridLayout" name="gridLayout">
-   <property name="margin">
+   <property name="leftMargin">
+    <number>3</number>
+   </property>
+   <property name="topMargin">
+    <number>3</number>
+   </property>
+   <property name="rightMargin">
+    <number>3</number>
+   </property>
+   <property name="bottomMargin">
     <number>3</number>
    </property>
    <property name="spacing">
@@ -35,6 +44,12 @@
    </item>
    <item row="0" column="1">
     <widget class="ScrSpinBox" name="textBase">
+     <property name="toolTip">
+      <string>Offset to baseline of characters</string>
+     </property>
+     <property name="suffix">
+      <string> %</string>
+     </property>
      <property name="minimum">
       <double>-100.000000000000000</double>
      </property>
@@ -51,7 +66,14 @@
     </widget>
    </item>
    <item row="0" column="3">
-    <widget class="ScrSpinBox" name="tracking"/>
+    <widget class="ScrSpinBox" name="tracking">
+     <property name="toolTip">
+      <string>Manual Tracking</string>
+     </property>
+     <property name="suffix">
+      <string> %</string>
+     </property>
+    </widget>
    </item>
    <item row="1" column="0">
     <widget class="QLabel" name="scaleHLabel">
@@ -61,7 +83,14 @@
     </widget>
    </item>
    <item row="1" column="1">
-    <widget class="ScrSpinBox" name="scaleH"/>
+    <widget class="ScrSpinBox" name="scaleH">
+     <property name="toolTip">
+      <string>Scaling width of characters</string>
+     </property>
+     <property name="suffix">
+      <string> %</string>
+     </property>
+    </widget>
    </item>
    <item row="1" column="2">
     <widget class="QLabel" name="scaleVLabel">
@@ -71,12 +100,19 @@
     </widget>
    </item>
    <item row="1" column="3">
-    <widget class="ScrSpinBox" name="scaleV"/>
+    <widget class="ScrSpinBox" name="scaleV">
+     <property name="toolTip">
+      <string>Scaling height of characters</string>
+     </property>
+     <property name="suffix">
+      <string> %</string>
+     </property>
+    </widget>
    </item>
    <item row="2" column="0" colspan="2">
     <widget class="QLabel" name="wordTrackingLabel">
      <property name="text">
-      <string>Word Spacing</string>
+      <string>Word Tracking</string>
      </property>
     </widget>
    </item>
@@ -89,6 +125,12 @@
    </item>
    <item row="3" column="1">
     <widget class="ScrSpinBox" name="minWordTrackingSpinBox">
+     <property name="toolTip">
+      <string>Minimal width of spaces between words</string>
+     </property>
+     <property name="suffix">
+      <string> %</string>
+     </property>
      <property name="minimum">
       <double>1.000000000000000</double>
      </property>
@@ -102,6 +144,12 @@
    </item>
    <item row="3" column="3">
     <widget class="ScrSpinBox" name="normWordTrackingSpinBox">
+     <property name="toolTip">
+      <string>Normal width of spaces between words</string>
+     </property>
+     <property name="suffix">
+      <string> %</string>
+     </property>
      <property name="minimum">
       <double>1.000000000000000</double>
      </property>
@@ -116,7 +164,7 @@
    <item row="3" column="2">
     <widget class="QLabel" name="normWordTrackingLabel">
      <property name="text">
-      <string>Max:</string>
+      <string>Norm:</string>
      </property>
     </widget>
    </item>
@@ -136,6 +184,12 @@
    </item>
    <item row="5" column="1">
     <widget class="ScrSpinBox" name="minGlyphExtSpinBox">
+     <property name="toolTip">
+      <string>Minimal shrinkage of glyphs for justification</string>
+     </property>
+     <property name="suffix">
+      <string> %</string>
+     </property>
      <property name="minimum">
       <double>90.000000000000000</double>
      </property>
@@ -149,6 +203,12 @@
    </item>
    <item row="5" column="3">
     <widget class="ScrSpinBox" name="maxGlyphExtSpinBox">
+     <property name="toolTip">
+      <string>Maximal extension of glyphs for justification</string>
+     </property>
+     <property name="suffix">
+      <string> %</string>
+     </property>
      <property name="minimum">
       <double>90.000000000000000</double>
      </property>

Modified: trunk/Scribus/scribus/ui/propertywidget_distance.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21611&path=/trunk/Scribus/scribus/ui/propertywidget_distance.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/propertywidget_distance.cpp	(original)
+++ trunk/Scribus/scribus/ui/propertywidget_distance.cpp	Thu Dec  8 08:12:45 2016
@@ -436,9 +436,7 @@
 
 void PropertyWidget_Distance::languageChange()
 {
-	columnsLabel->setText( tr("Colu&mns:"));
-
-	verticalAlignLabel->setText( tr("Vertical Alignment:"));
+	retranslateUi(this);
 
 	QSignalBlocker verticalAlignBlocker(verticalAlign);
 	int oldAlignIndex = verticalAlign->currentIndex();
@@ -455,13 +453,6 @@
 	columnGapLabel->addItem( tr("Width:"));
 	columnGapLabel->setCurrentIndex(oldColGapLabel);
 
-	topLabel->setText( tr("To&p:"));
-	bottomLabel->setText( tr("&Bottom:"));
-	leftLabel->setText( tr("&Left:"));
-	rightLabel->setText( tr("&Right:"));
-
-	tabsButton->setText( tr("T&abulators..."));
-
 	QString ptSuffix = tr(" pt");
 
 	QString suffix = (m_doc) ? unitGetSuffixFromIndex(m_doc->unitIndex()) : ptSuffix;
@@ -471,15 +462,6 @@
 	topDistance->setSuffix(suffix);
 	bottomDistance->setSuffix(suffix);
 	rightDistance->setSuffix(suffix);
-
-	columns->setToolTip( tr("Number of columns in text frame"));
-	columnGapLabel->setToolTip( tr("Switches between Gap or Column width"));
-	columnGap->setToolTip( tr("Distance between columns"));
-	topDistance->setToolTip( tr("Distance of text from top of frame"));
-	bottomDistance->setToolTip( tr("Distance of text from bottom of frame"));
-	leftDistance->setToolTip( tr("Distance of text from left of frame"));
-	rightDistance->setToolTip( tr("Distance of text from right of frame"));
-	tabsButton->setToolTip( tr("Edit tab settings of text frame..."));
 }
 
 void PropertyWidget_Distance::unitChange()

Modified: trunk/Scribus/scribus/ui/propertywidget_distancebase.ui
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21611&path=/trunk/Scribus/scribus/ui/propertywidget_distancebase.ui
==============================================================================
--- trunk/Scribus/scribus/ui/propertywidget_distancebase.ui	(original)
+++ trunk/Scribus/scribus/ui/propertywidget_distancebase.ui	Thu Dec  8 08:12:45 2016
@@ -6,7 +6,7 @@
    <rect>
     <x>0</x>
     <y>0</y>
-    <width>186</width>
+    <width>187</width>
     <height>223</height>
    </rect>
   </property>
@@ -38,7 +38,7 @@
    <item row="0" column="0">
     <widget class="QLabel" name="verticalAlignLabel">
      <property name="text">
-      <string>Vertical Alignment</string>
+      <string>Vertical Alignment:</string>
      </property>
     </widget>
    </item>
@@ -70,6 +70,9 @@
    </item>
    <item row="1" column="1">
     <widget class="ScrSpinBox" name="columns">
+     <property name="toolTip">
+      <string>Number of columns in text frame</string>
+     </property>
      <property name="minimum">
       <double>1.000000000000000</double>
      </property>
@@ -80,6 +83,9 @@
    </item>
    <item row="2" column="0">
     <widget class="ScComboBox" name="columnGapLabel">
+     <property name="toolTip">
+      <string>Switches between Gap or Column width</string>
+     </property>
      <item>
       <property name="text">
        <string>Gap:</string>
@@ -93,7 +99,11 @@
     </widget>
    </item>
    <item row="2" column="1">
-    <widget class="ScrSpinBox" name="columnGap"/>
+    <widget class="ScrSpinBox" name="columnGap">
+     <property name="toolTip">
+      <string>Distance between columns</string>
+     </property>
+    </widget>
    </item>
    <item row="3" column="0">
     <widget class="QLabel" name="topLabel">
@@ -103,7 +113,11 @@
     </widget>
    </item>
    <item row="3" column="1">
-    <widget class="ScrSpinBox" name="topDistance"/>
+    <widget class="ScrSpinBox" name="topDistance">
+     <property name="toolTip">
+      <string>Distance of text from top of frame</string>
+     </property>
+    </widget>
    </item>
    <item row="4" column="0">
     <widget class="QLabel" name="bottomLabel">
@@ -113,7 +127,11 @@
     </widget>
    </item>
    <item row="4" column="1">
-    <widget class="ScrSpinBox" name="bottomDistance"/>
+    <widget class="ScrSpinBox" name="bottomDistance">
+     <property name="toolTip">
+      <string>Distance of text from bottom of frame</string>
+     </property>
+    </widget>
    </item>
    <item row="5" column="0">
     <widget class="QLabel" name="leftLabel">
@@ -123,7 +141,11 @@
     </widget>
    </item>
    <item row="5" column="1">
-    <widget class="ScrSpinBox" name="leftDistance"/>
+    <widget class="ScrSpinBox" name="leftDistance">
+     <property name="toolTip">
+      <string>Distance of text from left of frame</string>
+     </property>
+    </widget>
    </item>
    <item row="6" column="0">
     <widget class="QLabel" name="rightLabel">
@@ -133,7 +155,11 @@
     </widget>
    </item>
    <item row="6" column="1">
-    <widget class="ScrSpinBox" name="rightDistance"/>
+    <widget class="ScrSpinBox" name="rightDistance">
+     <property name="toolTip">
+      <string>Distance of text from right of frame</string>
+     </property>
+    </widget>
    </item>
    <item row="7" column="0" colspan="2">
     <widget class="QToolButton" name="tabsButton">
@@ -142,6 +168,9 @@
        <horstretch>0</horstretch>
        <verstretch>0</verstretch>
       </sizepolicy>
+     </property>
+     <property name="toolTip">
+      <string>Edit tab settings of text frame...</string>
      </property>
      <property name="text">
       <string>T&abulators...</string>

Modified: trunk/Scribus/scribus/ui/propertywidget_flop.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21611&path=/trunk/Scribus/scribus/ui/propertywidget_flop.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/propertywidget_flop.cpp	(original)
+++ trunk/Scribus/scribus/ui/propertywidget_flop.cpp	Thu Dec  8 08:12:45 2016
@@ -51,13 +51,5 @@
 
 void PropertyWidget_Flop::languageChange()
 {
-	flopRealHeight->setText( tr("Maximum Ascent") );
-	flopFontAscent->setText( tr("Font Ascent") );
-	flopLineSpacing->setText( tr("Line Spacing") );
-	flopBaselineGrid->setText( tr("Baseline Grid") );
-	
-	flopRealHeight->setToolTip( "<qt>" + tr("Set the height of the first line of the text frame to use the tallest height of the included characters") + "</qt>" );
-	flopFontAscent->setToolTip( "<qt>" + tr("Set the height of the first line of text frame to use the full ascent of the font(s) in use") + "</qt>" );
-	flopLineSpacing->setToolTip( "<qt>" + tr("Set the height of the first line of the text frame to the specified line height") + "</qt>" );
-	flopBaselineGrid->setToolTip( "<qt>" + tr("Set the base line of the first line of the text frame to the base line grid") + "</qt>" );
+	retranslateUi(this);
 }

Modified: trunk/Scribus/scribus/ui/propertywidget_flopbase.ui
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21611&path=/trunk/Scribus/scribus/ui/propertywidget_flopbase.ui
==============================================================================
--- trunk/Scribus/scribus/ui/propertywidget_flopbase.ui	(original)
+++ trunk/Scribus/scribus/ui/propertywidget_flopbase.ui	Thu Dec  8 08:12:45 2016
@@ -7,7 +7,7 @@
     <x>0</x>
     <y>0</y>
     <width>218</width>
-    <height>88</height>
+    <height>126</height>
    </rect>
   </property>
   <property name="windowTitle">
@@ -22,41 +22,53 @@
   <layout class="QVBoxLayout" name="verticalLayout">
    <item>
     <widget class="QRadioButton" name="flopRealHeight">
+     <property name="toolTip">
+      <string>Set the height of the first line of the text frame to use the tallest height of the included characters</string>
+     </property>
      <property name="text">
       <string>Maximum Ascent</string>
      </property>
      <attribute name="buttonGroup">
-      <string>flopGroup</string>
+      <string notr="true">flopGroup</string>
      </attribute>
     </widget>
    </item>
    <item>
     <widget class="QRadioButton" name="flopFontAscent">
+     <property name="toolTip">
+      <string>Set the height of the first line of text frame to use the full ascent of the font(s) in use</string>
+     </property>
      <property name="text">
       <string>Font Ascent</string>
      </property>
      <attribute name="buttonGroup">
-      <string>flopGroup</string>
+      <string notr="true">flopGroup</string>
      </attribute>
     </widget>
    </item>
    <item>
     <widget class="QRadioButton" name="flopLineSpacing">
+     <property name="toolTip">
+      <string>Set the height of the first line of the text frame to the specified line height</string>
+     </property>
      <property name="text">
       <string>Line Spacing</string>
      </property>
      <attribute name="buttonGroup">
-      <string>flopGroup</string>
+      <string notr="true">flopGroup</string>
      </attribute>
     </widget>
    </item>
    <item>
     <widget class="QRadioButton" name="flopBaselineGrid">
+     <property name="toolTip">
+      <string>Set the base line of the first line of the text frame to the base line grid</string>
+     </property>
      <property name="text">
       <string>Baseline Grid</string>
      </property>
      <attribute name="buttonGroup">
-      <string>flopGroup</string>
+      <string notr="true">flopGroup</string>
      </attribute>
     </widget>
    </item>

Modified: trunk/Scribus/scribus/ui/propertywidget_hyphenation.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21611&path=/trunk/Scribus/scribus/ui/propertywidget_hyphenation.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/propertywidget_hyphenation.cpp	(original)
+++ trunk/Scribus/scribus/ui/propertywidget_hyphenation.cpp	Thu Dec  8 08:12:45 2016
@@ -1,200 +1,201 @@
-/*
-For general Scribus (>=1.3.2) copyright and licensing information please refer
-to the COPYING file provided with the program. Following this notice may exist
-a copyright and/or license notice that predates the release of Scribus 1.3.2
-for which a new license (GPL+exception) is in place.
-*/
-#include "propertywidget_hyphenation.h"
-
-#include "appmodes.h"
-#include "pageitem_table.h"
-#include "iconmanager.h"
-#include "scribus.h"
-#include "scribusdoc.h"
-#include "selection.h"
-
-PropertyWidget_Hyphenation::PropertyWidget_Hyphenation(QWidget* parent)
-	: QFrame(parent)
-{
-	m_item = NULL;
-	m_ScMW = NULL;
-	setupUi(this);
-
-	setFrameStyle(QFrame::Box | QFrame::Plain);
-	setLineWidth(1);
-	layout()->setAlignment( Qt::AlignTop );
-	languageChange();
-}
-
-void PropertyWidget_Hyphenation::setMainWindow(ScribusMainWindow *mw)
-{
-	m_ScMW = mw;
-}
-
-void PropertyWidget_Hyphenation::changeEvent(QEvent *e)
-{
-	if (e->type() == QEvent::LanguageChange)
-	{
-		languageChange();
-		return;
-	}
-	QWidget::changeEvent(e);
-}
-
-void PropertyWidget_Hyphenation::languageChange()
-{
-}
-
-void PropertyWidget_Hyphenation::handleWordMin(int minWord)
-{
-	if (!m_doc || !m_item || !m_ScMW || m_ScMW->scriptIsRunning())
-		return;
-
-	Selection tempSelection(this, false);
-	tempSelection.addItem(m_item, true);
-	m_doc->itemSelection_SetHyphenWordMin(minWord, &tempSelection);
-}
-
-void PropertyWidget_Hyphenation::handleConsecutiveLines(int consecutiveLines)
-{
-	if (!m_doc || !m_item || !m_ScMW || m_ScMW->scriptIsRunning())
-		return;
-
-	Selection tempSelection(this, false);
-	tempSelection.addItem(m_item, true);
-	m_doc->itemSelection_SetHyphenConsecutiveLines(consecutiveLines, &tempSelection);
-}
-
-void PropertyWidget_Hyphenation::handleHyphenChar(const QString& hyphenText)
-{
-	if (!m_doc || !m_item || !m_ScMW || m_ScMW->scriptIsRunning())
-		return;
-
-	Selection tempSelection(this, false);
-	uint hyphenChar;
-	if (hyphenText.isEmpty())
-		hyphenChar = 0;
-	else
-		hyphenChar = hyphenText.toUcs4()[0];
-	qDebug() << hyphenChar;
-	tempSelection.addItem(m_item, true);
-	m_doc->itemSelection_SetHyphenChar(hyphenChar, &tempSelection);
-}
-
-void PropertyWidget_Hyphenation::setDoc(ScribusDoc *d)
-{
-	if((d == (ScribusDoc*) m_doc) || (m_ScMW && m_ScMW->scriptIsRunning()))
-		return;
-
-	if (m_doc)
-	{
-		disconnect(m_doc->m_Selection, SIGNAL(selectionChanged()), this, SLOT(handleSelectionChanged()));
-		disconnect(m_doc             , SIGNAL(docChanged())      , this, SLOT(handleSelectionChanged()));
-	}
-
-	m_doc  = d;
-	m_item = NULL;
-
-	if (m_doc.isNull())
-	{
-		disconnectSignals();
-		return;
-	}
-
-	connect(m_doc->m_Selection, SIGNAL(selectionChanged()), this, SLOT(handleSelectionChanged()));
-	connect(m_doc             , SIGNAL(docChanged())      , this, SLOT(handleSelectionChanged()));
-}
-
-void PropertyWidget_Hyphenation::handleSelectionChanged()
-{
-	if (!m_doc || !m_ScMW || m_ScMW->scriptIsRunning())
-		return;
-
-	PageItem* currItem = currentItemFromSelection();
-	setCurrentItem(currItem);
-	updateGeometry();
-	repaint();
-}
-
-void PropertyWidget_Hyphenation::updateCharStyle(const CharStyle& charStyle)
-{
-	if (!m_ScMW || m_ScMW->scriptIsRunning())
-		return;
-
-	smallestWordSpinBox->setValue(charStyle.hyphenWordMin());
-	uint hyphenChar = charStyle.hyphenChar();
-	QString hyphenText;
-	if (hyphenChar)
-		hyphenText = QString::fromUcs4(&hyphenChar, 1);
-	hyphenCharLineEdit->setText(hyphenText);
-}
-
-void PropertyWidget_Hyphenation::updateStyle(const ParagraphStyle& paraStyle)
-{
-	if (!m_ScMW || m_ScMW->scriptIsRunning())
-		return;
-
-	const CharStyle& charStyle = paraStyle.charStyle();
-	updateCharStyle(charStyle);
-
-	maxConsecutiveCountSpinBox->setValue(paraStyle.hyphenConsecutiveLines());
-}
-
-void PropertyWidget_Hyphenation::connectSignals()
-{
-	connect(smallestWordSpinBox,        SIGNAL(valueChanged(int)), this, SLOT(handleWordMin(int)));
-	connect(maxConsecutiveCountSpinBox, SIGNAL(valueChanged(int)), this, SLOT(handleConsecutiveLines(int)));
-	connect(hyphenCharLineEdit,         SIGNAL(textChanged(const QString&)), this, SLOT(handleHyphenChar(const QString&)));
-}
-
-void PropertyWidget_Hyphenation::disconnectSignals()
-{
-	disconnect(smallestWordSpinBox,        SIGNAL(valueChanged(int)), this, SLOT(handleWordMin(int)));
-	disconnect(maxConsecutiveCountSpinBox, SIGNAL(valueChanged(int)), this, SLOT(handleConsecutiveLines(int)));
-	disconnect(hyphenCharLineEdit,         SIGNAL(textChanged(const QString&)), this, SLOT(handleHyphenChar(const QString&)));
-}
-
-void PropertyWidget_Hyphenation::configureWidgets(void)
-{
-	bool enabled = false;
-	if (m_item && m_doc)
-	{
-		if (m_item->asPathText() || m_item->asTextFrame() || m_item->asTable())
-			enabled = true;
-		if ((m_item->isGroup()) && (!m_item->isSingleSel))
-			enabled = false;
-		if (m_item->asOSGFrame() || m_item->asSymbolFrame())
-			enabled = false;
-		if (m_doc->m_Selection->count() > 1)
-			enabled = false;
-	}
-	setEnabled(enabled);
-}
-
-void PropertyWidget_Hyphenation::setCurrentItem(PageItem *item)
-{
-	if (!m_ScMW || m_ScMW->scriptIsRunning())
-		return;
-
-	if (item && m_doc.isNull())
-		setDoc(item->doc());
-
-	m_item = item;
-
-	disconnectSignals();
-	configureWidgets();
-
-	if (m_item)
-	{
-		if (m_item->asTextFrame() || m_item->asPathText() || m_item->asTable())
-		{
-			ParagraphStyle parStyle =  m_item->itemText.defaultStyle();
-			if (m_doc->appMode == modeEdit)
-				m_item->currentTextProps(parStyle);
-			else if (m_doc->appMode == modeEditTable)
-				m_item->asTable()->activeCell().textFrame()->currentTextProps(parStyle);
-			updateStyle(parStyle);
-		}
-		connectSignals();
-	}
-}
+/*
+For general Scribus (>=1.3.2) copyright and licensing information please refer
+to the COPYING file provided with the program. Following this notice may exist
+a copyright and/or license notice that predates the release of Scribus 1.3.2
+for which a new license (GPL+exception) is in place.
+*/
+#include "propertywidget_hyphenation.h"
+
+#include "appmodes.h"
+#include "pageitem_table.h"
+#include "iconmanager.h"
+#include "scribus.h"
+#include "scribusdoc.h"
+#include "selection.h"
+
+PropertyWidget_Hyphenation::PropertyWidget_Hyphenation(QWidget* parent)
+	: QFrame(parent)
+{
+	m_item = NULL;
+	m_ScMW = NULL;
+	setupUi(this);
+
+	setFrameStyle(QFrame::Box | QFrame::Plain);
+	setLineWidth(1);
+	layout()->setAlignment( Qt::AlignTop );
+	languageChange();
+}
+
+void PropertyWidget_Hyphenation::setMainWindow(ScribusMainWindow *mw)
+{
+	m_ScMW = mw;
+}
+
+void PropertyWidget_Hyphenation::changeEvent(QEvent *e)
+{
+	if (e->type() == QEvent::LanguageChange)
+	{
+		languageChange();
+		return;
+	}
+	QWidget::changeEvent(e);
+}
+
+void PropertyWidget_Hyphenation::languageChange()
+{
+	retranslateUi(this);
+}
+
+void PropertyWidget_Hyphenation::handleWordMin(int minWord)
+{
+	if (!m_doc || !m_item || !m_ScMW || m_ScMW->scriptIsRunning())
+		return;
+
+	Selection tempSelection(this, false);
+	tempSelection.addItem(m_item, true);
+	m_doc->itemSelection_SetHyphenWordMin(minWord, &tempSelection);
+}
+
+void PropertyWidget_Hyphenation::handleConsecutiveLines(int consecutiveLines)
+{
+	if (!m_doc || !m_item || !m_ScMW || m_ScMW->scriptIsRunning())
+		return;
+
+	Selection tempSelection(this, false);
+	tempSelection.addItem(m_item, true);
+	m_doc->itemSelection_SetHyphenConsecutiveLines(consecutiveLines, &tempSelection);
+}
+
+void PropertyWidget_Hyphenation::handleHyphenChar(const QString& hyphenText)
+{
+	if (!m_doc || !m_item || !m_ScMW || m_ScMW->scriptIsRunning())
+		return;
+
+	Selection tempSelection(this, false);
+	uint hyphenChar;
+	if (hyphenText.isEmpty())
+		hyphenChar = 0;
+	else
+		hyphenChar = hyphenText.toUcs4()[0];
+	qDebug() << hyphenChar;
+	tempSelection.addItem(m_item, true);
+	m_doc->itemSelection_SetHyphenChar(hyphenChar, &tempSelection);
+}
+
+void PropertyWidget_Hyphenation::setDoc(ScribusDoc *d)
+{
+	if((d == (ScribusDoc*) m_doc) || (m_ScMW && m_ScMW->scriptIsRunning()))
+		return;
+
+	if (m_doc)
+	{
+		disconnect(m_doc->m_Selection, SIGNAL(selectionChanged()), this, SLOT(handleSelectionChanged()));
+		disconnect(m_doc             , SIGNAL(docChanged())      , this, SLOT(handleSelectionChanged()));
+	}
+
+	m_doc  = d;
+	m_item = NULL;
+
+	if (m_doc.isNull())
+	{
+		disconnectSignals();
+		return;
+	}
+
+	connect(m_doc->m_Selection, SIGNAL(selectionChanged()), this, SLOT(handleSelectionChanged()));
+	connect(m_doc             , SIGNAL(docChanged())      , this, SLOT(handleSelectionChanged()));
+}
+
+void PropertyWidget_Hyphenation::handleSelectionChanged()
+{
+	if (!m_doc || !m_ScMW || m_ScMW->scriptIsRunning())
+		return;
+
+	PageItem* currItem = currentItemFromSelection();
+	setCurrentItem(currItem);
+	updateGeometry();
+	repaint();
+}
+
+void PropertyWidget_Hyphenation::updateCharStyle(const CharStyle& charStyle)
+{
+	if (!m_ScMW || m_ScMW->scriptIsRunning())
+		return;
+
+	smallestWordSpinBox->setValue(charStyle.hyphenWordMin());
+	uint hyphenChar = charStyle.hyphenChar();
+	QString hyphenText;
+	if (hyphenChar)
+		hyphenText = QString::fromUcs4(&hyphenChar, 1);
+	hyphenCharLineEdit->setText(hyphenText);
+}
+
+void PropertyWidget_Hyphenation::updateStyle(const ParagraphStyle& paraStyle)
+{
+	if (!m_ScMW || m_ScMW->scriptIsRunning())
+		return;
+
+	const CharStyle& charStyle = paraStyle.charStyle();
+	updateCharStyle(charStyle);
+
+	maxConsecutiveCountSpinBox->setValue(paraStyle.hyphenConsecutiveLines());
+}
+
+void PropertyWidget_Hyphenation::connectSignals()
+{
+	connect(smallestWordSpinBox,        SIGNAL(valueChanged(int)), this, SLOT(handleWordMin(int)));
+	connect(maxConsecutiveCountSpinBox, SIGNAL(valueChanged(int)), this, SLOT(handleConsecutiveLines(int)));
+	connect(hyphenCharLineEdit,         SIGNAL(textChanged(const QString&)), this, SLOT(handleHyphenChar(const QString&)));
+}
+
+void PropertyWidget_Hyphenation::disconnectSignals()
+{
+	disconnect(smallestWordSpinBox,        SIGNAL(valueChanged(int)), this, SLOT(handleWordMin(int)));
+	disconnect(maxConsecutiveCountSpinBox, SIGNAL(valueChanged(int)), this, SLOT(handleConsecutiveLines(int)));
+	disconnect(hyphenCharLineEdit,         SIGNAL(textChanged(const QString&)), this, SLOT(handleHyphenChar(const QString&)));
+}
+
+void PropertyWidget_Hyphenation::configureWidgets(void)
+{
+	bool enabled = false;
+	if (m_item && m_doc)
+	{
+		if (m_item->asPathText() || m_item->asTextFrame() || m_item->asTable())
+			enabled = true;
+		if ((m_item->isGroup()) && (!m_item->isSingleSel))
+			enabled = false;
+		if (m_item->asOSGFrame() || m_item->asSymbolFrame())
+			enabled = false;
+		if (m_doc->m_Selection->count() > 1)
+			enabled = false;
+	}
+	setEnabled(enabled);
+}
+
+void PropertyWidget_Hyphenation::setCurrentItem(PageItem *item)
+{
+	if (!m_ScMW || m_ScMW->scriptIsRunning())
+		return;
+
+	if (item && m_doc.isNull())
+		setDoc(item->doc());
+
+	m_item = item;
+
+	disconnectSignals();
+	configureWidgets();
+
+	if (m_item)
+	{
+		if (m_item->asTextFrame() || m_item->asPathText() || m_item->asTable())
+		{
+			ParagraphStyle parStyle =  m_item->itemText.defaultStyle();
+			if (m_doc->appMode == modeEdit)
+				m_item->currentTextProps(parStyle);
+			else if (m_doc->appMode == modeEditTable)
+				m_item->asTable()->activeCell().textFrame()->currentTextProps(parStyle);
+			updateStyle(parStyle);
+		}
+		connectSignals();
+	}
+}

Modified: trunk/Scribus/scribus/ui/propertywidget_optmargins.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21611&path=/trunk/Scribus/scribus/ui/propertywidget_optmargins.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/propertywidget_optmargins.cpp	(original)
+++ trunk/Scribus/scribus/ui/propertywidget_optmargins.cpp	Thu Dec  8 08:12:45 2016
@@ -215,9 +215,5 @@
 
 void PropertyWidget_OptMargins::languageChange()
 {
-	optMarginRadioNone->setText( tr("None","optical margins") );
-	optMarginRadioBoth->setText( tr("Both Sides","optical margins") );
-	optMarginRadioLeft->setText( tr("Left Only","optical margins") );
-	optMarginRadioRight->setText( tr("Right Only","optical margins") );
-	optMarginResetButton->setText( tr("Reset") );
-}
+	retranslateUi(this);
+}

Modified: trunk/Scribus/scribus/ui/propertywidget_textcolor.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21611&path=/trunk/Scribus/scribus/ui/propertywidget_textcolor.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/propertywidget_textcolor.cpp	(original)
+++ trunk/Scribus/scribus/ui/propertywidget_textcolor.cpp	Thu Dec  8 08:12:45 2016
@@ -516,13 +516,5 @@
 void PropertyWidget_TextColor::languageChange()
 {
 	retranslateUi(this);
-
 	textEffects->languageChange();
-
-	fillColor->setToolTip( "<qt>" + tr("Color of selected text. If Outline text decoration is enabled, this color will be the fill color. If Drop Shadow Text is enabled, then this will be the top most color.") + "</qt>" );
-	strokeColor->setToolTip( "<qt>" + tr("Color of text stroke and/or drop shadow, depending which is chosen. If both are chosen, then they share the same color.") + "</qt>" );
-	backColor->setToolTip( "<qt>" + tr("Background color of selected text") + "</qt>" );
-	fillShade->setToolTip( tr("Saturation of color of text fill"));
-	strokeShade->setToolTip( tr("Saturation of color of text stroke"));
-	backShade->setToolTip( tr("Saturation of color of text background"));
-}
+}

Modified: trunk/Scribus/scribus/ui/propertywidget_textcolorbase.ui
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21611&path=/trunk/Scribus/scribus/ui/propertywidget_textcolorbase.ui
==============================================================================
--- trunk/Scribus/scribus/ui/propertywidget_textcolorbase.ui	(original)
+++ trunk/Scribus/scribus/ui/propertywidget_textcolorbase.ui	Thu Dec  8 08:12:45 2016
@@ -58,6 +58,9 @@
          <verstretch>0</verstretch>
         </sizepolicy>
        </property>
+       <property name="toolTip">
+        <string>Color of selected text. If Outline text decoration is enabled, this color will be the fill color. If Drop Shadow Text is enabled, then this will be the top most color.</string>
+       </property>
       </widget>
      </item>
      <item>
@@ -72,6 +75,9 @@
      </item>
      <item>
       <widget class="ShadeButton" name="fillShade">
+       <property name="toolTip">
+        <string>Saturation of color of text fill</string>
+       </property>
        <property name="text">
         <string/>
        </property>
@@ -114,6 +120,9 @@
          <verstretch>0</verstretch>
         </sizepolicy>
        </property>
+       <property name="toolTip">
+        <string>Color of text stroke and/or drop shadow, depending which is chosen. If both are chosen, then they share the same color.</string>
+       </property>
       </widget>
      </item>
      <item>
@@ -128,6 +137,9 @@
      </item>
      <item>
       <widget class="ShadeButton" name="strokeShade">
+       <property name="toolTip">
+        <string>Saturation of color of text stroke</string>
+       </property>
        <property name="text">
         <string/>
        </property>
@@ -158,6 +170,9 @@
          <verstretch>0</verstretch>
         </sizepolicy>
        </property>
+       <property name="toolTip">
+        <string>Background color of selected text</string>
+       </property>
       </widget>
      </item>
      <item>
@@ -172,6 +187,9 @@
      </item>
      <item>
       <widget class="ShadeButton" name="backShade">
+       <property name="toolTip">
+        <string>Saturation of color of text background</string>
+       </property>
        <property name="text">
         <string/>
        </property>




More information about the scribus-commit mailing list