r19509 by craig - #12693: First part, disable the menu items in special edit mode. Move startup setup to AppModeHelper

scribus-commit scribus-commit at lists.scribus.net
Mon Sep 15 21:21:26 UTC 2014


Author: craig
Date: Mon Sep 15 21:21:26 2014
New Revision: 19509

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=19509
Log:
#12693: First part, disable the menu items in special edit mode. Move startup setup to AppModeHelper

Modified:
    trunk/Scribus/scribus/actionmanager.cpp
    trunk/Scribus/scribus/actionmanager.h
    trunk/Scribus/scribus/appmodehelper.cpp
    trunk/Scribus/scribus/appmodehelper.h
    trunk/Scribus/scribus/scribus.cpp

Modified: trunk/Scribus/scribus/actionmanager.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19509&path=/trunk/Scribus/scribus/actionmanager.cpp
==============================================================================
--- trunk/Scribus/scribus/actionmanager.cpp (original)
+++ trunk/Scribus/scribus/actionmanager.cpp Mon Sep 15 21:21:26 2014
@@ -2516,135 +2516,3 @@
 	return QString::null;
 }
 
-void ActionManager::setStartupActionsEnabled(bool enabled)
-{
-	(*scrActions)["fileDocSetup150"]->setEnabled(false);
-	(*scrActions)["filePrint"]->setEnabled(false);
-	(*scrActions)["fileSave"]->setEnabled(false);
-	(*scrActions)["fileSaveAs"]->setEnabled(false);
-	(*scrActions)["fileRevert"]->setEnabled(false);
-	(*scrActions)["fileCollect"]->setEnabled(false);
-	(*scrActions)["fileClose"]->setEnabled(false);
-	(*scrActions)["PrintPreview"]->setEnabled(false);
-	(*scrActions)["SaveAsDocumentTemplate"]->setEnabled(false);
-//	scrMenuMgr->setMenuEnabled("FileImport", false);
-//	scrMenuMgr->setMenuEnabled("FileExport", false);
-	(*scrActions)["fileExportAsPDF"]->setEnabled(false);
-	(*scrActions)["fileExportText"]->setEnabled(false);
-	(*scrActions)["fileExportAsEPS"]->setEnabled(false);
-	(*scrActions)["fileImportText"]->setEnabled(false);
-	(*scrActions)["fileImportText2"]->setEnabled(false);
-	(*scrActions)["fileImportImage"]->setEnabled(false);
-	(*scrActions)["fileImportAppendText"]->setEnabled(false);
-	(*scrActions)["fileImportVector"]->setEnabled(false);
-	(*scrActions)["pageInsert"]->setEnabled(false);
-	(*scrActions)["pageImport"]->setEnabled(false);
-	(*scrActions)["pageDelete"]->setEnabled(false);
-	(*scrActions)["pageImport"]->setEnabled(false);
-	(*scrActions)["pageMove"]->setEnabled(false);
-	(*scrActions)["pageCopy"]->setEnabled(false);
-	(*scrActions)["pageApplyMasterPage"]->setEnabled(false);
-	(*scrActions)["pageCopyToMasterPage"]->setEnabled(false);
-	(*scrActions)["pageManageGuides"]->setEnabled(false);
-	(*scrActions)["pageManageMargins"]->setEnabled(false);
-	(*scrActions)["editUndoAction"]->setEnabled(false);
-	(*scrActions)["editRedoAction"]->setEnabled(false);
-	(*scrActions)["editCut"]->setEnabled(false);
-	(*scrActions)["editCopy"]->setEnabled(false);
-	(*scrActions)["editPaste"]->setEnabled(false);
-//	scrMenuMgr->setMenuEnabled("EditPasteRecent", false);
-	(*scrActions)["editClearContents"]->setEnabled(false);
-	(*scrActions)["editTruncateContents"]->setEnabled(false);
-	(*scrActions)["editSelectAll"]->setEnabled(false);
-	(*scrActions)["editSelectAllOnLayer"]->setEnabled(false);
-	(*scrActions)["editDeselectAll"]->setEnabled(false);
-	(*scrActions)["editReplaceColors"]->setEnabled(false);
-	(*scrActions)["editStyles"]->setEnabled(false);
-	(*scrActions)["editMarks"]->setEnabled(false);
-	(*scrActions)["editNotesStyles"]->setEnabled(false);
-	(*scrActions)["editSearchReplace"]->setEnabled(false);
-	(*scrActions)["editMasterPages"]->setEnabled(false);
-	(*scrActions)["editJavascripts"]->setEnabled(false);
-	(*scrActions)["editEditWithImageEditor"]->setEnabled(false);
-	(*scrActions)["editEditRenderSource"]->setEnabled(false);
-	(*scrActions)["toolsPreflightVerifier"]->setEnabled(false);
-	(*scrActions)["extrasHyphenateText"]->setEnabled(false);
-	(*scrActions)["extrasDeHyphenateText"]->setEnabled(false);
-	(*scrActions)["viewFitInWindow"]->setEnabled(false);
-	(*scrActions)["viewFitWidth"]->setEnabled(false);
-	(*scrActions)["viewFit50"]->setEnabled(false);
-	(*scrActions)["viewFit75"]->setEnabled(false);
-	(*scrActions)["viewFit100"]->setEnabled(false);
-	(*scrActions)["viewFit200"]->setEnabled(false);
-	(*scrActions)["viewFit400"]->setEnabled(false);
-	(*scrActions)["viewSnapToGuides"]->setChecked(false);
-	(*scrActions)["viewSnapToElements"]->setChecked(false);
-	(*scrActions)["viewSnapToGrid"]->setChecked(false);
-	(*scrActions)["viewShowRulers"]->setEnabled(false);
-//	scrMenuMgr->setMenuEnabled("Insert", false);
-	(*scrActions)["insertFrame"]->setEnabled(false);
-	(*scrActions)["insertSampleText"]->setEnabled(false);
-	(*scrActions)["itemDuplicate"]->setEnabled(false);
-	(*scrActions)["itemMulDuplicate"]->setEnabled(false);
-	(*scrActions)["itemTransform"]->setEnabled(false);
-	(*scrActions)["itemDelete"]->setEnabled(false);
-	(*scrActions)["itemRaise"]->setEnabled(false);
-	(*scrActions)["itemLower"]->setEnabled(false);
-	(*scrActions)["itemRaiseToTop"]->setEnabled(false);
-	(*scrActions)["itemLowerToBottom"]->setEnabled(false);
-//	scrMenuMgr->setMenuEnabled("itemSendToScrapbook", false);
-	(*scrActions)["itemSendToPattern"]->setEnabled(false);
-	(*scrActions)["itemSendToInline"]->setEnabled(false);
-	(*scrActions)["itemAdjustFrameToImage"]->setEnabled(false);
-	(*scrActions)["itemAdjustImageToFrame"]->setEnabled(false);
-	(*scrActions)["itemExtendedImageProperties"]->setEnabled(false);
-	(*scrActions)["itemUpdateImage"]->setEnabled(false);
-	(*scrActions)["itemPreviewFull"]->setEnabled(false);
-	(*scrActions)["itemPreviewNormal"]->setEnabled(false);
-	(*scrActions)["itemPreviewLow"]->setEnabled(false);
-	(*scrActions)["itemAttributes"]->setEnabled(false);
-	(*scrActions)["itemPDFAnnotationProps"]->setEnabled(false);
-	(*scrActions)["itemPDFFieldProps"]->setEnabled(false);
-	(*scrActions)["itemConvertToBezierCurve"]->setEnabled(false);
-	(*scrActions)["itemConvertToImageFrame"]->setEnabled(false);
-	(*scrActions)["itemConvertToOutlines"]->setEnabled(false);
-	(*scrActions)["itemConvertToPolygon"]->setEnabled(false);
-	(*scrActions)["itemConvertToTextFrame"]->setEnabled(false);
-	(*scrActions)["itemConvertToSymbolFrame"]->setEnabled(false);
-	(*scrActions)["toolsSelect"]->setEnabled(false);
-	(*scrActions)["toolsRotate"]->setEnabled(false);
-	(*scrActions)["toolsEditContents"]->setEnabled(false);
-	(*scrActions)["toolsEditWithStoryEditor"]->setEnabled(false);
-	(*scrActions)["toolsZoom"]->setEnabled(false);
-	(*scrActions)["toolsInsertTextFrame"]->setEnabled(false);
-	(*scrActions)["toolsInsertImageFrame"]->setEnabled(false);
-	(*scrActions)["toolsInsertShape"]->setEnabled(false);
-	(*scrActions)["toolsInsertLine"]->setEnabled(false);
-	(*scrActions)["toolsInsertBezier"]->setEnabled(false);
-	(*scrActions)["toolsInsertFreehandLine"]->setEnabled(false);
-	(*scrActions)["toolsInsertCalligraphicLine"]->setEnabled(false);
-	(*scrActions)["toolsInsertPolygon"]->setEnabled(false);
-	(*scrActions)["toolsInsertArc"]->setEnabled(false);
-	(*scrActions)["toolsInsertSpiral"]->setEnabled(false);
-	(*scrActions)["toolsInsertRenderFrame"]->setEnabled(false);
-	(*scrActions)["toolsInsertTable"]->setEnabled(false);
-	(*scrActions)["toolsLinkTextFrame"]->setEnabled(false);
-	(*scrActions)["toolsUnlinkTextFrame"]->setEnabled(false);
-	(*scrActions)["toolsUnlinkTextFrameWithTextCopy"]->setEnabled(false);
-	(*scrActions)["toolsUnlinkTextFrameWithTextCut"]->setEnabled(false);
-	(*scrActions)["toolsMeasurements"]->setEnabled(false);
-	(*scrActions)["toolsCopyProperties"]->setEnabled(false);
-	(*scrActions)["toolsEyeDropper"]->setEnabled(false);
-	(*scrActions)["toolsPDFPushButton"]->setEnabled(false);
-	(*scrActions)["toolsPDFRadioButton"]->setEnabled(false);
-	(*scrActions)["toolsPDFTextField"]->setEnabled(false);
-	(*scrActions)["toolsPDFCheckBox"]->setEnabled(false);
-	(*scrActions)["toolsPDFComboBox"]->setEnabled(false);
-	(*scrActions)["toolsPDFListBox"]->setEnabled(false);
-	(*scrActions)["toolsPDFAnnotText"]->setEnabled(false);
-	(*scrActions)["toolsPDFAnnotLink"]->setEnabled(false);
-#ifdef HAVE_OSG
-	(*scrActions)["toolsPDFAnnot3D"]->setEnabled(false);
-#endif
-}
-

Modified: trunk/Scribus/scribus/actionmanager.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19509&path=/trunk/Scribus/scribus/actionmanager.h
==============================================================================
--- trunk/Scribus/scribus/actionmanager.h (original)
+++ trunk/Scribus/scribus/actionmanager.h Mon Sep 15 21:21:26 2014
@@ -86,7 +86,6 @@
 		void enableUnicodeActions(QMap<QString, QPointer<ScrAction> > *actionMap, bool enabled, const QString& fontName=QString::null);
 		void setPDFActions(ScribusView *);
 		
-		void setStartupActionsEnabled(bool enabled);
 	public slots:
 		void languageChange();
 		void handleMultipleSelections(bool isMultiple);

Modified: trunk/Scribus/scribus/appmodehelper.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19509&path=/trunk/Scribus/scribus/appmodehelper.cpp
==============================================================================
--- trunk/Scribus/scribus/appmodehelper.cpp (original)
+++ trunk/Scribus/scribus/appmodehelper.cpp Mon Sep 15 21:21:26 2014
@@ -43,14 +43,31 @@
 AppModeHelper::AppModeHelper(QObject *parent) :
     QObject(parent)
 {
+	a_actMgr=NULL;
 	a_scrActions=NULL;
-	a_actMgr=NULL;
-}
-
-void AppModeHelper::setup(ActionManager* am, QMap<QString, QPointer<ScrAction> > *scra)
+	a_scrRecentFileActions=NULL;
+	a_scrWindowsActions=NULL;
+	a_scrScrapActions=NULL;
+	a_scrLayersActions=NULL;
+	a_scrRecentPasteActions=NULL;
+}
+
+void AppModeHelper::setup(ActionManager* am,
+						  QMap<QString, QPointer<ScrAction> > *scrA,
+						  QMap<QString, QPointer<ScrAction> > *scrRFA,
+						  QMap<QString, QPointer<ScrAction> > *sWA,
+						  QMap<QString, QPointer<ScrAction> > *scSA,
+						  QMap<QString, QPointer<ScrAction> > *scLA,
+						  QMap<QString, QPointer<ScrAction> > *scRPA)
 {
 	a_actMgr=am;
-	a_scrActions=scra;
+	a_scrActions=scrA;
+	a_scrRecentFileActions=scrRFA;
+	a_scrWindowsActions=sWA;
+	a_scrScrapActions=scSA;
+	a_scrLayersActions=scLA;
+	a_scrRecentPasteActions=scRPA;
+
 }
 
 void AppModeHelper::resetApplicationMode(ScribusMainWindow* scmw, int newMode)
@@ -399,6 +416,13 @@
 	return inEditMode;
 }
 
+void AppModeHelper::setActionGroupEnabled(QMap<QString, QPointer<ScrAction> >*ag, bool enabled)
+{
+	if (ag!=NULL)
+		for( QMap<QString, QPointer<ScrAction> >::Iterator it = ag->begin(); it!=ag->end(); ++it )
+			(*it)->setEnabled(enabled);
+}
+
 void AppModeHelper::setTextEditMode(bool b)
 {
 	bool b2=!b;
@@ -451,6 +475,12 @@
 	(*a_scrActions)["pageDelete"]->setEnabled(b2);
 	(*a_scrActions)["pageCopy"]->setEnabled(b2);
 	(*a_scrActions)["pageCopyToMasterPage"]->setEnabled(b2);
+
+	setActionGroupEnabled(a_scrLayersActions, b2);
+	setActionGroupEnabled(a_scrRecentFileActions, b2);
+	setActionGroupEnabled(a_scrRecentPasteActions, b2);
+	setActionGroupEnabled(a_scrScrapActions, b2);
+	setActionGroupEnabled(a_scrWindowsActions, b2);
 }
 
 void AppModeHelper::setFrameEditMode(bool b)
@@ -1008,3 +1038,136 @@
 		(*a_scrActions)["editMark"]->setEnabled(false);
 	}
 }
+
+void AppModeHelper::setStartupActionsEnabled(bool enabled)
+{
+	(*a_scrActions)["fileDocSetup150"]->setEnabled(false);
+	(*a_scrActions)["filePrint"]->setEnabled(false);
+	(*a_scrActions)["fileSave"]->setEnabled(false);
+	(*a_scrActions)["fileSaveAs"]->setEnabled(false);
+	(*a_scrActions)["fileRevert"]->setEnabled(false);
+	(*a_scrActions)["fileCollect"]->setEnabled(false);
+	(*a_scrActions)["fileClose"]->setEnabled(false);
+	(*a_scrActions)["PrintPreview"]->setEnabled(false);
+	(*a_scrActions)["SaveAsDocumentTemplate"]->setEnabled(false);
+//	scrMenuMgr->setMenuEnabled("FileImport", false);
+//	scrMenuMgr->setMenuEnabled("FileExport", false);
+	(*a_scrActions)["fileExportAsPDF"]->setEnabled(false);
+	(*a_scrActions)["fileExportText"]->setEnabled(false);
+	(*a_scrActions)["fileExportAsEPS"]->setEnabled(false);
+	(*a_scrActions)["fileImportText"]->setEnabled(false);
+	(*a_scrActions)["fileImportText2"]->setEnabled(false);
+	(*a_scrActions)["fileImportImage"]->setEnabled(false);
+	(*a_scrActions)["fileImportAppendText"]->setEnabled(false);
+	(*a_scrActions)["fileImportVector"]->setEnabled(false);
+	(*a_scrActions)["pageInsert"]->setEnabled(false);
+	(*a_scrActions)["pageImport"]->setEnabled(false);
+	(*a_scrActions)["pageDelete"]->setEnabled(false);
+	(*a_scrActions)["pageImport"]->setEnabled(false);
+	(*a_scrActions)["pageMove"]->setEnabled(false);
+	(*a_scrActions)["pageCopy"]->setEnabled(false);
+	(*a_scrActions)["pageApplyMasterPage"]->setEnabled(false);
+	(*a_scrActions)["pageCopyToMasterPage"]->setEnabled(false);
+	(*a_scrActions)["pageManageGuides"]->setEnabled(false);
+	(*a_scrActions)["pageManageMargins"]->setEnabled(false);
+	(*a_scrActions)["editUndoAction"]->setEnabled(false);
+	(*a_scrActions)["editRedoAction"]->setEnabled(false);
+	(*a_scrActions)["editCut"]->setEnabled(false);
+	(*a_scrActions)["editCopy"]->setEnabled(false);
+	(*a_scrActions)["editPaste"]->setEnabled(false);
+//	scrMenuMgr->setMenuEnabled("EditPasteRecent", false);
+	(*a_scrActions)["editClearContents"]->setEnabled(false);
+	(*a_scrActions)["editTruncateContents"]->setEnabled(false);
+	(*a_scrActions)["editSelectAll"]->setEnabled(false);
+	(*a_scrActions)["editSelectAllOnLayer"]->setEnabled(false);
+	(*a_scrActions)["editDeselectAll"]->setEnabled(false);
+	(*a_scrActions)["editReplaceColors"]->setEnabled(false);
+	(*a_scrActions)["editStyles"]->setEnabled(false);
+	(*a_scrActions)["editMarks"]->setEnabled(false);
+	(*a_scrActions)["editNotesStyles"]->setEnabled(false);
+	(*a_scrActions)["editSearchReplace"]->setEnabled(false);
+	(*a_scrActions)["editMasterPages"]->setEnabled(false);
+	(*a_scrActions)["editJavascripts"]->setEnabled(false);
+	(*a_scrActions)["editEditWithImageEditor"]->setEnabled(false);
+	(*a_scrActions)["editEditRenderSource"]->setEnabled(false);
+	(*a_scrActions)["toolsPreflightVerifier"]->setEnabled(false);
+	(*a_scrActions)["extrasHyphenateText"]->setEnabled(false);
+	(*a_scrActions)["extrasDeHyphenateText"]->setEnabled(false);
+	(*a_scrActions)["viewFitInWindow"]->setEnabled(false);
+	(*a_scrActions)["viewFitWidth"]->setEnabled(false);
+	(*a_scrActions)["viewFit50"]->setEnabled(false);
+	(*a_scrActions)["viewFit75"]->setEnabled(false);
+	(*a_scrActions)["viewFit100"]->setEnabled(false);
+	(*a_scrActions)["viewFit200"]->setEnabled(false);
+	(*a_scrActions)["viewFit400"]->setEnabled(false);
+	(*a_scrActions)["viewSnapToGuides"]->setChecked(false);
+	(*a_scrActions)["viewSnapToElements"]->setChecked(false);
+	(*a_scrActions)["viewSnapToGrid"]->setChecked(false);
+	(*a_scrActions)["viewShowRulers"]->setEnabled(false);
+//	scrMenuMgr->setMenuEnabled("Insert", false);
+	(*a_scrActions)["insertFrame"]->setEnabled(false);
+	(*a_scrActions)["insertSampleText"]->setEnabled(false);
+	(*a_scrActions)["itemDuplicate"]->setEnabled(false);
+	(*a_scrActions)["itemMulDuplicate"]->setEnabled(false);
+	(*a_scrActions)["itemTransform"]->setEnabled(false);
+	(*a_scrActions)["itemDelete"]->setEnabled(false);
+	(*a_scrActions)["itemRaise"]->setEnabled(false);
+	(*a_scrActions)["itemLower"]->setEnabled(false);
+	(*a_scrActions)["itemRaiseToTop"]->setEnabled(false);
+	(*a_scrActions)["itemLowerToBottom"]->setEnabled(false);
+//	scrMenuMgr->setMenuEnabled("itemSendToScrapbook", false);
+	(*a_scrActions)["itemSendToPattern"]->setEnabled(false);
+	(*a_scrActions)["itemSendToInline"]->setEnabled(false);
+	(*a_scrActions)["itemAdjustFrameToImage"]->setEnabled(false);
+	(*a_scrActions)["itemAdjustImageToFrame"]->setEnabled(false);
+	(*a_scrActions)["itemExtendedImageProperties"]->setEnabled(false);
+	(*a_scrActions)["itemUpdateImage"]->setEnabled(false);
+	(*a_scrActions)["itemPreviewFull"]->setEnabled(false);
+	(*a_scrActions)["itemPreviewNormal"]->setEnabled(false);
+	(*a_scrActions)["itemPreviewLow"]->setEnabled(false);
+	(*a_scrActions)["itemAttributes"]->setEnabled(false);
+	(*a_scrActions)["itemPDFAnnotationProps"]->setEnabled(false);
+	(*a_scrActions)["itemPDFFieldProps"]->setEnabled(false);
+	(*a_scrActions)["itemConvertToBezierCurve"]->setEnabled(false);
+	(*a_scrActions)["itemConvertToImageFrame"]->setEnabled(false);
+	(*a_scrActions)["itemConvertToOutlines"]->setEnabled(false);
+	(*a_scrActions)["itemConvertToPolygon"]->setEnabled(false);
+	(*a_scrActions)["itemConvertToTextFrame"]->setEnabled(false);
+	(*a_scrActions)["itemConvertToSymbolFrame"]->setEnabled(false);
+	(*a_scrActions)["toolsSelect"]->setEnabled(false);
+	(*a_scrActions)["toolsRotate"]->setEnabled(false);
+	(*a_scrActions)["toolsEditContents"]->setEnabled(false);
+	(*a_scrActions)["toolsEditWithStoryEditor"]->setEnabled(false);
+	(*a_scrActions)["toolsZoom"]->setEnabled(false);
+	(*a_scrActions)["toolsInsertTextFrame"]->setEnabled(false);
+	(*a_scrActions)["toolsInsertImageFrame"]->setEnabled(false);
+	(*a_scrActions)["toolsInsertShape"]->setEnabled(false);
+	(*a_scrActions)["toolsInsertLine"]->setEnabled(false);
+	(*a_scrActions)["toolsInsertBezier"]->setEnabled(false);
+	(*a_scrActions)["toolsInsertFreehandLine"]->setEnabled(false);
+	(*a_scrActions)["toolsInsertCalligraphicLine"]->setEnabled(false);
+	(*a_scrActions)["toolsInsertPolygon"]->setEnabled(false);
+	(*a_scrActions)["toolsInsertArc"]->setEnabled(false);
+	(*a_scrActions)["toolsInsertSpiral"]->setEnabled(false);
+	(*a_scrActions)["toolsInsertRenderFrame"]->setEnabled(false);
+	(*a_scrActions)["toolsInsertTable"]->setEnabled(false);
+	(*a_scrActions)["toolsLinkTextFrame"]->setEnabled(false);
+	(*a_scrActions)["toolsUnlinkTextFrame"]->setEnabled(false);
+	(*a_scrActions)["toolsUnlinkTextFrameWithTextCopy"]->setEnabled(false);
+	(*a_scrActions)["toolsUnlinkTextFrameWithTextCut"]->setEnabled(false);
+	(*a_scrActions)["toolsMeasurements"]->setEnabled(false);
+	(*a_scrActions)["toolsCopyProperties"]->setEnabled(false);
+	(*a_scrActions)["toolsEyeDropper"]->setEnabled(false);
+	(*a_scrActions)["toolsPDFPushButton"]->setEnabled(false);
+	(*a_scrActions)["toolsPDFRadioButton"]->setEnabled(false);
+	(*a_scrActions)["toolsPDFTextField"]->setEnabled(false);
+	(*a_scrActions)["toolsPDFCheckBox"]->setEnabled(false);
+	(*a_scrActions)["toolsPDFComboBox"]->setEnabled(false);
+	(*a_scrActions)["toolsPDFListBox"]->setEnabled(false);
+	(*a_scrActions)["toolsPDFAnnotText"]->setEnabled(false);
+	(*a_scrActions)["toolsPDFAnnotLink"]->setEnabled(false);
+#ifdef HAVE_OSG
+	(*a_scrActions)["toolsPDFAnnot3D"]->setEnabled(false);
+#endif
+}
+

Modified: trunk/Scribus/scribus/appmodehelper.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19509&path=/trunk/Scribus/scribus/appmodehelper.h
==============================================================================
--- trunk/Scribus/scribus/appmodehelper.h (original)
+++ trunk/Scribus/scribus/appmodehelper.h Mon Sep 15 21:21:26 2014
@@ -34,11 +34,12 @@
 
 	public:
 		explicit AppModeHelper(QObject *parent = 0);
-		void setup(ActionManager* am, QMap<QString, QPointer<ScrAction> > *);
+		void setup(ActionManager* am, QMap<QString, QPointer<ScrAction> > *, QMap<QString, QPointer<ScrAction> > *, QMap<QString, QPointer<ScrAction> > *, QMap<QString, QPointer<ScrAction> > *, QMap<QString, QPointer<ScrAction> > *, QMap<QString, QPointer<ScrAction> > *);
 		void resetApplicationMode(ScribusMainWindow* scmw, int newMode);
 		void setApplicationMode(ScribusMainWindow* scmw, ScribusDoc* doc, int newMode);
 		void setModeActionsPerMode(int newMode);
 		bool inAnEditMode(ScribusDoc* doc);
+		void setActionGroupEnabled(QMap<QString, QPointer<ScrAction> > *, bool enabled);
 		void setTextEditMode(bool b);
 		void setSpecialEditMode(bool b);
 		void setFrameEditMode(bool b);
@@ -52,6 +53,7 @@
 		void setPreviewMode(bool b);
 		//! \brief enable or disable the unicode actions and their menus
 		void enableTextActions(bool enabled, const QString& fontName=QString::null);
+		void setStartupActionsEnabled(bool enabled);
 
 
 	signals:
@@ -62,6 +64,11 @@
 
 	protected:
 		QMap<QString, QPointer<ScrAction> > *a_scrActions;
+		QMap<QString, QPointer<ScrAction> > *a_scrRecentFileActions;
+		QMap<QString, QPointer<ScrAction> > *a_scrWindowsActions;
+		QMap<QString, QPointer<ScrAction> > *a_scrScrapActions;
+		QMap<QString, QPointer<ScrAction> > *a_scrLayersActions;
+		QMap<QString, QPointer<ScrAction> > *a_scrRecentPasteActions;
 		ActionManager* a_actMgr;
 };
 

Modified: trunk/Scribus/scribus/scribus.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19509&path=/trunk/Scribus/scribus/scribus.cpp
==============================================================================
--- trunk/Scribus/scribus/scribus.cpp (original)
+++ trunk/Scribus/scribus/scribus.cpp Mon Sep 15 21:21:26 2014
@@ -358,7 +358,7 @@
 	scrScrapActions.clear();
 	actionManager = new ActionManager(this);
 	appModeHelper = new AppModeHelper();
-	appModeHelper->setup(actionManager, &scrActions);
+	appModeHelper->setup(actionManager, &scrActions, &scrRecentFileActions, &scrWindowsActions, &scrScrapActions, &scrLayersActions, &scrRecentPasteActions);
 	scrMenuMgr = new ScMWMenuManager(menuBar(), actionManager);
 	prefsManager = PrefsManager::instance();
 	formatsManager = FormatsManager::instance();
@@ -469,7 +469,7 @@
 				csm.loadPalette(Cpfad, m_doc, prefsManager->appPrefs.colorPrefs.DColors, prefsManager->appPrefs.defaultGradients, prefsManager->appPrefs.defaultPatterns, false);
 		}
 	}
-	actionManager->setStartupActionsEnabled(false);
+	appModeHelper->setStartupActionsEnabled(false);
 
 	return retVal;
 }
@@ -2044,7 +2044,7 @@
 	}
 	else
 	{
-		actionManager->setStartupActionsEnabled(false);
+		appModeHelper->setStartupActionsEnabled(false);
 	}
 	prefsManager->setShowStartupDialog(!dia->startUpDialog->isChecked());
 	delete dia;




More information about the scribus-commit mailing list