r16904 by jghali - more work on content properties palette : basics of text properties

scribus-commit scribus-commit at lists.scribus.net
Fri Oct 14 11:19:33 UTC 2011


Author: jghali
Date: Fri Oct 14 11:19:33 2011
New Revision: 16904

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=16904
Log:
more work on content properties palette : basics of text properties

Added:
    branches/ScribusOIF/scribus/ui/propertywidget_text.cpp
    branches/ScribusOIF/scribus/ui/propertywidget_text.h
    branches/ScribusOIF/scribus/ui/propertywidget_textbase.ui
Modified:
    branches/ScribusOIF/scribus/CMakeLists.txt
    branches/ScribusOIF/scribus/scribus.cpp
    branches/ScribusOIF/scribus/ui/propertiespalette_content.cpp
    branches/ScribusOIF/scribus/ui/propertiespalette_content.h
    branches/ScribusOIF/scribus/ui/propertiespalette_text.cpp
    branches/ScribusOIF/scribus/ui/propertiespalette_text.h
    branches/ScribusOIF/scribus/ui/propertywidget_distance.cpp
    branches/ScribusOIF/scribus/ui/propertywidget_distance.h
    branches/ScribusOIF/scribus/ui/propertywidget_image.h
    branches/ScribusOIF/scribus/ui/propertywidget_optmargins.cpp
    branches/ScribusOIF/scribus/ui/propertywidget_optmargins.h
    branches/ScribusOIF/scribus/ui/propertywidget_pathtext.cpp
    branches/ScribusOIF/scribus/ui/propertywidget_pathtext.h
    branches/ScribusOIF/scribus/ui/propertywidget_textcolorbase.ui
    branches/ScribusOIF/win32/vc9/Scribus.vcproj

Modified: branches/ScribusOIF/scribus/CMakeLists.txt
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16904&path=/branches/ScribusOIF/scribus/CMakeLists.txt
==============================================================================
--- branches/ScribusOIF/scribus/CMakeLists.txt (original)
+++ branches/ScribusOIF/scribus/CMakeLists.txt Fri Oct 14 11:19:33 2011
@@ -143,6 +143,7 @@
   ui/propertywidget_pathtextbase.ui
   ui/propertywidget_posbase.ui
   ui/propertywidget_shapebase.ui
+  ui/propertywidget_textbase.ui
   ui/propertywidget_textcolorbase.ui
   ui/propertywidget_textstylesbase.ui
   ui/propertywidget_transparency.ui
@@ -399,6 +400,7 @@
   ui/propertywidget_pathtext.h
   ui/propertywidget_pos.h
   ui/propertywidget_shape.h
+  ui/propertywidget_text.h
   ui/propertywidget_textcolor.h
   ui/propertywidget_textstyles.h
   ui/propertywidget_transparency.h
@@ -829,6 +831,7 @@
   ui/propertywidget_pathtext.cpp
   ui/propertywidget_pos.cpp
   ui/propertywidget_shape.cpp
+  ui/propertywidget_text.cpp
   ui/propertywidget_textcolor.cpp
   ui/propertywidget_textstyles.cpp
   ui/propertywidget_transparency.cpp

Modified: branches/ScribusOIF/scribus/scribus.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16904&path=/branches/ScribusOIF/scribus/scribus.cpp
==============================================================================
--- branches/ScribusOIF/scribus/scribus.cpp (original)
+++ branches/ScribusOIF/scribus/scribus.cpp Fri Oct 14 11:19:33 2011
@@ -9371,7 +9371,6 @@
 		if (datein.isEmpty())
 			prefsManager->appPrefs.hyphPrefs.Language = "English";
 	}
-//	propertiesPalette->fillLangCombo(LangTransl);
 }
 
 QString ScribusMainWindow::GetLang(QString inLang)

Modified: branches/ScribusOIF/scribus/ui/propertiespalette_content.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16904&path=/branches/ScribusOIF/scribus/ui/propertiespalette_content.cpp
==============================================================================
--- branches/ScribusOIF/scribus/ui/propertiespalette_content.cpp (original)
+++ branches/ScribusOIF/scribus/ui/propertiespalette_content.cpp Fri Oct 14 11:19:33 2011
@@ -17,6 +17,7 @@
 #include "pageitem.h"
 #include "propertiespalette_content.h"
 #include "propertywidget_image.h"
+#include "propertywidget_text.h"
 #include "scribus.h"
 #include "scribuscore.h"
 #include "scribusdoc.h"
@@ -52,26 +53,48 @@
 	
 	QHBoxLayout* hboxLayout = new QHBoxLayout();
 	hboxLayout->setObjectName(QString::fromUtf8("hboxLayout"));
-	
+
+	QButtonGroup* buttonGroup = new QButtonGroup(widget);
+	buttonGroup->setObjectName(QString::fromUtf8("buttonGroup"));
+
 	QToolButton* imageButton = new QToolButton(widget);
 	imageButton->setObjectName(QString::fromUtf8("imageButton"));
 	imageButton->setSizePolicy( QSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed));
+	imageButton->setIcon( loadIcon("16/insert-image.png") );
 	imageButton->setText("");
 	hboxLayout->addWidget(imageButton);
 	
 	QToolButton* textButton = new QToolButton(widget);
 	textButton->setObjectName(QString::fromUtf8("textButton"));
 	textButton->setSizePolicy( QSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed));
+	textButton->setIcon( loadIcon("16/insert-text-frame.png") );
 	textButton->setText("");
 	hboxLayout->addWidget(textButton);
+
+	QToolButton* tableButton = new QToolButton(widget);
+	tableButton->setObjectName(QString::fromUtf8("tableButton"));
+	tableButton->setSizePolicy( QSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed));
+	tableButton->setIcon( loadIcon("16/insert-table.png") );
+	tableButton->setText("");
+	hboxLayout->addWidget(tableButton);
 	
 	vboxLayout->addLayout(hboxLayout);
+
+	buttonGroup->addButton(imageButton);
+	buttonGroup->addButton(textButton);
+	buttonGroup->addButton(tableButton);
+	imageButton->setChecked(true);
 	
 	QStackedWidget* widgetStack = new QStackedWidget(this);
 	widgetStack->setObjectName(QString::fromUtf8("widgetStack"));
 	
 	imageWidget = new PropertyWidget_Image(widgetStack);
+	imageWidget->setObjectName(QString::fromUtf8("imagePropsWidget"));
 	widgetStack->addWidget(imageWidget);
+
+	textWidget = new PropertyWidget_Text(widgetStack);
+	textWidget->setObjectName(QString::fromUtf8("textPropsWidget"));
+	widgetStack->addWidget(textWidget);
 	
 	vboxLayout->addWidget(widgetStack);
 	
@@ -80,6 +103,17 @@
 	setWidget(widget);
 
 	languageChange();
+
+	connect(buttonGroup, SIGNAL(buttonClicked(QAbstractButton*)), this, SLOT(onButtonGroupClicked(QAbstractButton*)));
+}
+
+void PropertiesPalette_Content::onButtonGroupClicked(QAbstractButton* button)
+{
+	QStackedWidget* widgetStack = this->findChild<QStackedWidget*>("widgetStack");
+	if (button->objectName() == "imageButton")
+		widgetStack->setCurrentIndex(0);
+	if (button->objectName() == "textButton")
+		widgetStack->setCurrentIndex(1);
 }
 
 void PropertiesPalette_Content::connectSignals()
@@ -111,7 +145,8 @@
 	setParent(m_ScMW);
 	move(p2);
 
-	this->imageWidget->setMainWindow(mw);
+	imageWidget->setMainWindow(mw);
+	textWidget->setMainWindow(mw);
 }
 
 void PropertiesPalette_Content::setDoc(ScribusDoc *d)
@@ -128,7 +163,8 @@
 	m_doc = d;
 	m_item = NULL;
 
-	this->imageWidget->setDoc(m_doc);
+	imageWidget->setDoc(m_doc);
+	textWidget->setDoc(m_doc);
 
 	if (m_doc.isNull())
 	{
@@ -195,6 +231,7 @@
 	setWindowTitle( tr("Content Properties"));
 
 	imageWidget->languageChange();
+	textWidget->languageChange();
 }
 
 void PropertiesPalette_Content::unitChange()
@@ -206,4 +243,5 @@
 	m_unitIndex = m_doc->unitIndex();
 
 	imageWidget->unitChange();
-}
+	textWidget->unitChange();
+}

Modified: branches/ScribusOIF/scribus/ui/propertiespalette_content.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16904&path=/branches/ScribusOIF/scribus/ui/propertiespalette_content.h
==============================================================================
--- branches/ScribusOIF/scribus/ui/propertiespalette_content.h (original)
+++ branches/ScribusOIF/scribus/ui/propertiespalette_content.h Fri Oct 14 11:19:33 2011
@@ -12,8 +12,11 @@
 #include "propertywidgetbase.h"
 #include "scdockpalette.h"
 
+class QAbstractButton;
+
 class PageItem;
 class PropertyWidget_Image;
+class PropertyWidget_Text;
 class ScribusDoc;
 class ScribusMainWindow;
 class Selection;
@@ -43,6 +46,7 @@
 	
 private:
 	PropertyWidget_Image* imageWidget;
+	PropertyWidget_Text*  textWidget;
 	
 public slots:
 	void setDoc(ScribusDoc *d);
@@ -52,6 +56,9 @@
 
 	void languageChange();
 	void unitChange();
+
+private slots:
+	void onButtonGroupClicked(QAbstractButton* button);
 };
 
 #endif

Modified: branches/ScribusOIF/scribus/ui/propertiespalette_text.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16904&path=/branches/ScribusOIF/scribus/ui/propertiespalette_text.cpp
==============================================================================
--- branches/ScribusOIF/scribus/ui/propertiespalette_text.cpp (original)
+++ branches/ScribusOIF/scribus/ui/propertiespalette_text.cpp Fri Oct 14 11:19:33 2011
@@ -100,28 +100,7 @@
 	connect(charStyleClear, SIGNAL(clicked()), this, SLOT(doClearCStyle()));
 	connect(paraStyleClear, SIGNAL(clicked()), this, SLOT(doClearPStyle()));
 
-	connect(distanceWidgets->columns       , SIGNAL(valueChanged(int))   , this, SLOT(handleColumns()));
-	connect(distanceWidgets->columnGap     , SIGNAL(valueChanged(double)), this, SLOT(handleColumnGap()));
-	connect(distanceWidgets->columnGapLabel, SIGNAL(activated(int))      , this, SLOT(handleGapSwitch()));
-	connect(distanceWidgets->topDistance   , SIGNAL(valueChanged(double)), this, SLOT(handleTextDistances()));
-	connect(distanceWidgets->leftDistance  , SIGNAL(valueChanged(double)), this, SLOT(handleTextDistances()));
-	connect(distanceWidgets->rightDistance , SIGNAL(valueChanged(double)), this, SLOT(handleTextDistances()));
-	connect(distanceWidgets->bottomDistance, SIGNAL(valueChanged(double)), this, SLOT(handleTextDistances()));
-	connect(distanceWidgets->tabsButton    , SIGNAL( clicked() )         , this, SLOT( handleTabs() ) );
-
 	connect(flopBox->flopGroup, SIGNAL(buttonClicked( int )), this, SLOT(handleFirstLinePolicy(int)));
-
-	connect(optMargins->optMarginRadioNone  , SIGNAL(clicked()), this, SLOT(handleOpticalMargins()) );
-	connect(optMargins->optMarginRadioBoth  , SIGNAL(clicked()), this, SLOT(handleOpticalMargins()) );
-	connect(optMargins->optMarginRadioLeft  , SIGNAL(clicked()), this, SLOT(handleOpticalMargins()) );
-	connect(optMargins->optMarginRadioRight , SIGNAL(clicked()), this, SLOT(handleOpticalMargins()) );
-	connect(optMargins->optMarginResetButton, SIGNAL(clicked()), this, SLOT(resetOpticalMargins()) );
-	
-	connect(pathTextWidgets->showCurveCheckBox, SIGNAL(clicked())     , this, SLOT(handlePathLine()));
-	connect(pathTextWidgets->pathTextType     , SIGNAL(activated(int)), this, SLOT(handlePathType()));
-	connect(pathTextWidgets->flippedPathText  , SIGNAL(clicked())     , this, SLOT(handlePathFlip()));
-	connect(pathTextWidgets->startOffset      , SIGNAL(valueChanged(double)), this, SLOT(handlePathDist()));
-	connect(pathTextWidgets->distFromCurve    , SIGNAL(valueChanged(double)), this, SLOT(handlePathOffs()));
 
 	connect(lineSpacingModeCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(handleLineSpacingMode(int)));
 
@@ -135,10 +114,11 @@
 
 	advancedWidgets->setMainWindow(mw);
 	colorWidgets->setMainWindow(mw);
+	distanceWidgets->setMainWindow(mw);
+	optMargins->setMainWindow(mw);
+	pathTextWidgets->setMainWindow(mw);
 
 	connect(this  , SIGNAL(DocChanged())           , m_ScMW, SLOT(slotDocCh()));
-	connect(this  , SIGNAL(NewAlignment(int))      , m_ScMW, SLOT(setNewAlignment(int)));
-	connect(this  , SIGNAL(NewFont(const QString&)), m_ScMW, SLOT(SetNewFont(const QString&)));
 	connect(m_ScMW, SIGNAL(UpdateRequest(int))     , this  , SLOT(handleUpdateRequest(int)));
 
 	connect(paraStyleCombo, SIGNAL(newStyle(const QString&)), m_ScMW, SLOT(setNewParStyle(const QString&)), Qt::UniqueConnection);
@@ -206,6 +186,7 @@
 	flopBox->setDoc(0);
 	optMargins->setDoc(0);
 	orphanBox->setDoc(0);
+	pathTextWidgets->setDoc(0);
 
 	m_haveItem = false;
 
@@ -314,55 +295,12 @@
 	m_haveItem = false;
 	m_item = i;
 
-	QString tm;
-	PageItem_TextFrame *i2=m_item->asTextFrame();
-	if (i2!=0)
-	{
-		disconnect(distanceWidgets->columnGap, SIGNAL(valueChanged(double)), this, SLOT(handleColumnGap()));
-		disconnect(distanceWidgets->columns  , SIGNAL(valueChanged(int)), this, SLOT(handleColumns()));
-		distanceWidgets->columns->setMaximum(qMax(qRound(i2->width() / qMax(i2->ColGap, 10.0)), 1));
-		distanceWidgets->columns->setMinimum(1);
-		distanceWidgets->columns->setValue(i2->Cols);
-		distanceWidgets->columnGap->setMinimum(0);
-		if (distanceWidgets->columnGapLabel->currentIndex() == 0)
-		{
-			distanceWidgets->columnGap->setMaximum(qMax((i2->width() / i2->Cols - i2->textToFrameDistLeft() - i2->textToFrameDistRight())*m_unitRatio, 0.0));
-			distanceWidgets->columnGap->setValue(i2->ColGap*m_unitRatio);
-		}
-		else
-		{
-			distanceWidgets->columnGap->setMaximum(qMax((i2->width() / i2->Cols)*m_unitRatio, 0.0));
-			distanceWidgets->columnGap->setValue(i2->columnWidth()*m_unitRatio);
-		}
-		distanceWidgets->leftDistance->setValue(i2->textToFrameDistLeft()*m_unitRatio);
-		distanceWidgets->topDistance->setValue(i2->textToFrameDistTop()*m_unitRatio);
-		distanceWidgets->bottomDistance->setValue(i2->textToFrameDistBottom()*m_unitRatio);
-		distanceWidgets->rightDistance->setValue(i2->textToFrameDistRight()*m_unitRatio);
-		if (distanceWidgets->columns->value() == 1)
-		{
-			distanceWidgets->columnGap->setEnabled(false);
-			distanceWidgets->columnGapLabel->setEnabled(false);
-		}
-		else
-		{
-			distanceWidgets->columnGap->setEnabled(true);
-			distanceWidgets->columnGapLabel->setEnabled(true);
-		}
-		// I put it here because it’s visually grouped with these elements
-		// but it’s a PageItem prop. and as such should be set without considering
-		// the frame type.
-		displayFirstLinePolicy(m_item->firstLineOffset());
-		
-		connect(distanceWidgets->columnGap, SIGNAL(valueChanged(double)), this, SLOT(handleColumnGap()));
-		connect(distanceWidgets->columns, SIGNAL(valueChanged(int))   , this, SLOT(handleColumns()));
-	}
+	displayFirstLinePolicy(m_item->firstLineOffset());
 
 	if (m_item->asTextFrame() || m_item->asPathText())
 	{
 		fonts->RebuildList(m_doc, m_item->isAnnotation());
 	}
-
-	displayTextDistances(i->textToFrameDistLeft(),i->textToFrameDistTop(),i->textToFrameDistBottom(),i->textToFrameDistRight());
 
 	if ((m_item->isGroup()) && (!m_item->isSingleSel))
 	{
@@ -374,11 +312,6 @@
 		distanceItem->setHidden(true);
 		orphanItem->setHidden(true);
 		pathTextItem->setHidden(false);
-		pathTextWidgets->pathTextType->setCurrentIndex(m_item->textPathType);
-		pathTextWidgets->flippedPathText->setChecked(m_item->textPathFlipped);
-		pathTextWidgets->showCurveCheckBox->setChecked(m_item->PoShow);
-		pathTextWidgets->distFromCurve->setValue(m_item->BaseOffs * -1);
-		pathTextWidgets->startOffset->setValue(m_item->textToFrameDistLeft());
 	}
 	else if (m_item->asTextFrame())
 	{
@@ -431,47 +364,6 @@
 	m_haveItem = tmp;
 }
 
-void PropertiesPalette_Text::displayColumns(int r, double g)
-{
-	if (!m_ScMW || m_ScMW->scriptIsRunning())
-		return;
-	bool tmp = m_haveItem;
-	m_haveItem = false;
-	distanceWidgets->columns->setValue(r);
-	distanceWidgets->columnGap->setValue(g*m_unitRatio);
-	if (tmp)
-	{
-		PageItem_TextFrame *i2=m_item->asTextFrame();
-		if (i2!=0)
-		{
-			distanceWidgets->columns->setMaximum(qMax(qRound(i2->width() / qMax(i2->ColGap, 10.0)), 1));
-			if (distanceWidgets->columnGapLabel->currentIndex() == 0)
-			{
-				distanceWidgets->columnGap->setMaximum(qMax((i2->width() / i2->Cols - i2->textToFrameDistLeft() - i2->textToFrameDistRight())*m_unitRatio, 0.0));
-				distanceWidgets->columnGap->setValue(i2->ColGap*m_unitRatio);
-			}
-			else
-			{
-				distanceWidgets->columnGap->setMaximum(qMax((i2->width() / i2->Cols)*m_unitRatio, 0.0));
-				distanceWidgets->columnGap->setValue(i2->columnWidth()*m_unitRatio);
-			}
-		}
-	}
-	distanceWidgets->columns->setMinimum(1);
-	distanceWidgets->columnGap->setMinimum(0);
-	if (distanceWidgets->columns->value() == 1)
-	{
-		distanceWidgets->columnGap->setEnabled(false);
-		distanceWidgets->columnGapLabel->setEnabled(false);
-	}
-	else
-	{
-		distanceWidgets->columnGap->setEnabled(true);
-		distanceWidgets->columnGapLabel->setEnabled(true);
-	}
-	m_haveItem = tmp;
-}
-
 void PropertiesPalette_Text::handleLineSpacingMode(int id)
 {
 	if ((m_haveDoc) && (m_haveItem))
@@ -495,13 +387,6 @@
 		lineSpacingModeCombo->setCurrentIndex(curStyle.lineSpacingMode());
 	}
 	m_haveItem = tmp;
-}
-
-void PropertiesPalette_Text::displayTextDistances(double left, double top, double bottom, double right)
-{
-	if (!m_ScMW || m_ScMW->scriptIsRunning())
-		return;
-	distanceWidgets->displayTextDistances(left, top, bottom, right);
 }
 
 void PropertiesPalette_Text::displayFontFace(const QString& newFont)
@@ -577,6 +462,7 @@
 
 	advancedWidgets->updateStyle(newCurrent);
 	colorWidgets->updateStyle(newCurrent);
+	optMargins->updateStyle(newCurrent);
 	orphanBox->updateStyle (newCurrent);
 
 	displayFontFace(charStyle.font().scName());
@@ -589,8 +475,6 @@
 	lineSpacingModeCombo->setCurrentIndex(newCurrent.lineSpacingMode());
 	textAlignment->setStyle(newCurrent.alignment());
 	
-	displayOpticalMargins(newCurrent);
-	
 	m_haveItem = tmp;
 }
 
@@ -639,139 +523,32 @@
 	paraStyleCombo->blockSignals(blocked);
 }
 
-void PropertiesPalette_Text::handleOpticalMargins()
+void PropertiesPalette_Text::handleLineSpacing()
 {
 	if (!m_haveDoc || !m_haveItem || !m_ScMW || m_ScMW->scriptIsRunning())
 		return;
-	int omt(ParagraphStyle::OM_None);
-	if (optMargins->optMarginRadioBoth->isChecked())
-		omt = ParagraphStyle::OM_Default;
-	else if (optMargins->optMarginRadioLeft->isChecked())
-		omt = ParagraphStyle::OM_LeftHangingPunct;
-	else if (optMargins->optMarginRadioRight->isChecked())
-		omt = ParagraphStyle::OM_RightHangingPunct;
-
-	m_doc->itemSelection_SetOpticalMargins(omt);
-}
-
-void PropertiesPalette_Text::resetOpticalMargins()
+	m_doc->itemSelection_SetLineSpacing(lineSpacing->value());
+}
+
+void PropertiesPalette_Text::handleFontSize()
 {
 	if (!m_haveDoc || !m_haveItem || !m_ScMW || m_ScMW->scriptIsRunning())
 		return;
-	m_doc->itemSelection_resetOpticalMargins();
-}
-
-void PropertiesPalette_Text::displayOpticalMargins(const ParagraphStyle & pStyle)
-{
-	ParagraphStyle::OpticalMarginType omt(static_cast<ParagraphStyle::OpticalMarginType>(pStyle.opticalMargins()));
-	bool blocked = optMargins->optMarginRadioBoth->blockSignals(true);
-	if (omt == ParagraphStyle::OM_Default)
-		optMargins->optMarginRadioBoth->setChecked(true);
-	else if (omt == ParagraphStyle::OM_LeftHangingPunct)
-		optMargins->optMarginRadioLeft->setChecked(true);
-	else if (omt == ParagraphStyle::OM_RightHangingPunct)
-		optMargins->optMarginRadioRight->setChecked(true);
-	else
-		optMargins->optMarginRadioNone->setChecked(true);
-	optMargins->optMarginRadioBoth->blockSignals(blocked);
-}
-
-void PropertiesPalette_Text::handleLineSpacing()
+	m_doc->itemSelection_SetFontSize(qRound(fontSize->value()*10.0));
+}
+
+void PropertiesPalette_Text::handleAlignement(int a)
 {
 	if (!m_haveDoc || !m_haveItem || !m_ScMW || m_ScMW->scriptIsRunning())
 		return;
-	m_doc->itemSelection_SetLineSpacing(lineSpacing->value());
-}
-
-void PropertiesPalette_Text::handleGapSwitch()
+	m_doc->itemSelection_SetAlignment(a);
+}
+
+void PropertiesPalette_Text::handleTextFont(QString c)
 {
 	if (!m_haveDoc || !m_haveItem || !m_ScMW || m_ScMW->scriptIsRunning())
 		return;
-	displayColumns(m_item->Cols, m_item->ColGap);
-	distanceWidgets->columnGap->setToolTip("");
-	if (distanceWidgets->columnGapLabel->currentIndex() == 0)
-		distanceWidgets->columnGap->setToolTip( tr( "Distance between columns" ) );
-	else
-		distanceWidgets->columnGap->setToolTip( tr( "Column width" ) );
-}
-
-void PropertiesPalette_Text::handleColumns()
-{
-	if (!m_haveDoc || !m_haveItem || !m_ScMW || m_ScMW->scriptIsRunning())
-		return;
-	m_item->Cols = distanceWidgets->columns->value();
-	displayColumns(m_item->Cols, m_item->ColGap);
-	m_item->update();
-	if (distanceWidgets->columns->value() == 1)
-	{
-		distanceWidgets->columnGap->setEnabled(false);
-		distanceWidgets->columnGapLabel->setEnabled(false);
-	}
-	else
-	{
-		distanceWidgets->columnGap->setEnabled(true);
-		distanceWidgets->columnGapLabel->setEnabled(true);
-	}
-	emit DocChanged();
-}
-
-void PropertiesPalette_Text::handleColumnGap()
-{
-	if (!m_haveDoc || !m_haveItem || !m_ScMW || m_ScMW->scriptIsRunning())
-		return;
-	if (distanceWidgets->columnGapLabel->currentIndex() == 0)
-		m_item->ColGap = distanceWidgets->columnGap->value() / m_unitRatio;
-	else
-	{
-		double lineCorr;
-		if ((m_item->lineColor() != CommonStrings::None) || (!m_item->strokePattern().isEmpty()))
-			lineCorr = m_item->lineWidth();
-		else
-			lineCorr = 0;
-		double newWidth = distanceWidgets->columnGap->value() / m_unitRatio;
-		double newGap = qMax(((m_item->width() - m_item->textToFrameDistLeft() - m_item->textToFrameDistRight() - lineCorr) - (newWidth * m_item->Cols)) / (m_item->Cols - 1), 0.0);
-		m_item->ColGap = newGap;
-	}
-	m_item->update();
-	emit DocChanged();
-}
-
-void PropertiesPalette_Text::handleFontSize()
-{
-	if (!m_haveDoc || !m_haveItem || !m_ScMW || m_ScMW->scriptIsRunning())
-		return;
-	m_doc->itemSelection_SetFontSize(qRound(fontSize->value()*10.0));
-}
-
-void PropertiesPalette_Text::handleAlignement(int a)
-{
-	if (!m_haveDoc || !m_haveItem || !m_ScMW || m_ScMW->scriptIsRunning())
-		return;
-	m_doc->itemSelection_SetAlignment(a);
-}
-
-void PropertiesPalette_Text::handleTextDistances()
-{
-	if (!m_ScMW || m_ScMW->scriptIsRunning())
-		return;
-	if ((m_haveDoc) && (m_haveItem))
-	{
-		double left   = distanceWidgets->leftDistance->value() / m_unitRatio;
-		double right  = distanceWidgets->rightDistance->value() / m_unitRatio;
-		double top    = distanceWidgets->topDistance->value() / m_unitRatio;
-		double bottom = distanceWidgets->bottomDistance->value() / m_unitRatio;
-		m_item->setTextToFrameDist(left, right, top, bottom);
-		displayColumns(m_item->Cols, m_item->ColGap);
-		m_item->update();
-		emit DocChanged();
-	}
-}
-
-void PropertiesPalette_Text::handleTextFont(QString c)
-{
-	if (!m_haveDoc || !m_haveItem || !m_ScMW || m_ScMW->scriptIsRunning())
-		return;
-	emit NewFont(c);
+	m_ScMW->SetNewFont(c);
 }
 
 void PropertiesPalette_Text::doClearCStyle()
@@ -803,111 +580,6 @@
 		return;
 
 	colorWidgets->updateColorList();
-}
-
-void PropertiesPalette_Text::handlePathType()
-{
-	if (!m_haveDoc || !m_haveItem || !m_ScMW || m_ScMW->scriptIsRunning())
-		return;
-	m_item->textPathType = pathTextType->currentIndex();
-	m_item->update();
-	emit DocChanged();
-}
-
-void PropertiesPalette_Text::handlePathFlip()
-{
-	if (!m_haveDoc || !m_haveItem || !m_ScMW || m_ScMW->scriptIsRunning())
-		return;
-	m_item->textPathFlipped = pathTextWidgets->flippedPathText->isChecked();
-	m_item->updatePolyClip();
-	m_item->update();
-	emit DocChanged();
-}
-
-void PropertiesPalette_Text::handlePathLine()
-{
-	if (!m_haveDoc || !m_haveItem || !m_ScMW || m_ScMW->scriptIsRunning())
-		return;
-	m_item->PoShow = pathTextWidgets->showCurveCheckBox->isChecked();
-	m_item->update();
-	emit DocChanged();
-}
-
-void PropertiesPalette_Text::handlePathDist()
-{
-	if (!m_haveDoc || !m_haveItem || !m_ScMW || m_ScMW->scriptIsRunning())
-		return;
-	m_item->setTextToFrameDistLeft(pathTextWidgets->startOffset->value());
-	m_doc->AdjustItemSize(m_item);
-	m_item->updatePolyClip();
-	m_item->update();
-	emit DocChanged();
-}
-
-void PropertiesPalette_Text::handlePathOffs()
-{
-	if (!m_haveDoc || !m_haveItem || !m_ScMW || m_ScMW->scriptIsRunning())
-		return;
-	m_item->BaseOffs = -pathTextWidgets->distFromCurve->value();
-	m_doc->AdjustItemSize(m_item);
-	m_item->updatePolyClip();
-	m_item->update();
-	emit DocChanged();
-}
-
-void PropertiesPalette_Text::fillLangCombo(QMap<QString,QString> langMap)
-{
-	QStringList sortList;
-	QMap<QString,QString>::Iterator it;
-	if (!m_ScMW || m_ScMW->scriptIsRunning())
-		return;
-	langCombo->clear();
-	for (it = langMap.begin(); it != langMap.end(); ++it)
-		sortList.push_back(it.value());
-	langCombo->addItems(sortQStringList(sortList));
-	QListView *tmpView = dynamic_cast<QListView*>(langCombo->view()); Q_ASSERT(tmpView);
-	int tmpWidth = tmpView->sizeHintForColumn(0);
-	if (tmpWidth > 0)
-		tmpView->setMinimumWidth(tmpWidth + 24);
-}
-
-void PropertiesPalette_Text::handleHyphLanguage()
-{
-	if ((m_haveDoc) && (m_haveItem))
-	{
-		m_item->doc()->setHyphLanguage(m_ScMW->GetLang(langCombo->currentText()));
-		emit DocChanged();
-	}
-}
-
-void PropertiesPalette_Text::handleTabs()
-{
-	if ((m_haveDoc) && (m_haveItem))
-	{
-		PageItem_TextFrame *i2=m_item->asTextFrame();
-		if (i2==0)
-			return;
-		const ParagraphStyle& style(m_doc->appMode == modeEdit ? i2->currentStyle() : i2->itemText.defaultStyle());
-		TabManager *dia = new TabManager(this, m_doc->unitIndex(), style.tabValues(), i2->columnWidth());
-		if (dia->exec())
-		{
-			if (m_doc->appMode != modeEdit)
-			{
-				ParagraphStyle newStyle(m_item->itemText.defaultStyle());
-				newStyle.setTabValues(dia->tmpTab);
-				m_item->itemText.setDefaultStyle(newStyle);
-			}
-			else
-			{
-				ParagraphStyle newStyle;
-				newStyle.setTabValues(dia->tmpTab);
-				m_doc->itemSelection_ApplyParagraphStyle(newStyle);
-			}
-			m_item->update();
-			emit DocChanged();
-		}
-		delete dia;
-	}
 }
 
 void PropertiesPalette_Text::changeEvent(QEvent *e)
@@ -932,7 +604,6 @@
 	optMarginsItem->setText(0, tr("Optical Margins"));
 	orphanItem->setText(0, tr("Orphans and Widows"));
 	pathTextItem->setText(0, tr("Path Text Properties"));
-	
 
 	int oldLineSpacingMode = lineSpacingModeCombo->currentIndex();
 	lineSpacingModeCombo->clear();

Modified: branches/ScribusOIF/scribus/ui/propertiespalette_text.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16904&path=/branches/ScribusOIF/scribus/ui/propertiespalette_text.h
==============================================================================
--- branches/ScribusOIF/scribus/ui/propertiespalette_text.h (original)
+++ branches/ScribusOIF/scribus/ui/propertiespalette_text.h Fri Oct 14 11:19:33 2011
@@ -46,11 +46,7 @@
 	virtual void changeEvent(QEvent *e);
 	
 	void updateColorList();
-	/*! \brief fills the langs combobox in language specific order
-	\author 10/07/2004 - Petr Vanek - rewritten to fix #1185.
-	Uses sortQStringList from utils.cpp - STL!
-	\param langMap a structure with languages/hyphs*/
-	void fillLangCombo(QMap<QString,QString> langMap);
+
 	/** @brief Returns true if there is a user action going on at the moment of call. */
 	bool userActionOn(); // not yet implemented!!! This is needed badly.
                          // When user releases the mouse button or arrow key, changes must be checked
@@ -87,14 +83,11 @@
 
 	void displayAlignment(int e);
 	void displayCharStyle(const QString& name);
-	void displayColumns(int r, double g);
 	void displayFontFace(const QString&);
 	void displayFontSize(double s);
 	void displayFirstLinePolicy(FirstLineOffsetPolicy);
 	void displayLineSpacing(double r);
-	void displayOpticalMargins(const ParagraphStyle& pStyle);
 	void displayParStyle(const QString& name);
-	void displayTextDistances(double left, double top, double bottom, double right);
 	
 	void setupLineSpacingSpinbox(int mode, double value);
 	
@@ -107,35 +100,20 @@
 	void updateTextStyles();
 	
 	void handleLineSpacingMode(int id);
-	void handleOpticalMargins();
-	void resetOpticalMargins();
-	void handleTabs();
 	void handleTextFont(QString);
 
 private slots:
 	void handleAlignement(int a);
-	void handleColumns();
-	void handleColumnGap();
 	void handleFirstLinePolicy(int);
 	void handleFontSize();
-	void handleGapSwitch();
-	void handleHyphLanguage();
 	void handleLineSpacing();
-	void handleTextDistances();
 	
 	void doClearCStyle();
 	void doClearPStyle();
 
-	void handlePathType();
-	void handlePathFlip();
-	void handlePathLine();
-	void handlePathDist();
-	void handlePathOffs();
-
 protected:
 
 	ScComboBox* pathTextType;
-	QComboBox* langCombo;
 
 	PropertyWidget_TextColor* colorWidgets;
 	QTreeWidgetItem* colorWidgetsItem;
@@ -160,8 +138,6 @@
 
 signals:
 	void DocChanged();
-	void NewAlignment(int);
-	void NewFont(const QString&);
 };
 
 #endif

Modified: branches/ScribusOIF/scribus/ui/propertywidget_distance.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16904&path=/branches/ScribusOIF/scribus/ui/propertywidget_distance.cpp
==============================================================================
--- branches/ScribusOIF/scribus/ui/propertywidget_distance.cpp (original)
+++ branches/ScribusOIF/scribus/ui/propertywidget_distance.cpp Fri Oct 14 11:19:33 2011
@@ -7,7 +7,11 @@
 
 #include "propertywidget_distance.h"
 
+#include "pageitem_textframe.h"
+#include "scribus.h"
 #include "scribusdoc.h"
+#include "selection.h"
+#include "tabmanager.h"
 #include "units.h"
 #include "util_icon.h"
 
@@ -40,15 +44,32 @@
 	columnGapLabel->setCurrentIndex(0);
 }
 
+void PropertyWidget_Distance::setMainWindow(ScribusMainWindow* mw)
+{
+	m_ScMW = mw;
+
+	connect(m_ScMW, SIGNAL(UpdateRequest(int)), this  , SLOT(handleUpdateRequest(int)));
+}
+
 void PropertyWidget_Distance::setDoc(ScribusDoc *d)
 {
 	if(d == (ScribusDoc*) m_doc)
 		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())
-		return;
+	{
+		disconnectSignals();
+		return;
+	}
 
 	m_unitRatio   = m_doc->unitRatio();
 	m_unitIndex   = m_doc->unitIndex();
@@ -58,6 +79,270 @@
 	leftDistance->setDecimals(2);
 	bottomDistance->setDecimals(2);
 	rightDistance->setDecimals(2);
+
+	connect(m_doc->m_Selection, SIGNAL(selectionChanged()), this, SLOT(handleSelectionChanged()));
+	connect(m_doc             , SIGNAL(docChanged())      , this, SLOT(handleSelectionChanged()));
+}
+
+void PropertyWidget_Distance::setCurrentItem(PageItem *item)
+{
+	if (!m_ScMW || m_ScMW->scriptIsRunning())
+		return;
+	//CB We shouldnt really need to process this if our item is the same one
+	//maybe we do if the item has been changed by scripter.. but that should probably
+	//set some status if so.
+	//FIXME: This wont work until when a canvas deselect happens, m_item must be NULL.
+	//if (m_item == i)
+	//	return;
+
+	if (item && m_doc.isNull())
+		setDoc(item->doc());
+
+	m_item = item;
+
+	disconnectSignals();
+	enableFromSelection();
+
+	if (m_item)
+	{
+		PageItem_TextFrame *textItem = m_item->asTextFrame();
+		if (textItem)
+		{
+			columns->setMaximum(qMax(qRound(textItem->width() / qMax(textItem->ColGap, 10.0)), 1));
+			columns->setMinimum(1);
+			columns->setValue(textItem->Cols);
+			columnGap->setMinimum(0);
+			if (columnGapLabel->currentIndex() == 0)
+			{
+				columnGap->setMaximum(qMax((textItem->width() / textItem->Cols - textItem->textToFrameDistLeft() - textItem->textToFrameDistRight()) * m_unitRatio, 0.0));
+				columnGap->setValue(textItem->ColGap*m_unitRatio);
+			}
+			else
+			{
+				columnGap->setMaximum(qMax((textItem->width() / textItem->Cols) * m_unitRatio, 0.0));
+				columnGap->setValue(textItem->columnWidth() * m_unitRatio);
+			}
+			leftDistance->setValue(textItem->textToFrameDistLeft()*m_unitRatio);
+			topDistance->setValue(textItem->textToFrameDistTop()*m_unitRatio);
+			bottomDistance->setValue(textItem->textToFrameDistBottom()*m_unitRatio);
+			rightDistance->setValue(textItem->textToFrameDistRight()*m_unitRatio);
+			if (columns->value() == 1)
+			{
+				columnGap->setEnabled(false);
+				columnGapLabel->setEnabled(false);
+			}
+			else
+			{
+				columnGap->setEnabled(true);
+				columnGapLabel->setEnabled(true);
+			}
+		}
+
+		displayTextDistances(item->textToFrameDistLeft(), item->textToFrameDistTop(), item->textToFrameDistBottom(), item->textToFrameDistRight());
+		connectSignals();
+	}
+}
+
+void PropertyWidget_Distance::connectSignals()
+{
+	connect(columns       , SIGNAL(valueChanged(int))   , this, SLOT(handleColumns()));
+	connect(columnGap     , SIGNAL(valueChanged(double)), this, SLOT(handleColumnGap()));
+	connect(columnGapLabel, SIGNAL(activated(int))      , this, SLOT(handleGapSwitch()));
+	connect(topDistance   , SIGNAL(valueChanged(double)), this, SLOT(handleTextDistances()));
+	connect(leftDistance  , SIGNAL(valueChanged(double)), this, SLOT(handleTextDistances()));
+	connect(rightDistance , SIGNAL(valueChanged(double)), this, SLOT(handleTextDistances()));
+	connect(bottomDistance, SIGNAL(valueChanged(double)), this, SLOT(handleTextDistances()));
+	connect(tabsButton    , SIGNAL(clicked())           , this, SLOT(handleTabs()));
+}
+
+void PropertyWidget_Distance::disconnectSignals()
+{
+	disconnect(columns       , SIGNAL(valueChanged(int))   , this, SLOT(handleColumns()));
+	disconnect(columnGap     , SIGNAL(valueChanged(double)), this, SLOT(handleColumnGap()));
+	disconnect(columnGapLabel, SIGNAL(activated(int))      , this, SLOT(handleGapSwitch()));
+	disconnect(topDistance   , SIGNAL(valueChanged(double)), this, SLOT(handleTextDistances()));
+	disconnect(leftDistance  , SIGNAL(valueChanged(double)), this, SLOT(handleTextDistances()));
+	disconnect(rightDistance , SIGNAL(valueChanged(double)), this, SLOT(handleTextDistances()));
+	disconnect(bottomDistance, SIGNAL(valueChanged(double)), this, SLOT(handleTextDistances()));
+	disconnect(tabsButton    , SIGNAL(clicked())           , this, SLOT(handleTabs()));
+}
+
+void PropertyWidget_Distance::enableFromSelection(void)
+{
+	bool enabled = false;
+	if (m_item && m_doc)
+	{
+		enabled  = m_item->isTextFrame();
+		enabled &= (m_doc->m_Selection->count() == 1);
+
+		if (m_item->asTextFrame())
+		{
+			int numCols = m_item->asTextFrame()->Cols;
+			
+			columnGap->setEnabled(numCols != 1);
+			columnGapLabel->setEnabled(numCols != 1);
+		}
+	}
+	setEnabled(enabled);
+}
+
+void PropertyWidget_Distance::handleSelectionChanged()
+{
+	if (!m_doc || !m_ScMW || m_ScMW->scriptIsRunning())
+		return;
+
+	PageItem* currItem = currentItemFromSelection();
+	setCurrentItem(currItem);
+	updateGeometry();
+	repaint();
+}
+
+void PropertyWidget_Distance::handleUpdateRequest(int /*updateFlags*/)
+{
+	// Nothing to do in this widget
+}
+
+void PropertyWidget_Distance::displayColumns(int r, double g)
+{
+	if (!m_ScMW || m_ScMW->scriptIsRunning())
+		return;
+
+	bool cSigWasBlocked    = columns->blockSignals(true);
+	bool cGapSigWasBlocked = columnGap->blockSignals(true);
+
+	columns->setValue(r);
+	columnGap->setValue(g * m_unitRatio);
+	if (m_item)
+	{
+		PageItem_TextFrame *textItem = m_item->asTextFrame();
+		if (textItem != 0)
+		{
+			columns->setMaximum(qMax(qRound(textItem->width() / qMax(textItem->ColGap, 10.0)), 1));
+			if (columnGapLabel->currentIndex() == 0)
+			{
+				columnGap->setMaximum(qMax((textItem->width() / textItem->Cols - textItem->textToFrameDistLeft() - textItem->textToFrameDistRight()) * m_unitRatio, 0.0));
+				columnGap->setValue(textItem->ColGap * m_unitRatio);
+			}
+			else
+			{
+				columnGap->setMaximum(qMax((textItem->width() / textItem->Cols) * m_unitRatio, 0.0));
+				columnGap->setValue(textItem->columnWidth() * m_unitRatio);
+			}
+		}
+	}
+	columns->setMinimum(1);
+	columnGap->setMinimum(0);
+	columnGap->setEnabled(columns->value() != 1);
+	columnGapLabel->setEnabled(columns->value() != 1);
+
+	columns->blockSignals(cSigWasBlocked);
+	columnGap->blockSignals(cGapSigWasBlocked);
+}
+
+void PropertyWidget_Distance::displayTextDistances(double left, double top, double bottom, double right)
+{
+	leftDistance->showValue(left * m_unitRatio);
+	topDistance->showValue(top * m_unitRatio);
+	bottomDistance->showValue(bottom * m_unitRatio);
+	rightDistance->showValue(right * m_unitRatio);
+}
+
+void PropertyWidget_Distance::handleColumns()
+{
+	if (!m_doc || !m_item || !m_ScMW || m_ScMW->scriptIsRunning())
+		return;
+	m_item->Cols = columns->value();
+	displayColumns(m_item->Cols, m_item->ColGap);
+	if (columns->value() == 1)
+	{
+		columnGap->setEnabled(false);
+		columnGapLabel->setEnabled(false);
+	}
+	else
+	{
+		columnGap->setEnabled(true);
+		columnGapLabel->setEnabled(true);
+	}
+	m_item->update();
+	//emit DocChanged();
+}
+
+void PropertyWidget_Distance::handleColumnGap()
+{
+	if (!m_doc || !m_item || !m_ScMW || m_ScMW->scriptIsRunning())
+		return;
+	if (columnGapLabel->currentIndex() == 0)
+		m_item->ColGap = columnGap->value() / m_unitRatio;
+	else
+	{
+		double lineCorr;
+		if ((m_item->lineColor() != CommonStrings::None) || (!m_item->strokePattern().isEmpty()))
+			lineCorr = m_item->lineWidth();
+		else
+			lineCorr = 0;
+		double newWidth = columnGap->value() / m_unitRatio;
+		double newGap = qMax(((m_item->width() - m_item->textToFrameDistLeft() - m_item->textToFrameDistRight() - lineCorr) - (newWidth * m_item->Cols)) / (m_item->Cols - 1), 0.0);
+		m_item->ColGap = newGap;
+	}
+	m_item->update();
+	//emit DocChanged();
+}
+
+void PropertyWidget_Distance::handleGapSwitch()
+{
+	if (!m_doc || !m_item || !m_ScMW || m_ScMW->scriptIsRunning())
+		return;
+	displayColumns(m_item->Cols, m_item->ColGap);
+
+	int index = columnGapLabel->currentIndex();
+	columnGap->setToolTip((index == 0) ? tr( "Distance between columns" ) : tr( "Column width" ));
+}
+
+void PropertyWidget_Distance::handleTabs()
+{
+	if (m_doc && m_item)
+	{
+		PageItem_TextFrame *tItem = m_item->asTextFrame();
+		if (tItem == 0)
+			return;
+		const ParagraphStyle& style(m_doc->appMode == modeEdit ? tItem->currentStyle() : tItem->itemText.defaultStyle());
+		TabManager *dia = new TabManager(this, m_doc->unitIndex(), style.tabValues(), tItem->columnWidth());
+		if (dia->exec())
+		{
+			if (m_doc->appMode != modeEdit)
+			{
+				ParagraphStyle newStyle(m_item->itemText.defaultStyle());
+				newStyle.setTabValues(dia->tmpTab);
+				m_item->itemText.setDefaultStyle(newStyle);
+			}
+			else
+			{
+				ParagraphStyle newStyle;
+				newStyle.setTabValues(dia->tmpTab);
+				m_doc->itemSelection_ApplyParagraphStyle(newStyle);
+			}
+			m_item->update();
+			//emit DocChanged();
+		}
+		delete dia;
+	}
+}
+
+void PropertyWidget_Distance::handleTextDistances()
+{
+	if (!m_ScMW || m_ScMW->scriptIsRunning())
+		return;
+	if (m_doc && m_item)
+	{
+		double left   = leftDistance->value() / m_unitRatio;
+		double right  = rightDistance->value() / m_unitRatio;
+		double top    = topDistance->value() / m_unitRatio;
+		double bottom = bottomDistance->value() / m_unitRatio;
+		m_item->setTextToFrameDist(left, right, top, bottom);
+		displayColumns(m_item->Cols, m_item->ColGap);
+		m_item->update();
+		//emit DocChanged();
+	}
 }
 
 void PropertyWidget_Distance::changeEvent(QEvent *e)
@@ -68,41 +353,6 @@
 		return;
 	}
 	QWidget::changeEvent(e);
-}
-
-void PropertyWidget_Distance::displayTextDistances(double left, double top, double bottom, double right)
-{
-	leftDistance->showValue(left*m_unitRatio);
-	topDistance->showValue(top*m_unitRatio);
-	bottomDistance->showValue(bottom*m_unitRatio);
-	rightDistance->showValue(right*m_unitRatio);
-}
-
-void PropertyWidget_Distance::unitChange()
-{
-	if (!m_doc)
-		return;
-
-	m_unitRatio = m_doc->unitRatio();
-	m_unitIndex = m_doc->unitIndex();
-
-	columnGap->blockSignals(true);
-	leftDistance->blockSignals(true);
-	topDistance->blockSignals(true);
-	bottomDistance->blockSignals(true);
-	rightDistance->blockSignals(true);
-
-	columnGap->setNewUnit( m_unitIndex );
-	leftDistance->setNewUnit( m_unitIndex );
-	topDistance->setNewUnit( m_unitIndex );
-	bottomDistance->setNewUnit( m_unitIndex );
-	rightDistance->setNewUnit( m_unitIndex );
-
-	columnGap->blockSignals(false);
-	leftDistance->blockSignals(false);
-	topDistance->blockSignals(false);
-	bottomDistance->blockSignals(false);
-	rightDistance->blockSignals(false);
 }
 
 void PropertyWidget_Distance::languageChange()
@@ -140,4 +390,31 @@
 	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()
+{
+	if (!m_doc)
+		return;
+
+	m_unitRatio = m_doc->unitRatio();
+	m_unitIndex = m_doc->unitIndex();
+
+	columnGap->blockSignals(true);
+	leftDistance->blockSignals(true);
+	topDistance->blockSignals(true);
+	bottomDistance->blockSignals(true);
+	rightDistance->blockSignals(true);
+
+	columnGap->setNewUnit( m_unitIndex );
+	leftDistance->setNewUnit( m_unitIndex );
+	topDistance->setNewUnit( m_unitIndex );
+	bottomDistance->setNewUnit( m_unitIndex );
+	rightDistance->setNewUnit( m_unitIndex );
+
+	columnGap->blockSignals(false);
+	leftDistance->blockSignals(false);
+	topDistance->blockSignals(false);
+	bottomDistance->blockSignals(false);
+	rightDistance->blockSignals(false);
 }

Modified: branches/ScribusOIF/scribus/ui/propertywidget_distance.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16904&path=/branches/ScribusOIF/scribus/ui/propertywidget_distance.h
==============================================================================
--- branches/ScribusOIF/scribus/ui/propertywidget_distance.h (original)
+++ branches/ScribusOIF/scribus/ui/propertywidget_distance.h Fri Oct 14 11:19:33 2011
@@ -9,11 +9,13 @@
 
 #include "ui_propertywidget_distancebase.h"
 
-#include "scguardedptr.h"
+#include "propertywidgetbase.h"
 
 class ScribusDoc;
+class ScribusMainWindow;
 
-class PropertyWidget_Distance : public QFrame, public Ui::PropertyWidget_DistanceBase
+class PropertyWidget_Distance : public QFrame, public Ui::PropertyWidget_DistanceBase,
+                                public PropertyWidgetBase
 {
 	Q_OBJECT
 
@@ -24,20 +26,37 @@
 	virtual void changeEvent(QEvent *e);
 
 protected:
+	void connectSignals();
+	void disconnectSignals();
+
+	PageItem *         m_item;
+	ScribusMainWindow* m_ScMW;
 
 	double m_unitRatio;
 	int    m_unitIndex;
 
-	ScGuardedPtr<ScribusDoc> m_doc;
+	void enableFromSelection(void);
+	void setCurrentItem(PageItem *item);
 
 public slots:
+	void setMainWindow(ScribusMainWindow *mw);
+	void setDoc(ScribusDoc *d);
 
-	void setDoc(ScribusDoc *d);
+	void handleSelectionChanged();
+	void handleUpdateRequest(int);
 
 	void languageChange();
 	void unitChange();
 
+	void displayColumns(int r, double g);
 	void displayTextDistances(double left, double top, double bottom, double right);
+
+private slots:
+	void handleColumns();
+	void handleColumnGap();
+	void handleGapSwitch();
+	void handleTabs();
+	void handleTextDistances();
 };
 
 #endif

Modified: branches/ScribusOIF/scribus/ui/propertywidget_image.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16904&path=/branches/ScribusOIF/scribus/ui/propertywidget_image.h
==============================================================================
--- branches/ScribusOIF/scribus/ui/propertywidget_image.h (original)
+++ branches/ScribusOIF/scribus/ui/propertywidget_image.h Fri Oct 14 11:19:33 2011
@@ -32,15 +32,15 @@
 	void updateCMSOptions();
 
 protected:
-	void connectSignals();
-	void disconnectSignals();
-
 	PageItem *         m_item;
 	ScribusMainWindow* m_ScMW;
 
 	bool      m_userActionOn;
 	double    m_unitRatio;
 	int       m_unitIndex;
+
+	void connectSignals();
+	void disconnectSignals();
 
 	void enableFromSelection(void);
 	void setCurrentItem(PageItem *item);

Modified: branches/ScribusOIF/scribus/ui/propertywidget_optmargins.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16904&path=/branches/ScribusOIF/scribus/ui/propertywidget_optmargins.cpp
==============================================================================
--- branches/ScribusOIF/scribus/ui/propertywidget_optmargins.cpp (original)
+++ branches/ScribusOIF/scribus/ui/propertywidget_optmargins.cpp Fri Oct 14 11:19:33 2011
@@ -7,7 +7,9 @@
 
 #include "propertywidget_optmargins.h"
 
+#include "scribus.h"
 #include "scribusdoc.h"
+#include "selection.h"
 #include "units.h"
 #include "util_icon.h"
 
@@ -22,15 +24,150 @@
 	languageChange();
 }
 
+void PropertyWidget_OptMargins::setMainWindow(ScribusMainWindow* mw)
+{
+	m_ScMW = mw;
+
+	connect(m_ScMW, SIGNAL(UpdateRequest(int)), this  , SLOT(handleUpdateRequest(int)));
+}
+
 void PropertyWidget_OptMargins::setDoc(ScribusDoc *d)
 {
-	if(d == (ScribusDoc*) m_doc)
+	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_OptMargins::setCurrentItem(PageItem *item)
+{
+	if (!m_ScMW || m_ScMW->scriptIsRunning())
+		return;
+	//CB We shouldnt really need to process this if our item is the same one
+	//maybe we do if the item has been changed by scripter.. but that should probably
+	//set some status if so.
+	//FIXME: This wont work until when a canvas deselect happens, m_item must be NULL.
+	//if (m_item == i)
+	//	return;
+
+	if (item && m_doc.isNull())
+		setDoc(item->doc());
+
+	m_item = item;
+
+	disconnectSignals();
+	enableFromSelection();
+
+	if (m_item)
+	{
+		if (m_item->asTextFrame() || m_item->asPathText())
+		{
+			ParagraphStyle parStyle =  m_item->itemText.defaultStyle();
+			if (m_doc->appMode == modeEdit)
+				m_item->currentTextProps(parStyle);
+			displayOpticalMargins(parStyle);
+		}
+
+		connectSignals();
+	}
+}
+
+void PropertyWidget_OptMargins::connectSignals()
+{
+	connect(optMarginRadioNone  , SIGNAL(clicked()), this, SLOT(handleOpticalMargins()) );
+	connect(optMarginRadioBoth  , SIGNAL(clicked()), this, SLOT(handleOpticalMargins()) );
+	connect(optMarginRadioLeft  , SIGNAL(clicked()), this, SLOT(handleOpticalMargins()) );
+	connect(optMarginRadioRight , SIGNAL(clicked()), this, SLOT(handleOpticalMargins()) );
+	connect(optMarginResetButton, SIGNAL(clicked()), this, SLOT(resetOpticalMargins()) );
+}
+
+void PropertyWidget_OptMargins::disconnectSignals()
+{
+	disconnect(optMarginRadioNone  , SIGNAL(clicked()), this, SLOT(handleOpticalMargins()) );
+	disconnect(optMarginRadioBoth  , SIGNAL(clicked()), this, SLOT(handleOpticalMargins()) );
+	disconnect(optMarginRadioLeft  , SIGNAL(clicked()), this, SLOT(handleOpticalMargins()) );
+	disconnect(optMarginRadioRight , SIGNAL(clicked()), this, SLOT(handleOpticalMargins()) );
+	disconnect(optMarginResetButton, SIGNAL(clicked()), this, SLOT(resetOpticalMargins()) );
+}
+
+void PropertyWidget_OptMargins::enableFromSelection(void)
+{
+	bool enabled = false;
+	if (m_item && m_doc)
+	{
+		enabled  = (m_item->isPathText() || m_item->isTextFrame());
+		enabled &= (m_doc->m_Selection->count() == 1);
+	}
+	setEnabled(enabled);
+}
+
+void PropertyWidget_OptMargins::handleSelectionChanged()
+{
+	if (!m_doc || !m_ScMW || m_ScMW->scriptIsRunning())
+		return;
+
+	PageItem* currItem = currentItemFromSelection();
+	setCurrentItem(currItem);
+	updateGeometry();
+	repaint();
+}
+
+void PropertyWidget_OptMargins::displayOpticalMargins(const ParagraphStyle & pStyle)
+{
+	ParagraphStyle::OpticalMarginType omt(static_cast<ParagraphStyle::OpticalMarginType>(pStyle.opticalMargins()));
+	bool blocked = optMarginRadioBoth->blockSignals(true);
+	if (omt == ParagraphStyle::OM_Default)
+		optMarginRadioBoth->setChecked(true);
+	else if (omt == ParagraphStyle::OM_LeftHangingPunct)
+		optMarginRadioLeft->setChecked(true);
+	else if (omt == ParagraphStyle::OM_RightHangingPunct)
+		optMarginRadioRight->setChecked(true);
+	else
+		optMarginRadioNone->setChecked(true);
+	optMarginRadioBoth->blockSignals(blocked);
+}
+
+void PropertyWidget_OptMargins::updateStyle(const ParagraphStyle& newCurrent)
+{
+	displayOpticalMargins(newCurrent);
+}
+
+void PropertyWidget_OptMargins::handleOpticalMargins()
+{
+	if (!m_doc || !m_item || !m_ScMW || m_ScMW->scriptIsRunning())
+		return;
+	int omt(ParagraphStyle::OM_None);
+	if (optMarginRadioBoth->isChecked())
+		omt = ParagraphStyle::OM_Default;
+	else if (optMarginRadioLeft->isChecked())
+		omt = ParagraphStyle::OM_LeftHangingPunct;
+	else if (optMarginRadioRight->isChecked())
+		omt = ParagraphStyle::OM_RightHangingPunct;
+
+	m_doc->itemSelection_SetOpticalMargins(omt);
+}
+
+void PropertyWidget_OptMargins::resetOpticalMargins()
+{
+	if (!m_doc || !m_item || !m_ScMW || m_ScMW->scriptIsRunning())
+		return;
+	m_doc->itemSelection_resetOpticalMargins();
 }
 
 void PropertyWidget_OptMargins::changeEvent(QEvent *e)

Modified: branches/ScribusOIF/scribus/ui/propertywidget_optmargins.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16904&path=/branches/ScribusOIF/scribus/ui/propertywidget_optmargins.h
==============================================================================
--- branches/ScribusOIF/scribus/ui/propertywidget_optmargins.h (original)
+++ branches/ScribusOIF/scribus/ui/propertywidget_optmargins.h Fri Oct 14 11:19:33 2011
@@ -9,11 +9,14 @@
 
 #include "ui_propertywidget_optmarginsbase.h"
 
-#include "scguardedptr.h"
+#include "propertywidgetbase.h"
 
+class ParagraphStyle;
 class ScribusDoc;
+class ScribusMainWindow;
 
-class PropertyWidget_OptMargins : public QFrame, public Ui::PropertyWidget_OptMarginsBase
+class PropertyWidget_OptMargins : public QFrame, public Ui::PropertyWidget_OptMarginsBase,
+                                  public PropertyWidgetBase
 {
 	Q_OBJECT
 
@@ -23,16 +26,33 @@
 
 	virtual void changeEvent(QEvent *e);
 
+	void updateStyle(const ParagraphStyle& newCurrent);
+
 protected:
+	PageItem *         m_item;
+	ScribusMainWindow* m_ScMW;
 
-	ScGuardedPtr<ScribusDoc> m_doc;
+	void connectSignals();
+	void disconnectSignals();
+
+	void enableFromSelection(void);
+	void setCurrentItem(PageItem *item);
 
 public slots:
+	void setMainWindow(ScribusMainWindow *mw);
+	void setDoc(ScribusDoc *d);
 
-	void setDoc(ScribusDoc *d);
+	void handleSelectionChanged();
+	void handleUpdateRequest(int) {};
 
 	void languageChange();
 	void unitChange() {};
+
+	void displayOpticalMargins(const ParagraphStyle& pStyle);
+
+private slots:
+	void handleOpticalMargins();
+	void resetOpticalMargins();
 };
 
 #endif

Modified: branches/ScribusOIF/scribus/ui/propertywidget_pathtext.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16904&path=/branches/ScribusOIF/scribus/ui/propertywidget_pathtext.cpp
==============================================================================
--- branches/ScribusOIF/scribus/ui/propertywidget_pathtext.cpp (original)
+++ branches/ScribusOIF/scribus/ui/propertywidget_pathtext.cpp Fri Oct 14 11:19:33 2011
@@ -8,11 +8,17 @@
 #include "propertywidget_pathtext.h"
 
 #include "scribusdoc.h"
+#include "scribus.h"
+#include "selection.h"
 #include "units.h"
 #include "util_icon.h"
 
 PropertyWidget_PathText::PropertyWidget_PathText(QWidget* parent) : QFrame(parent)
 {
+	m_ScMW = 0;
+	m_doc  = 0;
+	m_unitRatio  = 1.0;
+
 	setupUi(this);
 
 	setFrameStyle(QFrame::Box | QFrame::Plain);
@@ -28,15 +34,32 @@
 	languageChange();
 }
 
+void PropertyWidget_PathText::setMainWindow(ScribusMainWindow* mw)
+{
+	m_ScMW = mw;
+
+	connect(m_ScMW, SIGNAL(UpdateRequest(int)), this  , SLOT(handleUpdateRequest(int)));
+}
+
 void PropertyWidget_PathText::setDoc(ScribusDoc *d)
 {
 	if(d == (ScribusDoc*) m_doc)
 		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())
-		return;
+	{
+		disconnectSignals();
+		return;
+	}
 
 	m_unitRatio   = m_doc->unitRatio();
 	m_unitIndex   = m_doc->unitIndex();
@@ -47,6 +70,137 @@
 	distFromCurve->setMaximum( 300 );
 	distFromCurve->setMinimum( -300 );
 	distFromCurve->setSingleStep(10);
+
+	connect(m_doc->m_Selection, SIGNAL(selectionChanged()), this, SLOT(handleSelectionChanged()));
+	connect(m_doc             , SIGNAL(docChanged())      , this, SLOT(handleSelectionChanged()));
+}
+
+void PropertyWidget_PathText::setCurrentItem(PageItem *item)
+{
+	if (!m_ScMW || m_ScMW->scriptIsRunning())
+		return;
+	//CB We shouldnt really need to process this if our item is the same one
+	//maybe we do if the item has been changed by scripter.. but that should probably
+	//set some status if so.
+	//FIXME: This wont work until when a canvas deselect happens, m_item must be NULL.
+	//if (m_item == i)
+	//	return;
+
+	if (item && m_doc.isNull())
+		setDoc(item->doc());
+
+	m_item = item;
+
+	disconnectSignals();
+	enableFromSelection();
+
+	if (m_item)
+	{
+		if (m_item->asPathText())
+		{
+			pathTextType->setCurrentIndex(m_item->textPathType);
+			flippedPathText->setChecked(m_item->textPathFlipped);
+			showCurveCheckBox->setChecked(m_item->PoShow);
+			distFromCurve->setValue(m_item->BaseOffs * -1);
+			startOffset->setValue(m_item->textToFrameDistLeft());
+		}
+		connectSignals();
+	}
+}
+
+void PropertyWidget_PathText::connectSignals()
+{
+	connect(showCurveCheckBox, SIGNAL(clicked())     , this, SLOT(handlePathLine()));
+	connect(pathTextType     , SIGNAL(activated(int)), this, SLOT(handlePathType()));
+	connect(flippedPathText  , SIGNAL(clicked())     , this, SLOT(handlePathFlip()));
+	connect(startOffset      , SIGNAL(valueChanged(double)), this, SLOT(handlePathDist()));
+	connect(distFromCurve    , SIGNAL(valueChanged(double)), this, SLOT(handlePathOffs()));
+}
+
+void PropertyWidget_PathText::disconnectSignals()
+{
+	disconnect(showCurveCheckBox, SIGNAL(clicked())     , this, SLOT(handlePathLine()));
+	disconnect(pathTextType     , SIGNAL(activated(int)), this, SLOT(handlePathType()));
+	disconnect(flippedPathText  , SIGNAL(clicked())     , this, SLOT(handlePathFlip()));
+	disconnect(startOffset      , SIGNAL(valueChanged(double)), this, SLOT(handlePathDist()));
+	disconnect(distFromCurve    , SIGNAL(valueChanged(double)), this, SLOT(handlePathOffs()));
+}
+
+void PropertyWidget_PathText::enableFromSelection(void)
+{
+	bool enabled = false;
+	if (m_item && m_doc)
+	{
+		enabled  = m_item->isPathText();
+		enabled &= (m_doc->m_Selection->count() == 1);
+	}
+	setEnabled(enabled);
+}
+
+void PropertyWidget_PathText::handleSelectionChanged()
+{
+	if (!m_doc || !m_ScMW || m_ScMW->scriptIsRunning())
+		return;
+
+	PageItem* currItem = currentItemFromSelection();
+	setCurrentItem(currItem);
+	updateGeometry();
+	repaint();
+}
+
+void PropertyWidget_PathText::handleUpdateRequest(int /*updateFlags*/)
+{
+	// Nothing to do
+}
+
+void PropertyWidget_PathText::handlePathDist()
+{
+	if (!m_doc || !m_item || !m_ScMW || m_ScMW->scriptIsRunning())
+		return;
+	m_item->setTextToFrameDistLeft(startOffset->value());
+	m_doc->AdjustItemSize(m_item);
+	m_item->updatePolyClip();
+	m_item->update();
+	//emit DocChanged();
+}
+
+void PropertyWidget_PathText::handlePathFlip()
+{
+	if (!m_doc || !m_item || !m_ScMW || m_ScMW->scriptIsRunning())
+		return;
+	m_item->textPathFlipped = flippedPathText->isChecked();
+	m_item->updatePolyClip();
+	m_item->update();
+	//emit DocChanged();
+}
+
+void PropertyWidget_PathText::handlePathLine()
+{
+	if (!m_doc || !m_item || !m_ScMW || m_ScMW->scriptIsRunning())
+		return;
+	m_item->PoShow = showCurveCheckBox->isChecked();
+	m_item->update();
+	//emit DocChanged();
+}
+
+void PropertyWidget_PathText::handlePathOffs()
+{
+	if (!m_doc || !m_item || !m_ScMW || m_ScMW->scriptIsRunning())
+		return;
+	m_item->BaseOffs = -distFromCurve->value();
+	m_doc->AdjustItemSize(m_item);
+	m_item->updatePolyClip();
+	m_item->update();
+	//emit DocChanged();
+}
+
+void PropertyWidget_PathText::handlePathType()
+{
+	if (!m_doc || !m_item || !m_ScMW || m_ScMW->scriptIsRunning())
+		return;
+	m_item->textPathType = pathTextType->currentIndex();
+	m_item->update();
+	//emit DocChanged();
 }
 
 void PropertyWidget_PathText::changeEvent(QEvent *e)
@@ -57,18 +211,6 @@
 		return;
 	}
 	QWidget::changeEvent(e);
-}
-
-void PropertyWidget_PathText::unitChange()
-{
-	if (!m_doc)
-		return;
-
-	m_unitRatio = m_doc->unitRatio();
-	m_unitIndex = m_doc->unitIndex();
-
-	startOffset->setNewUnit( m_unitIndex );
-	distFromCurve->setNewUnit( m_unitIndex );
 }
 
 void PropertyWidget_PathText::languageChange()
@@ -89,4 +231,16 @@
 	QString ptSuffix = tr(" pt");
 	startOffset->setSuffix(ptSuffix);
 	distFromCurve->setSuffix(ptSuffix);
-}
+}
+
+void PropertyWidget_PathText::unitChange()
+{
+	if (!m_doc)
+		return;
+
+	m_unitRatio = m_doc->unitRatio();
+	m_unitIndex = m_doc->unitIndex();
+
+	startOffset->setNewUnit( m_unitIndex );
+	distFromCurve->setNewUnit( m_unitIndex );
+}

Modified: branches/ScribusOIF/scribus/ui/propertywidget_pathtext.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16904&path=/branches/ScribusOIF/scribus/ui/propertywidget_pathtext.h
==============================================================================
--- branches/ScribusOIF/scribus/ui/propertywidget_pathtext.h (original)
+++ branches/ScribusOIF/scribus/ui/propertywidget_pathtext.h Fri Oct 14 11:19:33 2011
@@ -9,11 +9,13 @@
 
 #include "ui_propertywidget_pathtextbase.h"
 
-#include "scguardedptr.h"
+#include "propertywidgetbase.h"
 
 class ScribusDoc;
+class ScribusMainWindow;
 
-class PropertyWidget_PathText : public QFrame, public Ui::PropertyWidget_PathTextBase
+class PropertyWidget_PathText : public QFrame, public Ui::PropertyWidget_PathTextBase,
+                                public PropertyWidgetBase
 {
 	Q_OBJECT
 
@@ -24,18 +26,34 @@
 	virtual void changeEvent(QEvent *e);
 
 protected:
+	PageItem *         m_item;
+	ScribusMainWindow* m_ScMW;
 
 	double m_unitRatio;
 	int    m_unitIndex;
 
-	ScGuardedPtr<ScribusDoc> m_doc;
+	void connectSignals();
+	void disconnectSignals();
+
+	void enableFromSelection(void);
+	void setCurrentItem(PageItem *item);
 
 public slots:
+	void setMainWindow(ScribusMainWindow *mw);
+	void setDoc(ScribusDoc *d);
 
-	void setDoc(ScribusDoc *d);
+	void handleSelectionChanged();
+	void handleUpdateRequest(int);
 
 	void languageChange();
 	void unitChange();
+
+private slots:
+	void handlePathType();
+	void handlePathFlip();
+	void handlePathLine();
+	void handlePathDist();
+	void handlePathOffs();
 };
 
 #endif

Modified: branches/ScribusOIF/scribus/ui/propertywidget_textcolorbase.ui
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16904&path=/branches/ScribusOIF/scribus/ui/propertywidget_textcolorbase.ui
==============================================================================
--- branches/ScribusOIF/scribus/ui/propertywidget_textcolorbase.ui (original)
+++ branches/ScribusOIF/scribus/ui/propertywidget_textcolorbase.ui Fri Oct 14 11:19:33 2011
@@ -7,7 +7,7 @@
     <x>0</x>
     <y>0</y>
     <width>210</width>
-    <height>88</height>
+    <height>94</height>
    </rect>
   </property>
   <property name="windowTitle">
@@ -45,7 +45,14 @@
       </widget>
      </item>
      <item>
-      <widget class="ColorCombo" name="strokeColor"/>
+      <widget class="ColorCombo" name="strokeColor">
+       <property name="sizePolicy">
+        <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
+         <horstretch>0</horstretch>
+         <verstretch>0</verstretch>
+        </sizepolicy>
+       </property>
+      </widget>
      </item>
      <item>
       <widget class="QLabel" name="strokeShadeLabel">
@@ -63,19 +70,6 @@
         <string/>
        </property>
       </widget>
-     </item>
-     <item>
-      <spacer name="horizontalSpacer">
-       <property name="orientation">
-        <enum>Qt::Horizontal</enum>
-       </property>
-       <property name="sizeHint" stdset="0">
-        <size>
-         <width>40</width>
-         <height>20</height>
-        </size>
-       </property>
-      </spacer>
      </item>
     </layout>
    </item>
@@ -95,7 +89,14 @@
       </widget>
      </item>
      <item>
-      <widget class="ColorCombo" name="fillColor"/>
+      <widget class="ColorCombo" name="fillColor">
+       <property name="sizePolicy">
+        <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
+         <horstretch>0</horstretch>
+         <verstretch>0</verstretch>
+        </sizepolicy>
+       </property>
+      </widget>
      </item>
      <item>
       <widget class="QLabel" name="fillShadeLabel">
@@ -114,8 +115,15 @@
        </property>
       </widget>
      </item>
+    </layout>
+   </item>
+   <item row="2" column="0">
+    <layout class="QHBoxLayout" name="effectsLayout">
+     <property name="spacing">
+      <number>3</number>
+     </property>
      <item>
-      <spacer name="horizontalSpacer_2">
+      <spacer name="horizontalSpacer_3">
        <property name="orientation">
         <enum>Qt::Horizontal</enum>
        </property>
@@ -127,13 +135,6 @@
        </property>
       </spacer>
      </item>
-    </layout>
-   </item>
-   <item row="2" column="0">
-    <layout class="QHBoxLayout" name="effectsLayout">
-     <property name="spacing">
-      <number>3</number>
-     </property>
      <item>
       <widget class="StyleSelect" name="textEffects" native="true"/>
      </item>
@@ -152,19 +153,6 @@
         <bool>true</bool>
        </property>
       </widget>
-     </item>
-     <item>
-      <spacer name="horizontalSpacer_3">
-       <property name="orientation">
-        <enum>Qt::Horizontal</enum>
-       </property>
-       <property name="sizeHint" stdset="0">
-        <size>
-         <width>40</width>
-         <height>20</height>
-        </size>
-       </property>
-      </spacer>
      </item>
     </layout>
    </item>

Modified: branches/ScribusOIF/win32/vc9/Scribus.vcproj
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16904&path=/branches/ScribusOIF/win32/vc9/Scribus.vcproj
==============================================================================
--- branches/ScribusOIF/win32/vc9/Scribus.vcproj (original)
+++ branches/ScribusOIF/win32/vc9/Scribus.vcproj Fri Oct 14 11:19:33 2011
@@ -56,13 +56,14 @@
 			/>
 			<Tool
 				Name="VCCLCompilerTool"
+				AdditionalOptions="/MP2"
 				Optimization="0"
 				InlineFunctionExpansion="0"
 				EnableIntrinsicFunctions="false"
 				AdditionalIncludeDirectories="..\vc9;..\..\scribus;..\..\scribus\colormgmt;..\..\scribus\fonts;..\..\scribus\text;..\..\scribus\styles;..\..\scribus\simpletreemodel;..\..\scribus\ui;..\..\scribus\third_party\cairo;..\..\scribus\third_party\harfbuzz\src;"$(QT4_DIR)\include\QtCore";"$(QT4_DIR)\include\QtGui";"$(QT4_DIR)\include\QtNetwork";"$(QT4_DIR)\include\QtWebKit";"$(QT4_DIR)\include\QtXml";"$(QT4_DIR)\include";"$(QT4_DIR)\src\3rdparty\zlib";"$(LCMS_DIR)\include";"$(FREETYPE_DIR)\include";"$(LIBJPEG_DIR)\include";"$(LIBTIFF_DIR)\include";"$(PODOFO_DIR)\include";"$(ICU_DIR)\include""
 				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;QT_LARGEFILE_SUPPORT;QT_EDITION=QT_EDITION_DESKTOP;QT_DLL;QT_GUI_LIB;QT_CORE_LIB;QT_THREAD_SUPPORT;FRIBIDI_STATIC;HAVE_CAIRO;HAVE_PRIVATE_CAIRO;HAVE_CONFIG_H;AVOID_WIN32_FILEIO;COMPILE_SCRIBUS_MAIN_APP;DOCDIR=\"doc/\";ICONDIR=\"icons/\";SAMPLESDIR=\"samples/\";SCRIPTSDIR=\"scripts/\";SHAREDIR=\"share/\";TEMPLATEDIR=\"templates/\";LIBDIR=\"libs/\";PLUGINDIR=\"plugins\""
 				IgnoreStandardIncludePath="false"
-				MinimalRebuild="true"
+				MinimalRebuild="false"
 				BasicRuntimeChecks="3"
 				RuntimeLibrary="3"
 				DisableLanguageExtensions="false"
@@ -159,6 +160,7 @@
 			/>
 			<Tool
 				Name="VCCLCompilerTool"
+				AdditionalOptions="/MP2"
 				Optimization="2"
 				InlineFunctionExpansion="1"
 				OmitFramePointers="true"
@@ -1441,6 +1443,10 @@
 				>
 			</File>
 			<File
+				RelativePath="..\..\scribus\ui\propertywidget_text.cpp"
+				>
+			</File>
+			<File
 				RelativePath="..\..\scribus\ui\propertywidget_textcolor.cpp"
 				>
 			</File>
@@ -6346,6 +6352,24 @@
 				</FileConfiguration>
 			</File>
 			<File
+				RelativePath="..\..\scribus\ui\propertywidget_text.h"
+				>
+				<FileConfiguration
+					Name="Debug-cairo|Win32"
+					>
+					<Tool
+						Name="moc.exe"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release-cairo|Win32"
+					>
+					<Tool
+						Name="moc.exe"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
 				RelativePath="..\..\scribus\ui\propertywidget_textcolor.h"
 				>
 				<FileConfiguration
@@ -8897,6 +8921,10 @@
 				>
 			</File>
 			<File
+				RelativePath="..\..\scribus\ui\ui_propertywidget_textbase.h"
+				>
+			</File>
+			<File
 				RelativePath="..\..\scribus\ui\ui_propertywidget_textcolorbase.h"
 				>
 			</File>
@@ -9818,6 +9846,10 @@
 				>
 			</File>
 			<File
+				RelativePath="..\..\scribus\ui\moc_propertywidget_text.cpp"
+				>
+			</File>
+			<File
 				RelativePath="..\..\scribus\ui\moc_propertywidget_textcolor.cpp"
 				>
 			</File>
@@ -10519,6 +10551,10 @@
 				>
 			</File>
 			<File
+				RelativePath="..\..\scribus\ui\propertywidget_textbase.ui"
+				>
+			</File>
+			<File
 				RelativePath="..\..\scribus\ui\propertywidget_textcolorbase.ui"
 				>
 			</File>




More information about the scribus-commit mailing list