r16179 by jghali - - merge trunk revisions up to r16177

scribus-commit scribus-commit at lists.scribus.net
Wed Dec 29 03:41:41 CET 2010


Author: jghali
Date: Wed Dec 29 02:41:41 2010
New Revision: 16179

URL: http://scribus.info/websvn/listing.php?repname=Scribus&sc=1&rev=16179
Log:
- merge trunk revisions up to r16177
- new notification system to update specific elements of property widgets such a colors, style lists, etc ...
- some adjustements in line properties widget

Added:
    branches/ScribusOIF/scribus/plugins/import/shape/
      - copied from r16177, trunk/Scribus/scribus/plugins/import/shape/
    branches/ScribusOIF/win32/vc8/shapeimport/
      - copied from r16177, trunk/Scribus/win32/vc8/shapeimport/
Modified:
    branches/ScribusOIF/scribus/CMakeLists.txt
    branches/ScribusOIF/scribus/canvasmode_normal.cpp
    branches/ScribusOIF/scribus/pageitem.cpp
    branches/ScribusOIF/scribus/pageitem.h
    branches/ScribusOIF/scribus/pageitem_group.cpp
    branches/ScribusOIF/scribus/pageitem_textframe.cpp
    branches/ScribusOIF/scribus/plugins/import/CMakeLists.txt
    branches/ScribusOIF/scribus/plugins/import/svg/svgplugin.cpp
    branches/ScribusOIF/scribus/plugins/scriptplugin/cmdtext.cpp
    branches/ScribusOIF/scribus/plugins/scriptplugin/scriptercore.cpp
    branches/ScribusOIF/scribus/plugins/scriptplugin/svgimport.cpp
    branches/ScribusOIF/scribus/plugins/svgexplugin/svgexplugin.cpp
    branches/ScribusOIF/scribus/scpageoutput.cpp
    branches/ScribusOIF/scribus/scribus.cpp
    branches/ScribusOIF/scribus/scribus.h
    branches/ScribusOIF/scribus/scribusdoc.cpp
    branches/ScribusOIF/scribus/scribusdoc.h
    branches/ScribusOIF/scribus/scribusstructs.h
    branches/ScribusOIF/scribus/scribusview.cpp
    branches/ScribusOIF/scribus/serializer.cpp
    branches/ScribusOIF/scribus/ui/cpalette.cpp
    branches/ScribusOIF/scribus/ui/cpalette.h
    branches/ScribusOIF/scribus/ui/customfdialog.cpp
    branches/ScribusOIF/scribus/ui/paintmanager.cpp
    branches/ScribusOIF/scribus/ui/propertiespalette_group.cpp
    branches/ScribusOIF/scribus/ui/propertiespalette_group.h
    branches/ScribusOIF/scribus/ui/propertiespalette_line.cpp
    branches/ScribusOIF/scribus/ui/propertiespalette_line.h
    branches/ScribusOIF/scribus/ui/propertiespalette_text.cpp
    branches/ScribusOIF/scribus/ui/propertiespalette_text.h
    branches/ScribusOIF/scribus/ui/propertywidget_color.cpp
    branches/ScribusOIF/scribus/ui/propertywidget_color.h
    branches/ScribusOIF/scribus/ui/propertywidget_line.cpp
    branches/ScribusOIF/scribus/ui/propertywidget_line.h
    branches/ScribusOIF/scribus/ui/propertywidget_linebase.ui
    branches/ScribusOIF/scribus/ui/propertywidget_textcolor.cpp
    branches/ScribusOIF/scribus/ui/propertywidget_textcolor.h
    branches/ScribusOIF/scribus/ui/propertywidget_transparency.cpp
    branches/ScribusOIF/scribus/ui/propertywidget_transparency.h
    branches/ScribusOIF/scribus/ui/scrapbookpalette.cpp
    branches/ScribusOIF/scribus/ui/smlinestyle.cpp
    branches/ScribusOIF/scribus/ui/smtextstyles.cpp
    branches/ScribusOIF/scribus/ui/symbolpalette.cpp
    branches/ScribusOIF/scribus/ui/symbolpalette.h
    branches/ScribusOIF/scribus/ui/transparencypalette.cpp
    branches/ScribusOIF/scribus/ui/transparencypalette.h
    branches/ScribusOIF/win32/vc8/Scribus.sln

Modified: branches/ScribusOIF/scribus/CMakeLists.txt
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16179&path=/branches/ScribusOIF/scribus/CMakeLists.txt
==============================================================================
--- branches/ScribusOIF/scribus/CMakeLists.txt (original)
+++ branches/ScribusOIF/scribus/CMakeLists.txt Wed Dec 29 02:41:41 2010
@@ -630,7 +630,7 @@
   scxmlstreamreader.cpp
   selection.cpp
   serializer.cpp
-  stencilreader.cpp
+#  stencilreader.cpp
   styleitem.cpp
   textwriter.cpp
   tocgenerator.cpp

Modified: branches/ScribusOIF/scribus/canvasmode_normal.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16179&path=/branches/ScribusOIF/scribus/canvasmode_normal.cpp
==============================================================================
--- branches/ScribusOIF/scribus/canvasmode_normal.cpp (original)
+++ branches/ScribusOIF/scribus/canvasmode_normal.cpp Wed Dec 29 02:41:41 2010
@@ -49,7 +49,6 @@
 #include "scribusview.h"
 #include "scribusXml.h"
 #include "selection.h"
-#include "stencilreader.h"
 #include "undomanager.h"
 #include "util.h"
 #include "util_icon.h"
@@ -1283,10 +1282,8 @@
 		fmtCode++;
 		fmt = LoadSavePlugin::getFormatById(fmtCode);
 	}
-	allFormats += "*.sce *.SCE ";
-	allFormats += "*.shape *.SHAPE);;";
+	allFormats += "*.sce *.SCE;;";
 	formats.append("Scribus Objects (*.sce *.SCE)");
-	formats.append("Dia Shapes (*.shape *.SHAPE)");
 	qSort(formats);
 	allFormats += formats.join(";;");
 	PrefsContext* dirs = PrefsManager::instance()->prefsFile->getContext("dirs");
@@ -1302,22 +1299,12 @@
 		PrefsManager::instance()->prefsFile->getContext("dirs")->set("pastefile", fileName.left(fileName.lastIndexOf("/")));
 		m_doc->setLoading(true);
 		QFileInfo fi(fileName);
-		if (fi.suffix().toLower() == "shape")
-		{
-			QString f = "";
-			loadText(fileName, &f);
-			StencilReader *pre = new StencilReader();
-			fileName = pre->createShape(f);
-			delete pre;
-		}
 		bool savedAlignGrid = m_doc->useRaster;
 		bool savedAlignGuides = m_doc->SnapGuides;
 		m_doc->useRaster = false;
 		m_doc->SnapGuides = false;
 		if (fi.suffix().toLower() == "sce")
 			m_ScMW->slotElemRead(fileName, pastePoint.x(), pastePoint.y(), true, false, m_doc, m_doc->view());
-		else if (fi.suffix().toLower() == "shape")
-			m_ScMW->slotElemRead(fileName, pastePoint.x(), pastePoint.y(), false, true, m_doc, m_doc->view());
 		else
 		{
 			FileLoader *fileLoader = new FileLoader(fileName);
@@ -1336,9 +1323,7 @@
 				double x2, y2, w, h;
 				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->updateTextStyles();
-				m_ScMW->propertiesPalette->linePal->updateLineStyles();
+				m_ScMW->requestUpdate(reqColorsUpdate | reqLineStylesUpdate | reqTextStylesUpdate);
 			}
 		}
 		for (int a = 0; a < m_doc->m_Selection->count(); ++a)

Modified: branches/ScribusOIF/scribus/pageitem.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16179&path=/branches/ScribusOIF/scribus/pageitem.cpp
==============================================================================
--- branches/ScribusOIF/scribus/pageitem.cpp (original)
+++ branches/ScribusOIF/scribus/pageitem.cpp Wed Dec 29 02:41:41 2010
@@ -163,7 +163,6 @@
 	itemText(other.itemText),
 	isBookmark(other.isBookmark),
 	HasSel(other.HasSel),
-//	Tinput(other.Tinput),
 	isAutoText(other.isAutoText),
 	BackBox(NULL),  // otherwise other.BackBox->NextBox would be inconsistent
 	NextBox(NULL),  // otherwise other.NextBox->BackBox would be inconsistent
@@ -200,8 +199,6 @@
 	BottomLine(other.BottomLine),
 	isTableItem(other.isTableItem),
 	isSingleSel(other.isSingleSel),
-	isGroupControl(other.isGroupControl),
-	groupsLastItem(other.groupsLastItem),
 	groupItemList(other.groupItemList),
 	groupWidth(other.groupWidth),
 	groupHeight(other.groupHeight),
@@ -572,7 +569,6 @@
 	setUName(AnName);
 	m_annotation.setBorderColor(outline);
 	HasSel = false;
-//	Tinput = false;
 	isAutoText = false;
 	inPdfArticle = false;
 	isRaster = false;
@@ -817,8 +813,6 @@
 	isTableItem = false;
 	isSingleSel = false;
 	Dirty = false;
-	isGroupControl = false;
-	groupsLastItem = 0;
 	ChangedMasterItem = false;
 	isEmbedded = false;
 	OnMasterPage = m_Doc->currentPage() ? m_Doc->currentPage()->pageName() : QString();
@@ -1684,7 +1678,6 @@
 
 void PageItem::DrawObj_Decoration(ScPainter *p)
 {
-	ScribusView* view = m_Doc->view();
 	p->save();
 	if (!isEmbedded)
 		p->translate(Xpos, Ypos);
@@ -1692,7 +1685,7 @@
 	if ((!isEmbedded) && (!m_Doc->RePos))
 	{
 		double aestheticFactor(5.0);
-		double scpInv = 1.0 / (qMax(view->scale(), 1.0) * aestheticFactor);
+		double scpInv = 1.0 / (qMax(p->zoomFactor(), 1.0) * aestheticFactor);
 		if (!isGroup())
 		{
 			if ((Frame) && (m_Doc->guidesPrefs().framesShown) && ((itemType() == ImageFrame) || (itemType() == LatexFrame) || (itemType() == OSGFrame) || (itemType() == PathText)))
@@ -1740,7 +1733,7 @@
 		}
 		if ((m_Doc->guidesPrefs().framesShown) && textFlowUsesContourLine() && (ContourLine.size() != 0))
 		{
-			p->setPen(Qt::darkGray, 1.0 / qMax(view->scale(), 1.0), Qt::DotLine, Qt::FlatCap, Qt::MiterJoin);
+			p->setPen(Qt::darkGray, 1.0 / qMax(p->zoomFactor(), 1.0), Qt::DotLine, Qt::FlatCap, Qt::MiterJoin);
 // Ugly Hack to fix rendering problems with cairo >=1.5.10 && <1.8.0 follows
 #ifdef HAVE_CAIRO
 	#if ((CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1, 5, 10)) && (CAIRO_VERSION < CAIRO_VERSION_ENCODE(1, 8, 0)))
@@ -1762,7 +1755,7 @@
 				|| ((72.0 / imageYScale()) < minres) 
 				|| ((72.0 / imageXScale()) > maxres) 
 				|| ((72.0 / imageYScale()) > maxres)) 
-				&& (isRaster) && (checkres) && (!view->m_canvas->isPreviewMode()) && (PrefsManager::instance()->appPrefs.displayPrefs.showVerifierWarningsOnCanvas))
+				&& (isRaster) && (checkres) && (!m_Doc->drawAsPreview) && (PrefsManager::instance()->appPrefs.displayPrefs.showVerifierWarningsOnCanvas))
 			{
 				double ofx = Width - 22.0;
 				double ofy = Height - 22.0;
@@ -1773,9 +1766,9 @@
 				p->restore();
 			}
 		}
-		if ((m_Doc->guidesPrefs().layerMarkersShown) && (m_Doc->layerCount() > 1) && (!m_Doc->layerOutline(LayerID)) && (isGroup()) && (!view->m_canvas->isPreviewMode()))
-		{
-			p->setPen(Qt::black, 0.5/ m_Doc->view()->scale(), Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
+		if ((m_Doc->guidesPrefs().layerMarkersShown) && (m_Doc->layerCount() > 1) && (!m_Doc->layerOutline(LayerID)) && (isGroup()) && (!m_Doc->drawAsPreview))
+		{
+			p->setPen(Qt::black, 0.5/ p->zoomFactor(), Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
 			p->setPenOpacity(1.0);
 			p->setBrush(m_Doc->layerMarker(LayerID));
 			p->setBrushOpacity(1.0);
@@ -1803,23 +1796,6 @@
 	QList<PageItem*> emG;
 	emG.clear();
 	emG.append(cembedded);
-	if (cembedded->Groups.count() != 0)
-	{
-		for (int ga=0; ga<m_Doc->FrameItems.count(); ++ga)
-		{
-			if (m_Doc->FrameItems.at(ga)->Groups.count() != 0)
-			{
-				if (m_Doc->FrameItems.at(ga)->Groups.top() == cembedded->Groups.top())
-				{
-					if (m_Doc->FrameItems.at(ga)->ItemNr != cembedded->ItemNr)
-					{
-						if (!emG.contains(m_Doc->FrameItems.at(ga)))
-							emG.append(m_Doc->FrameItems.at(ga));
-					}
-				}
-			}
-		}
-	}
 	for (int em = 0; em < emG.count(); ++em)
 	{
 		PageItem* embedded = emG.at(em);
@@ -1990,121 +1966,11 @@
 			embedded->isEmbedded = false;
 			p->restore();
 		}
-//		p->drawImage(pat.getPattern());
 		p->setWorldMatrix(savWM);
 		xpos += adv;
 		p->restore();
 	}
 	p->newPath();
-}
-
-void PageItem::paintObj(QPainter *p)
-{
-	if ((!m_Doc->DoDrawing) || (m_Doc->RePos))
-	{
-		FrameOnly = false;
-		return;
-	}
-	double sc = m_Doc->view()->scale();
-	double handleSize = 6.0 / sc;
-	double halfSize = 3.0 / sc;
-	if ((!FrameOnly) && (!m_Doc->RePos))
-	{
-		if (!m_Doc->m_Selection->isEmpty())
-		{
-//				qDebug() << "Item: " << ItemNr << "W: " << Width << "H: " << Height;
-			if (!isGroup())
-			{
-				//Locked line colour selection
-				if (m_Locked)
-					p->setPen(QPen(PrefsManager::instance()->appPrefs.displayPrefs.frameLockColor, 1.0 / sc, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin));
-				else
-					p->setPen(QPen(PrefsManager::instance()->appPrefs.displayPrefs.frameColor, 1.0 / sc, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin));
-				p->setBrush(Qt::NoBrush);
-				double lw2 = 1.0 / sc;
-				double lw = 1.0 / sc;
-				Qt::PenCapStyle le = Qt::FlatCap;
-				if (NamedLStyle.isEmpty())
-				{
-					lw2 = (m_lineWidth / 2.0)  / sc;
-					lw = qMax(m_lineWidth, 1.0)  / sc;
-					le = PLineEnd;
-				}
-				else
-				{
-					multiLine ml = m_Doc->MLineStyles[NamedLStyle];
-					lw2 = (ml[ml.size()-1].Width / 2.0) / sc;
-					lw = qMax(ml[ml.size()-1].Width, 1.0) / sc;
-					le = static_cast<Qt::PenCapStyle>(ml[ml.size()-1].LineEnd);
-				}
-				//Draw our frame outline
-				if (asLine())
-				{
-					if (le != Qt::FlatCap)
-						p->drawRect(QRectF(-lw2, -lw2, Width+lw, lw));
-					else
-						p->drawRect(QRectF(-1 / sc, -lw2, Width, lw));
-				}
-				else
-					p->drawRect(QRectF(0, 0, Width, Height));
-//				p->setPen(QPen(PrefsManager::instance()->appPrefs.drameColor, 1.0 / sc, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin));
-				p->setBrush(PrefsManager::instance()->appPrefs.displayPrefs.frameColor);
-				p->setPen(Qt::NoPen);
-				if ((!m_Locked) && (!m_SizeLocked))
-				{
-					if (! asLine())
-					{
-						p->drawRect(QRectF(0.0, 0.0, handleSize, handleSize));
-						p->drawRect(QRectF(Width - handleSize, Height - handleSize, handleSize, handleSize));
-						p->drawRect(QRectF(Width - handleSize, 0.0, handleSize, handleSize));
-						p->drawRect(QRectF(0.0, Height - handleSize, handleSize, handleSize));
-						if (Width > 6)
-						{
-							p->drawRect(QRectF(Width / 2.0 - halfSize, Height - handleSize, handleSize, handleSize));
-							p->drawRect(QRectF(Width / 2.0 - halfSize, 0.0, handleSize, handleSize));
-						}
-						if (Height > 6)
-						{
-							p->drawRect(QRectF(Width - handleSize, Height / 2.0 - halfSize, handleSize, handleSize));
-							p->drawRect(QRectF(0.0, Height / 2.0 - halfSize, handleSize, handleSize));
-						}
-					}
-					else
-					{
-						p->drawRect(QRectF(-halfSize, -halfSize, handleSize, handleSize));
-						p->drawRect(QRectF(Width + halfSize, -halfSize, -handleSize, handleSize));
-					}
-				}
-			}
-			else
-			{
-				p->setPen(QPen(PrefsManager::instance()->appPrefs.displayPrefs.frameGroupColor, 1.0 / sc, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin));
-				p->setBrush(Qt::NoBrush);
-				p->drawRect(QRectF(0.0, 0.0, Width, Height));
-				if (m_Doc->m_Selection->count() == 1)
-				{
-					p->setPen(Qt::NoPen);
-//					p->setPen(QPen(PrefsManager::instance()->appPrefs.frameGroupColor, 1.0 / sc, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin));
-					p->setBrush(PrefsManager::instance()->appPrefs.displayPrefs.frameGroupColor);
-					p->drawRect(QRectF(0.0, 0.0, handleSize, handleSize));
-					p->drawRect(QRectF(Width - handleSize, Height - handleSize, handleSize, handleSize));
-					p->drawRect(QRectF(Width - handleSize, 0.0, handleSize, handleSize));
-					p->drawRect(QRectF(0.0, Height - handleSize, handleSize, handleSize));
-					if (Width > 6)
-					{
-						p->drawRect(QRectF(Width / 2.0 - halfSize, Height - handleSize, handleSize, handleSize));
-						p->drawRect(QRectF(Width / 2.0 - halfSize, 0.0, handleSize, handleSize));
-					}
-					if (Height > 6)
-					{
-						p->drawRect(QRectF(Width - handleSize, Height / 2.0 - halfSize, handleSize, handleSize));
-						p->drawRect(QRectF(0.0, Height / 2.0 - halfSize, handleSize, handleSize));
-					}
-				}
-			}
-		}
-	}
-	FrameOnly = false;
 }
 
 QImage PageItem::DrawObj_toImage()
@@ -5973,7 +5839,7 @@
 void PageItem::drawLockedMarker(ScPainter *p)
 {
 	//TODO: CB clean
-	double scp1 = 1 ;// / ScMW->view->scale();
+	double scp1 = p->zoomFactor() ;// / ScMW->view->scale();
 	double ofwh = 6 * scp1;
 	double ofx = Width - ofwh/2;
 	double ofy = Height - ofwh*1.5;
@@ -5981,8 +5847,7 @@
 	double by1= ofy+3 * scp1;
 	double bw= 4*scp1;
 	double bh= 2*scp1;
-	ScribusView* view = m_Doc->view();
-	p->setPen(Qt::black, 0.5 / view->scale(), Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
+	p->setPen(Qt::black, 0.5 / p->zoomFactor(), Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
 	p->setPenOpacity(1.0);
 	p->setBrush(Qt::white);
 	p->setBrushOpacity(1.0);
@@ -5990,7 +5855,7 @@
 	p->drawRect(ofx, ofy, ofwh, ofwh);
 	p->setBrush(Qt::black);
 	p->drawRect(bx1, by1, bw, bh);
-	p->setPen(Qt::black, 1.5 / view->scale(), Qt::SolidLine, Qt::FlatCap, Qt::RoundJoin);
+	p->setPen(Qt::black, 1.5 / p->zoomFactor(), Qt::SolidLine, Qt::FlatCap, Qt::RoundJoin);
 	if (m_Locked)
 		p->drawLine(FPoint(bx1+scp1/2, ofy+scp1), FPoint(bx1+scp1/2, by1));
 	p->drawLine(FPoint(bx1+scp1*3.5, ofy+scp1), FPoint(bx1+scp1*3.5, by1));

Modified: branches/ScribusOIF/scribus/pageitem.h
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16179&path=/branches/ScribusOIF/scribus/pageitem.h
==============================================================================
--- branches/ScribusOIF/scribus/pageitem.h (original)
+++ branches/ScribusOIF/scribus/pageitem.h Wed Dec 29 02:41:41 2010
@@ -229,9 +229,6 @@
 	PageItem(ScribusDoc *pa, ItemType newType, double x, double y, double w, double h, double w2, QString fill, QString outline);
 	~PageItem();
 
-//	static const Xml_string saxxDefaultElem;
-//	static void  desaxeRules(const Xml_string& prefixPattern, desaxe::Digester& ruleset, Xml_string elemtag = saxxDefaultElem);
-	
 	void saxx(SaxHandler& handler, const Xml_string& elemtag) const {};
 	void saxx(SaxHandler& handler) const {};
 	
@@ -275,7 +272,6 @@
 	virtual bool createInfoGroup(QFrame *, QGridLayout *) {return false;}
 	
   /** Zeichnet das Item */
-	void paintObj(QPainter *p);
 	void DrawObj(ScPainter *p, QRectF e);
 	void DrawObj_Pre(ScPainter *p);
 	virtual void DrawObj_Post(ScPainter *p);
@@ -289,8 +285,6 @@
 			
 protected:
 	void DrawObj_ImageFrame(ScPainter *p, double sc);
-	//void DrawObj_TextFrame(ScPainter *p, QRectF e, double sc);
-	//void DrawObj_Line(ScPainter *p);
 	void DrawObj_Polygon(ScPainter *p);
 	void DrawObj_PolyLine(ScPainter *p);
 	void DrawObj_PathText(ScPainter *p, double sc);
@@ -305,8 +299,6 @@
 	void updatePolyClip();
 	void updateClip();
 	void convertClip();
-	//QRect getRedrawBounding(const double);
-	//void setRedrawBounding();
 	void getBoundingRect(double *x1, double *y1, double *x2, double *y2) const;
 	void getVisualBoundingRect(double *x1, double *y1, double *x2, double *y2) const;
 	QRectF getBoundingRect() const;
@@ -332,7 +324,6 @@
 	 * @return bool true if the x, y is in the bounds 
 	 */
 	bool mouseWithinItem(const int x, const int y, double scale) const;
-//	void copyToCopyPasteBuffer(struct CopyPasteBuffer *Buffer);
 	
 	virtual void handleModeEditKey(QKeyEvent *k, bool &keyRepeat);
 	
@@ -542,13 +533,6 @@
 	bool ScaleType;
 	bool AspectRatio;
 	QStack<int> Groups;
-//	const QStack<int>& groups() const { return Groups; }
-//	QStack<int>& groups() { return Groups; }
-//	void setGroups( QStack<int> val) { Groups = val; }
-	
-//	bool controlsGroup() const { return isGroupControl; }
-//	void setControlsGroup(bool val) { isGroupControl = val; }
-	
 	QVector<double> DashValues;
 	double DashOffset;
 	const QVector<double>& dashes() const { return DashValues; }
@@ -583,8 +567,6 @@
 	void setTopLink(PageItem* lnk) { TopLink = lnk; }
 	void setBottomLink(PageItem* lnk) { BottomLink = lnk; }
 	bool isSingleSel;
-	bool isGroupControl;
-	PageItem *groupsLastItem;
 	QList<PageItem*> groupItemList;
 	virtual QList<PageItem*> getItemList();
 	double groupWidth;

Modified: branches/ScribusOIF/scribus/pageitem_group.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16179&path=/branches/ScribusOIF/scribus/pageitem_group.cpp
==============================================================================
--- branches/ScribusOIF/scribus/pageitem_group.cpp (original)
+++ branches/ScribusOIF/scribus/pageitem_group.cpp Wed Dec 29 02:41:41 2010
@@ -194,6 +194,18 @@
 			}
 			p->endLayer();
 			p->restore();
+			if (m_Doc->guidesPrefs().framesShown)
+			{
+				for (int em = 0; em < groupItemList.count(); ++em)
+				{
+					PageItem* embedded = groupItemList.at(em);
+					double x = embedded->xPos();
+					double y = embedded->yPos();
+					embedded->setXYPos(embedded->gXpos, embedded->gYpos, true);
+					embedded->DrawObj_Decoration(p);
+					embedded->setXYPos(x, y, true);
+				}
+			}
 		}
 		else
 		{

Modified: branches/ScribusOIF/scribus/pageitem_textframe.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16179&path=/branches/ScribusOIF/scribus/pageitem_textframe.cpp
==============================================================================
--- branches/ScribusOIF/scribus/pageitem_textframe.cpp (original)
+++ branches/ScribusOIF/scribus/pageitem_textframe.cpp Wed Dec 29 02:41:41 2010
@@ -685,7 +685,6 @@
 
 void PageItem_TextFrame::DrawObj_Decoration(ScPainter *p)
 {
-	ScribusView* view = m_Doc->view();
 	p->save();
 	if (!isEmbedded)
 		p->translate(Xpos, Ypos);
@@ -694,7 +693,7 @@
 	{
 		// added to prevent fat frame outline due to antialiasing and considering you can’t pass a cosmetic pen to scpainter - pm
 		double aestheticFactor(5.0);
-		double scpInv = 1.0 / (qMax(view->scale(), 1.0) * aestheticFactor);
+		double scpInv = 1.0 / (qMax(p->zoomFactor(), 1.0) * aestheticFactor);
 		if ((Frame) && (m_Doc->guidesPrefs().framesShown))
 		{
 			p->setPen(PrefsManager::instance()->appPrefs.displayPrefs.frameNormColor, scpInv, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
@@ -737,14 +736,14 @@
 		//Draw the overflow icon
 		if (frameOverflows())
 		{//CB && added here for jghali prior to commit access
-			if ((!view->m_canvas->isPreviewMode()))
+			if ((!m_Doc->drawAsPreview))
 				drawOverflowMarker(p);
 		}
-		if ((m_Doc->guidesPrefs().colBordersShown) && (!view->m_canvas->isPreviewMode()))
+		if ((m_Doc->guidesPrefs().colBordersShown) && (!m_Doc->drawAsPreview))
 			drawColumnBorders(p);
-		if ((m_Doc->guidesPrefs().layerMarkersShown) && (m_Doc->layerCount() > 1) && (!m_Doc->layerOutline(LayerID)) && (!view->m_canvas->isPreviewMode()))
-		{
-			p->setPen(Qt::black, 0.5/ m_Doc->view()->scale(), Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
+		if ((m_Doc->guidesPrefs().layerMarkersShown) && (m_Doc->layerCount() > 1) && (!m_Doc->layerOutline(LayerID)) && (!m_Doc->drawAsPreview))
+		{
+			p->setPen(Qt::black, 0.5/ p->zoomFactor(), Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
 			p->setPenOpacity(1.0);
 			p->setBrush(m_Doc->layerMarker(LayerID));
 			p->setBrushOpacity(1.0);
@@ -1477,8 +1476,7 @@
 	p->drawLine(FPoint(scm_lineWidth16, scpheight3), FPoint(scm_lineWidth3, scpheight16));
 	*/
 	//TODO: CB clean
-	ScribusView* view = m_Doc->view();
-	double scp1 = 1 ;// / ScMW->view->scale();
+	double scp1 = p->zoomFactor() ;// / ScMW->view->scale();
 	double ofwh = 8 * scp1;
 	//CB moved down while locked marker disabled
 	//double ofx = Width - ofwh/2;
@@ -1489,15 +1487,15 @@
 	double ly1= ofy;
 	double lx2= ofx+ofwh;
 	double ly2= ofy+ofwh;
-	p->setPen(PrefsManager::instance()->appPrefs.displayPrefs.frameNormColor, 0.5 / view->scale(), Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
+	p->setPen(PrefsManager::instance()->appPrefs.displayPrefs.frameNormColor, 0.5 / p->zoomFactor(), Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
 	if ((isBookmark) || (m_isAnnotation))
-		p->setPen(PrefsManager::instance()->appPrefs.displayPrefs.frameAnnotationColor, 0.5 / view->scale(), Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
+		p->setPen(PrefsManager::instance()->appPrefs.displayPrefs.frameAnnotationColor, 0.5 / p->zoomFactor(), Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
 	if ((BackBox != 0) || (NextBox != 0))
-		p->setPen(PrefsManager::instance()->appPrefs.displayPrefs.frameLinkColor, 0.5 / view->scale(), Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
+		p->setPen(PrefsManager::instance()->appPrefs.displayPrefs.frameLinkColor, 0.5 / p->zoomFactor(), Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
 	if (m_Locked)
-		p->setPen(PrefsManager::instance()->appPrefs.displayPrefs.frameLockColor, 0.5 / view->scale(), Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
+		p->setPen(PrefsManager::instance()->appPrefs.displayPrefs.frameLockColor, 0.5 / p->zoomFactor(), Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
 	if (m_Doc->m_Selection->containsItem(this))
-		p->setPen(Qt::red, 0.5 / view->scale(), Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
+		p->setPen(Qt::red, 0.5 / p->zoomFactor(), Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
 	p->setPenOpacity(1.0);
 	p->setBrush(Qt::white);
 	p->setBrushOpacity(1.0);
@@ -1509,8 +1507,7 @@
 
 void PageItem_TextFrame::drawColumnBorders(ScPainter *p)
 {
-	ScribusView* view = m_Doc->view();
-	p->setPen(Qt::black, 0.5/ view->scale(), Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
+	p->setPen(Qt::black, 0.5/ p->zoomFactor(), Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
 	p->setPenOpacity(1.0);
 	p->setBrush(Qt::white);
 	p->setBrushOpacity(1.0);

Modified: branches/ScribusOIF/scribus/plugins/import/CMakeLists.txt
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16179&path=/branches/ScribusOIF/scribus/plugins/import/CMakeLists.txt
==============================================================================
--- branches/ScribusOIF/scribus/plugins/import/CMakeLists.txt (original)
+++ branches/ScribusOIF/scribus/plugins/import/CMakeLists.txt Wed Dec 29 02:41:41 2010
@@ -6,6 +6,7 @@
 ADD_SUBDIRECTORY(oodraw)
 ADD_SUBDIRECTORY(pct)
 ADD_SUBDIRECTORY(ps)
+ADD_SUBDIRECTORY(shape)
 ADD_SUBDIRECTORY(sml)
 ADD_SUBDIRECTORY(svg)
 ADD_SUBDIRECTORY(uniconvertor)

Modified: branches/ScribusOIF/scribus/plugins/import/svg/svgplugin.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16179&path=/branches/ScribusOIF/scribus/plugins/import/svg/svgplugin.cpp
==============================================================================
--- branches/ScribusOIF/scribus/plugins/import/svg/svgplugin.cpp (original)
+++ branches/ScribusOIF/scribus/plugins/import/svg/svgplugin.cpp Wed Dec 29 02:41:41 2010
@@ -28,6 +28,7 @@
 #include "scclocale.h"
 #include "scconfig.h"
 #include "scgzfile.h"
+#include "sclimits.h"
 #include "scmimedata.h"
 #include "scpaths.h"
 #include "scpattern.h"
@@ -1123,10 +1124,10 @@
 	}
 	else
 	{
-		double minx = 999999.9;
-		double miny = 999999.9;
-		double maxx = -999999.9;
-		double maxy = -999999.9;
+		double minx =  std::numeric_limits<double>::max();
+		double miny =  std::numeric_limits<double>::max();
+		double maxx = -std::numeric_limits<double>::max();
+		double maxy = -std::numeric_limits<double>::max();
 		GElements.append(neu);
 		for (int gr = 0; gr < gElements.count(); ++gr)
 		{

Modified: branches/ScribusOIF/scribus/plugins/scriptplugin/cmdtext.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16179&path=/branches/ScribusOIF/scribus/plugins/scriptplugin/cmdtext.cpp
==============================================================================
--- branches/ScribusOIF/scribus/plugins/scriptplugin/cmdtext.cpp (original)
+++ branches/ScribusOIF/scribus/plugins/scriptplugin/cmdtext.cpp Wed Dec 29 02:41:41 2010
@@ -310,7 +310,6 @@
 	if (ScCore->primaryMainWindow()->doc->DoDrawing)
 	{
 // FIXME adapt to Qt-4 painting style
-//		it->paintObj();
 		it->Dirty = false;
 	}
 //	Py_INCREF(Py_None);

Modified: branches/ScribusOIF/scribus/plugins/scriptplugin/scriptercore.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16179&path=/branches/ScribusOIF/scribus/plugins/scriptplugin/scriptercore.cpp
==============================================================================
--- branches/ScribusOIF/scribus/plugins/scriptplugin/scriptercore.cpp (original)
+++ branches/ScribusOIF/scribus/plugins/scriptplugin/scriptercore.cpp Wed Dec 29 02:41:41 2010
@@ -159,41 +159,6 @@
 		ScMW->pagePalette->setView(ScMW->view);
 		ScMW->pagePalette->Rebuild();
 		ScMW->doc->RePos = true;
-/*		QImage pgPix(10, 10, QImage::Format_ARGB32);
-		QRect rd = QRect(0,0,9,9);
-		ScPainter *painter = new ScPainter(&pgPix, pgPix.width(), pgPix.height());
-		for (int azz=0; azz<ScMW->doc->Items->count(); ++azz)
-		{
-			PageItem *ite = ScMW->doc->Items->at(azz);
-			if (ite->Groups.count() != 0)
-				ScMW->doc->GroupOnPage(ite);
-			else
-				ite->OwnPage = ScMW->doc->OnPage(ite);
-			ite->setRedrawBounding();
-			if ((ite->itemType() == PageItem::TextFrame) || (ite->itemType() == PageItem::PathText)) // && (!ite->Redrawn))
-			{
-				if (ite->itemType() == PageItem::PathText)
-				{
-					ite->Frame = false;
-					ite->updatePolyClip();
-					ite->DrawObj(painter, rd);
-				}
-				else
-				{
-					if ((ite->prevInChain() != 0) || (ite->nextInChain() != 0))
-					{
-						PageItem *nextItem = ite;
-						while (nextItem->prevInChain() != 0)
-							nextItem = nextItem->prevInChain();
-						ite = nextItem;
-						ite->DrawObj(painter, rd);
-					}
-					else
-						ite->DrawObj(painter, rd);
-				}
-			}
-		}
-		delete painter; */
 		ScMW->doc->RePos = false;
 		if (ScMW->doc->m_Selection->count() != 0)
 		{

Modified: branches/ScribusOIF/scribus/plugins/scriptplugin/svgimport.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16179&path=/branches/ScribusOIF/scribus/plugins/scriptplugin/svgimport.cpp
==============================================================================
--- branches/ScribusOIF/scribus/plugins/scriptplugin/svgimport.cpp (original)
+++ branches/ScribusOIF/scribus/plugins/scriptplugin/svgimport.cpp Wed Dec 29 02:41:41 2010
@@ -55,9 +55,7 @@
 				ScCore->primaryMainWindow()->view->startGroupTransaction();
 				ScCore->primaryMainWindow()->doc->moveGroup(pageUnitXToDocX(x) - x2, pageUnitYToDocY(y) - y2);
 				ScCore->primaryMainWindow()->view->endGroupTransaction();
-				ScCore->primaryMainWindow()->propertiesPalette->updateColorList();
-				ScCore->primaryMainWindow()->propertiesPalette->textPal->updateTextStyles();
-				ScCore->primaryMainWindow()->propertiesPalette->linePal->updateLineStyles();
+				ScCore->primaryMainWindow()->requestUpdate(reqColorsUpdate | reqLineStylesUpdate | reqTextStylesUpdate);
 			}
 		}
 	}
@@ -91,9 +89,7 @@
 			ScCore->primaryMainWindow()->view->startGroupTransaction();
 			ScCore->primaryMainWindow()->doc->moveGroup(pageUnitXToDocX(x) - x2, pageUnitYToDocY(y) - y2);
 			ScCore->primaryMainWindow()->view->endGroupTransaction();
-			ScCore->primaryMainWindow()->propertiesPalette->updateColorList();
-			ScCore->primaryMainWindow()->propertiesPalette->textPal->updateTextStyles();
-			ScCore->primaryMainWindow()->propertiesPalette->linePal->updateLineStyles();
+			ScCore->primaryMainWindow()->requestUpdate(reqColorsUpdate | reqLineStylesUpdate | reqTextStylesUpdate);
 		}
 	}
 	else
@@ -126,9 +122,7 @@
 			ScCore->primaryMainWindow()->view->startGroupTransaction();
 			ScCore->primaryMainWindow()->doc->moveGroup(pageUnitXToDocX(x) - x2, pageUnitYToDocY(y) - y2);
 			ScCore->primaryMainWindow()->view->endGroupTransaction();
-			ScCore->primaryMainWindow()->propertiesPalette->updateColorList();
-			ScCore->primaryMainWindow()->propertiesPalette->textPal->updateTextStyles();
-			ScCore->primaryMainWindow()->propertiesPalette->linePal->updateLineStyles();
+			ScCore->primaryMainWindow()->requestUpdate(reqColorsUpdate | reqLineStylesUpdate | reqTextStylesUpdate);
 		}
 	}
 	else
@@ -161,9 +155,7 @@
 			ScCore->primaryMainWindow()->view->startGroupTransaction();
 			ScCore->primaryMainWindow()->doc->moveGroup(pageUnitXToDocX(x) - x2, pageUnitYToDocY(y) - y2);
 			ScCore->primaryMainWindow()->view->endGroupTransaction();
-			ScCore->primaryMainWindow()->propertiesPalette->updateColorList();
-			ScCore->primaryMainWindow()->propertiesPalette->textPal->updateTextStyles();
-			ScCore->primaryMainWindow()->propertiesPalette->linePal->updateLineStyles();
+			ScCore->primaryMainWindow()->requestUpdate(reqColorsUpdate | reqLineStylesUpdate | reqTextStylesUpdate)
 		}
 	}
 	else
@@ -196,9 +188,7 @@
 			ScCore->primaryMainWindow()->view->startGroupTransaction();
 			ScCore->primaryMainWindow()->doc->moveGroup(pageUnitXToDocX(x) - x2, pageUnitYToDocY(y) - y2);
 			ScCore->primaryMainWindow()->view->endGroupTransaction();
-			ScCore->primaryMainWindow()->propertiesPalette->updateColorList();
-			ScCore->primaryMainWindow()->propertiesPalette->textPal->updateTextStyles();
-			ScCore->primaryMainWindow()->propertiesPalette->linePal->updateLineStyles();
+			ScCore->primaryMainWindow()->requestUpdate(reqColorsUpdate | reqLineStylesUpdate | reqTextStylesUpdate)
 		}
 	}
 	else

Modified: branches/ScribusOIF/scribus/plugins/svgexplugin/svgexplugin.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16179&path=/branches/ScribusOIF/scribus/plugins/svgexplugin/svgexplugin.cpp
==============================================================================
--- branches/ScribusOIF/scribus/plugins/svgexplugin/svgexplugin.cpp (original)
+++ branches/ScribusOIF/scribus/plugins/svgexplugin/svgexplugin.cpp Wed Dec 29 02:41:41 2010
@@ -1191,41 +1191,12 @@
 #if 0 // FIXME_OIF
 	const CharStyle & charStyle(*hl);
 	QList<PageItem*> emG = hl->embedded.getGroupedItems();
-	QStack<PageItem*> groupStack;
-	QStack<QDomElement> groupStack2;
 	QDomElement layerGroup = docu.createElement("g");
 	if (pathT)
 		layerGroup.setAttribute("transform", MatrixToStr(finalMat));
 	for (int em = 0; em < emG.count(); ++em)
 	{
 		PageItem* embedded = emG.at(em);
-		if (embedded->isGroupControl)
-		{
-			groupStack.push(embedded->groupsLastItem);
-			groupStack2.push(layerGroup);
-			layerGroup = docu.createElement("g");
-			if (embedded->fillTransparency() != 0)
-				layerGroup.setAttribute("opacity", FToStr(1.0 - embedded->fillTransparency()));
-			QDomElement ob = docu.createElement("clipPath");
-			ob.setAttribute("id", "Clip"+IToStr(ClipCount));
-			QDomElement cl = docu.createElement("path");
-			cl.setAttribute("d", SetClipPath(&embedded->PoLine, true));
-			QTransform mm;
-			mm.translate(xpos + embedded->gXpos * (charStyle.scaleH() / 1000.0), (ypos - (embedded->gHeight * (charStyle.scaleV() / 1000.0)) + embedded->gYpos * (charStyle.scaleV() / 1000.0)));
-			if (charStyle.baselineOffset() != 0)
-				mm.translate(0, embedded->gHeight * (charStyle.baselineOffset() / 1000.0));
-			if (charStyle.scaleH() != 1000)
-				mm.scale(charStyle.scaleH() / 1000.0, 1);
-			if (charStyle.scaleV() != 1000)
-				mm.scale(1, charStyle.scaleV() / 1000.0);
-			mm.rotate(embedded->rotation());
-			cl.setAttribute("transform", MatrixToStr(mm));
-			ob.appendChild(cl);
-			globalDefs.appendChild(ob);
-			layerGroup.setAttribute("clip-path", "url(#Clip"+IToStr(ClipCount)+")");
-			ClipCount++;
-			continue;
-		}
 		QDomElement obE;
 		QString fill = getFillStyle(embedded);
 		QString stroke = "stroke:none";
@@ -1271,17 +1242,6 @@
 		mm.rotate(embedded->rotation());
 		obE.setAttribute("transform", MatrixToStr(mm));
 		layerGroup.appendChild(obE);
-		if (groupStack.count() != 0)
-		{
-			while (embedded == groupStack.top())
-			{
-				groupStack.pop();
-				groupStack2.top().appendChild(layerGroup);
-				layerGroup = groupStack2.pop();
-				if (groupStack.count() == 0)
-					break;
-			}
-		}
 	}
 	for (int em = 0; em < emG.count(); ++em)
 	{

Modified: branches/ScribusOIF/scribus/scpageoutput.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16179&path=/branches/ScribusOIF/scribus/scpageoutput.cpp
==============================================================================
--- branches/ScribusOIF/scribus/scpageoutput.cpp (original)
+++ branches/ScribusOIF/scribus/scpageoutput.cpp Wed Dec 29 02:41:41 2010
@@ -593,23 +593,6 @@
 		return;
 	QList<PageItem*> emG;
 	emG.append(cembedded);
-	if (cembedded->Groups.count() != 0)
-	{
-		for (int ga=0; ga < m_doc->FrameItems.count(); ++ga)
-		{
-			if (m_doc->FrameItems.at(ga)->Groups.count() != 0)
-			{
-				if (m_doc->FrameItems.at(ga)->Groups.top() == cembedded->Groups.top())
-				{
-					if (m_doc->FrameItems.at(ga)->ItemNr != cembedded->ItemNr)
-					{
-						if (!emG.contains(m_doc->FrameItems.at(ga)))
-							emG.append(m_doc->FrameItems.at(ga));
-					}
-				}
-			}
-		}
-	}
 	for (int em = 0; em < emG.count(); ++em)
 	{
 		PageItem* embedded = emG.at(em);

Modified: branches/ScribusOIF/scribus/scribus.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16179&path=/branches/ScribusOIF/scribus/scribus.cpp
==============================================================================
--- branches/ScribusOIF/scribus/scribus.cpp (original)
+++ branches/ScribusOIF/scribus/scribus.cpp Wed Dec 29 02:41:41 2010
@@ -142,21 +142,17 @@
 #include "ui/bookmarkpalette.h"
 #include "ui/charselect.h"
 #include "ui/checkDocument.h"
-//#include "ui/cmsprefs.h"
 #include "ui/collectforoutput_ui.h"
 #include "ui/colorcombo.h"
 #include "ui/contextmenu.h"
 #include "ui/cpalette.h"
 #include "ui/customfdialog.h"
 #include "ui/delpages.h"
-//#include "ui/docitemattrprefs.h"
 #include "ui/effectsdialog.h"
 #include "ui/fontcombo.h"
-//#include "ui/fontprefs.h"
 #include "ui/guidemanager.h"
 #include "ui/helpbrowser.h"
 #include "ui/hruler.h"
-//#include "ui/hysettings.h"
 #include "ui/imageinfodialog.h"
 #include "ui/insertaframe.h"
 #include "ui/inspage.h"
@@ -185,12 +181,10 @@
 #include "ui/pagepalette.h"
 #include "ui/pageselector.h"
 #include "ui/paintmanager.h"
-//#include "ui/patterndialog.h"
 #include "ui/pdfopts.h"
 #include "ui/picstatus.h"
 #include "ui/polygonwidget.h"
 #include "ui/preferencesdialog.h"
-//#include "ui/prefs.h"
 #include "ui/preview.h"
 #include "ui/printdialog.h"
 #include "ui/propertiespalette.h"
@@ -201,7 +195,6 @@
 #include "ui/propertiespalette_text.h"
 #include "ui/propertiespalette_xyz.h"
 #include "ui/query.h"
-//#include "ui/reformdoc.h"
 #include "ui/replacecolors.h"
 #include "ui/sccombobox.h"
 #include "ui/scmessagebox.h"
@@ -215,15 +208,9 @@
 #include "ui/storyeditor.h"
 #include "ui/stylemanager.h"
 #include "ui/symbolpalette.h"
-//#include "ui/tabcheckdoc.h"
-//#include "ui/tabguides.h"
 #include "ui/tabmanager.h"
-//#include "ui/tabpdfoptions.h"
-//#include "ui/tabtools.h"
-//#include "ui/tabtypography.h"
 #include "text/nlsconfig.h"
 #include "tocgenerator.h"
-//#include "ui/tocindexprefs.h"
 #include "ui/transformdialog.h"
 #include "ui/transparencypalette.h"
 #include "ui/copypagetomasterpagedialog.h"
@@ -1682,6 +1669,11 @@
 	qApp->exit(0);
 }
 
+void ScribusMainWindow::requestUpdate(int val)
+{
+	emit UpdateRequest(val);
+}
+
 /////////////////////////////////////////////////////////////////////
 // SLOT IMPLEMENTATION
 /////////////////////////////////////////////////////////////////////
@@ -3017,28 +3009,17 @@
 		scrActions["editSearchReplace"]->setEnabled(false);
 
 		bool hPoly = false;
-		bool isGroup = true;
-		int firstElem = -1;
-		if (currItem->Groups.count() != 0)
-			firstElem = currItem->Groups.top();
 		for (uint bx=0; bx < docSelectionCount; ++bx)
 		{
 			PageItem* bxi=doc->m_Selection->itemAt(bx);
 			if ((bxi->asPolygon()) || (bxi->asPolyLine()))
 				hPoly = true;
-			if (bxi->Groups.count() != 0)
-			{
-				if (bxi->Groups.top() != firstElem)
-					isGroup = false;
-			}
-			else
-				isGroup = false;
 		}
 		// It is possible to select objects on different layer using
 		// document outline palette. We need to check selected objects
 		// are on a common layer before allowing user to group them
 		bool objectsOnSameLayer = (doc->m_Selection->objectsLayer() != -1);
-		scrActions["itemGroup"]->setEnabled(!isGroup && objectsOnSameLayer);
+		scrActions["itemGroup"]->setEnabled(objectsOnSameLayer);
 		scrActions["itemCombinePolygons"]->setEnabled(hPoly);
 		if (docSelectionCount == 2)
 		{
@@ -3332,9 +3313,7 @@
 				double x2, y2, w, h;
 				doc->m_Selection->getGroupRect(&x2, &y2, &w, &h);
 				doc->moveGroup(doc->currentPage()->xOffset() - x2, doc->currentPage()->yOffset() - y2);
-				propertiesPalette->updateColorList();
-				propertiesPalette->textPal->updateTextStyles();
-				propertiesPalette->linePal->updateLineStyles();
+				emit UpdateRequest(reqColorsUpdate|reqTextStylesUpdate|reqLineStylesUpdate);
 			}
 		}
 		else if (rasterFiles.contains(fi.suffix().toLower()))
@@ -3353,24 +3332,13 @@
 		else
 		{
 			UndoTransaction pasteAction(undoManager->beginTransaction(Um::SelectionGroup, Um::IGroup, Um::Create,"",Um::ICreate));
-			if (fi.suffix().toLower() == "shape")
-			{
-				QString f = "";
-				loadText(data, &f);
-				StencilReader *pre = new StencilReader();
-				data = pre->createShape(f);
-				delete pre;
-			}
 			view->Deselect(true);
 			uint ac = doc->Items->count();
 			bool savedAlignGrid = doc->useRaster;
 			bool savedAlignGuides = doc->SnapGuides;
 			doc->useRaster = false;
 			doc->SnapGuides = false;
-			if (fi.suffix().toLower() == "sce")
-				slotElemRead(data, doc->currentPage()->xOffset(), doc->currentPage()->yOffset(), true, true, doc, view);
-			else
-				slotElemRead(data, doc->currentPage()->xOffset(), doc->currentPage()->yOffset(), false, true, doc, view);
+			slotElemRead(data, doc->currentPage()->xOffset(), doc->currentPage()->yOffset(), true, true, doc, view);
 			doc->useRaster = savedAlignGrid;
 			doc->SnapGuides = savedAlignGuides;
 			Selection tmpSelection(this, false);
@@ -3415,10 +3383,8 @@
 		fmtCode++;
 		fmt = LoadSavePlugin::getFormatById(fmtCode);
 	}
-	allFormats += "*.sce *.SCE ";
-	allFormats += "*.shape *.SHAPE);;";
+	allFormats += "*.sce *.SCE;;";
 	formats.append("Scribus Objects (*.sce *.SCE)");
-	formats.append("Dia Shapes (*.shape *.SHAPE)");
 	qSort(formats);
 	allFormats += formats.join(";;");
 	PrefsContext* dirs = PrefsManager::instance()->prefsFile->getContext("dirs");
@@ -3523,8 +3489,7 @@
 {
 	if (HaveDoc)
 	{
-		propertiesPalette->updateColorList();
-		propertiesPalette->linePal->updateLineStyles();
+		requestUpdate(reqColorsUpdate | reqLineStylesUpdate);
 		styleManager->updateColorList();
 	}
 }
@@ -3683,8 +3648,7 @@
 		propertiesPalette->updateColorList();
 		propertiesPalette->textPal->paraStyleCombo->setDoc(doc);
 		propertiesPalette->textPal->charStyleCombo->setDoc(doc);
-		propertiesPalette->linePal->updateLineStyles();
-		propertiesPalette->linePal->updateArrowStyles();
+		emit UpdateRequest(reqArrowStylesUpdate | reqLineStylesUpdate);
 		symbolPalette->updateSymbolList();
 		if (!Mpa)
 		{
@@ -5056,8 +5020,6 @@
 				for (int as = ac; as < doc->Items->count(); ++as)
 				{
 					doc->m_Selection->addItem(doc->Items->at(as));
-					if (isGroup)
-						doc->Items->at(as)->Groups.push(doc->GroupCounter);
 				}
 				doc->m_Selection->delaySignalsOff();
 				if (isGroup)
@@ -7253,8 +7215,7 @@
 		}
 	}
 
-	propertiesPalette->textPal->updateTextStyles();
-	propertiesPalette->updateColorList();
+	emit UpdateRequest(reqColorsUpdate | reqTextStylesUpdate);
 	view->DrawNew();
 	slotDocCh();
 }
@@ -8398,9 +8359,7 @@
 		vie->DrawNew();
 		if (doc == docc)
 		{
-			propertiesPalette->updateColorList();
-			propertiesPalette->textPal->updateTextStyles();
-			propertiesPalette->linePal->updateLineStyles();
+			emit UpdateRequest(reqColorsUpdate | reqTextStylesUpdate | reqLineStylesUpdate);
 			slotDocCh();
 		}
 	}
@@ -9728,7 +9687,7 @@
 					loadDoc( fi.absoluteFilePath() );
 				}
 			}
-			else if ((fileUrl.endsWith(".shape")) || (fileUrl.endsWith(".sce")))
+			else if (fileUrl.endsWith(".sce"))
 			{
 				QUrl url( fileUrls[i] );
 				QFileInfo fi(url.path());
@@ -9738,16 +9697,7 @@
 					QString data;
 					QByteArray cf;
 					loadRawText(url.toLocalFile(), cf);
-					if (fileUrl.endsWith(".sce"))
-						data = QString::fromUtf8(cf.data());
-					else
-					{
-						QString f = QString::fromUtf8(cf.data());
-						StencilReader *pre = new StencilReader();
-						if (fileUrl.endsWith(".shape"))
-							data = pre->createShape(f);
-						delete pre;
-					}
+					data = QString::fromUtf8(cf.data());
 					double gx, gy, gw, gh;
 					ScriXmlDoc *ss = new ScriXmlDoc();
 					if(ss->ReadElemHeader(data, false, &gx, &gy, &gw, &gh))
@@ -9755,10 +9705,7 @@
 						doFileNew(gw, gh, 0, 0, 0, 0, 0, 0, false, false, 0, false, 0, 1, "Custom", true);
 						HaveNewDoc();
 						doc->reformPages(true);
-						if (fileUrl.endsWith(".sce"))
-							slotElemRead(data, doc->currentPage()->xOffset(), doc->currentPage()->yOffset(), false, false, doc, view);
-						else
-							slotElemRead(data, doc->currentPage()->xOffset(), doc->currentPage()->yOffset(), false, true, doc, view);
+						slotElemRead(data, doc->currentPage()->xOffset(), doc->currentPage()->yOffset(), false, false, doc, view);
 						slotDocCh(false);
 						doc->regionsChanged()->update(QRectF());
 						delete ss;
@@ -10085,8 +10032,7 @@
 			doc->replaceLineStyleColors(dia2->replaceMap);
 			doc->recalculateColors();
 			doc->recalcPicturesRes();
-			propertiesPalette->updateColorList();
-			propertiesPalette->linePal->updateLineStyles();
+			requestUpdate(reqColorsUpdate | reqLineStylesUpdate);
 			styleManager->updateColorList();
 			if (doc->m_Selection->count() != 0)
 				doc->m_Selection->itemAt(0)->emitAllToGUI();

Modified: branches/ScribusOIF/scribus/scribus.h
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16179&path=/branches/ScribusOIF/scribus/scribus.h
==============================================================================
--- branches/ScribusOIF/scribus/scribus.h (original)
+++ branches/ScribusOIF/scribus/scribus.h Wed Dec 29 02:41:41 2010
@@ -146,6 +146,7 @@
 	void keyReleaseEvent(QKeyEvent *k);
 	void inputMethodEvent ( QInputMethodEvent * event );
 	QVariant inputMethodQuery ( Qt::InputMethodQuery query ) const ;
+	void requestUpdate(int);
 	void setTBvals(PageItem *currItem);
 	void ShowSubs();
 	void applyNewMaster(QString name);
@@ -562,6 +563,7 @@
 	void TextStyle(const ParagraphStyle&);
 //deprecated: (av)
 	void TextEffects(int);
+	void UpdateRequest(int updateFlags);
 
 protected:
 	/*!

Modified: branches/ScribusOIF/scribus/scribusdoc.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16179&path=/branches/ScribusOIF/scribus/scribusdoc.cpp
==============================================================================
--- branches/ScribusOIF/scribus/scribusdoc.cpp (original)
+++ branches/ScribusOIF/scribus/scribusdoc.cpp Wed Dec 29 02:41:41 2010
@@ -243,6 +243,7 @@
 	docPrefsData.pdfPrefs.bleeds = docPrefsData.docSetupPrefs.bleeds;
 	docPrefsData.pdfPrefs.useDocBleeds = true;
 	Print_Options.firstUse = true;
+	drawAsPreview = false;
 }
 
 
@@ -333,6 +334,7 @@
 	docPrefsData.docSetupPrefs.pageOrientation=pagesSetup.orientation;
 	docPrefsData.docSetupPrefs.pagePositioning=pagesSetup.pageArrangement;
 	Print_Options.firstUse = true;
+	drawAsPreview = false;
 }
 
 
@@ -5170,27 +5172,6 @@
 		Page* addedPage = TempPages.at(0);
 		if (Items->count() > 1)
 		{
-		/*	bool isGroup = true;
-			int firstElem = -1;
-			if (currItem->Groups.count() != 0)
-				firstElem = currItem->Groups.top();
-			for (int bx = 0; bx < Items->count(); ++bx)
-			{
-				PageItem* bxi = Items->at(bx);
-				if (bxi->Groups.count() != 0)
-				{
-					if (bxi->Groups.top() != firstElem)
-					{
-						isGroup = false;
-						break;
-					}
-				}
-				else
-				{
-					isGroup = false;
-					break;
-				}
-			} */
 			if ((!currItem->isGroup()) && (Items->count() > 1))
 			{
 				itemAdd(PageItem::Group, PageItem::Rectangle, addedPage->xOffset(), addedPage->yOffset(), 10, 10, 0, CommonStrings::None, CommonStrings::None, true);
@@ -7202,11 +7183,6 @@
 		ma.scale(-1, 1);
 		currItem->ContourLine.map(ma);
 		regionsChanged()->update(QRectF());
-//		currItem->Tinput = true;
-//		currItem->FrameOnly = true;
-//		currItem->paintObj();
-//		currItem->FrameOnly = false;
-//		m_View->MarkClip(currItem, currItem->ContourLine, true);
 		changed();
 		return;
 	}
@@ -7251,11 +7227,6 @@
 		ma.scale(1, -1);
 		currItem->ContourLine.map(ma);
 		regionsChanged()->update(QRectF());
-//		currItem->Tinput = true;
-//		currItem->FrameOnly = true;
-//		currItem->paintObj();
-//		currItem->FrameOnly = false;
-//		m_View->MarkClip(currItem, currItem->ContourLine, true);
 		changed();
 		return;
 	}
@@ -9198,38 +9169,10 @@
 		currItem = itemSelection->itemAt(a);
 		Object.Objects.clear();
 		currItem->getBoundingRect(&Object.x1, &Object.y1, &Object.x2, &Object.y2);
-/*		if (currItem->Groups.count() > 0)
-		{
-			ObjGroup = currItem->Groups.top();
-			bool found = false;
-			for (int a2 = 0; a2 < AObjects.count(); ++a2)
-			{
-				if (AObjects[a2].Group == ObjGroup)
-				{
-					AObjects[a2].x1 = qMin(AObjects[a2].x1, Object.x1);
-					AObjects[a2].y1 = qMin(AObjects[a2].y1, Object.y1);
-					AObjects[a2].x2 = qMax(AObjects[a2].x2, Object.x2);
-					AObjects[a2].y2 = qMax(AObjects[a2].y2, Object.y2);
-					AObjects[a2].Objects.append(currItem);
-					found = true;
-					break;
-				}
-			}
-			if (!found)
-			{
-				Object.Group = ObjGroup;
-				Object.ObjNr = 0;
-				Object.Objects.append(currItem);
-				AObjects.append(Object);
-			}
-		}
-		else
-		{ */
-			Object.Group = 0;
-			Object.ObjNr = currItem->ItemNr;
-			Object.Objects.append(currItem);
-			AObjects.append(Object);
-//		}
+		Object.Group = 0;
+		Object.ObjNr = currItem->ItemNr;
+		Object.Objects.append(currItem);
+		AObjects.append(Object);
 	}
 	for (int i = 0; i < AObjects.count(); ++i)
 	{
@@ -11371,10 +11314,7 @@
 	currItem->OwnPage = OnPage(currItem);
 	if (currItem->Sizing)
 	{
-//		currItem->Tinput = true;
 		currItem->FrameOnly = true;
-//		if ((m_View->frameResizeHandle == 1) && !(currItem->asLine()))
-//			currItem->paintObj();
 
 		if (currItem->FrameType == 0 || currItem->asLine())
 		{

Modified: branches/ScribusOIF/scribus/scribusdoc.h
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16179&path=/branches/ScribusOIF/scribus/scribusdoc.h
==============================================================================
--- branches/ScribusOIF/scribus/scribusdoc.h (original)
+++ branches/ScribusOIF/scribus/scribusdoc.h Wed Dec 29 02:41:41 2010
@@ -1170,6 +1170,7 @@
 	QMap<QString, VGradient> docGradients;
 	QWidget* WinHan;
 	bool DoDrawing;
+	bool drawAsPreview;
 	struct OpenNodesList
 	{
 		int type;

Modified: branches/ScribusOIF/scribus/scribusstructs.h
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16179&path=/branches/ScribusOIF/scribus/scribusstructs.h
==============================================================================
--- branches/ScribusOIF/scribus/scribusstructs.h (original)
+++ branches/ScribusOIF/scribus/scribusstructs.h Wed Dec 29 02:41:41 2010
@@ -334,6 +334,18 @@
 	customPage = 30
 };
 
+enum UpdateRequests
+{
+	reqColorsUpdate = 1,
+	reqCharStylesUpdate = 2,
+	reqParaStylesUpdate = 4,
+	reqTextStylesUpdate = 6,
+	reqArrowStylesUpdate = 8,
+	reqLineStylesUpdate  = 16,
+	reqSymbolsUpdate     = 32,
+	reqUpdateAll = 65535
+};
+
 //! \brief Common type for guides list
 typedef QList<double> Guides;
 

Modified: branches/ScribusOIF/scribus/scribusview.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16179&path=/branches/ScribusOIF/scribus/scribusview.cpp
==============================================================================
--- branches/ScribusOIF/scribus/scribusview.cpp (original)
+++ branches/ScribusOIF/scribus/scribusview.cpp Wed Dec 29 02:41:41 2010
@@ -99,7 +99,6 @@
 #include "scribusXml.h"
 #include "selection.h"
 #include "serializer.h"
-#include "stencilreader.h"
 #include "text/nlsconfig.h"
 #include "ui/adjustcmsdialog.h"
 #include "ui/extimageprops.h"
@@ -417,6 +416,7 @@
 void ScribusView::togglePreview()
 {
 	m_canvas->m_viewMode.viewAsPreview = !m_canvas->m_viewMode.viewAsPreview;
+	Doc->drawAsPreview = m_canvas->m_viewMode.viewAsPreview;
 	if (m_canvas->m_viewMode.viewAsPreview)
 	{
 		storedFramesShown = Doc->guidesPrefs().framesShown;
@@ -919,7 +919,7 @@
 		bool vectorFile = false;
 		if (fi.exists())
 		{
-			if ((fi.suffix().toLower() == "shape") || (fi.suffix().toLower() == "sce"))
+			if (fi.suffix().toLower() == "sce")
 				vectorFile = true;
 			else
 			{
@@ -997,17 +997,7 @@
 				if (fi.exists())
 				{
 					QString data;
-					if (fi.suffix().toLower() == "shape")
-					{
-						QByteArray cf;
-						loadRawText(url.toLocalFile(), cf);
-						StencilReader *pre = new StencilReader();
-						QString f = QString::fromUtf8(cf.data());
-						data = pre->createShape(f);
-						delete pre;
-						emit LoadElem(data, dropPosDoc.x(), dropPosDoc.y(), false, false, Doc, this);
-					}
-					else if (fi.suffix().toLower() == "sce")
+					if (fi.suffix().toLower() == "sce")
 					{
 						emit LoadElem(url.toLocalFile(), dropPosDoc.x(), dropPosDoc.y(), true, false, Doc, this);
 					}
@@ -1049,10 +1039,7 @@
 									undoManager->setUndoEnabled(false);
 									Doc->m_Selection->getGroupRect(&x2, &y2, &w, &h);
 									Doc->moveGroup(dropPosDoc.x() - x2, dropPosDoc.y() - y2);
-									m_ScMW->propertiesPalette->updateColorList();
-									m_ScMW->symbolPalette->updateSymbolList();
-									m_ScMW->propertiesPalette->textPal->updateTextStyles();
-									m_ScMW->propertiesPalette->linePal->updateLineStyles();
+									m_ScMW->requestUpdate(reqColorsUpdate | reqSymbolsUpdate | reqTextStylesUpdate | reqLineStylesUpdate);
 									undoManager->setUndoEnabled(true);
 								}
 							}
@@ -1806,20 +1793,6 @@
 			//emitting in prepend below so do it here.
 			//Doc->m_Selection->itemAt(0)->emitAllToGUI();
 		}
-	}
-	else
-	{
-	//CB Prepend used to occur to enable level changes to work properly, however with
-	//current selection code we dont seem to need that anymore
-	/*
-		if (Doc->m_Selection->count() > 1)
-		{
-			PageItem *bb = Doc->m_Selection->itemAt(0);
-			Doc->m_Selection->removeItem(currItem);
-			Doc->m_Selection->prependItem(currItem, false);
-			currItem->paintObj();
-			bb->paintObj();
-		}*/
 	}
 	if (draw)
 	{

Modified: branches/ScribusOIF/scribus/serializer.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16179&path=/branches/ScribusOIF/scribus/serializer.cpp
==============================================================================
--- branches/ScribusOIF/scribus/serializer.cpp (original)
+++ branches/ScribusOIF/scribus/serializer.cpp Wed Dec 29 02:41:41 2010
@@ -176,278 +176,6 @@
 	addRule("/SCRIBUSFRAGMENT/item", SetterP<Collection,PageItem>( & Collection::collectItem ));
 }
 
-
-#if 0
-void Serializer::serializeObjects(const Selection& selection, SaxHandler& outputhandler)
-{
-	Xml_attr attr;
-	UniqueID handler( & outputhandler );
-	handler.beginDoc();
-	handler.begin("SCRIBUSFRAGMENT", attr);
-	
-	if (selection.count() == 0)
-	{
-		handler.end("SCRIBUSFRAGMENT");
-		handler.endDoc();
-		return;
-	}
-	ScribusDoc* doc = selection.itemAt(0)->doc();
-	
-	QMap<QString,int>::Iterator itf;
-	for (itf = doc->UsedFonts.begin(); itf != doc->UsedFonts.end(); ++itf)
-	{
-		attr["name"] = itf.key();
-		handler.beginEnd("font", attr);
-	}
-	
-	ColorList usedColors;
-	doc->getUsedColors(usedColors, false);
-	ColorList::Iterator itc;
-	for (itc = usedColors.begin(); itc != usedColors.end(); ++itc)
-	{
-		Xml_attr cattr;
-		cattr["name"] = itc.key();
-		if (doc->PageColors[itc.key()].getColorModel() == colorModelRGB)
-			cattr["RGB"] = doc->PageColors[itc.key()].nameRGB();
-		else
-			cattr["CMYK"] = doc->PageColors[itc.key()].nameCMYK();
-		cattr["Spot"] = toXMLString(doc->PageColors[itc.key()].isSpotColor());
-		cattr["Register"] = toXMLString(doc->PageColors[itc.key()].isRegistrationColor());
-		handler.beginEnd("color", cattr);
-	}
-	
-	ResourceCollection lists;
-	for (int i=0; i < doc->Items->count(); ++i)
-		doc->Items->at(i)->getNamedResources(lists);
-	
-	QList<QString>::Iterator it;
-	QList<QString> names = lists.styleNames();
-	for (it = names.begin(); it != names.end(); ++it)
-		doc->paragraphStyles().get(*it).saxx(handler);
-
-	names = lists.charStyleNames();
-	for (it = names.begin(); it != names.end(); ++it)
-		doc->charStyles().get(*it).saxx(handler);
-	
-	names = lists.lineStyleNames();
-	for (it = names.begin(); it != names.end(); ++it)
-	{
-		Xml_attr multiattr;
-		multiattr["Name"] = *it;
-		handler.begin("MultiLine", multiattr);		
-		multiLine ml = doc->MLineStyles[*it];
-		
-		multiLine::Iterator itMU2;
-		for (itMU2 = ml.begin(); itMU2 != ml.end(); ++itMU2)
-		{
-			Xml_attr lineattr;
-			lineattr["Color"] = (*itMU2).Color;
-			lineattr["Shade"] = toXMLString((*itMU2).Shade);
-			lineattr["Dash"] = toXMLString((*itMU2).Dash);
-			lineattr["LineEnd"] = toXMLString((*itMU2).LineEnd);
-			lineattr["LineJoin"] = toXMLString((*itMU2).LineJoin);
-			lineattr["Width"] = toXMLString((*itMU2).Width);
-			handler.beginEnd("SubLine", lineattr);
-		}
-		handler.end("MultiLine");
-	}
-
-	/*	names = lists.patterns();
-	for (it = names.begin(); it != names.end(); ++it)
-		doc->patterns[*it].saxx(handler);
-*/
-/*
-	QStringList patterns = doc->getUsedPatternsSelection((Selection*)&selection);
-	for (int c = 0; c < patterns.count(); ++c)
-	{
-		ScPattern& pa = doc->docPatterns[patterns[c]];
-		Xml_attr cattr;
-		cattr["Name"] = patterns[c];
-		cattr["scaleX"] = toXMLString(pa.scaleX);
-		cattr["scaleY"] = toXMLString(pa.scaleY);
-		cattr["width"] = toXMLString(pa.width);
-		cattr["height"] = toXMLString(pa.height);
-		cattr["xoffset"] = toXMLString(pa.xoffset);
-		cattr["yoffset"] = toXMLString(pa.yoffset);
-		handler.begin("Pattern", cattr);
-		for (int o = 0; o < pa.items.count(); o++)
-		{
-			pa.items.at(o)->saxx(handler);
-		}
-		handler.end("Pattern");
-	}
-*/
-	for (int i=0; i < doc->Items->count(); ++i)
-	{
-		int k = selection.findItem(doc->Items->at(i));
-		if (k >=0)
-			doc->Items->at(i)->saxx(handler);
-	}
-
-	handler.end("SCRIBUSFRAGMENT");
-	handler.endDoc();
-}
-
-
-Selection Serializer::cloneObjects(const Selection& objects)
-{
-	backUpColors = m_Doc.PageColors;
-	store<ScribusDoc>("<scribusdoc>", &m_Doc);
-
-	serializeObjects(objects, *this);
-	
-	return importCollection();
-}
-	
-
-Selection Serializer::deserializeObjects(const QByteArray & xml)
-{
-	reset();
-	backUpColors = m_Doc.PageColors;
-	store<ScribusDoc>("<scribusdoc>", &m_Doc);
-
-	parseMemory(xml, xml.length());
-
-	return importCollection();
-}
-
-Selection Serializer::deserializeObjects(const QFile & file)
-{
-	reset();
-	backUpColors = m_Doc.PageColors;
-	store<ScribusDoc>("<scribusdoc>", &m_Doc);
-
-	QFileInfo fi(file);
-	parseFile(fi.filePath());
-
-	return importCollection();
-}
-
-
-Selection Serializer::importCollection()
-{
-	Collection* coll = lookup<Collection>("<collection>");
-	Selection result( &m_Doc, false);
-//	qDebug() << QString("deserialize: collection %1 doc %2").arg((ulong)coll).arg((ulong)&m_Doc);
-	if (coll == NULL)
-		qDebug() << "deserialize: no objects collected";
-	else
-	{
-		QMap<QString,QString> newNames;
-
-		//TODO: fonts
-
-		do {
-			newNames.clear();
-			for (int i = 0; i < coll->cstyles.count(); ++i)
-			{
-				QString oldName = coll->cstyles[i].name();
-				int oldIndex = m_Doc.charStyles().find(oldName);
-				if (oldIndex >= 0 && m_Doc.charStyle(oldName) == coll->cstyles[i])
-					continue;
-				QString newName = oldName;
-				if (oldIndex >= 0 && !newNames.contains(oldName))
-				{
-					int counter = 0;
-					while (m_Doc.charStyles().find(newName) >= 0)
-						newName = (QObject::tr("Copy of %1 (%2)")).arg(oldName).arg(++counter);
-					newNames[oldName] = newName;
-				}
-			}
-			
-			coll->cstyles.rename(newNames);
-		}
-		while (newNames.count() > 0);
-		m_Doc.redefineCharStyles(coll->cstyles, false);		
-
-		do {
-			newNames.clear();
-			for (int i = 0; i < coll->pstyles.count(); ++i)  // FIXME:  QValueList<QString> StyleSet::names()
-			{
-				QString oldName = coll->pstyles[i].name();
-				int oldIndex = m_Doc.paragraphStyles().find(oldName);
-//				qDebug() << QString("comparing %1 (old %2 new %3): parent '%4'='%5' cstyle %6 equiv %7").arg(oldName).arg(oldIndex).arg(i)
-//					   .arg(oldIndex>=0? m_Doc.paragraphStyle(oldName).parent() : "?").arg(coll->pstyles[i].parent())
-//					   .arg(oldIndex>=0? m_Doc.paragraphStyle(oldName).charStyle() == coll->pstyles[i].charStyle() : false)
-//					   .arg(oldIndex>=0? m_Doc.paragraphStyle(oldName).equiv(coll->pstyles[i]) : false);
-			
-				if (oldIndex >= 0 && coll->pstyles[i] == m_Doc.paragraphStyle(oldName) )
-					continue;
-				QString newName = oldName;
-				if (oldIndex >= 0 && !newNames.contains(oldName))
-				{
-					int counter = 0;
-					while (m_Doc.paragraphStyles().find(newName) >= 0)
-						newName = (QObject::tr("Copy of %1 (%2)")).arg(oldName).arg(++counter);
-					newNames[oldName] = newName;
-				}
-			}
-			coll->pstyles.rename(newNames);
-		}
-		while(newNames.count() > 0);
-		
-		m_Doc.redefineStyles(coll->pstyles, false);		
-
-		//TODO: linestyles : this is temporary code until MultiLine is replaced by LineStyle
-		QMap<QString,multiLine>::Iterator mlit;
-		for (mlit = coll->lstyles.begin(); mlit != coll->lstyles.end(); ++mlit)
-		{
-			multiLine& ml = mlit.value();
-			QString    oldName = mlit.key();
-			QString    newName = mlit.key();
-			QMap<QString,multiLine>::ConstIterator mlitd = m_Doc.MLineStyles.find(oldName);
-			if (mlitd != m_Doc.MLineStyles.end() && ml != mlitd.value())
-			{
-				int counter = 0;
-				while (m_Doc.MLineStyles.contains(newName))
-					newName = (QObject::tr("Copy of %1 (%2)")).arg(oldName).arg(++counter);
-			}
-			m_Doc.MLineStyles.insert(newName, ml);
-		}
-
-		//TODO: patterns
-		
-		QList<PageItem*>* objects = &(coll->items);
-		m_Doc.PageColors = backUpColors;
-		m_Doc.PageColors.addColors(coll->colors, false);
-		int maxG = m_Doc.GroupCounter;
-		for (int i=0; i < objects->count(); ++i)
-		{
-			PageItem* currItem = objects->at(i);
-			currItem->Clip = FlattenPath(currItem->PoLine, currItem->Segments);
-			currItem->setFillQColor();
-			currItem->setLineQColor();
-			currItem->set4ColorColors(currItem->GrColorP1, currItem->GrColorP2, currItem->GrColorP3, currItem->GrColorP4);
-			for (int grow = 0; grow < currItem->meshGradientArray.count(); grow++)
-			{
-				for (int gcol = 0; gcol < currItem->meshGradientArray[grow].count(); gcol++)
-				{
-					meshPoint mp = currItem->meshGradientArray[grow][gcol];
-					currItem->setMeshPointColor(grow, gcol, mp.colorName, mp.shade, mp.transparency);
-				}
-			}
-			result.addItem(currItem);
-			if (currItem->Groups.count() != 0)
-			{
-				QStack<int> groups;
-				for (int i=0; i < currItem->groups().count(); ++i)
-				{
-					int newGroup = m_Doc.GroupCounter + currItem->groups()[i] - 1;
-					groups.append(newGroup);
-				}
-				currItem->setGroups(groups);
-				maxG = qMax(maxG, currItem->Groups.top()+1);
-			}
-		}
-		m_Doc.GroupCounter = maxG;
-		updateGradientColors(coll->colors);
-		delete coll;
-	}
-	return result;
-}
-
-#endif
-
 bool Serializer::writeWithEncoding(const QString& filename, const QString& encoding, 
 								   const QString& txt)
 {
@@ -467,7 +195,6 @@
 	return false;
 }
 
-
 bool Serializer::readWithEncoding(const QString& filename, const QString& encoding, 
 								  QString &txt)
 {
@@ -484,117 +211,3 @@
 	}
 	return false;
 }
-/*
-void Serializer::updateGradientColors(const ColorList& colors)
-{
-	VColorStop* grStop;
-	uint itemsCount = m_Doc.Items->count();
-	for (uint c=0; c < itemsCount; ++c)
-	{
-		PageItem *ite = m_Doc.Items->at(c);
-		QList<VColorStop*> cstops = ite->fill_gradient.colorStops();
-		for (uint cst = 0; cst < ite->fill_gradient.Stops(); ++cst)
-		{
-			grStop = cstops.at(cst);
-			if (colors.contains(grStop->name))
-				grStop->color = SetColor(&m_Doc, grStop->name, grStop->shade);
-		}
-		cstops = ite->stroke_gradient.colorStops();
-		for (uint cst = 0; cst < ite->stroke_gradient.Stops(); ++cst)
-		{
-			grStop = cstops.at(cst);
-			if (colors.contains(grStop->name))
-				grStop->color = SetColor(&m_Doc, grStop->name, grStop->shade);
-		}
-		cstops = ite->mask_gradient.colorStops();
-		for (uint cst = 0; cst < ite->mask_gradient.Stops(); ++cst)
-		{
-			grStop = cstops.at(cst);
-			if (colors.contains(grStop->name))
-				grStop->color = SetColor(&m_Doc, grStop->name, grStop->shade);
-		}
-	}
-	uint masterItemsCount =  m_Doc.MasterItems.count();
-	for (uint c=0; c < masterItemsCount; ++c)
-	{
-		PageItem *ite = m_Doc.MasterItems.at(c);
-		QList<VColorStop*> cstops = ite->fill_gradient.colorStops();
-		for (uint cst = 0; cst < ite->fill_gradient.Stops(); ++cst)
-		{
-			grStop = cstops.at(cst);
-			if (colors.contains(grStop->name))
-				grStop->color = SetColor(&m_Doc, grStop->name, grStop->shade);
-		}
-		cstops = ite->stroke_gradient.colorStops();
-		for (uint cst = 0; cst < ite->stroke_gradient.Stops(); ++cst)
-		{
-			grStop = cstops.at(cst);
-			if (colors.contains(grStop->name))
-				grStop->color = SetColor(&m_Doc, grStop->name, grStop->shade);
-		}
-		cstops = ite->mask_gradient.colorStops();
-		for (uint cst = 0; cst < ite->mask_gradient.Stops(); ++cst)
-		{
-			grStop = cstops.at(cst);
-			if (colors.contains(grStop->name))
-				grStop->color = SetColor(&m_Doc, grStop->name, grStop->shade);
-		}
-	}
-	uint frameItemsCount = m_Doc.FrameItems.count();
-	for (uint c=0; c < frameItemsCount; ++c)
-	{
-		PageItem *ite = m_Doc.FrameItems.at(c);
-		QList<VColorStop*> cstops = ite->fill_gradient.colorStops();
-		for (uint cst = 0; cst < ite->fill_gradient.Stops(); ++cst)
-		{
-			grStop = cstops.at(cst);
-			if (colors.contains(grStop->name))
-				grStop->color = SetColor(&m_Doc, grStop->name, grStop->shade);
-		}
-		cstops = ite->stroke_gradient.colorStops();
-		for (uint cst = 0; cst < ite->stroke_gradient.Stops(); ++cst)
-		{
-			grStop = cstops.at(cst);
-			if (colors.contains(grStop->name))
-				grStop->color = SetColor(&m_Doc, grStop->name, grStop->shade);
-		}
-		cstops = ite->mask_gradient.colorStops();
-		for (uint cst = 0; cst < ite->mask_gradient.Stops(); ++cst)
-		{
-			grStop = cstops.at(cst);
-			if (colors.contains(grStop->name))
-				grStop->color = SetColor(&m_Doc, grStop->name, grStop->shade);
-		}
-	}
-	QStringList patterns =m_Doc.docPatterns.keys();
-	for (int c = 0; c < patterns.count(); ++c)
-	{
-		ScPattern& pa = m_Doc.docPatterns[patterns[c]];
-		for (int o = 0; o < pa.items.count(); o++)
-		{
-			PageItem *ite = pa.items.at(o);
-			QList<VColorStop*> cstops = ite->fill_gradient.colorStops();
-			for (uint cst = 0; cst < ite->fill_gradient.Stops(); ++cst)
-			{
-				grStop = cstops.at(cst);
-				if (colors.contains(grStop->name))
-					grStop->color = SetColor(&m_Doc, grStop->name, grStop->shade);
-			}
-			cstops = ite->stroke_gradient.colorStops();
-			for (uint cst = 0; cst < ite->stroke_gradient.Stops(); ++cst)
-			{
-				grStop = cstops.at(cst);
-				if (colors.contains(grStop->name))
-					grStop->color = SetColor(&m_Doc, grStop->name, grStop->shade);
-			}
-			cstops = ite->mask_gradient.colorStops();
-			for (uint cst = 0; cst < ite->mask_gradient.Stops(); ++cst)
-			{
-				grStop = cstops.at(cst);
-				if (colors.contains(grStop->name))
-					grStop->color = SetColor(&m_Doc, grStop->name, grStop->shade);
-			}
-		}
-	}
-}
-*/

Modified: branches/ScribusOIF/scribus/ui/cpalette.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16179&path=/branches/ScribusOIF/scribus/ui/cpalette.cpp
==============================================================================
--- branches/ScribusOIF/scribus/ui/cpalette.cpp (original)
+++ branches/ScribusOIF/scribus/ui/cpalette.cpp Wed Dec 29 02:41:41 2010
@@ -58,6 +58,7 @@
 #include "sccolorengine.h"
 #include "scpainter.h"
 #include "scpattern.h"
+#include "scribus.h"
 #include "selection.h"
 #include "util.h"
 #include "util_math.h"
@@ -167,6 +168,7 @@
 	{
 		disconnect(currentDoc->m_Selection, SIGNAL(selectionChanged()), this, SLOT(handleSelectionChanged()));
 		disconnect(currentDoc             , SIGNAL(docChanged())      , this, SLOT(handleSelectionChanged()));
+		disconnect(currentDoc->scMW()     , SIGNAL(UpdateRequest(int)), this, SLOT(handleUpdateRequest(int)));
 	}
 
 	ScribusDoc* oldDoc = currentDoc;
@@ -201,6 +203,7 @@
 
 		connect(currentDoc->m_Selection, SIGNAL(selectionChanged()), this, SLOT(handleSelectionChanged()));
 		connect(currentDoc             , SIGNAL(docChanged())      , this, SLOT(handleSelectionChanged()));
+		connect(currentDoc->scMW()     , SIGNAL(UpdateRequest(int)), this, SLOT(handleUpdateRequest(int)));
 	}
 
 	if (oldDoc != currentDoc)
@@ -377,6 +380,12 @@
 	}
 }
 
+void Cpalette::handleUpdateRequest(int updateFlags)
+{
+	if (updateFlags & reqColorsUpdate)
+		updateColorList();
+}
+
 void Cpalette::updateColorList()
 {
 	if (currentDoc)

Modified: branches/ScribusOIF/scribus/ui/cpalette.h
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16179&path=/branches/ScribusOIF/scribus/ui/cpalette.h
==============================================================================
--- branches/ScribusOIF/scribus/ui/cpalette.h (original)
+++ branches/ScribusOIF/scribus/ui/cpalette.h Wed Dec 29 02:41:41 2010
@@ -76,6 +76,7 @@
 public slots:
 
 	void handleSelectionChanged();
+	void handleUpdateRequest(int);
 
 	/*void editLineColorSelectorButton();
 	void editFillColorSelectorButton();*/

Modified: branches/ScribusOIF/scribus/ui/customfdialog.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16179&path=/branches/ScribusOIF/scribus/ui/customfdialog.cpp
==============================================================================
--- branches/ScribusOIF/scribus/ui/customfdialog.cpp (original)
+++ branches/ScribusOIF/scribus/ui/customfdialog.cpp Wed Dec 29 02:41:41 2010
@@ -50,7 +50,6 @@
 #include "scimage.h"
 #include "scribusstructs.h"
 #include "scslainforeader.h"
-#include "stencilreader.h"
 #include "scpreview.h"
 #include "units.h"
 #include "util.h"
@@ -228,33 +227,6 @@
 					repaint();
 				}
 			}
-		}
-	}
-	else if (ext.toUtf8() == "shape")
-	{
-		QByteArray cf;
-		if (loadRawText(name, cf))
-		{
-			QString f = QString::fromUtf8(cf.data());
-			StencilReader *pre = new StencilReader();
-			QString f2 = pre->createShape(f);
-			ScPreview *pre2 = new ScPreview();
-			QImage im = pre2->createPreview(f2);
-			im = im.scaled(w - 5, h - 21, Qt::KeepAspectRatio, Qt::SmoothTransformation);
-			QPainter p;
-			QBrush b(QColor(205,205,205), loadIcon("testfill.png"));
-			pm = *pixmap();
-			p.begin(&pm);
-			p.fillRect(0, 0, w, h-21, b);
-			p.fillRect(0, h-21, w, 21, QColor(255, 255, 255));
-			p.drawImage((w - im.width()) / 2, (h - 21 - im.height()) / 2, im);
-			QString desc = tr("Size:")+QString(" %1 x %2").arg(im.width()).arg(im.height());
-			p.drawText(2, h-5, desc);
-			p.end();
-			setPixmap(pm);
-			repaint();
-			delete pre;
-			delete pre2;
 		}
 	}
 	else if (ext.toUtf8() == "sce")

Modified: branches/ScribusOIF/scribus/ui/paintmanager.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16179&path=/branches/ScribusOIF/scribus/ui/paintmanager.cpp
==============================================================================
--- branches/ScribusOIF/scribus/ui/paintmanager.cpp (original)
+++ branches/ScribusOIF/scribus/ui/paintmanager.cpp Wed Dec 29 02:41:41 2010
@@ -55,7 +55,6 @@
 #include "scpaths.h"
 #include "sctextstream.h"
 #include "scribusXml.h"
-#include "stencilreader.h"
 #include "undomanager.h"
 #include "util.h"
 #include "util_color.h"
@@ -1078,9 +1077,7 @@
 				fmt = LoadSavePlugin::getFormatById(fmtCode);
 			}
 			allFormats += "*.sce *.SCE ";
-			allFormats += "*.shape *.SHAPE ";
 			formats.append("Scribus Objects (*.sce *.SCE)");
-			formats.append("Dia Shapes (*.shape *.SHAPE)");
 			QString form1 = "";
 			QString form2 = "";
 			QStringList imgFormats;
@@ -1162,7 +1159,7 @@
 				qApp->changeOverrideCursor(QCursor(Qt::WaitCursor));
 				PrefsManager::instance()->prefsFile->getContext("dirs")->set("patterns", fileName.left(fileName.lastIndexOf("/")));
 				QFileInfo fi(fileName);
-				if ((fi.suffix().toLower() == "shape") || (fi.suffix().toLower() == "sce") || (!imgFormats.contains(fi.suffix().toLower())))
+				if ((fi.suffix().toLower() == "sce") || (!imgFormats.contains(fi.suffix().toLower())))
 				{
 					loadVectors(fileName);
 				}
@@ -1231,7 +1228,7 @@
 				qApp->processEvents(QEventLoop::ExcludeUserInputEvents);
 				QFileInfo fi(QDir::cleanPath(QDir::convertSeparators(fileName + "/" + d[dc])));
 				QString ext = fi.suffix().toLower();
-				if ((ext == "shape") || (ext == "sce") || (!formats.contains(ext)))
+				if ((ext == "sce") || (!formats.contains(ext)))
 					loadVectors(QDir::cleanPath(QDir::convertSeparators(fileName + "/" + d[dc])));
 			}
 			for (uint dc = 0; dc < d.count(); ++dc)
@@ -1240,7 +1237,7 @@
 				qApp->processEvents(QEventLoop::ExcludeUserInputEvents);
 				QFileInfo fi(QDir::cleanPath(QDir::convertSeparators(fileName + "/" + d[dc])));
 				QString ext = fi.suffix().toLower();
-				if ((ext == "shape") || (ext == "sce") || (!formats.contains(ext)))
+				if ((ext == "sce") || (!formats.contains(ext)))
 					continue;
 				else if (formats.contains(ext))
 				{
@@ -1275,14 +1272,6 @@
 	m_doc->setLoading(true);
 	QFileInfo fi(data);
 	QString patNam = fi.baseName().trimmed().simplified().replace(" ", "_");
-	if (fi.suffix().toLower() == "shape")
-	{
-		QString f = "";
-		loadText(data, &f);
-		StencilReader *pre = new StencilReader();
-		data = pre->createShape(f);
-		delete pre;
-	}
 	uint ac = m_doc->Items->count();
 	uint ap = m_doc->docPatterns.count();
 	bool savedAlignGrid = m_doc->useRaster;
@@ -1293,11 +1282,6 @@
 	{
 		ScriXmlDoc ss;
 		ss.ReadElem(data, PrefsManager::instance()->appPrefs.fontPrefs.AvailFonts, m_doc, m_doc->currentPage()->xOffset(), m_doc->currentPage()->yOffset(), true, true, PrefsManager::instance()->appPrefs.fontPrefs.GFontSub);
-	}
-	else if (fi.suffix().toLower() == "shape")
-	{
-		ScriXmlDoc ss;
-		ss.ReadElem(data, PrefsManager::instance()->appPrefs.fontPrefs.AvailFonts, m_doc, m_doc->currentPage()->xOffset(), m_doc->currentPage()->yOffset(), false, true, PrefsManager::instance()->appPrefs.fontPrefs.GFontSub);
 	}
 	else
 	{

Modified: branches/ScribusOIF/scribus/ui/propertiespalette_group.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16179&path=/branches/ScribusOIF/scribus/ui/propertiespalette_group.cpp
==============================================================================
--- branches/ScribusOIF/scribus/ui/propertiespalette_group.cpp (original)
+++ branches/ScribusOIF/scribus/ui/propertiespalette_group.cpp Wed Dec 29 02:41:41 2010
@@ -124,7 +124,8 @@
 	m_ScMW = mw;
 
 	connect(this->transPalWidget, SIGNAL(gradientChanged()), m_ScMW, SLOT(updtGradMaskGroup()));
-	connect(this           , SIGNAL(DocChanged())     , m_ScMW, SLOT(slotDocCh()));
+	connect(this                , SIGNAL(DocChanged())     , m_ScMW, SLOT(slotDocCh()));
+	connect(m_ScMW, SIGNAL(UpdateRequest(int)), this, SLOT(handleUpdateRequest(int)));
 }
 
 void PropertiesPalette_Group::setDoc(ScribusDoc *d)
@@ -250,6 +251,12 @@
 	repaint();
 }
 
+void PropertiesPalette_Group::handleUpdateRequest(int updateFlags)
+{
+	if (updateFlags & reqColorsUpdate)
+		updateColorList();
+}
+
 void PropertiesPalette_Group::setCurrentItem(PageItem *item)
 {
 	if (!m_ScMW || m_ScMW->scriptIsRunning())

Modified: branches/ScribusOIF/scribus/ui/propertiespalette_group.h
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16179&path=/branches/ScribusOIF/scribus/ui/propertiespalette_group.h
==============================================================================
--- branches/ScribusOIF/scribus/ui/propertiespalette_group.h (original)
+++ branches/ScribusOIF/scribus/ui/propertiespalette_group.h Wed Dec 29 02:41:41 2010
@@ -60,6 +60,7 @@
 	void unsetItem();
 
 	void handleSelectionChanged();
+	void handleUpdateRequest(int);
 
 	void languageChange();
 	void unitChange();

Modified: branches/ScribusOIF/scribus/ui/propertiespalette_line.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16179&path=/branches/ScribusOIF/scribus/ui/propertiespalette_line.cpp
==============================================================================
--- branches/ScribusOIF/scribus/ui/propertiespalette_line.cpp (original)
+++ branches/ScribusOIF/scribus/ui/propertiespalette_line.cpp Wed Dec 29 02:41:41 2010
@@ -122,7 +122,8 @@
 {
 	m_ScMW = mw;
 
-	connect(this, SIGNAL(DocChanged()), m_ScMW, SLOT(slotDocCh()));
+	connect(this  , SIGNAL(DocChanged())      , m_ScMW, SLOT(slotDocCh()));
+	connect(m_ScMW, SIGNAL(UpdateRequest(int)), this  , SLOT(handleUpdateRequest(int)));
 }
 
 void PropertiesPalette_Line::setDoc(ScribusDoc *d)
@@ -230,6 +231,14 @@
 	}
 	updateGeometry();
 	repaint();
+}
+
+void PropertiesPalette_Line::handleUpdateRequest(int updateFlags)
+{
+	if (updateFlags & reqArrowStylesUpdate)
+		updateArrowStyles();
+	if (updateFlags & reqLineStylesUpdate)
+		updateLineStyles();
 }
 
 void PropertiesPalette_Line::setCurrentItem(PageItem *item)

Modified: branches/ScribusOIF/scribus/ui/propertiespalette_line.h
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16179&path=/branches/ScribusOIF/scribus/ui/propertiespalette_line.h
==============================================================================
--- branches/ScribusOIF/scribus/ui/propertiespalette_line.h (original)
+++ branches/ScribusOIF/scribus/ui/propertiespalette_line.h Wed Dec 29 02:41:41 2010
@@ -60,6 +60,7 @@
 	void unsetItem();
 
 	void handleSelectionChanged();
+	void handleUpdateRequest(int);
 
 	void displayLineWidth(double s);
 	void displayLineValues(Qt::PenStyle p, Qt::PenCapStyle pc, Qt::PenJoinStyle pj);

Modified: branches/ScribusOIF/scribus/ui/propertiespalette_text.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16179&path=/branches/ScribusOIF/scribus/ui/propertiespalette_text.cpp
==============================================================================
--- branches/ScribusOIF/scribus/ui/propertiespalette_text.cpp (original)
+++ branches/ScribusOIF/scribus/ui/propertiespalette_text.cpp Wed Dec 29 02:41:41 2010
@@ -132,9 +132,10 @@
 	advancedWidgets->setMainWindow(mw);
 	colorWidgets->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(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)));
 }
 
 void PropertiesPalette_Text::setDoc(ScribusDoc *d)
@@ -276,6 +277,17 @@
 	}
 	updateGeometry();
 	repaint();
+}
+
+void PropertiesPalette_Text::handleUpdateRequest(int updateFlags)
+{
+	// ColorWidget will handle its update itself
+	/*if (updateFlags & reqColorsUpdate)
+		updateColorList();*/
+	if (updateFlags & reqCharStylesUpdate)
+		charStyleCombo->updateFormatList();
+	if (updateFlags & reqParaStylesUpdate)
+		paraStyleCombo->updateFormatList();
 }
 
 void PropertiesPalette_Text::setCurrentItem(PageItem *i)

Modified: branches/ScribusOIF/scribus/ui/propertiespalette_text.h
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16179&path=/branches/ScribusOIF/scribus/ui/propertiespalette_text.h
==============================================================================
--- branches/ScribusOIF/scribus/ui/propertiespalette_text.h (original)
+++ branches/ScribusOIF/scribus/ui/propertiespalette_text.h Wed Dec 29 02:41:41 2010
@@ -79,6 +79,7 @@
 	void unsetItem();
 
 	void handleSelectionChanged();
+	void handleUpdateRequest(int);
 
 	void languageChange();
 	void unitChange();

Modified: branches/ScribusOIF/scribus/ui/propertywidget_color.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16179&path=/branches/ScribusOIF/scribus/ui/propertywidget_color.cpp
==============================================================================
--- branches/ScribusOIF/scribus/ui/propertywidget_color.cpp (original)
+++ branches/ScribusOIF/scribus/ui/propertywidget_color.cpp Wed Dec 29 02:41:41 2010
@@ -39,6 +39,7 @@
 #include "sccolorengine.h"
 #include "scpainter.h"
 #include "scpattern.h"
+#include "scribus.h"
 #include "selection.h"
 #include "util.h"
 #include "util_math.h"
@@ -211,6 +212,7 @@
 	{
 		disconnect(m_doc->m_Selection, SIGNAL(selectionChanged()), this, SLOT(handleSelectionChanged()));
 		disconnect(m_doc             , SIGNAL(docChanged())      , this, SLOT(handleSelectionChanged()));
+		disconnect(m_doc->scMW()     , SIGNAL(UpdateRequest(int)), this, SLOT(handleUpdateRequest(int)));
 	}
 
 	ScribusDoc* oldDoc = m_doc;
@@ -233,6 +235,7 @@
 
 		connect(m_doc->m_Selection, SIGNAL(selectionChanged()), this, SLOT(handleSelectionChanged()));
 		connect(m_doc             , SIGNAL(docChanged())      , this, SLOT(handleSelectionChanged()));
+		connect(m_doc->scMW()     , SIGNAL(UpdateRequest(int)), this, SLOT(handleUpdateRequest(int)));
 	}
 
 	if (oldDoc != m_doc)
@@ -342,6 +345,12 @@
 		setCurrentItem(m_item);
 		updateFromItem();
 	}
+}
+
+void PropertyWidget_Color::handleUpdateRequest(int updateFlags)
+{
+	if (updateFlags & reqColorsUpdate)
+		updateColorList();
 }
 
 void PropertyWidget_Color::updateColorList()

Modified: branches/ScribusOIF/scribus/ui/propertywidget_color.h
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16179&path=/branches/ScribusOIF/scribus/ui/propertywidget_color.h
==============================================================================
--- branches/ScribusOIF/scribus/ui/propertywidget_color.h (original)
+++ branches/ScribusOIF/scribus/ui/propertywidget_color.h Wed Dec 29 02:41:41 2010
@@ -71,6 +71,7 @@
 public slots:
 
 	void handleSelectionChanged();
+	void handleUpdateRequest(int);
 
 	void editLineColorSelectorButton();
 	void editFillColorSelectorButton();

Modified: branches/ScribusOIF/scribus/ui/propertywidget_line.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16179&path=/branches/ScribusOIF/scribus/ui/propertywidget_line.cpp
==============================================================================
--- branches/ScribusOIF/scribus/ui/propertywidget_line.cpp (original)
+++ branches/ScribusOIF/scribus/ui/propertywidget_line.cpp Wed Dec 29 02:41:41 2010
@@ -133,7 +133,8 @@
 {
 	m_ScMW = mw;
 
-	connect(this, SIGNAL(DocChanged()), m_ScMW, SLOT(slotDocCh()));
+	connect(this  , SIGNAL(DocChanged())      , m_ScMW, SLOT(slotDocCh()));
+	connect(m_ScMW, SIGNAL(UpdateRequest(int)), this  , SLOT(handleUpdateRequest(int)));
 }
 
 void PropertyWidget_Line::setDoc(ScribusDoc *d)
@@ -184,6 +185,14 @@
 	setCurrentItem(currItem);
 	updateGeometry();
 	repaint();
+}
+
+void PropertyWidget_Line::handleUpdateRequest(int updateFlags)
+{
+	if (updateFlags & reqArrowStylesUpdate)
+		updateArrowStyles();
+	if (updateFlags & reqLineStylesUpdate)
+		updateLineStyles();
 }
 
 void PropertyWidget_Line::setCurrentItem(PageItem *item)
@@ -314,7 +323,6 @@
 	endArrowScale->setEnabled(arrowEnabled);
 
 	bool lineSettingsEnabled = m_item->NamedLStyle.isEmpty();
-
 	lineType->setEnabled(lineSettingsEnabled);
 	lineWidth->setEnabled(lineSettingsEnabled);
 	bevelJoinEdge->setEnabled(lineSettingsEnabled);
@@ -323,6 +331,9 @@
 	flatCapEnd->setEnabled(lineSettingsEnabled);
 	squareCapEnd->setEnabled(lineSettingsEnabled);
 	roundCapEnd->setEnabled(lineSettingsEnabled);
+
+	bool lineStylesEnabled = !(m_item->isTableItem && m_item->isSingleSel);
+	lineStyles->setEnabled(lineStylesEnabled);
 
 	if ((m_item->isGroup()) && (!m_item->isSingleSel))
 	{
@@ -680,6 +691,7 @@
 		endArrow->setCurrentIndex(arrowItem);
 	}
 	//lineWidthLabel->setText( tr("Line &Width:"));
+	lineStyleLabel->setText( tr("Style:"));
 	lineJoinLabel->setText( tr("Ed&ges:"));
 	lineEndLabel->setText( tr("&Endings:"));
 

Modified: branches/ScribusOIF/scribus/ui/propertywidget_line.h
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16179&path=/branches/ScribusOIF/scribus/ui/propertywidget_line.h
==============================================================================
--- branches/ScribusOIF/scribus/ui/propertywidget_line.h (original)
+++ branches/ScribusOIF/scribus/ui/propertywidget_line.h Wed Dec 29 02:41:41 2010
@@ -60,6 +60,7 @@
 	void setDoc(ScribusDoc *d);
 
 	void handleSelectionChanged();
+	void handleUpdateRequest(int);
 
 	void displayLineWidth(double s);
 	void displayLineValues(Qt::PenStyle p, Qt::PenCapStyle pc, Qt::PenJoinStyle pj);

Modified: branches/ScribusOIF/scribus/ui/propertywidget_linebase.ui
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16179&path=/branches/ScribusOIF/scribus/ui/propertywidget_linebase.ui
==============================================================================
--- branches/ScribusOIF/scribus/ui/propertywidget_linebase.ui (original)
+++ branches/ScribusOIF/scribus/ui/propertywidget_linebase.ui Wed Dec 29 02:41:41 2010
@@ -7,7 +7,7 @@
     <x>0</x>
     <y>0</y>
     <width>281</width>
-    <height>170</height>
+    <height>194</height>
    </rect>
   </property>
   <property name="windowTitle">
@@ -32,10 +32,23 @@
       <number>4</number>
      </property>
      <item row="0" column="1">
-      <widget class="LineCombo" name="lineType"/>
+      <widget class="LineCombo" name="lineType">
+       <property name="sizePolicy">
+        <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
+         <horstretch>0</horstretch>
+         <verstretch>0</verstretch>
+        </sizepolicy>
+       </property>
+      </widget>
      </item>
      <item row="0" column="2">
       <widget class="ScrSpinBox" name="lineWidth">
+       <property name="sizePolicy">
+        <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
+         <horstretch>0</horstretch>
+         <verstretch>0</verstretch>
+        </sizepolicy>
+       </property>
        <property name="specialValueText">
         <string>Hairline</string>
        </property>
@@ -60,15 +73,15 @@
        </property>
       </widget>
      </item>
-     <item row="1" column="1">
+     <item row="2" column="1">
       <widget class="QLabel" name="lineJoinLabel">
        <property name="text">
         <string>Ed&amp;ges:</string>
        </property>
       </widget>
      </item>
-     <item row="1" column="2">
-      <layout class="QHBoxLayout" name="horizontalLayout">
+     <item row="2" column="2">
+      <layout class="QHBoxLayout" name="edgesLayout">
        <item>
         <widget class="QToolButton" name="mitterJoinEdge">
          <property name="text">
@@ -119,15 +132,15 @@
        </item>
       </layout>
      </item>
-     <item row="2" column="1">
+     <item row="3" column="1">
       <widget class="QLabel" name="lineEndLabel">
        <property name="text">
         <string>&amp;Endings:</string>
        </property>
       </widget>
      </item>
-     <item row="2" column="2">
-      <layout class="QHBoxLayout" name="horizontalLayout_2">
+     <item row="3" column="2">
+      <layout class="QHBoxLayout" name="endingsLayout">
        <item>
         <widget class="QToolButton" name="flatCapEnd">
          <property name="text">
@@ -178,7 +191,7 @@
        </item>
       </layout>
      </item>
-     <item row="3" column="1" colspan="2">
+     <item row="4" column="1" colspan="2">
       <widget class="QStackedWidget" name="stackedWidget">
        <property name="currentIndex">
         <number>0</number>
@@ -191,9 +204,6 @@
          <property name="margin">
           <number>0</number>
          </property>
-         <item>
-          <widget class="ScComboBox" name="lineStyles"/>
-         </item>
         </layout>
        </widget>
        <widget class="QWidget" name="arrowPage">
@@ -298,6 +308,23 @@
          </item>
         </layout>
        </widget>
+      </widget>
+     </item>
+     <item row="1" column="2">
+      <widget class="ScComboBox" name="lineStyles">
+       <property name="sizePolicy">
+        <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
+         <horstretch>0</horstretch>
+         <verstretch>0</verstretch>
+        </sizepolicy>
+       </property>
+      </widget>
+     </item>
+     <item row="1" column="1">
+      <widget class="QLabel" name="lineStyleLabel">
+       <property name="text">
+        <string>Style:</string>
+       </property>
       </widget>
      </item>
     </layout>

Modified: branches/ScribusOIF/scribus/ui/propertywidget_textcolor.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16179&path=/branches/ScribusOIF/scribus/ui/propertywidget_textcolor.cpp
==============================================================================
--- branches/ScribusOIF/scribus/ui/propertywidget_textcolor.cpp (original)
+++ branches/ScribusOIF/scribus/ui/propertywidget_textcolor.cpp Wed Dec 29 02:41:41 2010
@@ -47,6 +47,8 @@
 void PropertyWidget_TextColor::setMainWindow(ScribusMainWindow *mw)
 {
 	m_ScMW = mw;
+
+	connect(m_ScMW, SIGNAL(UpdateRequest(int)), this, SLOT(handleUpdateRequest(int)));
 }
 
 void PropertyWidget_TextColor::setDoc(ScribusDoc *d)
@@ -169,6 +171,12 @@
 	repaint();
 }
 
+void PropertyWidget_TextColor::handleUpdateRequest(int updateFlags)
+{
+	if (updateFlags & reqColorsUpdate)
+		updateColorList();
+}
+
 void PropertyWidget_TextColor::updateColorList()
 {
 	if (!m_doc || !m_ScMW || m_ScMW->scriptIsRunning())

Modified: branches/ScribusOIF/scribus/ui/propertywidget_textcolor.h
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16179&path=/branches/ScribusOIF/scribus/ui/propertywidget_textcolor.h
==============================================================================
--- branches/ScribusOIF/scribus/ui/propertywidget_textcolor.h (original)
+++ branches/ScribusOIF/scribus/ui/propertywidget_textcolor.h Wed Dec 29 02:41:41 2010
@@ -42,6 +42,7 @@
 	void setDoc(ScribusDoc *d);
 
 	void handleSelectionChanged();
+	void handleUpdateRequest(int);
 
 	void languageChange();
 	void unitChange() {};

Modified: branches/ScribusOIF/scribus/ui/propertywidget_transparency.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16179&path=/branches/ScribusOIF/scribus/ui/propertywidget_transparency.cpp
==============================================================================
--- branches/ScribusOIF/scribus/ui/propertywidget_transparency.cpp (original)
+++ branches/ScribusOIF/scribus/ui/propertywidget_transparency.cpp Wed Dec 29 02:41:41 2010
@@ -25,6 +25,7 @@
 #include "sccolorengine.h"
 #include "scpainter.h"
 #include "scpattern.h"
+#include "scribus.h"
 #include "scribusdoc.h"
 #include "selection.h"
 #include "util_icon.h"
@@ -113,6 +114,12 @@
 	}
 }
 
+void PropertyWidget_Transparency::handleUpdateRequest(int updateFlags)
+{
+	if (updateFlags & reqColorsUpdate)
+		updateColorList();
+}
+
 void PropertyWidget_Transparency::setCurrentItem(PageItem* item)
 {
 	m_item = item;
@@ -126,6 +133,7 @@
 	{
 		disconnect(m_doc->m_Selection, SIGNAL(selectionChanged()), this, SLOT(handleSelectionChanged()));
 		disconnect(m_doc             , SIGNAL(docChanged())      , this, SLOT(handleSelectionChanged()));
+		disconnect(m_doc->scMW()     , SIGNAL(UpdateRequest(int)), this, SLOT(handleUpdateRequest(int)));
 	}
 
 	m_doc = doc;
@@ -140,6 +148,7 @@
 
 		connect(m_doc->m_Selection, SIGNAL(selectionChanged()), this, SLOT(handleSelectionChanged()));
 		connect(m_doc             , SIGNAL(docChanged())      , this, SLOT(handleSelectionChanged()));
+		connect(m_doc->scMW()     , SIGNAL(UpdateRequest(int)), this, SLOT(handleUpdateRequest(int)));
 	}
 }
 

Modified: branches/ScribusOIF/scribus/ui/propertywidget_transparency.h
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16179&path=/branches/ScribusOIF/scribus/ui/propertywidget_transparency.h
==============================================================================
--- branches/ScribusOIF/scribus/ui/propertywidget_transparency.h (original)
+++ branches/ScribusOIF/scribus/ui/propertywidget_transparency.h Wed Dec 29 02:41:41 2010
@@ -24,11 +24,6 @@
 #ifndef PROPERTYWIDGET_TRANSPARENCY_H
 #define PROPERTYWIDGET_TRANSPARENCY_H
 
-#include <QWidget>
-#include <QPointer>
-#include <QGroupBox>
-#include <QPushButton>
-#include <QToolButton>
 #include "scribusapi.h"
 #include "propertywidgetbase.h"
 #include "scribusdoc.h"
@@ -37,9 +32,6 @@
 #include "ui/patternpropsdialog.h"
 
 #include "ui_propertywidget_transparency.h"
-
-#include "scribusapi.h"
-#include "propertywidgetbase.h"
 
 class PageItem;
 class ColorListBox;
@@ -104,6 +96,7 @@
 public slots:
 
 	void handleSelectionChanged();
+	void handleUpdateRequest(int);
 
 	void changePatternProps();
 

Modified: branches/ScribusOIF/scribus/ui/scrapbookpalette.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16179&path=/branches/ScribusOIF/scribus/ui/scrapbookpalette.cpp
==============================================================================
--- branches/ScribusOIF/scribus/ui/scrapbookpalette.cpp (original)
+++ branches/ScribusOIF/scribus/ui/scrapbookpalette.cpp Wed Dec 29 02:41:41 2010
@@ -42,7 +42,6 @@
 #include "scpreview.h"
 #include "scimage.h"
 #include "scribuscore.h"
-#include "stencilreader.h"
 #include "fileloader.h"
 #include "loadsaveplugin.h"
 #include "plugins/formatidlist.h"
@@ -87,17 +86,7 @@
 	QFileInfo fi(dt);
 	QMimeData *mimeData = new QMimeData;
 	QList<QUrl> urlList;
-	if (fi.suffix().toLower() == "shape")
-	{
-		QByteArray cf;
-		loadRawText(dt, cf);
-		QString f = QString::fromUtf8(cf.data());
-		StencilReader *pre = new StencilReader();
-		dt = pre->createShape(f);
-		delete pre;
-		mimeData->setText(dt);
-	}
-	else if (fi.suffix().toLower() == "sce")
+	if (fi.suffix().toLower() == "sce")
 	{
 		if ( fi.exists() )
 		{
@@ -118,7 +107,6 @@
 	QDrag *drag = new QDrag(this);
 	drag->setMimeData(mimeData);
 	drag->setPixmap(objectMap[currentItem()->text()].Preview);
-//	drag->setDragCursor(objectMap[currentItem()->text()].Preview, Qt::CopyAction);
 	drag->exec(Qt::CopyAction);
 	clearSelection();
  }
@@ -306,199 +294,7 @@
 	s.writeRawData(cs.data(), cs.length());
 	f.close();
 }
-/*
-void BibView::SaveContents(QString name, QString oldName)
-{
-	QDir thumbs(name);
-	if (thumbs.exists())
-	{
-		if ((canWrite) && (PrefsManager::instance()->appPrefs.scrapbookPrefs.writePreviews))
-			thumbs.mkdir(".ScribusThumbs");
-	}
-	QDir d(oldName, "*.sce", QDir::Name, QDir::Files | QDir::Readable | QDir::NoSymLinks);
-	if ((d.exists()) && (d.count() != 0))
-	{
-		for (uint dc = 0; dc < d.count(); ++dc)
-		{
-			QByteArray cf;
-			if (!loadRawText(QDir::cleanPath(QDir::convertSeparators(oldName + "/" + d[dc])), cf))
-				continue;
-			QString ff = QString::fromUtf8(cf.data());
-			QPixmap pm;
-			QFileInfo fi(QDir::cleanPath(QDir::convertSeparators(oldName + "/" + d[dc])));
-			QFileInfo fi2(QDir::cleanPath(QDir::convertSeparators(fi.path()+"/.ScribusThumbs/"+fi.baseName()+".png")));
-			if (fi2.exists())
-				pm.load(QDir::cleanPath(QDir::convertSeparators(fi.path()+"/.ScribusThumbs/"+fi.baseName()+".png")));
-			else
-			{
-				QString f;
-				if (cf.left(16) == "<SCRIBUSELEMUTF8")
-					f = QString::fromUtf8(cf.data());
-				else
-					f = cf.data();
-				ScPreview *pre = new ScPreview();
-				pm = QPixmap::fromImage(pre->createPreview(f));
-				delete pre;
-			}
-			QFileInfo fi3(QDir::cleanPath(QDir::convertSeparators(name + "/" + d[dc])));
-			if (PrefsManager::instance()->appPrefs.scrapbookPrefs.writePreviews)
-				pm.save(QDir::cleanPath(QDir::convertSeparators(fi3.path()+"/.ScribusThumbs/"+fi3.baseName()+".png")), "PNG");
-			checkAndChange(ff, QDir::cleanPath(QDir::convertSeparators(name + "/" + d[dc])), QDir::cleanPath(QDir::convertSeparators(name)));
-		}
-	}
-	QDir d2(oldName, "*.sml", QDir::Name, QDir::Files | QDir::Readable | QDir::NoSymLinks);
-	if ((d2.exists()) && (d2.count() != 0))
-	{
-		for (uint dc = 0; dc < d2.count(); ++dc)
-		{
-			QByteArray cf;
-			if (!loadRawText(QDir::cleanPath(QDir::convertSeparators(oldName + "/" + d2[dc])), cf))
-				continue;
-			QFile fil(QDir::cleanPath(QDir::convertSeparators(name + "/" + d2[dc])));
-			if(!fil.open(QIODevice::WriteOnly))
-				continue ;
-			QDataStream s(&fil);
-			s.writeRawData(cf.data(), cf.length());
-			fil.close();
-			QPixmap pm;
-			QFileInfo fi(QDir::cleanPath(QDir::convertSeparators(oldName + "/" + d2[dc])));
-			QFileInfo fi2(QDir::cleanPath(QDir::convertSeparators(fi.path()+"/"+fi.baseName()+".png")));
-			if (fi2.exists())
-				pm.load(QDir::cleanPath(QDir::convertSeparators(fi.path()+"/"+fi.baseName()+".png")));
-			else
-			{
-				QString f = QString::fromUtf8(cf.data());
-				StencilReader *pre = new StencilReader();
-				pm = pre->createPreview(f);
-				delete pre;
-			}
-			QFileInfo fi3(QDir::cleanPath(QDir::convertSeparators(name + "/" + d2[dc])));
-			if (PrefsManager::instance()->appPrefs.scrapbookPrefs.writePreviews)
-				pm.save(QDir::cleanPath(QDir::convertSeparators(fi3.path()+"/"+fi3.baseName()+".png")), "PNG");
-		}
-	}
-	QDir d3(name, "*.shape", QDir::Name, QDir::Files | QDir::Readable | QDir::NoSymLinks);
-	if ((d3.exists()) && (d3.count() != 0))
-	{
-		for (uint dc = 0; dc < d3.count(); ++dc)
-		{
-			QByteArray cf;
-			if (!loadRawText(QDir::cleanPath(QDir::convertSeparators(oldName + "/" + d3[dc])), cf))
-				continue;
-			QFile fil(QDir::cleanPath(QDir::convertSeparators(name + "/" + d3[dc])));
-			if(!fil.open(QIODevice::WriteOnly))
-				continue ;
-			QDataStream s(&fil);
-			s.writeRawData(cf.data(), cf.length());
-			fil.close();
-			QPixmap pm;
-			QFileInfo fi(QDir::cleanPath(QDir::convertSeparators(oldName + "/" + d3[dc])));
-			QFileInfo fi2(QDir::cleanPath(QDir::convertSeparators(fi.path()+"/"+fi.baseName()+".png")));
-			if (fi2.exists())
-				pm.load(QDir::cleanPath(QDir::convertSeparators(fi.path()+"/"+fi.baseName()+".png")));
-			else
-			{
-				QString f = QString::fromUtf8(cf.data());
-				StencilReader *pre = new StencilReader();
-				QString f2 = pre->createShape(f);
-				ScPreview *pre2 = new ScPreview();
-				pm = QPixmap::fromImage(pre2->createPreview(f2));
-				delete pre;
-				delete pre2;
-			}
-			QFileInfo fi3(QDir::cleanPath(QDir::convertSeparators(name + "/" + d3[dc])));
-			if (PrefsManager::instance()->appPrefs.scrapbookPrefs.writePreviews)
-				pm.save(QDir::cleanPath(QDir::convertSeparators(fi3.path()+"/"+fi3.baseName()+".png")), "PNG");
-		}
-	}
-	QStringList vectorFiles = LoadSavePlugin::getExtensionsForPreview(FORMATID_ODGIMPORT);
-	for (int v = 0; v < vectorFiles.count(); v++)
-	{
-		QString ext = "*." + vectorFiles[v];
-		QDir d4(name, ext, QDir::Name, QDir::Files | QDir::Readable | QDir::NoSymLinks);
-		if ((d4.exists()) && (d4.count() != 0))
-		{
-			for (uint dc = 0; dc < d4.count(); ++dc)
-			{
-				QByteArray cf;
-				if (!loadRawText(QDir::cleanPath(QDir::convertSeparators(oldName + "/" + d4[dc])), cf))
-					continue;
-				QFile fil(QDir::cleanPath(QDir::convertSeparators(name + "/" + d4[dc])));
-				if(!fil.open(QIODevice::WriteOnly))
-					continue ;
-				QDataStream s(&fil);
-				s.writeRawData(cf.data(), cf.length());
-				fil.close();
-				QPixmap pm;
-				QFileInfo fi(QDir::cleanPath(QDir::convertSeparators(name + "/" + d4[dc])));
-				QFileInfo fi2(QDir::cleanPath(QDir::convertSeparators(fi.path()+"/.ScribusThumbs/"+fi.fileName()+".png")));
-				if (fi2.exists())
-					pm.load(QDir::cleanPath(QDir::convertSeparators(fi.path()+"/.ScribusThumbs/"+fi.fileName()+".png")));
-				else
-				{
-					FileLoader *fileLoader = new FileLoader(QDir::cleanPath(QDir::convertSeparators(name + "/" + d4[dc])));
-					int testResult = fileLoader->TestFile();
-					delete fileLoader;
-					if ((testResult != -1) && (testResult >= FORMATID_ODGIMPORT))
-					{
-						const FileFormat * fmt = LoadSavePlugin::getFormatById(testResult);
-						if( fmt )
-						{
-							QImage im = fmt->readThumbnail(QDir::cleanPath(QDir::convertSeparators(name + "/" + d4[dc])));
-							im = im.scaled(60, 60, Qt::KeepAspectRatio, Qt::SmoothTransformation);
-							pm = QPixmap::fromImage(im);
-						}
-					}
-				}
-				QFileInfo fi3(QDir::cleanPath(QDir::convertSeparators(name + "/" + d4[dc])));
-				if ((canWrite) && (PrefsManager::instance()->appPrefs.scrapbookPrefs.writePreviews))
-					pm.save(QDir::cleanPath(QDir::convertSeparators(fi3.path()+"/.ScribusThumbs/"+fi3.fileName()+".png")), "PNG");
-			}
-		}
-	}
-	QString formatD(FormatsManager::instance()->extensionListForFormat(FormatsManager::RASTORIMAGES, 1));
-	QStringList rasterFiles = formatD.split("|");
-	for (int v = 0; v < rasterFiles.count(); v++)
-	{
-		QString ext = "*." + rasterFiles[v];
-		QDir d5(name, ext, QDir::Name, QDir::Files | QDir::Readable | QDir::NoSymLinks);
-		if ((d5.exists()) && (d5.count() != 0))
-		{
-			for (uint dc = 0; dc < d5.count(); ++dc)
-			{
-				QByteArray cf;
-				if (!loadRawText(QDir::cleanPath(QDir::convertSeparators(oldName + "/" + d5[dc])), cf))
-					continue;
-				QFile fil(QDir::cleanPath(QDir::convertSeparators(name + "/" + d5[dc])));
-				if(!fil.open(QIODevice::WriteOnly))
-					continue ;
-				QDataStream s(&fil);
-				s.writeRawData(cf.data(), cf.length());
-				fil.close();
-				QPixmap pm;
-				QFileInfo fi(QDir::cleanPath(QDir::convertSeparators(name + "/" + d5[dc])));
-				QFileInfo fi2(QDir::cleanPath(QDir::convertSeparators(fi.path()+"/.ScribusThumbs/"+fi.fileName()+".png")));
-				if (fi2.exists())
-					pm.load(QDir::cleanPath(QDir::convertSeparators(fi.path()+"/.ScribusThumbs/"+fi.fileName()+".png")));
-				else
-				{
-					bool mode = false;
-					ScImage im;
-					CMSettings cms(0, "", Intent_Perceptual);
-					cms.allowColorManagement(false);
-					if (im.loadPicture(QDir::cleanPath(QDir::convertSeparators(name + "/" + d5[dc])), 1, cms, ScImage::Thumbnail, 72, &mode))
-					{
-						QImage img = im.scaled(60, 60, Qt::KeepAspectRatio, Qt::SmoothTransformation);
-						if ((canWrite) && (PrefsManager::instance()->appPrefs.scrapbookPrefs.writePreviews))
-							img.save(QDir::cleanPath(QDir::convertSeparators(fi.path()+"/.ScribusThumbs/"+fi.fileName()+".png")), "PNG");
-						pm = QPixmap::fromImage(img);
-					}
-				}
-			}
-		}
-	}
-}
-*/
+
 void BibView::ReadOldContents(QString name, QString newName)
 {
 	bool isUtf8 = false;
@@ -558,8 +354,6 @@
 	fileCount += dd.count();
 	QDir d(name, "*.sce", QDir::Name, QDir::Files | QDir::Readable | QDir::NoSymLinks);
 	fileCount += d.count();
-	QDir d3(name, "*.shape", QDir::Name, QDir::Files | QDir::Readable | QDir::NoSymLinks);
-	fileCount += d3.count();
 	QStringList vectorFiles = LoadSavePlugin::getExtensionsForPreview(FORMATID_ODGIMPORT);
 	for (int v = 0; v < vectorFiles.count(); v++)
 	{
@@ -634,56 +428,6 @@
 			}
 			previewFiles.append(fi.baseName()+".png");
 			AddObj(fi.baseName(), QDir::cleanPath(QDir::convertSeparators(name + "/" + d[dc])), pm);
-		}
-	}
-	if ((d3.exists()) && (d3.count() != 0))
-	{
-		for (uint dc = 0; dc < d3.count(); ++dc)
-		{
-			if (pgDia)
-			{
-				pgDia->setValue(readCount);
-				readCount++;
-			}
-			QPixmap pm;
-			QByteArray cf;
-			if (!loadRawText(QDir::cleanPath(QDir::convertSeparators(name + "/" + d3[dc])), cf))
-				continue;
-			QFileInfo fi(QDir::cleanPath(QDir::convertSeparators(name + "/" + d3[dc])));
-			QFileInfo fi2(QDir::cleanPath(QDir::convertSeparators(fi.path()+"/"+fi.baseName()+".png")));
-			QFileInfo fi2p(QDir::cleanPath(QDir::convertSeparators(fi.path()+"/"+fi.baseName()+".xpm")));
-			QFileInfo fi3(QDir::cleanPath(QDir::convertSeparators(fi.path()+"/.ScribusThumbs/"+fi.baseName()+".png")));
-			if ((fi2.exists()) || (fi2p.exists()) || (fi3.exists()))
-			{
-				if (fi3.exists())
-				{
-					pm.load(QDir::cleanPath(QDir::convertSeparators(fi.path()+"/.ScribusThumbs/"+fi.baseName()+".png")));
-					previewFiles.append(fi.baseName()+".png");
-				}
-				else if (fi2.exists())
-				{
-					pm.load(QDir::cleanPath(QDir::convertSeparators(fi.path()+"/"+fi.baseName()+".png")));
-					previewFiles.append(fi.baseName()+".png");
-				}
-				else if (fi2p.exists())
-				{
-					pm.load(QDir::cleanPath(QDir::convertSeparators(fi.path()+"/"+fi.baseName()+".xpm")));
-					previewFiles.append(fi.baseName()+".xpm");
-				}
-			}
-			else
-			{
-				QString f = QString::fromUtf8(cf.data());
-				StencilReader *pre = new StencilReader();
-				QString f2 = pre->createShape(f);
-				ScPreview *pre2 = new ScPreview();
-				pm = QPixmap::fromImage(pre2->createPreview(f2));
-				if ((canWrite) && (PrefsManager::instance()->appPrefs.scrapbookPrefs.writePreviews))
-					pm.save(QDir::cleanPath(QDir::convertSeparators(fi.path()+"/.ScribusThumbs/"+fi.baseName()+".png")), "PNG");
-				delete pre;
-				delete pre2;
-			}
-			AddObj(fi.baseName(), QDir::cleanPath(QDir::convertSeparators(name + "/" + d3[dc])), pm);
 		}
 	}
 	for (int v = 0; v < vectorFiles.count(); v++)

Modified: branches/ScribusOIF/scribus/ui/smlinestyle.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16179&path=/branches/ScribusOIF/scribus/ui/smlinestyle.cpp
==============================================================================
--- branches/ScribusOIF/scribus/ui/smlinestyle.cpp (original)
+++ branches/ScribusOIF/scribus/ui/smlinestyle.cpp Wed Dec 29 02:41:41 2010
@@ -262,7 +262,7 @@
 		}
 	}
 	doc_->changed();
-	doc_->scMW()->propertiesPalette->linePal->updateLineStyles();
+	doc_->scMW()->requestUpdate(reqLineStylesUpdate);
 	// Better not call DrawNew() here, as this will cause several unnecessary calls
 	// doc_->view()->DrawNew();
 	selectionIsDirty_ = false;

Modified: branches/ScribusOIF/scribus/ui/smtextstyles.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16179&path=/branches/ScribusOIF/scribus/ui/smtextstyles.cpp
==============================================================================
--- branches/ScribusOIF/scribus/ui/smtextstyles.cpp (original)
+++ branches/ScribusOIF/scribus/ui/smtextstyles.cpp Wed Dec 29 02:41:41 2010
@@ -301,7 +301,7 @@
 
 	deleted_.clear(); // deletion done at this point
 
-	doc_->scMW()->propertiesPalette->textPal->updateTextStyles();
+	doc_->scMW()->requestUpdate(reqTextStylesUpdate);
 	// Better not call DrawNew() here, as this will cause several unnecessary calls
 	// doc_->view()->DrawNew();
 	doc_->changed();
@@ -1661,7 +1661,7 @@
 
 	deleted_.clear(); // deletion done at this point
 
-	doc_->scMW()->propertiesPalette->textPal->updateTextStyles();
+	doc_->scMW()->requestUpdate(reqTextStylesUpdate);
 	// Better not call DrawNew() here, as this will cause several unnecessary calls
 	// doc_->view()->DrawNew();
 	doc_->changed();

Modified: branches/ScribusOIF/scribus/ui/symbolpalette.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16179&path=/branches/ScribusOIF/scribus/ui/symbolpalette.cpp
==============================================================================
--- branches/ScribusOIF/scribus/ui/symbolpalette.cpp (original)
+++ branches/ScribusOIF/scribus/ui/symbolpalette.cpp Wed Dec 29 02:41:41 2010
@@ -128,7 +128,12 @@
 {
 	m_scMW = mw;
 	if (m_scMW == NULL)
+	{
 		SymbolViewWidget->clear();
+		disconnect(m_scMW, SIGNAL(UpdateRequest(int)), this, SLOT(handleUpdateRequest(int)));
+		return;
+	}
+	connect(m_scMW, SIGNAL(UpdateRequest(int)), this, SLOT(handleUpdateRequest(int)), Qt::UniqueConnection);
 }
 
 void SymbolPalette::setDoc(ScribusDoc *newDoc)
@@ -147,6 +152,12 @@
 {
 	currDoc = NULL;
 	SymbolViewWidget->clear();
+}
+
+void SymbolPalette::handleUpdateRequest(int updateFlags)
+{
+	if (updateFlags & reqSymbolsUpdate)
+		updateSymbolList();
 }
 
 void SymbolPalette::updateSymbolList()

Modified: branches/ScribusOIF/scribus/ui/symbolpalette.h
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16179&path=/branches/ScribusOIF/scribus/ui/symbolpalette.h
==============================================================================
--- branches/ScribusOIF/scribus/ui/symbolpalette.h (original)
+++ branches/ScribusOIF/scribus/ui/symbolpalette.h Wed Dec 29 02:41:41 2010
@@ -75,6 +75,7 @@
 
 public slots:
 	void handleDoubleClick(QListWidgetItem *item);
+	void handleUpdateRequest(int);
 	void languageChange();
 
 signals:

Modified: branches/ScribusOIF/scribus/ui/transparencypalette.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16179&path=/branches/ScribusOIF/scribus/ui/transparencypalette.cpp
==============================================================================
--- branches/ScribusOIF/scribus/ui/transparencypalette.cpp (original)
+++ branches/ScribusOIF/scribus/ui/transparencypalette.cpp Wed Dec 29 02:41:41 2010
@@ -25,6 +25,7 @@
 #include "sccolorengine.h"
 #include "scpainter.h"
 #include "scpattern.h"
+#include "scribus.h"
 #include "util_icon.h"
 #include "util.h"
 #include "util_math.h"
@@ -74,6 +75,11 @@
 	disconnect(this, SIGNAL(NewBlendS(int)), 0, 0);
 	disconnect(this, SIGNAL(NewPattern(QString)), 0, 0);
 	disconnect(this, SIGNAL(NewPatternProps(double, double, double, double, double, double, double, bool, bool)), 0, 0);
+	
+	if (currentDoc)
+	{
+		disconnect(currentDoc->scMW(), SIGNAL(UpdateRequest(int)), this, 0);
+	}
 
 	currentDoc = doc;
 
@@ -91,7 +97,14 @@
 		connect(this, SIGNAL(NewGradient(int)), doc, SLOT(itemSelection_SetItemGradMask(int)));
 		connect(this, SIGNAL(NewPattern(QString)), doc, SLOT(itemSelection_SetItemPatternMask(QString)));
 		connect(this, SIGNAL(NewPatternProps(double, double, double, double, double, double, double, bool, bool)), doc, SLOT(itemSelection_SetItemPatternMaskProps(double, double, double, double, double, double, double, bool, bool)));
-	}
+		connect(doc->scMW(), SIGNAL(UpdateRequest(int)), this, SLOT(handleUpdateRequest(int)));
+	}
+}
+
+void Tpalette::handleUpdateRequest(int updateFlags)
+{
+	if (updateFlags & reqColorsUpdate)
+		updateColorList();
 }
 
 void Tpalette::updateColorList()

Modified: branches/ScribusOIF/scribus/ui/transparencypalette.h
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16179&path=/branches/ScribusOIF/scribus/ui/transparencypalette.h
==============================================================================
--- branches/ScribusOIF/scribus/ui/transparencypalette.h (original)
+++ branches/ScribusOIF/scribus/ui/transparencypalette.h Wed Dec 29 02:41:41 2010
@@ -60,6 +60,8 @@
 	~Tpalette() {};
 	
 	virtual void changeEvent(QEvent *e);
+
+	void handleUpdateRequest(int);
 
 	void setDocument(ScribusDoc* doc);
 	void setCurrentItem(PageItem* item);

Modified: branches/ScribusOIF/win32/vc8/Scribus.sln
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16179&path=/branches/ScribusOIF/win32/vc8/Scribus.sln
==============================================================================
--- branches/ScribusOIF/win32/vc8/Scribus.sln (original)
+++ branches/ScribusOIF/win32/vc8/Scribus.sln Wed Dec 29 02:41:41 2010
@@ -247,6 +247,11 @@
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "scribus-fribidi", "scribus-fribidi\scribus-fribidi.vcproj", "{622D8F0D-6593-4717-B06C-85FFD04389D0}"
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "smlimport", "smlimport\smlimport.vcproj", "{610E7F1D-5850-4294-96DD-B949D00E3176}"
+	ProjectSection(ProjectDependencies) = postProject
+		{B17FCD80-7978-4544-93C4-2FE1AC6FE9F3} = {B17FCD80-7978-4544-93C4-2FE1AC6FE9F3}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "shapeimport", "shapeimport\shapeimport.vcproj", "{1A8E95AC-29CD-459E-9E5E-09FA64ECC4F6}"
 	ProjectSection(ProjectDependencies) = postProject
 		{B17FCD80-7978-4544-93C4-2FE1AC6FE9F3} = {B17FCD80-7978-4544-93C4-2FE1AC6FE9F3}
 	EndProjectSection
@@ -683,6 +688,14 @@
 		{610E7F1D-5850-4294-96DD-B949D00E3176}.Release-arthur|Win32.Build.0 = Release-arthur|Win32
 		{610E7F1D-5850-4294-96DD-B949D00E3176}.Release-cairo|Win32.ActiveCfg = Release-cairo|Win32
 		{610E7F1D-5850-4294-96DD-B949D00E3176}.Release-cairo|Win32.Build.0 = Release-cairo|Win32
+		{1A8E95AC-29CD-459E-9E5E-09FA64ECC4F6}.Debug-arthur|Win32.ActiveCfg = Debug-arthur|Win32
+		{1A8E95AC-29CD-459E-9E5E-09FA64ECC4F6}.Debug-arthur|Win32.Build.0 = Debug-arthur|Win32
+		{1A8E95AC-29CD-459E-9E5E-09FA64ECC4F6}.Debug-cairo|Win32.ActiveCfg = Debug-cairo|Win32
+		{1A8E95AC-29CD-459E-9E5E-09FA64ECC4F6}.Debug-cairo|Win32.Build.0 = Debug-cairo|Win32
+		{1A8E95AC-29CD-459E-9E5E-09FA64ECC4F6}.Release-arthur|Win32.ActiveCfg = Release-arthur|Win32
+		{1A8E95AC-29CD-459E-9E5E-09FA64ECC4F6}.Release-arthur|Win32.Build.0 = Release-arthur|Win32
+		{1A8E95AC-29CD-459E-9E5E-09FA64ECC4F6}.Release-cairo|Win32.ActiveCfg = Release-cairo|Win32
+		{1A8E95AC-29CD-459E-9E5E-09FA64ECC4F6}.Release-cairo|Win32.Build.0 = Release-cairo|Win32
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
 		HideSolutionNode = FALSE




More information about the scribus-commit mailing list