r18539 by craig - Make send to scrapbook work again from the main menu
scribus-commit
scribus-commit at lists.scribus.net
Wed Oct 9 21:30:10 UTC 2013
Author: craig
Date: Wed Oct 9 21:30:10 2013
New Revision: 18539
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=18539
Log:
Make send to scrapbook work again from the main menu
Modified:
trunk/Scribus/scribus/menumanager.cpp
trunk/Scribus/scribus/scribus.cpp
Modified: trunk/Scribus/scribus/menumanager.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18539&path=/trunk/Scribus/scribus/menumanager.cpp
==============================================================================
--- trunk/Scribus/scribus/menumanager.cpp (original)
+++ trunk/Scribus/scribus/menumanager.cpp Wed Oct 9 21:30:10 2013
@@ -33,6 +33,7 @@
menuStrings.clear();
recentFileMenu=NULL;
editPasteRecentMenu=NULL;
+ itemSendtoScrapbookMenu=NULL;
windowsMenu=NULL;
}
@@ -197,10 +198,6 @@
{
itemLayerMenu=subMenu;
}
- else if (menuStrings[menuName].at(i)=="itemSendToScrapbook")
- {
- itemSendtoScrapbookMenu=subMenu;
- }
addMenuItemStringstoMenu(menuStrings[menuName].at(i), subMenu, menuActions);
}
}
@@ -231,7 +228,13 @@
{
QMenu *subMenu=menuToAddTo->addMenu(menuStringTexts[menuStrings[menuName].at(i)]);
if (subMenu)
+ {
+ if (menuStrings[menuName].at(i)=="ItemSendToScrapbook")
+ {
+ itemSendtoScrapbookMenu=subMenu;
+ }
addMenuItemStringstoMenu(menuStrings[menuName].at(i), subMenu, menuActions);
+ }
}
}
}
@@ -252,6 +255,13 @@
for( QMap<QString, QPointer<ScrAction> >::ConstIterator it = menuActions.begin(); it!=menuActions.end(); ++it )
windowsMenu->addAction(*it);
}
+ else if (menuName=="ItemSendToScrapbook" && itemSendtoScrapbookMenu!=NULL)
+ {
+ for( QMap<QString, QPointer<ScrAction> >::ConstIterator it = menuActions.begin(); it!=menuActions.end(); ++it )
+ {
+ itemSendtoScrapbookMenu->addAction(*it);
+ }
+ }
}
void MenuManager::clearMenuStrings(const QString &menuName)
@@ -263,6 +273,10 @@
else if (menuName=="Windows" && windowsMenu!=NULL)
{
windowsMenu->clear();
+ }
+ else if (menuName=="ItemSendToScrapbook" && itemSendtoScrapbookMenu!=NULL)
+ {
+ itemSendtoScrapbookMenu->clear();
}
}
Modified: trunk/Scribus/scribus/scribus.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18539&path=/trunk/Scribus/scribus/scribus.cpp
==============================================================================
--- trunk/Scribus/scribus/scribus.cpp (original)
+++ trunk/Scribus/scribus/scribus.cpp Wed Oct 9 21:30:10 2013
@@ -818,12 +818,12 @@
scrMenuMgr->addMenuItemString("itemLowerToBottom", "Locking");
scrMenuMgr->createMenu("ItemLayer", tr("Send to La&yer"));
scrMenuMgr->addMenuItemString("ItemLayer", "Item");
- scrMenuMgr->addMenuToMenu("ItemLayer", "Item");
+// scrMenuMgr->addMenuToMenu("ItemLayer", "Item");
scrMenuMgr->createMenu("SendTo", tr("Send to"), "Item");
scrMenuMgr->addMenuItemString("SendTo", "Item");
- scrMenuMgr->createMenu("itemSendToScrapbook", tr("Scrapbook"));
- scrMenuMgr->addMenuItemString("itemSendToScrapbook", "SendTo");
- scrMenuMgr->addMenuToMenu("itemSendToScrapbook", "SendTo");
+ scrMenuMgr->createMenu("ItemSendToScrapbook", tr("Scrapbook"));
+ scrMenuMgr->addMenuItemString("ItemSendToScrapbook", "SendTo");
+// scrMenuMgr->addMenuToMenu("itemSendToScrapbook", "SendTo");
scrMenuMgr->addMenuItemString("itemSendToPattern", "SendTo");
scrMenuMgr->addMenuItemString("itemSendToInline", "SendTo");
scrMenuMgr->createMenu("Adjust", tr("Adjust"), "Item");
@@ -845,7 +845,7 @@
scrMenuMgr->addMenuItemString("itemPreviewNormal", "ItemPreviewSettings");
scrMenuMgr->addMenuItemString("itemPreviewFull", "ItemPreviewSettings");
scrMenuMgr->createMenu("ItemPDFOptions", tr("&PDF Options"));
- scrMenuMgr->addMenuToMenu("ItemPDFOptions", "Item");
+// scrMenuMgr->addMenuToMenu("ItemPDFOptions", "Item");
scrMenuMgr->addMenuItemString("ItemPDFOptions", "Item");
scrMenuMgr->addMenuItemString("itemPDFIsAnnotation", "ItemPDFOptions");
scrMenuMgr->addMenuItemString("itemPDFIsBookmark", "ItemPDFOptions");
@@ -881,7 +881,7 @@
scrMenuMgr->addMenuItemString("itemWeld", "Weld");
scrMenuMgr->addMenuItemString("itemEditWeld", "Weld");
- scrMenuMgr->addMenuItem(scrActions["editMark"], "Item", false);
+ //scrMenuMgr->addMenuItem(scrActions["editMark"], "Item", false);
scrMenuMgr->addMenuItemString("editMark", "Item");
//Insert menu
@@ -3302,16 +3302,15 @@
updateItemLayerList();
QStringList scrapNames = scrapbookPalette->getOpenScrapbooksNames();
scrapNames.removeAt(1);
- for( QMap<QString, QPointer<ScrAction> >::Iterator it0s = scrScrapActions.begin(); it0s != scrScrapActions.end(); ++it0s )
- scrMenuMgr->removeMenuItem((*it0s), "itemSendToScrapbook");
+ scrMenuMgr->clearMenuStrings("itemSendToScrapbook");
scrScrapActions.clear();
for (int i = 0; i < scrapNames.count(); i++)
{
ScrAction *act = new ScrAction( ScrAction::DataInt, QPixmap(), QPixmap(), scrapNames[i], QKeySequence(), this, i);
scrScrapActions.insert(scrapNames[i], act);
- scrMenuMgr->addMenuItem(act, "itemSendToScrapbook", true);
connect(act, SIGNAL(triggeredData(int)), this, SLOT(PutScrap(int)));
}
+ scrMenuMgr->addMenuItemStringstoSpecialMenu("ItemSendToScrapbook", scrScrapActions);
//propertiesPalette->textFlowsAroundFrame->setChecked(currItem->textFlowsAroundFrame());
propertiesPalette->setTextFlowMode(currItem->textFlowMode());
scrActions["itemLock"]->setEnabled(true);
More information about the scribus-commit
mailing list