r22813 by jghali - #15546: cannot add plugins to some of the menus
scribus-commit
scribus-commit at lists.scribus.net
Wed Jan 23 02:02:32 UTC 2019
Author: jghali
Date: Wed Jan 23 02:02:32 2019
New Revision: 22813
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=22813
Log:
#15546: cannot add plugins to some of the menus
Modified:
trunk/Scribus/scribus/actionmanager.cpp
trunk/Scribus/scribus/actionmanager.h
trunk/Scribus/scribus/pluginmanager.cpp
Modified: trunk/Scribus/scribus/actionmanager.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22813&path=/trunk/Scribus/scribus/actionmanager.cpp
==============================================================================
--- trunk/Scribus/scribus/actionmanager.cpp (original)
+++ trunk/Scribus/scribus/actionmanager.cpp Wed Jan 23 02:02:32 2019
@@ -106,6 +106,7 @@
initItemMenuActions();
initInsertMenuActions();
initPageMenuActions();
+ initTableMenuActions();
initViewMenuActions();
initToolsMenuActions();
initExtrasMenuActions();
@@ -453,31 +454,7 @@
scrActions->insert(name, new ScrAction("", defaultKey(name), mainWindow));
name="itemUpdateImage";
scrActions->insert(name, new ScrAction("", defaultKey(name), mainWindow));
- name="tableInsertRows";
- scrActions->insert(name, new ScrAction(im->loadPixmap("16/insert-table-rows.png"), im->loadPixmap("22/insert-table-rows.png"), "", defaultKey(name), mainWindow));
- name="tableInsertColumns";
- scrActions->insert(name, new ScrAction(im->loadPixmap("16/insert-table-columns.png"), im->loadPixmap("22/insert-table-columns.png"), "", defaultKey(name), mainWindow));
- name="tableDeleteRows";
- scrActions->insert(name, new ScrAction(im->loadPixmap("16/delete-table-rows.png"), im->loadPixmap("22/delete-table-rows.png"), "", defaultKey(name), mainWindow));
- name="tableDeleteColumns";
- scrActions->insert(name, new ScrAction(im->loadPixmap("16/delete-table-columns.png"), im->loadPixmap("22/delete-table-columns.png"), "", defaultKey(name), mainWindow));
- name="tableMergeCells";
- scrActions->insert(name, new ScrAction(im->loadPixmap("16/merge-table-cells.png"), im->loadPixmap("22/merge-table-cells.png"), "", defaultKey(name), mainWindow));
- name="tableSplitCells";
- scrActions->insert(name, new ScrAction(im->loadPixmap("16/split-table-cells.png"), im->loadPixmap("22/split-table-cells.png"), "", defaultKey(name), mainWindow));
- name="tableSetRowHeights";
- scrActions->insert(name, new ScrAction("", defaultKey(name), mainWindow));
- name="tableSetColumnWidths";
- scrActions->insert(name, new ScrAction("", defaultKey(name), mainWindow));
- name="tableDistributeRowsEvenly";
- scrActions->insert(name, new ScrAction("", defaultKey(name), mainWindow));
- name="tableDistributeColumnsEvenly";
- scrActions->insert(name, new ScrAction("", defaultKey(name), mainWindow));
- name="tableAdjustFrameToTable";
- scrActions->insert(name, new ScrAction("", defaultKey(name), mainWindow));
name="itemAdjustFrameHeightToText";
- scrActions->insert(name, new ScrAction("", defaultKey(name), mainWindow));
- name = "tableAdjustTableToFrame";
scrActions->insert(name, new ScrAction("", defaultKey(name), mainWindow));
name="itemAdjustFrameToImage";
scrActions->insert(name, new ScrAction("", defaultKey(name), mainWindow));
@@ -646,6 +623,36 @@
connect( (*scrActions)["pageApplyMasterPage"], SIGNAL(triggered()), mainWindow, SLOT(ApplyMasterPage()) );
connect( (*scrActions)["pageCopyToMasterPage"], SIGNAL(triggered()), mainWindow, SLOT(duplicateToMasterPage()) );
connect( (*scrActions)["pageManageProperties"], SIGNAL(triggered()), mainWindow, SLOT(changePageProperties()) );
+}
+
+void ActionManager::initTableMenuActions()
+{
+ QString name;
+
+ name = "tableInsertRows";
+ scrActions->insert(name, new ScrAction(im->loadPixmap("16/insert-table-rows.png"), im->loadPixmap("22/insert-table-rows.png"), "", defaultKey(name), mainWindow));
+ name = "tableInsertColumns";
+ scrActions->insert(name, new ScrAction(im->loadPixmap("16/insert-table-columns.png"), im->loadPixmap("22/insert-table-columns.png"), "", defaultKey(name), mainWindow));
+ name = "tableDeleteRows";
+ scrActions->insert(name, new ScrAction(im->loadPixmap("16/delete-table-rows.png"), im->loadPixmap("22/delete-table-rows.png"), "", defaultKey(name), mainWindow));
+ name = "tableDeleteColumns";
+ scrActions->insert(name, new ScrAction(im->loadPixmap("16/delete-table-columns.png"), im->loadPixmap("22/delete-table-columns.png"), "", defaultKey(name), mainWindow));
+ name = "tableMergeCells";
+ scrActions->insert(name, new ScrAction(im->loadPixmap("16/merge-table-cells.png"), im->loadPixmap("22/merge-table-cells.png"), "", defaultKey(name), mainWindow));
+ name = "tableSplitCells";
+ scrActions->insert(name, new ScrAction(im->loadPixmap("16/split-table-cells.png"), im->loadPixmap("22/split-table-cells.png"), "", defaultKey(name), mainWindow));
+ name = "tableSetRowHeights";
+ scrActions->insert(name, new ScrAction("", defaultKey(name), mainWindow));
+ name = "tableSetColumnWidths";
+ scrActions->insert(name, new ScrAction("", defaultKey(name), mainWindow));
+ name = "tableDistributeRowsEvenly";
+ scrActions->insert(name, new ScrAction("", defaultKey(name), mainWindow));
+ name = "tableDistributeColumnsEvenly";
+ scrActions->insert(name, new ScrAction("", defaultKey(name), mainWindow));
+ name = "tableAdjustFrameToTable";
+ scrActions->insert(name, new ScrAction("", defaultKey(name), mainWindow));
+ name = "tableAdjustTableToFrame";
+ scrActions->insert(name, new ScrAction("", defaultKey(name), mainWindow));
}
void ActionManager::initViewMenuActions()
Modified: trunk/Scribus/scribus/actionmanager.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22813&path=/trunk/Scribus/scribus/actionmanager.h
==============================================================================
--- trunk/Scribus/scribus/actionmanager.h (original)
+++ trunk/Scribus/scribus/actionmanager.h Wed Jan 23 02:02:32 2019
@@ -98,6 +98,7 @@
void initItemMenuActions();
void initInsertMenuActions();
void initPageMenuActions();
+ void initTableMenuActions();
void initViewMenuActions();
void initToolsMenuActions();
void initExtrasMenuActions();
Modified: trunk/Scribus/scribus/pluginmanager.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22813&path=/trunk/Scribus/scribus/pluginmanager.cpp
==============================================================================
--- trunk/Scribus/scribus/pluginmanager.cpp (original)
+++ trunk/Scribus/scribus/pluginmanager.cpp Wed Jan 23 02:02:32 2019
@@ -354,12 +354,22 @@
//CB maybe we should just call mw->createMenuBar() here instead...
mw->scrMenuMgr->clearMenu("File");
mw->scrMenuMgr->addMenuItemStringstoMenuBar("File", mw->scrActions);
+ mw->scrMenuMgr->clearMenu("Edit");
+ mw->scrMenuMgr->addMenuItemStringstoMenuBar("Edit", mw->scrActions);
mw->scrMenuMgr->clearMenu("Insert");
mw->scrMenuMgr->addMenuItemStringstoMenuBar("Insert", mw->scrActions);
mw->scrMenuMgr->clearMenu("Item");
mw->scrMenuMgr->addMenuItemStringstoMenuBar("Item", mw->scrActions);
+ mw->scrMenuMgr->clearMenu("Page");
+ mw->scrMenuMgr->addMenuItemStringstoMenuBar("Page", mw->scrActions);
+ mw->scrMenuMgr->clearMenu("ItemTable");
+ mw->scrMenuMgr->addMenuItemStringstoMenuBar("ItemTable", mw->scrActions);
mw->scrMenuMgr->clearMenu("Extras");
mw->scrMenuMgr->addMenuItemStringstoMenuBar("Extras", mw->scrActions);
+ mw->scrMenuMgr->clearMenu("View");
+ mw->scrMenuMgr->addMenuItemStringstoMenuBar("View", mw->scrActions);
+ mw->scrMenuMgr->clearMenu("Help");
+ mw->scrMenuMgr->addMenuItemStringstoMenuBar("Help", mw->scrActions);
return true;
}
More information about the scribus-commit
mailing list