r21575 by craig - Split Text formatting functions into new Text Properties palette

scribus-commit scribus-commit at lists.scribus.net
Sun Dec 4 23:12:24 UTC 2016


Author: craig
Date: Sun Dec  4 23:12:23 2016
New Revision: 21575

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=21575
Log:
Split Text formatting functions into new Text Properties palette

Added:
    trunk/Scribus/scribus/ui/textpalette.cpp   (with props)
    trunk/Scribus/scribus/ui/textpalette.h   (with props)
Modified:
    trunk/Scribus/scribus/CMakeLists.txt
    trunk/Scribus/scribus/actionmanager.cpp
    trunk/Scribus/scribus/gtaction.cpp
    trunk/Scribus/scribus/scribus.cpp
    trunk/Scribus/scribus/scribus.h
    trunk/Scribus/scribus/scribusstructs.h
    trunk/Scribus/scribus/ui/propertiespalette.cpp
    trunk/Scribus/scribus/ui/propertiespalette.h
    trunk/Scribus/scribus/ui/propertiespalette_text.cpp
    trunk/Scribus/scribus/ui/propertiespalette_text.h
    trunk/Scribus/scribus/ui/sctreewidget.cpp
    trunk/Scribus/scribus/ui/sctreewidget.h

Modified: trunk/Scribus/scribus/CMakeLists.txt
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21575&path=/trunk/Scribus/scribus/CMakeLists.txt
==============================================================================
--- trunk/Scribus/scribus/CMakeLists.txt	(original)
+++ trunk/Scribus/scribus/CMakeLists.txt	Sun Dec  4 23:12:23 2016
@@ -530,6 +530,7 @@
 	ui/tabmanager.h
 	ui/tabpdfoptions.h
 	ui/tabruler.h
+	ui/textpalette.h
 	ui/transformdialog.h
 	ui/transparencypalette.h
 	tt/simpletreemodel/treemodel.h
@@ -1005,6 +1006,7 @@
 	ui/tabmanager.cpp
 	ui/tabpdfoptions.cpp
 	ui/tabruler.cpp
+	ui/textpalette.cpp
 	ui/transformdialog.cpp
 	ui/transparencypalette.cpp
 	tt/simpletreemodel/treeitem.cpp

Modified: trunk/Scribus/scribus/actionmanager.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21575&path=/trunk/Scribus/scribus/actionmanager.cpp
==============================================================================
--- trunk/Scribus/scribus/actionmanager.cpp	(original)
+++ trunk/Scribus/scribus/actionmanager.cpp	Sun Dec  4 23:12:23 2016
@@ -788,6 +788,8 @@
 	QString name;
 	//Tool menu
 	name="toolsProperties";
+	scrActions->insert(name, new ScrAction("", defaultKey(name), mainWindow));
+	name="toolsText";
 	scrActions->insert(name, new ScrAction("", defaultKey(name), mainWindow));
 	name="toolsOutline";
 	scrActions->insert(name, new ScrAction("", defaultKey(name), mainWindow));
@@ -895,6 +897,7 @@
 #endif
 	//Set the applicaton wide palette shortcuts
 	(*scrActions)["toolsProperties"]->setShortcutContext(Qt::ApplicationShortcut);
+	(*scrActions)["toolsText"]->setShortcutContext(Qt::ApplicationShortcut);
 	(*scrActions)["toolsScrapbook"]->setShortcutContext(Qt::ApplicationShortcut);
 	(*scrActions)["toolsLayers"]->setShortcutContext(Qt::ApplicationShortcut);
 	(*scrActions)["toolsPages"]->setShortcutContext(Qt::ApplicationShortcut);
@@ -908,6 +911,7 @@
 
 
 	(*scrActions)["toolsProperties"]->setToggleAction(true);
+	(*scrActions)["toolsText"]->setToggleAction(true);
 	(*scrActions)["toolsOutline"]->setToggleAction(true);
 	(*scrActions)["toolsScrapbook"]->setToggleAction(true);
 	(*scrActions)["toolsLayers"]->setToggleAction(true);
@@ -1675,6 +1679,7 @@
 
 	//Tool menu
 	(*scrActions)["toolsProperties"]->setTexts( tr("&Properties"));
+	(*scrActions)["toolsText"]->setTexts( tr("Text Properties"));
 	(*scrActions)["toolsOutline"]->setTexts( tr("&Outline", "Document Outline Palette"));
 	(*scrActions)["toolsScrapbook"]->setTexts( tr("&Scrapbook"));
 	(*scrActions)["toolsLayers"]->setTexts( tr("&Layers"));
@@ -1941,6 +1946,7 @@
 
 	//Tool menu
 	defKeys.insert("toolsProperties", Qt::Key_F2);
+	//defKeys.insert("toolsText", Qt::Key_F2);
 	defKeys.insert("toolsLayers", Qt::Key_F6);
 
 	//toolbar only items
@@ -2346,6 +2352,7 @@
 		<< "windowsCascade"
 		<< "windowsTile"
 		<< "toolsProperties"
+		<< "toolsText"
 		<< "toolsOutline"
 		<< "toolsScrapbook"
 		<< "toolsLayers"

Modified: trunk/Scribus/scribus/gtaction.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21575&path=/trunk/Scribus/scribus/gtaction.cpp
==============================================================================
--- trunk/Scribus/scribus/gtaction.cpp	(original)
+++ trunk/Scribus/scribus/gtaction.cpp	Sun Dec  4 23:12:23 2016
@@ -50,7 +50,7 @@
 #include "undomanager.h"
 #include "util.h"
 #include "util_text.h"
-#include "ui/propertiespalette.h"
+#include "ui/textpalette.h"
 #include "ui/propertiespalette_text.h"
 #include "ui/missing.h"
 
@@ -556,7 +556,7 @@
 	tmp.create(vg);
 	m_textFrame->doc()->redefineStyles(tmp, false);
 	
-	m_ScMW->propertiesPalette->textPal->updateParagraphStyles();
+	m_ScMW->textPalette->textPal->updateParagraphStyles();
 }
 
 void gtAction:: setCharStyleAttributes(gtFont *font, CharStyle& style)
@@ -873,7 +873,7 @@
 			ScColor tmp;
 			tmp.fromQColor(c);
 			m_textFrame->doc()->PageColors.insert("FromGetText"+c.name(), tmp);
-			m_ScMW->propertiesPalette->updateColorList();
+			m_ScMW->textPalette->updateColorList();
 			ret = "FromGetText"+c.name();
 		}
 	}

Modified: trunk/Scribus/scribus/scribus.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21575&path=/trunk/Scribus/scribus/scribus.cpp
==============================================================================
--- trunk/Scribus/scribus/scribus.cpp	(original)
+++ trunk/Scribus/scribus/scribus.cpp	Sun Dec  4 23:12:23 2016
@@ -247,6 +247,7 @@
 #include "ui/stylemanager.h"
 #include "ui/symbolpalette.h"
 #include "ui/tabmanager.h"
+#include "ui/textpalette.h"
 #include "ui/transformdialog.h"
 #include "ui/transparencypalette.h"
 #include "ui/viewtoolbar.h"
@@ -620,6 +621,13 @@
 	connect( propertiesPalette, SIGNAL(paletteShown(bool)), scrActions["toolsProperties"], SLOT(setChecked(bool)));
 	emit UpdateRequest(reqDefFontListUpdate);
 	propertiesPalette->installEventFilter(this);
+
+	textPalette = new TextPalette(this);
+	textPalette->setMainWindow(this);
+	connect( scrActions["toolsText"], SIGNAL(toggled(bool)) , textPalette, SLOT(setPaletteShown(bool)) );
+	connect( textPalette, SIGNAL(paletteShown(bool)), scrActions["toolsText"], SLOT(setChecked(bool)));
+	emit UpdateRequest(reqDefFontListUpdate);
+	textPalette->installEventFilter(this);
 	nodePalette = new NodePalette(this);
 	nodePalette->installEventFilter(this);
 	layerPalette = new LayerPalette(this);
@@ -1191,6 +1199,7 @@
 	scrMenuMgr->addMenuItemString("windowsTile", "Windows");
 	scrMenuMgr->addMenuItemString("SEPARATOR", "Windows");
 	scrMenuMgr->addMenuItemString("toolsProperties", "Windows");
+	scrMenuMgr->addMenuItemString("toolsText", "Windows");
 	scrMenuMgr->addMenuItemString("toolsActionHistory", "Windows");
 	scrMenuMgr->addMenuItemString("toolsAlignDistribute", "Windows");
 	scrMenuMgr->addMenuItemString("SEPARATOR", "Windows");
@@ -1442,7 +1451,7 @@
 }
 
 
-//AV to be replaced with Selection::update and listener in PropertiesPalette
+//AV to be replaced with Selection::update and listener in textPalette
 void ScribusMainWindow::setTBvals(PageItem *currItem)
 {
 	scrActions["editMark"]->setEnabled(false);
@@ -1460,8 +1469,8 @@
 
 	const ParagraphStyle& currPStyle( inEditMode ? item->currentStyle() : item->itemText.defaultStyle());
 	setAlignmentValue(currPStyle.alignment());
-	propertiesPalette->textPal->showParStyle(currPStyle.parent());
-	propertiesPalette->textPal->showCharStyle(item->currentCharStyle().parent());
+	textPalette->textPal->showParStyle(currPStyle.parent());
+	textPalette->textPal->showCharStyle(item->currentCharStyle().parent());
 	doc->currentStyle = item->currentStyle();
 	if (doc->appMode == modeEdit || doc->appMode == modeEditTable)
 		item->currentTextProps(doc->currentStyle);
@@ -1469,7 +1478,7 @@
 		doc->currentStyle.charStyle().setStyle(item->currentCharStyle());
 	emit TextStyle(doc->currentStyle);
 	// to go: (av)
-	propertiesPalette->textPal->updateStyle(doc->currentStyle);
+	textPalette->textPal->updateStyle(doc->currentStyle);
 	//check if mark in cursor place and enable editMark action
 	if (doc->appMode == modeEdit && item->itemText.cursorPosition() < item->itemText.length())
 	{
@@ -1970,6 +1979,7 @@
 	}
 
 	propertiesPalette->hide();
+	textPalette->hide();
 	outlinePalette->hide();
 	scrapbookPalette->hide();
 	bookmarkPalette->hide();
@@ -2657,6 +2667,7 @@
 {
 	updateActiveWindowCaption(doc->DocName);
 	propertiesPalette->setDoc(doc);
+	textPalette->setDoc(doc);
 	marksManager->setDoc(doc);
 	nsEditor->setDoc(doc);
 	pagePalette->setView(view);
@@ -2699,6 +2710,7 @@
 	//Update palettes
 	updateActiveWindowCaption(doc->DocName);
 	propertiesPalette->setDoc(doc);
+	textPalette->setDoc(doc);
 	nsEditor->setDoc(doc);
 
 	marksManager->setDoc(doc);
@@ -2734,7 +2746,7 @@
 	connect(view, SIGNAL(PaintingDone()), this, SLOT(slotSelect()), Qt::UniqueConnection);
 	connect(view, SIGNAL(DocChanged()), this, SLOT(slotDocCh()), Qt::UniqueConnection);
 	connect(view, SIGNAL(MousePos(double, double)), this, SLOT(setStatusBarMousePosition(double, double)), Qt::UniqueConnection);
-	connect(view, SIGNAL(ItemCharStyle(const CharStyle&)), propertiesPalette->textPal, SLOT(updateCharStyle(const CharStyle&)), Qt::UniqueConnection);
+	connect(view, SIGNAL(ItemCharStyle(const CharStyle&)), textPalette->textPal, SLOT(updateCharStyle(const CharStyle&)), Qt::UniqueConnection);
 	connect(view, SIGNAL(ItemTextEffects(int)), this, SLOT(setStyleEffects(int)), Qt::UniqueConnection);
 	connect(view, SIGNAL(ItemTextAlign(int))  , this, SLOT(setAlignmentValue(int)), Qt::UniqueConnection);
 	connect(view, SIGNAL(HasTextSel()), this, SLOT(EnableTxEdit()), Qt::UniqueConnection);
@@ -2798,11 +2810,11 @@
 		else
 		{
 			doc->currentStyle = currItem->itemText.defaultStyle();
-			propertiesPalette->textPal->showParStyle(doc->currentStyle.parent());
-			propertiesPalette->textPal->showCharStyle(doc->currentStyle.charStyle().parent());
+			textPalette->textPal->showParStyle(doc->currentStyle.parent());
+			textPalette->textPal->showCharStyle(doc->currentStyle.charStyle().parent());
 			emit TextStyle(doc->currentStyle);
 			// to go: (av)
-			propertiesPalette->textPal->updateStyle(doc->currentStyle);
+			textPalette->textPal->updateStyle(doc->currentStyle);
 			setStyleEffects(doc->currentStyle.charStyle().effects());
 		}
 		break;
@@ -2820,11 +2832,11 @@
 		else
 		{
 			doc->currentStyle = currItem->itemText.defaultStyle();
-			propertiesPalette->textPal->showParStyle(doc->currentStyle.parent());
-			propertiesPalette->textPal->showCharStyle(doc->currentStyle.charStyle().parent());
+			textPalette->textPal->showParStyle(doc->currentStyle.parent());
+			textPalette->textPal->showCharStyle(doc->currentStyle.charStyle().parent());
 			emit TextStyle(doc->currentStyle);
 			// to go: (av)
-			propertiesPalette->textPal->updateStyle(doc->currentStyle);
+			textPalette->textPal->updateStyle(doc->currentStyle);
 			setStyleEffects(doc->currentStyle.charStyle().effects());
 		}
 		break;
@@ -3413,6 +3425,7 @@
 				AddBookMark(ite);
 		}
 		propertiesPalette->updateColorList();
+		textPalette->updateColorList();
 		emit UpdateRequest(reqArrowStylesUpdate | reqLineStylesUpdate | reqStyleComboDocUpdate | reqInlinePalUpdate);
 		symbolPalette->updateSymbolList();
 		slotDocCh();
@@ -3940,6 +3953,7 @@
 			if (outlinePalette->isVisible())
 				outlinePalette->BuildTree();
 			propertiesPalette->updateColorList();
+			textPalette->updateColorList();
 			emit UpdateRequest(reqArrowStylesUpdate | reqLineStylesUpdate | reqStyleComboDocUpdate | reqInlinePalUpdate);
 			symbolPalette->updateSymbolList();
 		}
@@ -3956,6 +3970,7 @@
 	if (outlinePalette->isVisible())
 		outlinePalette->BuildTree();
 	propertiesPalette->updateColorList();
+	textPalette->updateColorList();
 	emit UpdateRequest(reqArrowStylesUpdate | reqLineStylesUpdate | reqStyleComboDocUpdate | reqInlinePalUpdate);
 	symbolPalette->updateSymbolList();
 }
@@ -4278,6 +4293,7 @@
 		doc->CloseCMSProfiles();
 	//<<Palettes
 	propertiesPalette->unsetDoc();
+	textPalette->unsetDoc();
 	inlinePalette->unsetDoc();
 	symbolPalette->unsetDoc();
 	pagePalette->setView(0);
@@ -4766,6 +4782,8 @@
 			m_styleManager->setDoc(doc);
 			propertiesPalette->unsetDoc();
 			propertiesPalette->setDoc(doc);
+			textPalette->unsetDoc();
+			textPalette->setDoc(doc);
 			marksManager->setDoc(doc);
 			nsEditor->setDoc(doc);
 			symbolPalette->unsetDoc();
@@ -4845,6 +4863,8 @@
 				m_styleManager->setDoc(doc);
 				propertiesPalette->unsetDoc();
 				propertiesPalette->setDoc(doc);
+				textPalette->unsetDoc();
+				textPalette->setDoc(doc);
 				marksManager->setDoc(doc);
 				nsEditor->setDoc(doc);
 				symbolPalette->unsetDoc();
@@ -4926,6 +4946,8 @@
 			m_styleManager->setDoc(doc);
 			propertiesPalette->unsetDoc();
 			propertiesPalette->setDoc(doc);
+			textPalette->unsetDoc();
+			textPalette->setDoc(doc);
 			marksManager->setDoc(doc);
 			nsEditor->setDoc(doc);
 			symbolPalette->unsetDoc();
@@ -5525,6 +5547,8 @@
 		m_palettesStatus[PS_ALL] = false;
 		if (m_palettesStatus[PS_PROPERTIES])
 			propertiesPalette->show();
+		if (m_palettesStatus[PS_TEXT])
+			textPalette->show();
 		if (m_palettesStatus[PS_OUTLINE])
 			outlinePalette->show();
 		if (m_palettesStatus[PS_SCRAPBOOK])
@@ -5544,6 +5568,7 @@
 	else
 	{
 		m_palettesStatus[PS_PROPERTIES] = propertiesPalette->isVisible();
+		m_palettesStatus[PS_TEXT] = textPalette->isVisible();
 		m_palettesStatus[PS_OUTLINE] = outlinePalette->isVisible();
 		m_palettesStatus[PS_SCRAPBOOK] = scrapbookPalette->isVisible();
 		m_palettesStatus[PS_LAYER] = layerPalette->isVisible();
@@ -5553,6 +5578,7 @@
 		m_palettesStatus[PS_VERIFIER] = docCheckerPalette->isVisible();
 		m_palettesStatus[PS_DOWNLOADS] = downloadsPalette->isVisible();
 		propertiesPalette->hide();
+		textPalette->hide();
 		outlinePalette->hide();
 		scrapbookPalette->hide();
 		bookmarkPalette->hide();
@@ -6277,7 +6303,7 @@
 				doc->itemSelection_SetFontSize(fs*10);
 		}
 	}
-	propertiesPalette->textPal->showFontSize(fs*10);
+	textPalette->textPal->showFontSize(fs*10);
 }
 
 void ScribusMainWindow::setItemLanguage(QString language)
@@ -6288,7 +6314,7 @@
 		doc->itemSelection_SetLanguage(language);
 	}
 
-	propertiesPalette->textPal->showLanguage(language);
+	textPalette->textPal->showLanguage(language);
 }
 
 //CB-->Doc
@@ -6297,7 +6323,7 @@
 	if (!HaveDoc)
 		return;
 	doc->itemSelection_SetAlignment(a);
-	propertiesPalette->textPal->showAlignment(a);
+	textPalette->textPal->showAlignment(a);
 	PageItem *currItem = doc->m_Selection->itemAt(0);
 	setTBvals(currItem);
 }
@@ -6307,7 +6333,7 @@
 	if (!HaveDoc)
 		return;
 	doc->itemSelection_SetDirection(a);
-	propertiesPalette->textPal->showDirection(a);
+	textPalette->textPal->showDirection(a);
 	PageItem *currItem = doc->m_Selection->itemAt(0);
 	setTBvals(currItem);
 }
@@ -6332,7 +6358,7 @@
 
 void ScribusMainWindow::setAlignmentValue(int a)
 {
-	propertiesPalette->textPal->showAlignment(a);
+	textPalette->textPal->showAlignment(a);
 	QString alignment[] = {"Left", "Center", "Right", "Block", "Forced"};
 	for (int b=0; b<5; ++b)
 	{
@@ -6344,7 +6370,7 @@
 
 void ScribusMainWindow::setDirectionValue(int a)
 {
-	propertiesPalette->textPal->showDirection(a);
+	textPalette->textPal->showDirection(a);
 	QString direction[] = {"Left", "Right"};
 	for (int b=0; b<2; ++b)
 	{
@@ -6750,6 +6776,7 @@
 int ScribusMainWindow::ShowSubs()
 {
 	propertiesPalette->startup();
+	textPalette->startup();
 	outlinePalette->startup();
 	scrapbookPalette->startup();
 	bookmarkPalette->startup();
@@ -7437,6 +7464,7 @@
 	setCurrentComboItem(unitSwitcher, unitGetStrFromIndex(doc->unitIndex()));
 	view->unitChange();
 	propertiesPalette->unitChange();
+	textPalette->unitChange();
 	nodePalette->unitChange();
 	alignDistributePalette->unitChange();
 	guidePalette->setupPage();
@@ -7530,6 +7558,7 @@
 	view->DrawNew();
 	pagePalette->Rebuild();
 	propertiesPalette->updateColorList();
+	textPalette->updateColorList();
 	symbolPalette->editingFinished();
 	layerPalette->setEnabled(true);
 	if (outlinePalette->isVisible())
@@ -7598,6 +7627,8 @@
 	pagePalette->Rebuild();
 	propertiesPalette->unsetItem();
 	propertiesPalette->updateColorList();
+	textPalette->unsetItem();
+	textPalette->updateColorList();
 	inlinePalette->editingFinished();
 	layerPalette->setEnabled(true);
 	if (outlinePalette->isVisible())
@@ -8055,6 +8086,7 @@
 		return;
 	doc->recalculateColors();
 	propertiesPalette->updateColorList();
+	textPalette->updateColorList();
 }
 
 void ScribusMainWindow::ModifyAnnot()
@@ -8837,6 +8869,7 @@
 	qApp->processEvents(QEventLoop::ExcludeUserInputEvents);
 	view->DrawNew();
 	propertiesPalette->updateColorList();
+	textPalette->updateColorList();
 	emit UpdateRequest(reqCmsOptionsUpdate);
 	currItem->emitAllToGUI();
 	qApp->restoreOverrideCursor();
@@ -9141,6 +9174,7 @@
 	doc->m_Selection->clear();
 	doc->m_Selection->delaySignalsOff();
 	propertiesPalette->updateColorList();
+	textPalette->updateColorList();
 	symbolPalette->updateSymbolList();
 	emit UpdateRequest(reqColorsUpdate);
 	doc->minCanvasCoordinate = minSize;
@@ -9171,6 +9205,7 @@
 	m_undoManager->setUndoEnabled(false);
 	doc->itemSelection_convertItemsToSymbol(patternName);
 	propertiesPalette->updateColorList();
+	textPalette->updateColorList();
 	symbolPalette->updateSymbolList();
 	emit UpdateRequest(reqColorsUpdate);
 	if (outlinePalette->isVisible())
@@ -9947,6 +9982,7 @@
 	undoPalette->setEnabled(!doc->drawAsPreview);
 	outlinePalette->setEnabled(!(doc->drawAsPreview && !doc->editOnPreview));
 	propertiesPalette->setEnabled(!(doc->drawAsPreview && !doc->editOnPreview));
+	textPalette->setEnabled(!(doc->drawAsPreview && !doc->editOnPreview));
 	scrMenuMgr->setMenuEnabled("Edit", !doc->drawAsPreview);
 	scrMenuMgr->setMenuEnabled("Item", !doc->drawAsPreview);
 	scrMenuMgr->setMenuEnabled("Insert", !doc->drawAsPreview);

Modified: trunk/Scribus/scribus/scribus.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21575&path=/trunk/Scribus/scribus/scribus.h
==============================================================================
--- trunk/Scribus/scribus/scribus.h	(original)
+++ trunk/Scribus/scribus/scribus.h	Sun Dec  4 23:12:23 2016
@@ -106,6 +106,7 @@
 class StoryEditor;
 class StyleManager;
 class SymbolPalette;
+class TextPalette;
 class TOCGenerator;
 class UndoManager;
 class UndoPalette;
@@ -230,6 +231,7 @@
 	GuideManager *guidePalette;
 	CharSelect *charPalette;
 	PropertiesPalette *propertiesPalette;
+	TextPalette *textPalette;
 	MarksManager *marksManager;
 	NotesStylesEditor *nsEditor;
 	NodePalette *nodePalette;
@@ -617,6 +619,7 @@
 	int m_toolbarMenuPDFTools;
 	int m_viewToolbars;
 	int m_viewPropertiesPalette;
+	int m_viewPropertiesPaletteText;
 	int m_viewOutlinePalette;
 	int m_viewNodePalette;
 	int m_viewBpal;
@@ -625,7 +628,7 @@
 	int m_viewBopal;
 	int m_viewUndoPalette;
 
-	bool m_palettesStatus[11];
+	bool m_palettesStatus[12];
 	bool m_guidesStatus[13];
 
 	bool m_keyrep;

Modified: trunk/Scribus/scribus/scribusstructs.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21575&path=/trunk/Scribus/scribus/scribusstructs.h
==============================================================================
--- trunk/Scribus/scribus/scribusstructs.h	(original)
+++ trunk/Scribus/scribus/scribusstructs.h	Sun Dec  4 23:12:23 2016
@@ -429,6 +429,7 @@
 	PS_UNDO,
 	PS_VERIFIER,
 	PS_DOWNLOADS,
+	PS_TEXT,
 	PS_MAX
 };
 

Modified: trunk/Scribus/scribus/ui/propertiespalette.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21575&path=/trunk/Scribus/scribus/ui/propertiespalette.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/propertiespalette.cpp	(original)
+++ trunk/Scribus/scribus/ui/propertiespalette.cpp	Sun Dec  4 23:12:23 2016
@@ -47,7 +47,6 @@
 #include "propertiespalette_shadow.h"
 #include "propertiespalette_shape.h"
 #include "propertiespalette_table.h"
-#include "propertiespalette_text.h"
 #include "propertiespalette_utils.h"
 #include "propertiespalette_xyz.h"
 #include "sccombobox.h"
@@ -103,9 +102,6 @@
 	groupPal = new PropertiesPalette_Group( this );
 	idGroupItem = TabStack->addItem(groupPal, "Groups");
 
-	textPal = new PropertiesPalette_Text( this );
-	idTextItem = TabStack->addItem( textPal, "&Text" );
-
 	imagePal = new PropertiesPalette_Image(this);
 	idImageItem=TabStack->addItem( imagePal, "&Image" );
 
@@ -176,7 +172,6 @@
 	this->groupPal->setMainWindow(mw);
 	this->imagePal->setMainWindow(mw);
 	this->linePal->setMainWindow(mw);
-	this->textPal->setMainWindow(mw);
 	this->tablePal->setMainWindow(mw);
 
 	//connect(this->Cpal, SIGNAL(gradientChanged()), m_ScMW, SLOT(updtGradFill()));
@@ -249,7 +244,6 @@
 	groupPal->setDoc(m_doc);
 	imagePal->setDoc(m_doc);
 	linePal->setDoc(m_doc);
-	textPal->setDoc(m_doc);
 	tablePal->setDocument(m_doc);
 
 	updateColorList();
@@ -286,8 +280,6 @@
 	imagePal->unsetDoc();
 	linePal->unsetItem();
 	linePal->unsetDoc();
-	textPal->unsetItem();
-	textPal->unsetDoc();
 	tablePal->unsetItem();
 	tablePal->unsetDocument();
 
@@ -313,7 +305,6 @@
 	tablePal->unsetItem();
 	shapePal->unsetItem();
 	groupPal->unsetItem();
-	textPal->unsetItem();
 	shadowPal->unsetItem();
 	imagePal->unsetItem();
 	linePal->unsetItem();
@@ -363,13 +354,11 @@
 	{
 		if (m_item->isTable())
 		{
-			TabStack->setItemEnabled(idTextItem, m_doc->appMode == modeEditTable);
 			if (m_doc->appMode == modeEditTable)
 				connect(m_item->asTable(), SIGNAL(selectionChanged()), this, SLOT(handleSelectionChanged()));
 			else
 				disconnect(m_item->asTable(), SIGNAL(selectionChanged()), this, SLOT(handleSelectionChanged()));
 		}
-		textPal->handleSelectionChanged();
 	}
 }
 
@@ -420,7 +409,6 @@
 		TabStack->setItemEnabled(idGroupItem, true);
 		TabStack->setItemEnabled(idLineItem, false);
 		TabStack->setItemEnabled(idColorsItem, false);
-		TabStack->setItemEnabled(idTextItem, false);
 		TabStack->setItemEnabled(idImageItem, false);
 		TabStack->setItemEnabled(idTableItem, false);
 	}
@@ -444,7 +432,6 @@
 		groupPal->handleSelectionChanged();
 		imagePal->handleSelectionChanged();
 		linePal->handleSelectionChanged();
-		textPal->handleSelectionChanged();
 		tablePal->handleSelectionChanged();
 		Cpal->handleSelectionChanged();
 	}
@@ -459,7 +446,6 @@
 		TabStack->setItemEnabled(idColorsItem, true);
 		TabStack->setItemEnabled(idTableItem, false);
 		TabStack->setItemEnabled(idTransparencyItem, false);
-		TabStack->setItemEnabled(idTextItem, false);
 		TabStack->setItemEnabled(idImageItem, false);
 		TabStack->setItemEnabled(idTableItem, false);
 	}
@@ -471,7 +457,6 @@
 		TabStack->setItemEnabled(idGroupItem, true);
 		TabStack->setItemEnabled(idLineItem, false);
 		TabStack->setItemEnabled(idColorsItem, false);
-		TabStack->setItemEnabled(idTextItem, false);
 		TabStack->setItemEnabled(idImageItem, false);
 		TabStack->setItemEnabled(idTransparencyItem, false);
 		TabStack->setItemEnabled(idTableItem, false);
@@ -537,7 +522,6 @@
 				TabStack->setItemEnabled(idLineItem, false);
 				TabStack->setItemEnabled(idColorsItem, true);
 				TabStack->setItemEnabled(idTransparencyItem, false);
-				TabStack->setItemEnabled(idTextItem, false);
 				TabStack->setItemEnabled(idImageItem, false);
 			}
 			else
@@ -545,7 +529,6 @@
 				TabStack->setItemEnabled(idXYZItem, true);
 				TabStack->setItemEnabled(idShadowItem, true);
 				TabStack->setItemEnabled(idShapeItem, true);
-				TabStack->setItemEnabled(idTextItem, false);
 				TabStack->setItemEnabled(idImageItem, true);
 				TabStack->setItemEnabled(idLineItem, true);
 			}
@@ -553,14 +536,12 @@
 		case PageItem::TextFrame:
 			TabStack->setItemEnabled(idShadowItem, true);
 			TabStack->setItemEnabled(idShapeItem, true);
-			TabStack->setItemEnabled(idTextItem, true);
 			TabStack->setItemEnabled(idImageItem, false);
 			TabStack->setItemEnabled(idLineItem, true);
 			break;
 		case PageItem::Line:
 			TabStack->setItemEnabled(idShadowItem, true);
 			TabStack->setItemEnabled(idShapeItem, false);
-			TabStack->setItemEnabled(idTextItem, false);
 			TabStack->setItemEnabled(idImageItem, false);
 			TabStack->setItemEnabled(idLineItem, true);
 			break;
@@ -571,7 +552,6 @@
 		case PageItem::Arc:
 			TabStack->setItemEnabled(idShadowItem, true);
 			TabStack->setItemEnabled(idShapeItem, true);
-			TabStack->setItemEnabled(idTextItem, false);
 			TabStack->setItemEnabled(idImageItem, false);
 			TabStack->setItemEnabled(idLineItem, true);
 			break;
@@ -579,14 +559,12 @@
 		case PageItem::Spiral:
 			TabStack->setItemEnabled(idShadowItem, true);
 			TabStack->setItemEnabled(idShapeItem, true);
-			TabStack->setItemEnabled(idTextItem, false);
 			TabStack->setItemEnabled(idImageItem, false);
 			TabStack->setItemEnabled(idLineItem, true);
 			break;
 		case PageItem::PathText:
 			TabStack->setItemEnabled(idShadowItem, true);
 			TabStack->setItemEnabled(idShapeItem, true);
-			TabStack->setItemEnabled(idTextItem, true);
 			TabStack->setItemEnabled(idImageItem, false);
 			TabStack->setItemEnabled(idLineItem, true);
 			break;
@@ -594,7 +572,6 @@
 		case PageItem::Group:
 			TabStack->setItemEnabled(idShadowItem, true);
 			TabStack->setItemEnabled(idShapeItem, false);
-			TabStack->setItemEnabled(idTextItem, false);
 			TabStack->setItemEnabled(idImageItem, false);
 			TabStack->setItemEnabled(idLineItem, false);
 			TabStack->setItemEnabled(idGroupItem, true);
@@ -605,7 +582,6 @@
 			TabStack->setItemEnabled(idTableItem, true);
 			TabStack->setItemEnabled(idShadowItem, true);
 			TabStack->setItemEnabled(idShapeItem, true);
-			TabStack->setItemEnabled(idTextItem, m_doc->appMode == modeEditTable);
 			TabStack->setItemEnabled(idImageItem, false);
 			TabStack->setItemEnabled(idLineItem, false);
 			TabStack->setItemEnabled(idGroupItem, false);
@@ -642,7 +618,6 @@
 	groupPal->unitChange();
 	imagePal->unitChange();
 	linePal->unitChange();
-	textPal->unitChange();
 
 	Cpal->unitChange(oldRatio, m_unitRatio, m_doc->unitIndex());
 	Tpal->unitChange(oldRatio, m_unitRatio, m_doc->unitIndex());
@@ -883,7 +858,6 @@
 		return;
 
 	groupPal->updateColorList();
-	textPal->updateColorList();
 	tablePal->updateColorList();
 	Cpal->updateColorList();
 	Tpal->updateColorList();
@@ -915,7 +889,6 @@
 	setWindowTitle( tr("Properties"));
 
 	TabStack->setItemText(idXYZItem, tr("X, Y, &Z"));
-	TabStack->setItemText(idTextItem, tr("&Text"));
 	TabStack->setItemText(idImageItem, tr("&Image"));
 	TabStack->setItemText(idShadowItem, tr("Drop Shadow"));
 	TabStack->setItemText(idShapeItem, tr("&Shape"));
@@ -932,7 +905,6 @@
 	imagePal->languageChange();
 	Cpal->languageChange();
 	linePal->languageChange();
-	textPal->languageChange();
 	tablePal->languageChange();
 }
 

Modified: trunk/Scribus/scribus/ui/propertiespalette.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21575&path=/trunk/Scribus/scribus/ui/propertiespalette.h
==============================================================================
--- trunk/Scribus/scribus/ui/propertiespalette.h	(original)
+++ trunk/Scribus/scribus/ui/propertiespalette.h	Sun Dec  4 23:12:23 2016
@@ -39,7 +39,6 @@
 class PropertiesPalette_Shadow;
 class PropertiesPalette_Shape;
 class PropertiesPalette_Table;
-class PropertiesPalette_Text;
 class PropertiesPalette_XYZ;
 class ScComboBox;
 class ScribusDoc;
@@ -78,7 +77,6 @@
 	PropertiesPalette_Shadow* shadowPal;
 	PropertiesPalette_Shape* shapePal;
 	PropertiesPalette_Table* tablePal;
-	PropertiesPalette_Text*  textPal;
 	PropertiesPalette_XYZ*   xyzPal;
 	Cpalette *Cpal;
 	Tpalette *Tpal;
@@ -132,7 +130,6 @@
 	int idXYZItem;
 	int idShapeItem;
 	int idTableItem;
-	int idTextItem;
 	int idImageItem;
 	int idLineItem;
 	int idColorsItem;

Modified: trunk/Scribus/scribus/ui/propertiespalette_text.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21575&path=/trunk/Scribus/scribus/ui/propertiespalette_text.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/propertiespalette_text.cpp	(original)
+++ trunk/Scribus/scribus/ui/propertiespalette_text.cpp	Sun Dec  4 23:12:23 2016
@@ -61,7 +61,7 @@
 	m_unitRatio = 1.0;
 
 	setupUi(this);
-	setSizePolicy( QSizePolicy(QSizePolicy::Maximum, QSizePolicy::Maximum));
+//	setSizePolicy( QSizePolicy(QSizePolicy::Maximum, QSizePolicy::Maximum));
 
 	fontSize->setPrefix( "" );
 	fontSizeLabel->setPixmap(IconManager::instance()->loadPixmap("Zeichen.xpm"));
@@ -73,38 +73,49 @@
 	charStyleClear->setIcon(IconManager::instance()->loadPixmap("16/edit-clear.png"));
 
 	colorWidgets = new PropertyWidget_TextColor(textTree);
-	colorWidgetsItem = textTree->addWidget( tr("Color && Effects"), colorWidgets);
+	colorWidgetsItem = textTree->addItem( colorWidgets, tr("Color && Effects") );
+	//colorWidgetsItem = textTree->addWidget( tr("Color && Effects"), colorWidgets);
 
 	flopBox = new PropertyWidget_Flop(textTree);
-	flopItem = textTree->addWidget( tr("First Line Offset"), flopBox);
+	flopItem = textTree->addItem( flopBox, tr("First Line Offset"));
+	//flopItem = textTree->addWidget( tr("First Line Offset"), flopBox);
 
 	orphanBox = new PropertyWidget_Orphans(textTree);
-	orphanItem = textTree->addWidget( tr("Orphans and Widows"), orphanBox);
+	orphanItem = textTree->addItem(orphanBox, tr("Orphans and Widows"));
+//	orphanItem = textTree->addWidget( tr("Orphans and Widows"), orphanBox);
 
 	parEffectWidgets = new PropertyWidget_ParEffect(textTree);
-	parEffectItem = textTree->addWidget( tr("Paragraph Effects"), parEffectWidgets);
+	parEffectItem = textTree->addItem(parEffectWidgets, tr("Paragraph Effects"));
+//	parEffectItem = textTree->addWidget( tr("Paragraph Effects"), parEffectWidgets);
 
 	distanceWidgets = new PropertyWidget_Distance(textTree);
-	distanceItem = textTree->addWidget( tr("Columns && Text Distances"), distanceWidgets);
+	distanceItem = textTree->addItem(distanceWidgets, tr("Columns && Text Distances"));
+//	distanceItem = textTree->addWidget( tr("Columns && Text Distances"), distanceWidgets);
 
 	//<< Optical Margins
 	optMargins = new PropertyWidget_OptMargins(textTree);
-	optMarginsItem = textTree->addWidget( tr("Optical Margins"), optMargins);
+	optMarginsItem = textTree->addItem(optMargins, tr("Optical Margins"));
+//	optMarginsItem = textTree->addWidget( tr("Optical Margins"), optMargins);
 	//>> Optical Margins
 	
 	hyphenationWidget = new PropertyWidget_Hyphenation(textTree);
-	hyphenationWidgetItem = textTree->addWidget(tr("Hyphenation"), hyphenationWidget);
+	hyphenationWidgetItem = textTree->addItem(hyphenationWidget, tr("Hyphenation"));
+//	hyphenationWidgetItem = textTree->addWidget(tr("Hyphenation"), hyphenationWidget);
 
 	//<<Advanced Settings
 	advancedWidgets = new PropertyWidget_Advanced(textTree);
-	advancedWidgetsItem = textTree->addWidget( tr("Advanced Settings"), advancedWidgets);
-	
+	advancedWidgetsItem = textTree->addItem(advancedWidgets, tr("Advanced Settings"));
+//	advancedWidgetsItem = textTree->addWidget( tr("Advanced Settings"), advancedWidgets);
+
 	//>>Advanced Settings
 	fontfeaturesWidget = new PropertyWidget_FontFeatures(textTree);
-	fontfeaturesWidgetItem = textTree->addWidget( tr("Open Type Font Features"), fontfeaturesWidget);
+	fontfeaturesWidgetItem = textTree->addItem(fontfeaturesWidget, tr("Open Type Font Features"));
+//	fontfeaturesWidgetItem = textTree->addWidget( tr("Open Type Font Features"), fontfeaturesWidget);
+
 
 	pathTextWidgets = new PropertyWidget_PathText(textTree);
-	pathTextItem = textTree->addWidget( tr("Path Text Properties"), pathTextWidgets);
+	pathTextItem = textTree->addItem(pathTextWidgets, tr("Path Text Properties"));
+//	pathTextItem = textTree->addWidget( tr("Path Text Properties"), pathTextWidgets);
 
 	languageChange();
 
@@ -332,30 +343,30 @@
 	{
 		setEnabled(false);
 	}
-	if (m_item->asPathText())
-	{
-		flopItem->setHidden(true);
-		distanceItem->setHidden(true);
-		orphanItem->setHidden(true);
-		parEffectItem->setHidden(true);
-		pathTextItem->setHidden(false);
-	}
-	else if (m_item->asTextFrame() || m_item->asTable())
-	{
-		flopItem->setHidden(false);
-		distanceItem->setHidden(false);
-		orphanItem->setHidden(false);
-		parEffectItem->setHidden(false);
-		pathTextItem->setHidden(true);
-	}
-	else
-	{
-		flopItem->setHidden(false);
-		distanceItem->setHidden(false);
-		orphanItem->setHidden(false);
-		parEffectItem->setHidden(false);
-		pathTextItem->setHidden(true);
-	}
+//	if (m_item->asPathText())
+//	{
+//		flopItem->setHidden(true);
+//		distanceItem->setHidden(true);
+//		orphanItem->setHidden(true);
+//		parEffectItem->setHidden(true);
+//		pathTextItem->setHidden(false);
+//	}
+//	else if (m_item->asTextFrame() || m_item->asTable())
+//	{
+//		flopItem->setHidden(false);
+//		distanceItem->setHidden(false);
+//		orphanItem->setHidden(false);
+//		parEffectItem->setHidden(false);
+//		pathTextItem->setHidden(true);
+//	}
+//	else
+//	{
+//		flopItem->setHidden(false);
+//		distanceItem->setHidden(false);
+//		orphanItem->setHidden(false);
+//		parEffectItem->setHidden(false);
+//		pathTextItem->setHidden(true);
+//	}
 
 	m_haveItem = true;
 
@@ -719,16 +730,16 @@
 	paraStyleLabel->setText( tr("Paragraph St&yle:"));
 	charStyleLabel->setText( tr("Character St&yle:"));
 
-	colorWidgetsItem->setText(0, tr("Color && Effects"));
-	flopItem->setText(0, tr("First Line Offset"));
-	hyphenationWidgetItem->setText(0, tr("Hyphenation"));
-	orphanItem->setText(0, tr("Orphans and Widows"));
-	parEffectItem->setText(0, tr("Paragraph Effects"));
-	distanceItem->setText(0, tr("Columns && Text Distances"));
-	optMarginsItem->setText(0, tr("Optical Margins"));
-	advancedWidgetsItem->setText(0, tr("Advanced Settings"));
-	fontfeaturesWidgetItem->setText(0, tr("Font Features"));
-	pathTextItem->setText(0, tr("Path Text Properties"));
+//	colorWidgetsItem->setText(0, tr("Color && Effects"));
+//	flopItem->setText(0, tr("First Line Offset"));
+//	hyphenationWidgetItem->setText(0, tr("Hyphenation"));
+//	orphanItem->setText(0, tr("Orphans and Widows"));
+//	parEffectItem->setText(0, tr("Paragraph Effects"));
+//	distanceItem->setText(0, tr("Columns && Text Distances"));
+//	optMarginsItem->setText(0, tr("Optical Margins"));
+//	advancedWidgetsItem->setText(0, tr("Advanced Settings"));
+//	fontfeaturesWidgetItem->setText(0, tr("Font Features"));
+//	pathTextItem->setText(0, tr("Path Text Properties"));
 	QSignalBlocker lineSpacingModeBlocker(lineSpacingModeCombo);
 	int oldLineSpacingMode = lineSpacingModeCombo->currentIndex();
 	lineSpacingModeCombo->clear();

Modified: trunk/Scribus/scribus/ui/propertiespalette_text.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21575&path=/trunk/Scribus/scribus/ui/propertiespalette_text.h
==============================================================================
--- trunk/Scribus/scribus/ui/propertiespalette_text.h	(original)
+++ trunk/Scribus/scribus/ui/propertiespalette_text.h	Sun Dec  4 23:12:23 2016
@@ -119,35 +119,37 @@
 	void doClearPStyle();
 
 protected:
+	PropertyWidget_Advanced* advancedWidgets;
+	PropertyWidget_Distance* distanceWidgets;
+	PropertyWidget_Flop* flopBox;
+	PropertyWidget_FontFeatures* fontfeaturesWidget;
 	PropertyWidget_Hyphenation* hyphenationWidget;
-	QTreeWidgetItem* hyphenationWidgetItem;
+	PropertyWidget_OptMargins* optMargins;
+	PropertyWidget_Orphans* orphanBox;
+	PropertyWidget_ParEffect* parEffectWidgets;
+	PropertyWidget_PathText* pathTextWidgets;
+	PropertyWidget_TextColor* colorWidgets;
+//	QTreeWidgetItem* advancedWidgetsItem;
+//	QTreeWidgetItem* colorWidgetsItem;
+//	QTreeWidgetItem* distanceItem;
+//	QTreeWidgetItem* flopItem;
+//	QTreeWidgetItem* fontfeaturesWidgetItem;
+//	QTreeWidgetItem* hyphenationWidgetItem;
+//	QTreeWidgetItem* optMarginsItem;
+//	QTreeWidgetItem* orphanItem;
+//	QTreeWidgetItem* parEffectItem;
+//	QTreeWidgetItem* pathTextItem;
+	int advancedWidgetsItem;
+	int colorWidgetsItem;
+	int distanceItem;
+	int flopItem;
+	int fontfeaturesWidgetItem;
+	int hyphenationWidgetItem;
+	int optMarginsItem;
+	int orphanItem;
+	int parEffectItem;
+	int pathTextItem;
 
-	PropertyWidget_TextColor* colorWidgets;
-	QTreeWidgetItem* colorWidgetsItem;
-
-	PropertyWidget_Distance* distanceWidgets;
-	QTreeWidgetItem* distanceItem;
-
-	PropertyWidget_Advanced* advancedWidgets;
-	QTreeWidgetItem* advancedWidgetsItem;
-
-	PropertyWidget_FontFeatures* fontfeaturesWidget;
-	QTreeWidgetItem* fontfeaturesWidgetItem;
-
-	PropertyWidget_OptMargins* optMargins;
-	QTreeWidgetItem* optMarginsItem;
-
-	PropertyWidget_Flop* flopBox;
-	QTreeWidgetItem* flopItem;
-
-	PropertyWidget_Orphans* orphanBox;
-	QTreeWidgetItem* orphanItem;
-
-	PropertyWidget_ParEffect* parEffectWidgets;
-	QTreeWidgetItem* parEffectItem;
-
-	PropertyWidget_PathText* pathTextWidgets;
-	QTreeWidgetItem* pathTextItem;
 };
 
 #endif

Modified: trunk/Scribus/scribus/ui/sctreewidget.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21575&path=/trunk/Scribus/scribus/ui/sctreewidget.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/sctreewidget.cpp	(original)
+++ trunk/Scribus/scribus/ui/sctreewidget.cpp	Sun Dec  4 23:12:23 2016
@@ -132,12 +132,12 @@
 	QTreeWidgetItem *item2 = new QTreeWidgetItem(item1);
 	item2->setFlags(Qt::ItemIsEnabled);
 // hack to work around a bug in Qt-4.3.4
-	if (widget->layout())
-	{
-		widget->layout()->activate();
-		widget->setMinimumSize(widget->layout()->minimumSize());
-		item2->setSizeHint(0, widget->layout()->minimumSize());
-	}
+//	if (widget->layout())
+//	{
+//		widget->layout()->activate();
+//		widget->setMinimumSize(widget->layout()->minimumSize());
+//		item2->setSizeHint(0, widget->layout()->minimumSize());
+//	}
 // end hack
 	setItemWidget(item2, 0, widget);
 	QKeySequence newMnemonic = QKeySequence::mnemonic(title);

Modified: trunk/Scribus/scribus/ui/sctreewidget.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21575&path=/trunk/Scribus/scribus/ui/sctreewidget.h
==============================================================================
--- trunk/Scribus/scribus/ui/sctreewidget.h	(original)
+++ trunk/Scribus/scribus/ui/sctreewidget.h	Sun Dec  4 23:12:23 2016
@@ -50,7 +50,7 @@
 	Q_OBJECT
 public:
 	ScTreeWidget(QWidget* pa);
-	~ScTreeWidget() {};
+	~ScTreeWidget() {}
 	QTreeWidgetItem* addWidget(QString title, QWidget* widget);
 	void setToolBoxMode(bool enable);
 	int addItem(QWidget* widget, QString title);




More information about the scribus-commit mailing list