r16000 by jghali - first part of PP text tab uification

scribus-commit scribus-commit at lists.scribus.net
Fri Nov 26 19:03:49 CET 2010


Author: jghali
Date: Fri Nov 26 18:03:49 2010
New Revision: 16000

URL: http://scribus.info/websvn/listing.php?repname=Scribus&sc=1&rev=16000
Log:
first part of PP text tab uification

Added:
    branches/ScribusOIF/scribus/ui/propertiespalette_textbase.ui
Modified:
    branches/ScribusOIF/scribus/CMakeLists.txt
    branches/ScribusOIF/scribus/canvasmode_edit.cpp
    branches/ScribusOIF/scribus/canvasmode_normal.cpp
    branches/ScribusOIF/scribus/gtaction.cpp
    branches/ScribusOIF/scribus/pageitem.cpp
    branches/ScribusOIF/scribus/pageitem.h
    branches/ScribusOIF/scribus/plugins/scriptplugin/svgimport.cpp
    branches/ScribusOIF/scribus/scribus.cpp
    branches/ScribusOIF/scribus/scribusview.cpp
    branches/ScribusOIF/scribus/ui/propertiespalette_text.cpp
    branches/ScribusOIF/scribus/ui/propertiespalette_text.h
    branches/ScribusOIF/scribus/ui/smtextstyles.cpp
    branches/ScribusOIF/win32/vc8/Scribus.vcproj

Modified: branches/ScribusOIF/scribus/CMakeLists.txt
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16000&path=/branches/ScribusOIF/scribus/CMakeLists.txt
==============================================================================
--- branches/ScribusOIF/scribus/CMakeLists.txt (original)
+++ branches/ScribusOIF/scribus/CMakeLists.txt Fri Nov 26 18:03:49 2010
@@ -122,6 +122,7 @@
   ui/prefs_tableofcontentsbase.ui
   ui/prefs_documentitemattributesbase.ui
   ui/printdialogbase.ui
+  ui/propertiespalette_textbase.ui
   ui/replacecolors.ui
   ui/replaceonecolor.ui
   ui/selectobjects.ui

Modified: branches/ScribusOIF/scribus/canvasmode_edit.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16000&path=/branches/ScribusOIF/scribus/canvasmode_edit.cpp
==============================================================================
--- branches/ScribusOIF/scribus/canvasmode_edit.cpp (original)
+++ branches/ScribusOIF/scribus/canvasmode_edit.cpp Fri Nov 26 18:03:49 2010
@@ -661,7 +661,7 @@
 	if (GetItem(&currItem))
 	{
 //		m_view->slotDoCurs(false);
-		if (!currItem->locked() && !currItem->asLine())
+		if (!(currItem->locked() && !currItem->isTextFrame()) && !currItem->asLine())
 		{
 			FPoint canvasPoint = m_canvas->globalToCanvas(m->globalPos());
 			if (m_canvas->frameHitTest(QPointF(canvasPoint.x(), canvasPoint.y()), currItem) < 0)

Modified: branches/ScribusOIF/scribus/canvasmode_normal.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16000&path=/branches/ScribusOIF/scribus/canvasmode_normal.cpp
==============================================================================
--- branches/ScribusOIF/scribus/canvasmode_normal.cpp (original)
+++ branches/ScribusOIF/scribus/canvasmode_normal.cpp Fri Nov 26 18:03:49 2010
@@ -1418,8 +1418,7 @@
 				m_doc->m_Selection->getGroupRect(&x2, &y2, &w, &h);
 				m_doc->moveGroup(pastePoint.x() - x2, pastePoint.y() - y2);
 				m_ScMW->propertiesPalette->updateColorList();
-				m_ScMW->propertiesPalette->textPal->paraStyleCombo->updateFormatList();
-				m_ScMW->propertiesPalette->textPal->charStyleCombo->updateFormatList();
+				m_ScMW->propertiesPalette->textPal->updateTextStyles();
 				m_ScMW->propertiesPalette->linePal->updateLineStyles();
 			}
 		}

Modified: branches/ScribusOIF/scribus/gtaction.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16000&path=/branches/ScribusOIF/scribus/gtaction.cpp
==============================================================================
--- branches/ScribusOIF/scribus/gtaction.cpp (original)
+++ branches/ScribusOIF/scribus/gtaction.cpp Fri Nov 26 18:03:49 2010
@@ -417,7 +417,7 @@
 	tmp.create(vg);
 	textFrame->doc()->redefineStyles(tmp, false);
 	
-	m_ScMW->propertiesPalette->textPal->paraStyleCombo->updateFormatList();
+	m_ScMW->propertiesPalette->textPal->updateParagraphStyles();
 }
 
 void gtAction:: setCharStyleAttributes(gtFont *font, CharStyle& style)

Modified: branches/ScribusOIF/scribus/pageitem.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16000&path=/branches/ScribusOIF/scribus/pageitem.cpp
==============================================================================
--- branches/ScribusOIF/scribus/pageitem.cpp (original)
+++ branches/ScribusOIF/scribus/pageitem.cpp Fri Nov 26 18:03:49 2010
@@ -3989,7 +3989,7 @@
 		undoManager->action(this, ss);
 	}
 	m_Locked = !m_Locked;
-	emit frameLocked(m_Locked);
+	//emit frameLocked(m_Locked);
 }
 
 void PageItem::setLocked(bool isLocked)
@@ -4023,7 +4023,7 @@
 		undoManager->action(this, ss);
 	}
 	m_SizeLocked = !m_SizeLocked;
-	emit frameSizeLocked(m_SizeLocked);
+	//emit frameSizeLocked(m_SizeLocked);
 }
 
 void PageItem::setSizeLocked(bool isLocked)
@@ -6798,8 +6798,8 @@
 	connect(this, SIGNAL(frameType(int)), m_Doc->scMW(), SLOT(HaveNewSel(int)));
 	connect(this, SIGNAL(frameType(int)), m_Doc->view(), SLOT(selectionChanged()));
 	//connect(this, SIGNAL(frameType(int)), pp, SLOT(handleSelectionChanged()));
-	connect(this, SIGNAL(frameLocked(bool)), pp, SLOT(setLocked(bool)));
-	connect(this, SIGNAL(frameSizeLocked(bool)), pp, SLOT(setSizeLocked(bool)));
+	//connect(this, SIGNAL(frameLocked(bool)), pp, SLOT(setLocked(bool)));
+	//connect(this, SIGNAL(frameSizeLocked(bool)), pp, SLOT(setSizeLocked(bool)));
 	//Shape signals
 	//connect(this, SIGNAL(cornerRadius(double)), pp, SLOT(setRR(double)));
 	//	connect(view, SIGNAL(ItemTextCols(int, double)), propertiesPalette, SLOT(setCols(int, double)));

Modified: branches/ScribusOIF/scribus/pageitem.h
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16000&path=/branches/ScribusOIF/scribus/pageitem.h
==============================================================================
--- branches/ScribusOIF/scribus/pageitem.h (original)
+++ branches/ScribusOIF/scribus/pageitem.h Fri Nov 26 18:03:49 2010
@@ -1531,8 +1531,8 @@
 	//Frame signals
 	void myself(PageItem *);
 	void frameType(int);   // not related to Frametype but to m_itemIype :-/
-	void frameLocked(bool); //Frame lock
-	void frameSizeLocked(bool); //Frame size lock
+	//void frameLocked(bool); //Frame lock
+	//void frameSizeLocked(bool); //Frame size lock
 	//Shape signals
 	//void cornerRadius(double); //Corner radius of the shape
 	//Frame text signals

Modified: branches/ScribusOIF/scribus/plugins/scriptplugin/svgimport.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16000&path=/branches/ScribusOIF/scribus/plugins/scriptplugin/svgimport.cpp
==============================================================================
--- branches/ScribusOIF/scribus/plugins/scriptplugin/svgimport.cpp (original)
+++ branches/ScribusOIF/scribus/plugins/scriptplugin/svgimport.cpp Fri Nov 26 18:03:49 2010
@@ -56,8 +56,7 @@
 				ScCore->primaryMainWindow()->doc->moveGroup(pageUnitXToDocX(x) - x2, pageUnitYToDocY(y) - y2);
 				ScCore->primaryMainWindow()->view->endGroupTransaction();
 				ScCore->primaryMainWindow()->propertiesPalette->updateColorList();
-				ScCore->primaryMainWindow()->propertiesPalette->textPal->paraStyleCombo->updateFormatList();
-				ScCore->primaryMainWindow()->propertiesPalette->textPal->charStyleCombo->updateFormatList();
+				ScCore->primaryMainWindow()->propertiesPalette->textPal->updateTextStyles();
 				ScCore->primaryMainWindow()->propertiesPalette->linePal->updateLineStyles();
 			}
 		}
@@ -93,9 +92,8 @@
 			ScCore->primaryMainWindow()->doc->moveGroup(pageUnitXToDocX(x) - x2, pageUnitYToDocY(y) - y2);
 			ScCore->primaryMainWindow()->view->endGroupTransaction();
 			ScCore->primaryMainWindow()->propertiesPalette->updateColorList();
-			ScCore->primaryMainWindow()->propertiesPalette->paraStyleCombo->updateFormatList();
-			ScCore->primaryMainWindow()->propertiesPalette->charStyleCombo->updateFormatList();
-			ScCore->primaryMainWindow()->propertiesPalette->SetLineFormats(ScCore->primaryMainWindow()->doc);
+			ScCore->primaryMainWindow()->propertiesPalette->textPal->updateTextStyles();
+			ScCore->primaryMainWindow()->propertiesPalette->linePal->updateLineStyles();
 		}
 	}
 	else
@@ -129,9 +127,8 @@
 			ScCore->primaryMainWindow()->doc->moveGroup(pageUnitXToDocX(x) - x2, pageUnitYToDocY(y) - y2);
 			ScCore->primaryMainWindow()->view->endGroupTransaction();
 			ScCore->primaryMainWindow()->propertiesPalette->updateColorList();
-			ScCore->primaryMainWindow()->propertiesPalette->paraStyleCombo->updateFormatList();
-			ScCore->primaryMainWindow()->propertiesPalette->charStyleCombo->updateFormatList();
-			ScCore->primaryMainWindow()->propertiesPalette->SetLineFormats(ScCore->primaryMainWindow()->doc);
+			ScCore->primaryMainWindow()->propertiesPalette->textPal->updateTextStyles();
+			ScCore->primaryMainWindow()->propertiesPalette->linePal->updateLineStyles();
 		}
 	}
 	else
@@ -165,9 +162,8 @@
 			ScCore->primaryMainWindow()->doc->moveGroup(pageUnitXToDocX(x) - x2, pageUnitYToDocY(y) - y2);
 			ScCore->primaryMainWindow()->view->endGroupTransaction();
 			ScCore->primaryMainWindow()->propertiesPalette->updateColorList();
-			ScCore->primaryMainWindow()->propertiesPalette->paraStyleCombo->updateFormatList();
-			ScCore->primaryMainWindow()->propertiesPalette->charStyleCombo->updateFormatList();
-			ScCore->primaryMainWindow()->propertiesPalette->SetLineFormats(ScCore->primaryMainWindow()->doc);
+			ScCore->primaryMainWindow()->propertiesPalette->textPal->updateTextStyles();
+			ScCore->primaryMainWindow()->propertiesPalette->linePal->updateLineStyles();
 		}
 	}
 	else
@@ -201,9 +197,8 @@
 			ScCore->primaryMainWindow()->doc->moveGroup(pageUnitXToDocX(x) - x2, pageUnitYToDocY(y) - y2);
 			ScCore->primaryMainWindow()->view->endGroupTransaction();
 			ScCore->primaryMainWindow()->propertiesPalette->updateColorList();
-			ScCore->primaryMainWindow()->propertiesPalette->paraStyleCombo->updateFormatList();
-			ScCore->primaryMainWindow()->propertiesPalette->charStyleCombo->updateFormatList();
-			ScCore->primaryMainWindow()->propertiesPalette->SetLineFormats(ScCore->primaryMainWindow()->doc);
+			ScCore->primaryMainWindow()->propertiesPalette->textPal->updateTextStyles();
+			ScCore->primaryMainWindow()->propertiesPalette->linePal->updateLineStyles();
 		}
 	}
 	else

Modified: branches/ScribusOIF/scribus/scribus.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16000&path=/branches/ScribusOIF/scribus/scribus.cpp
==============================================================================
--- branches/ScribusOIF/scribus/scribus.cpp (original)
+++ branches/ScribusOIF/scribus/scribus.cpp Fri Nov 26 18:03:49 2010
@@ -482,7 +482,7 @@
 
 	//CB dont need this until we have a doc...
 	//propertiesPalette->Cpal->setColors(prefsManager->colorSet());
-	propertiesPalette->textPal->Fonts->RebuildList(0);
+	propertiesPalette->textPal->fonts->RebuildList(0);
 	propertiesPalette->installEventFilter(this);
 	nodePalette = new NodePalette(this);
 	nodePalette->installEventFilter(this);
@@ -2209,7 +2209,7 @@
 	propertiesPalette->setDoc(doc);
 	//propertiesPalette->Cpal->displayGradient(0);
 	pagePalette->setView(view);
-	propertiesPalette->textPal->Fonts->RebuildList(doc);
+	propertiesPalette->textPal->fonts->RebuildList(doc);
 	layerPalette->setDoc(doc);
 	guidePalette->setDoc(doc);
 	charPalette->setDoc(doc);
@@ -2655,7 +2655,6 @@
 
 		break;
 	case PageItem::TextFrame: //Text Frame
-		propertiesPalette->textPal->Fonts->RebuildList(doc, currItem->isAnnotation());
 		scrActions["fileImportText"]->setEnabled(true);
 		scrActions["fileImportText2"]->setEnabled(true);
 		scrActions["fileImportImage"]->setEnabled(false);
@@ -2752,7 +2751,6 @@
 
 		break;
 	case PageItem::PathText: //Path Text
-		propertiesPalette->textPal->Fonts->RebuildList(doc, currItem->isAnnotation());
 		scrActions["fileImportText"]->setEnabled(true);
 		scrActions["fileImportText2"]->setEnabled(true);
 		scrActions["fileImportImage"]->setEnabled(false);
@@ -3215,8 +3213,7 @@
 				doc->m_Selection->getGroupRect(&x2, &y2, &w, &h);
 				doc->moveGroup(doc->currentPage()->xOffset() - x2, doc->currentPage()->yOffset() - y2);
 				propertiesPalette->updateColorList();
-				propertiesPalette->textPal->paraStyleCombo->updateFormatList();
-				propertiesPalette->textPal->charStyleCombo->updateFormatList();
+				propertiesPalette->textPal->updateTextStyles();
 				propertiesPalette->linePal->updateLineStyles();
 			}
 		}
@@ -7212,8 +7209,7 @@
 		}
 	}
 
-	propertiesPalette->paraStyleCombo->updateFormatList();
-	propertiesPalette->charStyleCombo->updateFormatList();
+	propertiesPalette->textPal->updateTextStyles();
 	propertiesPalette->updateColorList();
 	view->DrawNew();
 	slotDocCh();
@@ -7568,7 +7564,7 @@
 			apf.setPointSize(newUIFontSize);
 			qApp->setFont(apf);
 		}
-		propertiesPalette->textPal->Fonts->RebuildList(0);
+		propertiesPalette->textPal->fonts->RebuildList(0);
 		if (prefsManager->appPrefs.uiPrefs.useTabs)
 			mdiArea->setViewMode(QMdiArea::TabbedView);
 		else
@@ -7728,7 +7724,7 @@
 			view->previewQualitySwitcher->setCurrentIndex(doc->itemToolPrefs().imageLowResType);
 			view->previewQualitySwitcher->blockSignals(false);
 		}
-		propertiesPalette->textPal->Fonts->RebuildList(doc);
+		propertiesPalette->textPal->fonts->RebuildList(doc);
 		scrActions["viewShowMargins"]->setChecked(doc->guidesPrefs().marginsShown);
 		scrActions["viewShowBleeds"]->setChecked(doc->guidesPrefs().showBleed);
 		scrActions["viewShowFrames"]->setChecked(doc->guidesPrefs().framesShown);
@@ -8330,8 +8326,7 @@
 		if (doc == docc)
 		{
 			propertiesPalette->updateColorList();
-			propertiesPalette->textPal->paraStyleCombo->updateFormatList();
-			propertiesPalette->textPal->charStyleCombo->updateFormatList();
+			propertiesPalette->textPal->updateTextStyles();
 			propertiesPalette->linePal->updateLineStyles();
 			slotDocCh();
 		}

Modified: branches/ScribusOIF/scribus/scribusview.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16000&path=/branches/ScribusOIF/scribus/scribusview.cpp
==============================================================================
--- branches/ScribusOIF/scribus/scribusview.cpp (original)
+++ branches/ScribusOIF/scribus/scribusview.cpp Fri Nov 26 18:03:49 2010
@@ -1055,8 +1055,7 @@
 									Doc->moveGroup(dropPosDoc.x() - x2, dropPosDoc.y() - y2);
 									m_ScMW->propertiesPalette->updateColorList();
 									m_ScMW->symbolPalette->updateSymbolList();
-									m_ScMW->propertiesPalette->textPal->paraStyleCombo->updateFormatList();
-									m_ScMW->propertiesPalette->textPal->charStyleCombo->updateFormatList();
+									m_ScMW->propertiesPalette->textPal->updateTextStyles();
 									m_ScMW->propertiesPalette->linePal->updateLineStyles();
 									undoManager->setUndoEnabled(true);
 								}

Modified: branches/ScribusOIF/scribus/ui/propertiespalette_text.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16000&path=/branches/ScribusOIF/scribus/ui/propertiespalette_text.cpp
==============================================================================
--- branches/ScribusOIF/scribus/ui/propertiespalette_text.cpp (original)
+++ branches/ScribusOIF/scribus/ui/propertiespalette_text.cpp Fri Nov 26 18:03:49 2010
@@ -87,42 +87,16 @@
 
 	setSizePolicy( QSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum));
 
-	pageLayout_3 = new QVBoxLayout( this );
-	pageLayout_3->setSpacing( 5 );
-	pageLayout_3->setMargin( 0 );
-	pageLayout_3->setAlignment( Qt::AlignLeft );
-
-	TextTree = new ScTreeWidget(this);
-
-	layout41 = new QGridLayout();
-	layout41->setSpacing( 3 );
-	layout41->setMargin( 3 );
-	layout41->setAlignment( Qt::AlignLeft );
-	Fonts = new FontComboH(this);
-	layout41->addWidget( Fonts, 0, 0, 1, 4 );
-	Size = new ScrSpinBox( 0.5, 2048, this, 0 );
-	Size->setPrefix( "" );
-	fontsizeLabel = new QLabel( "", this );
-	fontsizeLabel->setPixmap(loadIcon("Zeichen.xpm"));
-	layout41->addWidget( fontsizeLabel, 1, 0 );
-	layout41->addWidget( Size, 1, 1 );
-	lineSpacingLabel = new QLabel( "", this );
+	setupUi(this);
+
+	fontSize->setPrefix( "" );
+	fontSizeLabel->setPixmap(loadIcon("Zeichen.xpm"));
 	lineSpacingLabel->setPixmap(loadIcon("linespacing2.png"));
-	lineSpacingModeCombo = new QComboBox( this );
-	LineSp = new ScrSpinBox( this, 0 );
-	layout41->addWidget( LineSp, 2, 2 );
-	layout41->addWidget( lineSpacingLabel, 2, 0 );
-	layout41->addWidget( lineSpacingModeCombo, 2, 1 );
-	Layout1AL = new QHBoxLayout;
-	Layout1AL->setSpacing( 0 );
-	Layout1AL->setMargin( 0 );
-	Layout1AL->setAlignment( Qt::AlignLeft );
-	GroupAlign = new AlignSelect(this);
-	Layout1AL->addWidget(GroupAlign);
-	QSpacerItem* spacer7AL = new QSpacerItem( 0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum );
-	Layout1AL->addItem( spacer7AL );
-	layout41->addLayout( Layout1AL, 3, 0, 1, 4 );
-	pageLayout_3->addLayout( layout41 );
+
+	paraStyleLabel->setBuddy(paraStyleCombo);
+	paraStyleClear->setIcon(loadIcon("16/edit-clear.png"));
+	charStyleLabel->setBuddy(charStyleCombo);
+	charStyleClear->setIcon(loadIcon("16/edit-clear.png"));
 
 	colorWidgets = new QFrame();
 	colorWidgets->setFrameStyle(QFrame::Box | QFrame::Plain);
@@ -181,37 +155,7 @@
 	QSpacerItem* spacer7 = new QSpacerItem( 0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum );
 	Layout1->addItem( spacer7 );
 	layout41c->addLayout( Layout1, 2, 0, 1, 4 );
-	colorWidgetsItem = TextTree->addWidget( tr("Color & Effects"), colorWidgets);
-
-
-	styleWidgets = new QFrame();
-	styleWidgets->setFrameStyle(QFrame::Box | QFrame::Plain);
-	styleWidgets->setLineWidth(1);
-	GroupBox3aLayout = new QGridLayout(styleWidgets);
-	GroupBox3aLayout->setSpacing( 3 );
-	GroupBox3aLayout->setMargin( 3 );
-	paraStyleCombo = new ParaStyleComboBox(styleWidgets);
-	paraStyleLabel = new QLabel( "Paragraph St&yle:", styleWidgets );
-	paraStyleLabel->setBuddy(paraStyleCombo);
-	paraStyleClear = new QToolButton( styleWidgets );
-	paraStyleClear->setMaximumSize( QSize( 22, 22 ) );
-	paraStyleClear->setText("");
-	paraStyleClear->setIcon(loadIcon("16/edit-clear.png"));
-	GroupBox3aLayout->addWidget( paraStyleLabel, 0, 0, 1, 2 );
-	GroupBox3aLayout->addWidget( paraStyleCombo, 1, 0 );
-	GroupBox3aLayout->addWidget( paraStyleClear, 1, 1 );
-	charStyleCombo = new CharStyleComboBox(styleWidgets);
-	charStyleLabel = new QLabel( "Character St&yle:", styleWidgets );
-	charStyleLabel->setBuddy(charStyleCombo);
-	charStyleClear = new QToolButton( styleWidgets );
-	charStyleClear->setMaximumSize( QSize( 22, 22 ) );
-	charStyleClear->setText("");
-	charStyleClear->setIcon(loadIcon("16/edit-clear.png"));
-	GroupBox3aLayout->addWidget( charStyleLabel, 2, 0, 1, 2 );
-	GroupBox3aLayout->addWidget( charStyleCombo, 3, 0 );
-	GroupBox3aLayout->addWidget( charStyleClear, 3, 1 );
-	
-	styleWidgetsItem = TextTree->addWidget( tr("Style Settings"), styleWidgets);
+	colorWidgetsItem = textTree->addWidget( tr("Color & Effects"), colorWidgets);
 
 	flopBox = new QFrame();
 	flopBox->setFrameStyle(QFrame::Box | QFrame::Plain);
@@ -228,7 +172,7 @@
 	flopLayout->addWidget(flopFontAscent);
 	flopLayout->addWidget(flopLineSpacing);
 	flopRealHeight->setChecked(true);
-	flopItem = TextTree->addWidget( tr("First Line Offset"), flopBox);
+	flopItem = textTree->addWidget( tr("First Line Offset"), flopBox);
 
 	Distance = new QFrame();
 	Distance->setFrameStyle(QFrame::Box | QFrame::Plain);
@@ -278,7 +222,7 @@
 	TabsButton = new QToolButton( Distance );
 	TabsButton->setSizePolicy(QSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding));
 	DistanceLayout->addWidget( TabsButton, 7, 0, 1, 2 );
-    DistanceItem = TextTree->addWidget( tr("Columns & Text Distances"), Distance);
+    DistanceItem = textTree->addWidget( tr("Columns & Text Distances"), Distance);
 
 
 	//<< Optical Margins
@@ -318,7 +262,7 @@
 	OptMarginsLayout->addWidget(optMarginRadioRight);
 	OptMarginsLayout->addWidget(optMarginResetButton);
 
-	OptMarginsItem = TextTree->addWidget( tr("Optical Margins"), OptMargins);
+	OptMarginsItem = textTree->addWidget( tr("Optical Margins"), OptMargins);
 
 	//>> Optical Margins
 
@@ -391,7 +335,7 @@
 	glyphExtensionHLayout->addWidget(maxGlyphExtSpinBox);
 	layout41a->addLayout(glyphExtensionHLayout, 5, 0, 1, 4);
 
-	advancedWidgetsItem = TextTree->addWidget( tr("Advanced Settings"), advancedWidgets);
+	advancedWidgetsItem = textTree->addWidget( tr("Advanced Settings"), advancedWidgets);
 
 	//>>Advanced Settings
 
@@ -427,16 +371,14 @@
 	showcurveCheckBox = new QCheckBox( Distance2 );
 	showcurveCheckBox->setText( "Show Curve" );
 	DistanceLayout2->addWidget( showcurveCheckBox, 4, 0, 1, 2 );
-	Distance2Item = TextTree->addWidget( tr("Path Text Properties"), Distance2);
-
-	pageLayout_3->addWidget(TextTree);
+	Distance2Item = textTree->addWidget( tr("Path Text Properties"), Distance2);
 	
 	languageChange();
 
-	connect(LineSp    , SIGNAL(valueChanged(double)), this, SLOT(handleLineSpacing()));
-	connect(Size      , SIGNAL(valueChanged(double)), this, SLOT(handleFontSize()));
+	connect(lineSpacing    , SIGNAL(valueChanged(double)), this, SLOT(handleLineSpacing()));
+	connect(fontSize      , SIGNAL(valueChanged(double)), this, SLOT(handleFontSize()));
 	connect(Extra     , SIGNAL(valueChanged(double)), this, SLOT(handleTracking()));
-	connect(GroupAlign, SIGNAL(State(int))   , this, SLOT(handleAlignement(int)));
+	connect(textAlignment, SIGNAL(State(int))   , this, SLOT(handleAlignement(int)));
 	connect(Revert    , SIGNAL(clicked())    , this, SLOT(handleTextDirection()));
 	connect(charStyleClear, SIGNAL(clicked()), this, SLOT(doClearCStyle()));
 	connect(paraStyleClear, SIGNAL(clicked()), this, SLOT(doClearPStyle()));
@@ -456,7 +398,7 @@
 	connect(DRight   , SIGNAL(valueChanged(double)), this, SLOT(handleTextDistances()));
 	connect(DBottom  , SIGNAL(valueChanged(double)), this, SLOT(handleTextDistances()));
 	connect(flopGroup, SIGNAL(buttonClicked( int )), this, SLOT(handleFirstLinePolicy(int)));
-	connect(Fonts    , SIGNAL(fontSelected(QString )), this, SLOT(handleTextFont(QString)));
+	connect(fonts    , SIGNAL(fontSelected(QString )), this, SLOT(handleTextFont(QString)));
 	connect(TxFill   , SIGNAL(activated(int))      , this, SLOT(handleTextFill()));
 	connect(TxStroke , SIGNAL(activated(int))      , this, SLOT(handleTextStroke()));
 	connect(PM1      , SIGNAL(clicked())           , this, SLOT(handleTextShade()));
@@ -526,8 +468,8 @@
 	m_haveItem = false;
 
 	Extra->setValues( -300, 300, 2, 0);
-	Size->setValues( 0.5, 2048, 2, 1);
-	LineSp->setValues( 1, 2048, 2, 1);
+	fontSize->setValues( 0.5, 2048, 2, 1);
+	lineSpacing->setValues( 1, 2048, 2, 1);
 	minWordTrackingSpinBox->setValues(1, 100, 2, 100);
 	normWordTrackingSpinBox->setValues(1, 200, 2, 100);
 	minGlyphExtSpinBox->setValues(90, 110, 2, 100);
@@ -712,6 +654,11 @@
 		connect(dGap, SIGNAL(valueChanged(double)), this, SLOT(handleColumnGap()));
 		connect(DCol, SIGNAL(valueChanged(int))   , this, SLOT(handleColumns()));
 	}
+
+	if (m_item->asTextFrame() || m_item->asPathText())
+	{
+		fonts->RebuildList(m_doc, m_item->isAnnotation());
+	}
 	Revert->setChecked(m_item->reversed());
 
 	displayTextDistances(i->textToFrameDistLeft(),i->textToFrameDistTop(),i->textToFrameDistBottom(),i->textToFrameDistRight());
@@ -834,7 +781,7 @@
 		return;
 	bool tmp = m_haveItem;
 	m_haveItem = false;
-	LineSp->setValue(r);
+	lineSpacing->setValue(r);
 	const ParagraphStyle& curStyle(tmp && m_doc->appMode == modeEdit? m_item->currentStyle() : m_item->itemText.defaultStyle());
 	if (tmp)
 	{
@@ -861,8 +808,8 @@
 	bool tmp = m_haveItem;
 	m_haveItem = false;
 	if (m_item != NULL)
-		Fonts->RebuildList(m_doc, m_item->isAnnotation());
-	Fonts->setCurrentFont(newFont);
+		fonts->RebuildList(m_doc, m_item->isAnnotation());
+	fonts->setCurrentFont(newFont);
 	m_haveItem = tmp;
 }
 
@@ -870,7 +817,7 @@
 {
 	if (!m_ScMW || m_ScMW->scriptIsRunning())
 		return;
-	Size->showValue(s / 10.0);
+	fontSize->showValue(s / 10.0);
 }
 
 void PropertiesPalette_Text::displayExtra(double e)
@@ -892,25 +839,25 @@
 
 void PropertiesPalette_Text::setupLineSpacingSpinbox(int mode, double value)
 {
-	bool blocked = LineSp->blockSignals(true);
+	bool blocked = lineSpacing->blockSignals(true);
 	if (mode > 0)
 	{
 		if (mode==1)
-			LineSp->setSpecialValueText( tr( "Auto" ) );
+			lineSpacing->setSpecialValueText( tr( "Auto" ) );
 		if (mode==2)
-			LineSp->setSpecialValueText( tr( "Baseline" ) );
-		LineSp->setMinimum(0);
-		LineSp->setValue(0);
-		LineSp->setEnabled(false);
+			lineSpacing->setSpecialValueText( tr( "Baseline" ) );
+		lineSpacing->setMinimum(0);
+		lineSpacing->setValue(0);
+		lineSpacing->setEnabled(false);
 	}
 	else
 	{
-		LineSp->setSpecialValueText("");
-		LineSp->setMinimum(1);
-		LineSp->setValue(value);
-		LineSp->setEnabled(true);
-	}
-	LineSp->blockSignals(blocked);
+		lineSpacing->setSpecialValueText("");
+		lineSpacing->setMinimum(1);
+		lineSpacing->setValue(value);
+		lineSpacing->setEnabled(true);
+	}
+	lineSpacing->blockSignals(blocked);
 }
 
 void PropertiesPalette_Text::updateCharStyle(const CharStyle& charStyle)
@@ -957,7 +904,7 @@
 
 	setupLineSpacingSpinbox(newCurrent.lineSpacingMode(), newCurrent.lineSpacing());
 	lineSpacingModeCombo->setCurrentIndex(newCurrent.lineSpacingMode());
-	GroupAlign->setStyle(newCurrent.alignment());
+	textAlignment->setStyle(newCurrent.alignment());
 	minWordTrackingSpinBox->showValue(newCurrent.minWordTracking() * 100.0);
 	normWordTrackingSpinBox->showValue(newCurrent.charStyle().wordTracking() * 100.0);
 	minGlyphExtSpinBox->showValue(newCurrent.minGlyphExtension() * 100.0);
@@ -968,6 +915,22 @@
 	m_haveItem = tmp;
 }
 
+void PropertiesPalette_Text::updateCharStyles()
+{
+	charStyleCombo->updateFormatList();
+}
+
+void PropertiesPalette_Text::updateParagraphStyles()
+{
+	paraStyleCombo->updateFormatList();
+}
+
+void PropertiesPalette_Text::updateTextStyles()
+{
+	paraStyleCombo->updateFormatList();
+	charStyleCombo->updateFormatList();
+}
+
 void PropertiesPalette_Text::displayTextEffects(int s)
 {
 	if (!m_ScMW || m_ScMW->scriptIsRunning())
@@ -990,8 +953,8 @@
 		return;
 	bool tmp = m_haveItem;
 	m_haveItem = false;
-	GroupAlign->setEnabled(true);
-	GroupAlign->setStyle(e);
+	textAlignment->setEnabled(true);
+	textAlignment->setStyle(e);
 	m_haveItem = tmp;
 }
 
@@ -1134,7 +1097,7 @@
 {
 	if (!m_haveDoc || !m_haveItem || !m_ScMW || m_ScMW->scriptIsRunning())
 		return;
-	m_doc->itemSelection_SetLineSpacing(LineSp->value());
+	m_doc->itemSelection_SetLineSpacing(lineSpacing->value());
 }
 
 void PropertiesPalette_Text::handleGapSwitch()
@@ -1194,7 +1157,7 @@
 {
 	if (!m_haveDoc || !m_haveItem || !m_ScMW || m_ScMW->scriptIsRunning())
 		return;
-	m_doc->itemSelection_SetFontSize(qRound(Size->value()*10.0));
+	m_doc->itemSelection_SetFontSize(qRound(fontSize->value()*10.0));
 }
 
 void PropertiesPalette_Text::handleTracking()
@@ -1569,7 +1532,6 @@
 	maxGlyphExtensionLabel->setText( tr("Max:"));
 	colorWidgetsItem->setText(0, tr("Color & Effects"));
 	advancedWidgetsItem->setText(0, tr("Advanced Settings"));
-	styleWidgetsItem->setText(0, tr("Style Settings"));
 	flopItem->setText(0, tr("First Line Offset"));
     DistanceItem->setText(0, tr("Columns & Text Distances"));
 	Distance2Item->setText(0, tr("Path Text Properties"));
@@ -1593,8 +1555,8 @@
 	QString ptSuffix = tr(" pt");
 	Dist->setSuffix(ptSuffix);
 	LineW->setSuffix(ptSuffix);
-	Size->setSuffix(ptSuffix);
-	LineSp->setSuffix(ptSuffix);
+	fontSize->setSuffix(ptSuffix);
+	lineSpacing->setSuffix(ptSuffix);
 
 	QString ein = (m_haveDoc) ? unitGetSuffixFromIndex(m_doc->unitIndex()) : ptSuffix;
 
@@ -1605,9 +1567,9 @@
 	DRight->setSuffix(ein);
 
 	SeStyle->languageChange();
-	GroupAlign->languageChange();
-
-	Size->setToolTip( tr("Font Size"));
+	textAlignment->languageChange();
+
+	fontSize->setToolTip( tr("Font Size"));
 	ChBase->setToolTip( tr("Offset to baseline of characters"));
 	ChScale->setToolTip( tr("Scaling width of characters"));
 	ChScaleV->setToolTip( tr("Scaling height of characters"));
@@ -1617,7 +1579,7 @@
 	PM2->setToolTip( tr("Saturation of color of text fill"));
 	Revert->setToolTip( tr("Right to Left Writing"));
 	Extra->setToolTip( tr("Manual Tracking"));
-	LineSp->setToolTip( tr("Line Spacing"));
+	lineSpacing->setToolTip( tr("Line Spacing"));
 	lineSpacingModeCombo->setToolTip( tr("Select the line spacing mode.") );
 	paraStyleCombo->setToolTip( tr("Paragraph style of currently selected text or paragraph"));
 	charStyleCombo->setToolTip( tr("Character style of currently selected text or paragraph"));

Modified: branches/ScribusOIF/scribus/ui/propertiespalette_text.h
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16000&path=/branches/ScribusOIF/scribus/ui/propertiespalette_text.h
==============================================================================
--- branches/ScribusOIF/scribus/ui/propertiespalette_text.h (original)
+++ branches/ScribusOIF/scribus/ui/propertiespalette_text.h Fri Nov 26 18:03:49 2010
@@ -32,6 +32,7 @@
 class QVBoxLayout;
 class QWidget;
 
+#include "ui_propertiespalette_textbase.h"
 
 #include "scribusapi.h"
 #include "scrpalettebase.h"
@@ -53,12 +54,6 @@
 class ColorCombo;
 class DashEditor;
 class FontComboH;
-class NameWidget;
-class PropertiesPalette_Group;
-class PropertiesPalette_Image;
-class PropertiesPalette_Line;
-class PropertiesPalette_Shape;
-class PropertiesPalette_XYZ;
 class ScComboBox;
 class ScribusDoc;
 class ScribusMainWindow;
@@ -67,7 +62,7 @@
 class Tpalette;
 class UserActionSniffer;
 
-class SCRIBUS_API PropertiesPalette_Text : public QWidget
+class SCRIBUS_API PropertiesPalette_Text : public QWidget, public Ui::PropertiesPalette_TextBase
 {
 	Q_OBJECT
 
@@ -88,11 +83,6 @@
                          // When user releases the mouse button or arrow key, changes must be checked
                          // and if in ScribusView a groupTransaction has been started it must be also
                          // commmited
-
-
-	ParaStyleComboBox *paraStyleCombo;
-	CharStyleComboBox *charStyleCombo;
-	FontComboH* Fonts;
 
 protected:
 
@@ -148,6 +138,10 @@
 	void updateCharStyle(const CharStyle& charStyle);
 	void updateStyle(const ParagraphStyle& newCurrent);
 	
+	void updateCharStyles();
+	void updateParagraphStyles();
+	void updateTextStyles();
+	
 	void handleBaselineOffset();
 	void handleLineSpacingMode(int id);
 	void handleOpticalMargins();
@@ -192,13 +186,10 @@
 	void handlePathOffs();
 
 protected:
-	QVBoxLayout* pageLayout_3;
-
-	QGridLayout* layout41;
+
 	QGridLayout* layout41a;
 	QGridLayout* layout41c;
 	QHBoxLayout* Layout1;
-	QHBoxLayout* Layout1AL;
 	QGridLayout* DistanceLayout;
 	QGridLayout* DistanceLayout2;
 	QGridLayout* GroupBox3aLayout;
@@ -220,14 +211,10 @@
 	QLabel* leftLabel;
 	QLabel* rightLabel;
 	QLabel* trackingLabel;
-	QLabel* fontsizeLabel;
-	QLabel* lineSpacingLabel;
 	QLabel* StrokeIcon;
 	QLabel* ShadeTxt2;
 	QLabel* ShadeTxt1;
 	QLabel* FillIcon;
-	QLabel* paraStyleLabel;
-	QLabel* charStyleLabel;
 	QLabel* langLabel;
 	QLabel* ChBaseTxt;
 	QLabel* ScaleTxt;
@@ -241,23 +228,19 @@
 	QLabel* minGlyphExtensionLabel;
 	QLabel* maxGlyphExtensionLabel;
 
-	ScComboBox* colgapLabel;
+	ScComboBox*  colgapLabel;
 	StyleSelect* SeStyle;
-	AlignSelect* GroupAlign;
 
 	ShadeButton *PM1;
 	ShadeButton *PM2;
 
 	QToolButton* TabsButton;
 
-	QGroupBox* GroupBox3a;
-
 	QCheckBox* flippedPathText;
 	QCheckBox* showcurveCheckBox;
 
 	ScComboBox* pathTextType;
 	QComboBox* langCombo;
-	QComboBox* lineSpacingModeCombo;
 	ColorCombo* TxStroke;
 	ColorCombo* TxFill;
 	QRadioButton *optMarginRadioNone;
@@ -273,8 +256,6 @@
 	ScrSpinBox* DRight;
 	ScrSpinBox* Dist;
 	ScrSpinBox* LineW;
-	ScrSpinBox* Size;
-	ScrSpinBox* LineSp;
 	ScrSpinBox* Extra;
 	ScrSpinBox* ChScale;
 	ScrSpinBox* ChScaleV;
@@ -292,19 +273,13 @@
 	
 	QButtonGroup* flopGroup;
 
-	QMenu* lineSpacingPop;
-
 	QToolButton* Revert;
-	QToolButton* charStyleClear;
-	QToolButton* paraStyleClear;
-
-	ScTreeWidget* TextTree;
+
 	QFrame* colorWidgets;
 	QTreeWidgetItem* colorWidgetsItem;
 	QFrame* advancedWidgets;
 	QTreeWidgetItem* advancedWidgetsItem;
-	QFrame* styleWidgets;
-	QTreeWidgetItem* styleWidgetsItem;
+	/*QFrame* styleWidgets;*/
 	QFrame* flopBox;
 	QTreeWidgetItem* flopItem;
 	QFrame* Distance;

Modified: branches/ScribusOIF/scribus/ui/smtextstyles.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16000&path=/branches/ScribusOIF/scribus/ui/smtextstyles.cpp
==============================================================================
--- branches/ScribusOIF/scribus/ui/smtextstyles.cpp (original)
+++ branches/ScribusOIF/scribus/ui/smtextstyles.cpp Fri Nov 26 18:03:49 2010
@@ -300,8 +300,7 @@
 
 	deleted_.clear(); // deletion done at this point
 
-	doc_->scMW()->propertiesPalette->textPal->paraStyleCombo->updateFormatList();
-	doc_->scMW()->propertiesPalette->textPal->charStyleCombo->updateFormatList();
+	doc_->scMW()->propertiesPalette->textPal->updateTextStyles();
 	// Better not call DrawNew() here, as this will cause several unnecessary calls
 	// doc_->view()->DrawNew();
 	doc_->changed();
@@ -1661,8 +1660,7 @@
 
 	deleted_.clear(); // deletion done at this point
 
-	doc_->scMW()->propertiesPalette->textPal->paraStyleCombo->updateFormatList();
-	doc_->scMW()->propertiesPalette->textPal->charStyleCombo->updateFormatList();
+	doc_->scMW()->propertiesPalette->textPal->updateTextStyles();
 	// Better not call DrawNew() here, as this will cause several unnecessary calls
 	// doc_->view()->DrawNew();
 	doc_->changed();

Modified: branches/ScribusOIF/win32/vc8/Scribus.vcproj
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16000&path=/branches/ScribusOIF/win32/vc8/Scribus.vcproj
==============================================================================
--- branches/ScribusOIF/win32/vc8/Scribus.vcproj (original)
+++ branches/ScribusOIF/win32/vc8/Scribus.vcproj Fri Nov 26 18:03:49 2010
@@ -11757,6 +11757,10 @@
 				>
 			</File>
 			<File
+				RelativePath="..\..\scribus\ui\ui_propertiespalette_textbase.h"
+				>
+			</File>
+			<File
 				RelativePath="..\..\scribus\ui\ui_replacecolors.h"
 				>
 			</File>
@@ -13075,6 +13079,10 @@
 				>
 			</File>
 			<File
+				RelativePath="..\..\scribus\ui\propertiespalette_textbase.ui"
+				>
+			</File>
+			<File
 				RelativePath="..\..\scribus\ui\replacecolors.ui"
 				>
 			</File>




More information about the scribus-commit mailing list