r18538 by craig - Move Story Editor to new menu system, tidy up a little

scribus-commit scribus-commit at lists.scribus.net
Wed Oct 9 18:54:39 UTC 2013


Author: craig
Date: Wed Oct  9 18:54:39 2013
New Revision: 18538

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=18538
Log:
Move Story Editor to new menu system, tidy up a little

Modified:
    trunk/Scribus/scribus/scribus.cpp
    trunk/Scribus/scribus/ui/storyeditor.cpp

Modified: trunk/Scribus/scribus/scribus.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18538&path=/trunk/Scribus/scribus/scribus.cpp
==============================================================================
--- trunk/Scribus/scribus/scribus.cpp (original)
+++ trunk/Scribus/scribus/scribus.cpp Wed Oct  9 18:54:39 2013
@@ -1079,7 +1079,7 @@
 
 	//Window menu
 	scrMenuMgr->createMenu("Windows", ActionManager::defaultMenuNameEntryTranslated("Windows"), QString::null, true);
-	//connect(scrMenuMgr->getLocalPopupMenu("Windows"), SIGNAL(aboutToShow()), this, SLOT(windowsMenuAboutToShow()));
+	connect(scrMenuMgr->getLocalPopupMenu("Windows"), SIGNAL(aboutToShow()), this, SLOT(windowsMenuAboutToShow()));
 	//addDefaultWindowMenuItems();
 
 	//Help menu
@@ -1121,19 +1121,7 @@
 	menuBar()->addSeparator();
 	scrMenuMgr->addMenuStringToMenuBar("Help");
 	scrMenuMgr->addMenuItemStringstoMenuBar("Help", scrActions);
-//	scrMenuMgr->addMenuToMenuBar("File");
-//	scrMenuMgr->addMenuToMenuBar("Edit");
-//	scrMenuMgr->addMenuToMenuBar("Item");
-//	scrMenuMgr->addMenuToMenuBar("Insert");
-//	scrMenuMgr->addMenuToMenuBar("Page");
-//	scrMenuMgr->addMenuToMenuBar("ItemTable");
-//	scrMenuMgr->addMenuToMenuBar("Extras");
-//	scrMenuMgr->addMenuToMenuBar("View");
-//	scrMenuMgr->addMenuToMenuBar("Windows");
-	menuBar()->addSeparator();
-//	scrMenuMgr->addMenuToMenuBar("Help");
-
-	scrMenuMgr->dumpMenuStrings();
+
 }
 
 

Modified: trunk/Scribus/scribus/ui/storyeditor.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18538&path=/trunk/Scribus/scribus/ui/storyeditor.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/storyeditor.cpp (original)
+++ trunk/Scribus/scribus/ui/storyeditor.cpp Wed Oct  9 18:54:39 2013
@@ -1714,103 +1714,111 @@
 {
 	seMenuMgr = new MenuManager(this->menuBar(), this->menuBar());
 	seMenuMgr->createMenu("File", tr("&File"));
-	seMenuMgr->addMenuItem(seActions["fileNew"], "File", true);
-	seMenuMgr->addMenuItem(seActions["fileRevert"], "File", false);
-	seMenuMgr->addMenuSeparator("File");
-	seMenuMgr->addMenuItem(seActions["fileSaveToFile"], "File", true);
-	seMenuMgr->addMenuItem(seActions["fileLoadFromFile"], "File", true);
-	seMenuMgr->addMenuItem(seActions["fileSaveDocument"], "File", true);
-	seMenuMgr->addMenuSeparator("File");
-	seMenuMgr->addMenuItem(seActions["fileUpdateAndExit"], "File", true);
-	seMenuMgr->addMenuItem(seActions["fileExit"], "File", true);
+	seMenuMgr->addMenuItemString("fileNew", "File");
+	seMenuMgr->addMenuItemString("fileRevert", "File");
+	seMenuMgr->addMenuItemString("SEPARATOR", "File");
+	seMenuMgr->addMenuItemString("fileSaveToFile", "File");
+	seMenuMgr->addMenuItemString("fileLoadFromFile", "File");
+	seMenuMgr->addMenuItemString("fileSaveDocument", "File");
+	seMenuMgr->addMenuItemString("SEPARATOR", "File");
+	seMenuMgr->addMenuItemString("fileUpdateAndExit", "File");
+	seMenuMgr->addMenuItemString("fileExit", "File");
 	seMenuMgr->createMenu("Edit", tr("&Edit"));
-	seMenuMgr->addMenuItem(seActions["editSelectAll"], "Edit", true);
-	seMenuMgr->addMenuItem(seActions["editCut"], "Edit", false);
-	seMenuMgr->addMenuItem(seActions["editCopy"], "Edit", false);
-	seMenuMgr->addMenuItem(seActions["editPaste"], "Edit", false);
-	seMenuMgr->addMenuItem(seActions["editClear"], "Edit", false);
-	seMenuMgr->addMenuSeparator("Edit");
-	seMenuMgr->addMenuItem(seActions["editSearchReplace"], "Edit", true);
-	seMenuMgr->addMenuSeparator("Edit");
-//	seMenuMgr->addMenuItem(seActions["editEditStyle"], "Edit", true);
-	seMenuMgr->addMenuItem(seActions["editFontPreview"], "Edit", true);
-	seMenuMgr->addMenuItem(seActions["editUpdateFrame"], "Edit", false);
-	seMenuMgr->addMenuSeparator("Edit");
-	seMenuMgr->addMenuItem(seActions["settingsSmartTextSelection"], "Edit", true);
+	seMenuMgr->addMenuItemString("editSelectAll", "Edit");
+	seMenuMgr->addMenuItemString("editCut", "Edit");
+	seMenuMgr->addMenuItemString("editCopy", "Edit");
+	seMenuMgr->addMenuItemString("editPaste", "Edit");
+	seMenuMgr->addMenuItemString("editClear", "Edit");
+	seMenuMgr->addMenuItemString("SEPARATOR", "Edit");
+	seMenuMgr->addMenuItemString("editSearchReplace", "Edit");
+	seMenuMgr->addMenuItemString("SEPARATOR", "Edit");
+//	seMenuMgr->addMenuItemString("editEditStyle", "Edit");
+	seMenuMgr->addMenuItemString("editFontPreview", "Edit");
+	seMenuMgr->addMenuItemString("editUpdateFrame", "Edit");
+	seMenuMgr->addMenuItemString("SEPARATOR", "Edit");
+	seMenuMgr->addMenuItemString("settingsSmartTextSelection", "Edit");
 	seMenuMgr->createMenu("Insert", tr("&Insert"));
-	seMenuMgr->addMenuItem(seActions["insertGlyph"], "Insert", true);
-	seMenuMgr->addMenuItem(seActions["insertSampleText"], "Insert", true);
+	seMenuMgr->addMenuItemString("insertGlyph", "Insert");
+	seMenuMgr->addMenuItemString("insertSampleText", "Insert");
 	seMenuMgr->createMenu("InsertChar", tr("Character"), "Insert");
-	seMenuMgr->addMenuItem(seActions["unicodePageNumber"], "InsertChar", true);
-	seMenuMgr->addMenuItem(seActions["unicodePageCount"], "InsertChar", true);
-	//seMenuMgr->addMenuItem(seActions["unicodeSoftHyphen"], "InsertChar", true);
-	seMenuMgr->addMenuItem(seActions["unicodeNonBreakingHyphen"], "InsertChar", true);
-	seMenuMgr->addMenuSeparator("InsertChar");
-	seMenuMgr->addMenuItem(seActions["unicodeCopyRight"], "InsertChar", true);
-	seMenuMgr->addMenuItem(seActions["unicodeRegdTM"], "InsertChar", true);
-	seMenuMgr->addMenuItem(seActions["unicodeTM"], "InsertChar", true);
-	seMenuMgr->addMenuItem(seActions["unicodeSolidus"], "InsertChar", true);
-	seMenuMgr->addMenuItem(seActions["unicodeBullet"], "InsertChar", true);
-	seMenuMgr->addMenuItem(seActions["unicodeMidpoint"], "InsertChar", true);
-	seMenuMgr->addMenuSeparator("InsertChar");
-	seMenuMgr->addMenuItem(seActions["unicodeDashEm"], "InsertChar", true);
-	seMenuMgr->addMenuItem(seActions["unicodeDashEn"], "InsertChar", true);
-	seMenuMgr->addMenuItem(seActions["unicodeDashFigure"], "InsertChar", true);
-	seMenuMgr->addMenuItem(seActions["unicodeDashQuotation"], "InsertChar", true);
+	seMenuMgr->addMenuItemString("InsertChar", "Insert");
+	seMenuMgr->addMenuItemString("unicodePageNumber", "InsertChar");
+	seMenuMgr->addMenuItemString("unicodePageCount", "InsertChar");
+	//seMenuMgr->addMenuItemString("unicodeSoftHyphen", "InsertChar");
+	seMenuMgr->addMenuItemString("unicodeNonBreakingHyphen", "InsertChar");
+	seMenuMgr->addMenuItemString("SEPARATOR", "InsertChar");
+	seMenuMgr->addMenuItemString("unicodeCopyRight", "InsertChar");
+	seMenuMgr->addMenuItemString("unicodeRegdTM", "InsertChar");
+	seMenuMgr->addMenuItemString("unicodeTM", "InsertChar");
+	seMenuMgr->addMenuItemString("unicodeSolidus", "InsertChar");
+	seMenuMgr->addMenuItemString("unicodeBullet", "InsertChar");
+	seMenuMgr->addMenuItemString("unicodeMidpoint", "InsertChar");
+	seMenuMgr->addMenuItemString("SEPARATOR", "InsertChar");
+	seMenuMgr->addMenuItemString("unicodeDashEm", "InsertChar");
+	seMenuMgr->addMenuItemString("unicodeDashEn", "InsertChar");
+	seMenuMgr->addMenuItemString("unicodeDashFigure", "InsertChar");
+	seMenuMgr->addMenuItemString("unicodeDashQuotation", "InsertChar");
 	seMenuMgr->createMenu("InsertQuote", tr("Quote"), "Insert");
-	seMenuMgr->addMenuItem(seActions["unicodeQuoteApostrophe"], "InsertQuote", true);
-	seMenuMgr->addMenuItem(seActions["unicodeQuoteStraight"], "InsertQuote", true);
-	seMenuMgr->addMenuSeparator("InsertQuote");
-	seMenuMgr->addMenuItem(seActions["unicodeQuoteSingleLeft"], "InsertQuote", true);
-	seMenuMgr->addMenuItem(seActions["unicodeQuoteSingleRight"], "InsertQuote", true);
-	seMenuMgr->addMenuItem(seActions["unicodeQuoteDoubleLeft"], "InsertQuote", true);
-	seMenuMgr->addMenuItem(seActions["unicodeQuoteDoubleRight"], "InsertQuote", true);
-	seMenuMgr->addMenuSeparator("InsertQuote");
-	seMenuMgr->addMenuItem(seActions["unicodeQuoteSingleReversed"], "InsertQuote", true);
-	seMenuMgr->addMenuItem(seActions["unicodeQuoteDoubleReversed"], "InsertQuote", true);
-	seMenuMgr->addMenuSeparator("InsertQuote");
-	seMenuMgr->addMenuItem(seActions["unicodeQuoteLowSingleComma"], "InsertQuote", true);
-	seMenuMgr->addMenuItem(seActions["unicodeQuoteLowDoubleComma"], "InsertQuote", true);
-	seMenuMgr->addMenuSeparator("InsertQuote");
-	seMenuMgr->addMenuItem(seActions["unicodeQuoteSingleLeftGuillemet"], "InsertQuote", true);
-	seMenuMgr->addMenuItem(seActions["unicodeQuoteSingleRightGuillemet"], "InsertQuote", true);
-	seMenuMgr->addMenuItem(seActions["unicodeQuoteDoubleLeftGuillemet"], "InsertQuote", true);
-	seMenuMgr->addMenuItem(seActions["unicodeQuoteDoubleRightGuillemet"], "InsertQuote", true);
-	seMenuMgr->addMenuSeparator("InsertQuote");
-	seMenuMgr->addMenuItem(seActions["unicodeQuoteCJKSingleLeft"], "InsertQuote", true);
-	seMenuMgr->addMenuItem(seActions["unicodeQuoteCJKSingleRight"], "InsertQuote", true);
-	seMenuMgr->addMenuItem(seActions["unicodeQuoteCJKDoubleLeft"], "InsertQuote", true);
-	seMenuMgr->addMenuItem(seActions["unicodeQuoteCJKDoubleRight"], "InsertQuote", true);
+	seMenuMgr->addMenuItemString("InsertQuote", "Insert");
+	seMenuMgr->addMenuItemString("unicodeQuoteApostrophe", "InsertQuote");
+	seMenuMgr->addMenuItemString("unicodeQuoteStraight", "InsertQuote");
+	seMenuMgr->addMenuItemString("SEPARATOR", "InsertQuote");
+	seMenuMgr->addMenuItemString("unicodeQuoteSingleLeft", "InsertQuote");
+	seMenuMgr->addMenuItemString("unicodeQuoteSingleRight", "InsertQuote");
+	seMenuMgr->addMenuItemString("unicodeQuoteDoubleLeft", "InsertQuote");
+	seMenuMgr->addMenuItemString("unicodeQuoteDoubleRight", "InsertQuote");
+	seMenuMgr->addMenuItemString("SEPARATOR", "InsertQuote");
+	seMenuMgr->addMenuItemString("unicodeQuoteSingleReversed", "InsertQuote");
+	seMenuMgr->addMenuItemString("unicodeQuoteDoubleReversed", "InsertQuote");
+	seMenuMgr->addMenuItemString("SEPARATOR", "InsertQuote");
+	seMenuMgr->addMenuItemString("unicodeQuoteLowSingleComma", "InsertQuote");
+	seMenuMgr->addMenuItemString("unicodeQuoteLowDoubleComma", "InsertQuote");
+	seMenuMgr->addMenuItemString("SEPARATOR", "InsertQuote");
+	seMenuMgr->addMenuItemString("unicodeQuoteSingleLeftGuillemet", "InsertQuote");
+	seMenuMgr->addMenuItemString("unicodeQuoteSingleRightGuillemet", "InsertQuote");
+	seMenuMgr->addMenuItemString("unicodeQuoteDoubleLeftGuillemet", "InsertQuote");
+	seMenuMgr->addMenuItemString("unicodeQuoteDoubleRightGuillemet", "InsertQuote");
+	seMenuMgr->addMenuItemString("SEPARATOR", "InsertQuote");
+	seMenuMgr->addMenuItemString("unicodeQuoteCJKSingleLeft", "InsertQuote");
+	seMenuMgr->addMenuItemString("unicodeQuoteCJKSingleRight", "InsertQuote");
+	seMenuMgr->addMenuItemString("unicodeQuoteCJKDoubleLeft", "InsertQuote");
+	seMenuMgr->addMenuItemString("unicodeQuoteCJKDoubleRight", "InsertQuote");
 	seMenuMgr->createMenu("InsertSpace", tr("Spaces && Breaks"), "Insert");
-	seMenuMgr->addMenuItem(seActions["unicodeNonBreakingSpace"], "InsertSpace", true);
-	seMenuMgr->addMenuItem(seActions["unicodeSpaceEN"], "InsertSpace", true);
-	seMenuMgr->addMenuItem(seActions["unicodeSpaceEM"], "InsertSpace", true);
-	seMenuMgr->addMenuItem(seActions["unicodeSpaceThin"], "InsertSpace", true);
-	seMenuMgr->addMenuItem(seActions["unicodeSpaceThick"], "InsertSpace", true);
-	seMenuMgr->addMenuItem(seActions["unicodeSpaceMid"], "InsertSpace", true);
-	seMenuMgr->addMenuItem(seActions["unicodeSpaceHair"], "InsertSpace", true);
-	seMenuMgr->addMenuSeparator("InsertSpace");
-	seMenuMgr->addMenuItem(seActions["unicodeNewLine"], "InsertSpace", true);
-	seMenuMgr->addMenuItem(seActions["unicodeFrameBreak"], "InsertSpace", true);
-	seMenuMgr->addMenuItem(seActions["unicodeColumnBreak"], "InsertSpace", true);
+	seMenuMgr->addMenuItemString("InsertSpace", "Insert");
+	seMenuMgr->addMenuItemString("unicodeNonBreakingSpace", "InsertSpace");
+	seMenuMgr->addMenuItemString("unicodeSpaceEN", "InsertSpace");
+	seMenuMgr->addMenuItemString("unicodeSpaceEM", "InsertSpace");
+	seMenuMgr->addMenuItemString("unicodeSpaceThin", "InsertSpace");
+	seMenuMgr->addMenuItemString("unicodeSpaceThick", "InsertSpace");
+	seMenuMgr->addMenuItemString("unicodeSpaceMid", "InsertSpace");
+	seMenuMgr->addMenuItemString("unicodeSpaceHair", "InsertSpace");
+	seMenuMgr->addMenuItemString("SEPARATOR", "InsertSpace");
+	seMenuMgr->addMenuItemString("unicodeNewLine", "InsertSpace");
+	seMenuMgr->addMenuItemString("unicodeFrameBreak", "InsertSpace");
+	seMenuMgr->addMenuItemString("unicodeColumnBreak", "InsertSpace");
 	seMenuMgr->createMenu("InsertLigature", tr("Ligature"), "Insert");
-	seMenuMgr->addMenuItem(seActions["unicodeLigature_ff"], "InsertLigature", true);
-	seMenuMgr->addMenuItem(seActions["unicodeLigature_fi"], "InsertLigature", true);
-	seMenuMgr->addMenuItem(seActions["unicodeLigature_fl"], "InsertLigature", true);
-	seMenuMgr->addMenuItem(seActions["unicodeLigature_ffi"], "InsertLigature", true);
-	seMenuMgr->addMenuItem(seActions["unicodeLigature_ffl"], "InsertLigature", true);
-	seMenuMgr->addMenuItem(seActions["unicodeLigature_ft"], "InsertLigature", true);
-	seMenuMgr->addMenuItem(seActions["unicodeLigature_st"], "InsertLigature", true);
+	seMenuMgr->addMenuItemString("InsertLigature", "Insert");
+	seMenuMgr->addMenuItemString("unicodeLigature_ff", "InsertLigature");
+	seMenuMgr->addMenuItemString("unicodeLigature_fi", "InsertLigature");
+	seMenuMgr->addMenuItemString("unicodeLigature_fl", "InsertLigature");
+	seMenuMgr->addMenuItemString("unicodeLigature_ffi", "InsertLigature");
+	seMenuMgr->addMenuItemString("unicodeLigature_ffl", "InsertLigature");
+	seMenuMgr->addMenuItemString("unicodeLigature_ft", "InsertLigature");
+	seMenuMgr->addMenuItemString("unicodeLigature_st", "InsertLigature");
 
 	seMenuMgr->createMenu("Settings", tr("&Settings"));
-	seMenuMgr->addMenuItem(seActions["settingsBackground"], "Settings", true);
-	seMenuMgr->addMenuItem(seActions["settingsDisplayFont"], "Settings", true);
-//	seMenuMgr->addMenuItem(seActions["settingsSmartTextSelection"], "Settings", true);
-
-	seMenuMgr->addMenuToMenuBar("File");
-	seMenuMgr->addMenuToMenuBar("Edit");
-	seMenuMgr->addMenuToMenuBar("Insert");
-	seMenuMgr->addMenuToMenuBar("Settings");
+	seMenuMgr->addMenuItemString("settingsBackground", "Settings");
+	seMenuMgr->addMenuItemString("settingsDisplayFont", "Settings");
+//	seMenuMgr->addMenuItemString("settingsSmartTextSelection", "Settings");
+
+	seMenuMgr->addMenuStringToMenuBar("File");
+	seMenuMgr->addMenuItemStringstoMenuBar("File", seActions);
+	seMenuMgr->addMenuStringToMenuBar("Edit");
+	seMenuMgr->addMenuItemStringstoMenuBar("Edit", seActions);
+	seMenuMgr->addMenuStringToMenuBar("Insert");
+	seMenuMgr->addMenuItemStringstoMenuBar("Insert", seActions);
+	seMenuMgr->addMenuStringToMenuBar("Settings");
+	seMenuMgr->addMenuItemStringstoMenuBar("Settings", seActions);
 	
 	PluginManager::instance().setupPluginActions(this);
 	PluginManager::instance().languageChange();




More information about the scribus-commit mailing list