r14753 by cbradney - Remove commented out old context menu code

scribus-commit scribus-commit at lists.scribus.net
Wed Feb 17 23:00:43 CET 2010


Revision: 14753
Author: cbradney
Date: 2010-02-17T21:56:29.200424Z
Commit message: Remove commented out old context menu code

Changeset: 
M  /trunk/Scribus/scribus/pageitem_imageframe.cpp
M  /trunk/Scribus/scribus/pageitem_textframe.cpp
M  /trunk/Scribus/scribus/scribus.cpp
M  /trunk/Scribus/scribus/pageitem_pathtext.cpp
M  /trunk/Scribus/scribus/pageitem_imageframe.h
M  /trunk/Scribus/scribus/pageitem_textframe.h
M  /trunk/Scribus/scribus/pageitem.h
M  /trunk/Scribus/scribus/pageitem_pathtext.h
M  /trunk/Scribus/scribus/pageitem_polygon.cpp
M  /trunk/Scribus/scribus/pageitem_polygon.h

Diffs:
Index: scribus/pageitem_imageframe.h
===================================================================
--- scribus/pageitem_imageframe.h	(revision 14752)
+++ scribus/pageitem_imageframe.h	(revision 14753)
@@ -47,7 +47,6 @@
 	virtual void clearContents();
 	
 	virtual bool createInfoGroup(QFrame *, QGridLayout *);
-//	virtual bool createContextMenu(QMenu *, int);
 	virtual void applicableActions(QStringList& actionList);
 	virtual QString infoDescription();
 	
Index: scribus/pageitem_pathtext.h
===================================================================
--- scribus/pageitem_pathtext.h	(revision 14752)
+++ scribus/pageitem_pathtext.h	(revision 14753)
@@ -44,7 +44,6 @@
 
 	virtual void layout();
 	virtual bool createInfoGroup(QFrame *, QGridLayout *);
-//	virtual bool createContextMenu(QMenu *, int);
 	virtual void applicableActions(QStringList& actionList);
 	virtual QString infoDescription();
 
Index: scribus/pageitem_pathtext.cpp
===================================================================
--- scribus/pageitem_pathtext.cpp	(revision 14752)
+++ scribus/pageitem_pathtext.cpp	(revision 14753)
@@ -394,28 +394,6 @@
 	return true;
 }
 
-/*
-bool PageItem_PathText::createContextMenu(QMenu *menu, int step)
-{
-	QMap<QString, QPointer<ScrAction> > actions = doc()->scMW()->scrActions;
-	
-	if (menu == 0) return false;
-	
-	switch(step) {
-		case 10:
-			menu->addSeparator();
-			menu->addAction(actions["toolsEditWithStoryEditor"]);
-			break;
-		case 30:
-			menu->addAction(actions["itemConvertToOutlines"]);
-		break;
-		default:
-			return false;
-	}
-	return true;
-}
-*/
-
 void PageItem_PathText::applicableActions(QStringList & actionList)
 {
 	actionList << "toolsEditWithStoryEditor";
Index: scribus/pageitem.h
===================================================================
--- scribus/pageitem.h	(revision 14752)
+++ scribus/pageitem.h	(revision 14753)
@@ -267,7 +267,6 @@
 	void setObjectAttributes(ObjAttrVector*);
 	
 	virtual bool createInfoGroup(QFrame *, QGridLayout *) {return false;}
-//	virtual bool createContextMenu(QMenu *, int step) {return false;}
 	
   /** Zeichnet das Item */
 	void paintObj(QPainter *p);
Index: scribus/pageitem_textframe.cpp
===================================================================
--- scribus/pageitem_textframe.cpp	(revision 14752)
+++ scribus/pageitem_textframe.cpp	(revision 14753)
@@ -3722,70 +3722,6 @@
 	return true;
 }
 
-/*
-bool PageItem_TextFrame::createContextMenu(QMenu *menu, int step)
-{
-	static QMenu *menuPDF = 0;
-	QMap<QString, QPointer<ScrAction> > actions = doc()->scMW()->scrActions;
-	QAction *act;
-	
-	if (menu == 0) {
-		if (menuPDF) delete menuPDF;
-		return true;
-	}
-	switch(step) {
-		case 10:
-			menu->addSeparator();
-			menu->addAction(actions["fileImportText"]);
-			menu->addAction(actions["fileImportAppendText"]);
-			menu->addAction(actions["toolsEditWithStoryEditor"]);
-			menu->addAction(actions["insertSampleText"]);
-			break;
-		case 20:
-			if (doc()->currentPage()->pageName().isEmpty())
-			{
-				menuPDF = new QMenu();
-				menuPDF->addAction(actions["itemPDFIsAnnotation"]);
-				menuPDF->addAction(actions["itemPDFIsBookmark"]);
-				if (isAnnotation())
-				{
-					if ((annotation().Type() == 0) || (annotation().Type() == 1) || (annotation().Type() > 9))
-						menuPDF->addAction(actions["itemPDFAnnotationProps"]);
-					else
-						menuPDF->addAction(actions["itemPDFFieldProps"]);
-				}
-			}
-			act = menu->addMenu(menuPDF);
-			act->setText( ScribusView::tr("&PDF Options"));
-			break;
-		case 30:
-			if (isTableItem)
-			{
-				actions["itemConvertToImageFrame"]->setEnabled(true);
-				menu->addAction(actions["itemConvertToImageFrame"]);
-				//TODO: ConvertToLatexFrame
-			} else {
-				if ((prevInChain() == 0) && (nextInChain() == 0))
-					menu->addAction(actions["itemConvertToImageFrame"]);
-				menu->addAction(actions["itemConvertToOutlines"]);
-				if ((prevInChain() == 0) && (nextInChain() == 0))
-					menu->addAction(actions["itemConvertToPolygon"]);
-			}
-			break;
-		case 40:
-			if (itemText.lines() != 0) {
-				menu->addAction(actions["editClearContents"]);
-			} else {
-				return false;
-			}
-			break;
-		default:
-			return false;
-	}
-	return true;
-}
-*/
-
 void PageItem_TextFrame::applicableActions(QStringList & actionList)
 {
 	actionList << "fileImportText";
Index: scribus/pageitem_imageframe.cpp
===================================================================
--- scribus/pageitem_imageframe.cpp	(revision 14752)
+++ scribus/pageitem_imageframe.cpp	(revision 14753)
@@ -347,81 +347,6 @@
 	return true;
 }
 
-/*
-bool PageItem_ImageFrame::createContextMenu(QMenu *menu, int step)
-{
-	QMap<QString, QPointer<ScrAction> > actions = doc()->scMW()->scrActions;
-	static QMenu* menuResolution = 0;
-	QAction *act;
-	
-	if (menu == 0) {
-		if (menuResolution) delete menuResolution;
-		menuResolution = 0;
-		return true;
-	}
-	
-	switch (step) {
-		case 5:
-			if (pixm.imgInfo.exifDataValid)
-				menu->addAction(actions["itemImageInfo"]);
-		break;
-		case 10:
-			menu->addSeparator();
-			menu->addAction(actions["fileImportImage"]);
-			if (PictureIsAvailable)
-			{
-				if (!isTableItem)
-					menu->addAction(actions["itemAdjustFrameToImage"]);
-				menu->addAction(actions["itemAdjustImageToFrame"]);
-				if (pixm.imgInfo.valid)
-					menu->addAction(actions["itemExtendedImageProperties"]);
-				menu->addAction(actions["itemUpdateImage"]);
-			}
-			createContextMenu(menu, 11);
-			if (PictureIsAvailable && isRaster)
-			{
-				menu->addAction(actions["styleImageEffects"]);
-				menu->addAction(actions["editEditWithImageEditor"]);
-			}
-		break;
-		case 11:
-//			if (menuResolution != 0) {
-//				qDebug() << "New context menu created before old was destroyed."
-//						"Loosing some bytes of memory!";
-//			}
-			menuResolution = new QMenu();
-			act = menu->addMenu(menuResolution);
-			act->setText( tr("Preview Settings"));
-			menuResolution->addAction(actions["itemImageIsVisible"]);
-			menuResolution->addSeparator();
-			menuResolution->addAction(actions["itemPreviewLow"]);
-			menuResolution->addAction(actions["itemPreviewNormal"]);
-			menuResolution->addAction(actions["itemPreviewFull"]);
-		break;
-		case 30:
-			actions["itemConvertToTextFrame"]->setEnabled(true);
-			menu->addAction(actions["itemConvertToTextFrame"]);
-			if (!isTableItem)
-				menu->addAction(actions["itemConvertToPolygon"]);
-		break;
-		case 40:
-			if (PictureIsAvailable)
-				menu->addAction(actions["editCopyContents"]);
-			if (doc()->scMW()->contentsBuffer.sourceType==PageItem::ImageFrame)
-			{
-				menu->addAction(actions["editPasteContents"]);
-				menu->addAction(actions["editPasteContentsAbs"]);
-			}
-			if (PictureIsAvailable)
-				menu->addAction(actions["editClearContents"]);
-			return (PictureIsAvailable) || (doc()->scMW()->contentsBuffer.sourceType==PageItem::ImageFrame);
-		default:
-			return false;
-	}
-	return true;
-}
-*/
-
 void PageItem_ImageFrame::applicableActions(QStringList & actionList)
 {
 	actionList << "fileImportImage";
Index: scribus/scribus.cpp
===================================================================
--- scribus/scribus.cpp	(revision 14752)
+++ scribus/scribus.cpp	(revision 14753)
@@ -8876,10 +8876,13 @@
 
 void ScribusMainWindow::ImageEffects()
 {
+	qDebug()<<"void ScribusMainWindow::ImageEffects()";
 	if (HaveDoc)
 	{
+		qDebug()<<"void ScribusMainWindow::ImageEffects():HaveDoc";
 		if (doc->m_Selection->count() != 0)
 		{
+			qDebug()<<"void ScribusMainWindow::ImageEffects():(doc->m_Selection->count() != 0)";
 			PageItem *currItem = doc->m_Selection->itemAt(0);
 			EffectsDialog* dia = new EffectsDialog(this, currItem, doc);
 			if (dia->exec())
Index: scribus/pageitem_textframe.h
===================================================================
--- scribus/pageitem_textframe.h	(revision 14752)
+++ scribus/pageitem_textframe.h	(revision 14753)
@@ -95,7 +95,6 @@
 	QString unicodeInputString;
 	
 	virtual bool createInfoGroup(QFrame *, QGridLayout *);
-//	virtual bool createContextMenu(QMenu *, int);
 	virtual void applicableActions(QStringList& actionList);
 	virtual QString infoDescription();
 	
Index: scribus/pageitem_polygon.cpp
===================================================================
--- scribus/pageitem_polygon.cpp	(revision 14752)
+++ scribus/pageitem_polygon.cpp	(revision 14753)
@@ -57,26 +57,6 @@
 	}
 }
 
-/*
-bool PageItem_Polygon::createContextMenu(QMenu *menu, int step)
-{
-	QMap<QString, QPointer<ScrAction> > actions = doc()->scMW()->scrActions;
-	
-	if (menu == 0) return false;
-	switch(step) {
-		case 30:
-			menu->addSeparator();
-			menu->addAction(actions["itemConvertToBezierCurve"]);
-			menu->addAction(actions["itemConvertToImageFrame"]);
-			menu->addAction(actions["itemConvertToTextFrame"]);
-		break;
-		default:
-			return false;
-	}
-	return true;
-}
-*/
-
 void PageItem_Polygon::applicableActions(QStringList & actionList)
 {
 	actionList << "itemConvertToBezierCurve";
Index: scribus/pageitem_polygon.h
===================================================================
--- scribus/pageitem_polygon.h	(revision 14752)
+++ scribus/pageitem_polygon.h	(revision 14753)
@@ -42,8 +42,6 @@
 
 	virtual PageItem_Polygon * asPolygon() { return this; }
 	virtual bool isPolygon() const { return true; }
-
-//	virtual bool createContextMenu(QMenu *, int);
 	virtual void applicableActions(QStringList& actionList);
 	virtual QString infoDescription();
 	




More information about the scribus-commit mailing list