r19603 by craig - #12692: Apply patch to enable or disable in a group
scribus-commit
scribus-commit at lists.scribus.net
Tue Oct 21 19:23:42 UTC 2014
Author: craig
Date: Tue Oct 21 19:23:42 2014
New Revision: 19603
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=19603
Log:
#12692: Apply patch to enable or disable in a group
Modified:
trunk/Scribus/scribus/appmodehelper.cpp
trunk/Scribus/scribus/scribus.cpp
trunk/Scribus/scribus/scribus.h
Modified: trunk/Scribus/scribus/appmodehelper.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19603&path=/trunk/Scribus/scribus/appmodehelper.cpp
==============================================================================
--- trunk/Scribus/scribus/appmodehelper.cpp (original)
+++ trunk/Scribus/scribus/appmodehelper.cpp Tue Oct 21 19:23:42 2014
@@ -356,6 +356,9 @@
(*a_scrActions)["itemSendToPattern"]->setEnabled(false);
(*a_scrActions)["itemSendToInline"]->setEnabled(false);
}
+ scmw->enablePalettes(!doc->inAnEditMode());
+ scmw->pageSelector->setEnabled(!doc->inAnEditMode());
+ scmw->layerMenu->setEnabled(!doc->inAnEditMode());
emit AppModeChanged(oldMode, newMode);
a_actMgr->connectModeActions();
PluginManager::instance().enablePluginActionsForSelection(scmw);
@@ -894,6 +897,9 @@
(*a_scrActions)["itemLock"]->setChecked(currItem->locked());
(*a_scrActions)["itemLockSize"]->setChecked(currItem->sizeLocked());
(*a_scrActions)["itemPrintingEnabled"]->setChecked(currItem->printEnabled());
+ scmw->enablePalettes(!inAnEditMode);
+ scmw->pageSelector->setEnabled(!inAnEditMode);
+ scmw->layerMenu->setEnabled(!inAnEditMode);
}
}
Modified: trunk/Scribus/scribus/scribus.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19603&path=/trunk/Scribus/scribus/scribus.cpp
==============================================================================
--- trunk/Scribus/scribus/scribus.cpp (original)
+++ trunk/Scribus/scribus/scribus.cpp Tue Oct 21 19:23:42 2014
@@ -5653,6 +5653,22 @@
view->requestMode(i);
}
+void ScribusMainWindow::enablePalettes(bool b)
+{
+ if(doc->appMode == modeEdit) //Keep Palettes enabled when editing text
+ return;
+ layerPalette->setEnabled(b);
+ outlinePalette->setEnabled(b);
+ guidePalette->setEnabled(b);
+ scrapbookPalette->setEnabled(b);
+ pagePalette->setEnabled(b);
+ bookmarkPalette->setEnabled(b);
+ docCheckerPalette->setEnabled(b);
+ inlinePalette->setEnabled(b);
+ symbolPalette->setEnabled(b);
+ alignDistributePalette->setEnabled(b);
+}
+
void ScribusMainWindow::ToggleFrameEdit()
{
if (!doc)
@@ -5674,17 +5690,8 @@
connect(view, SIGNAL(PolyStatus(int, uint)), nodePalette, SLOT(PolyStatus(int, uint)));
doc->nodeEdit.reset();
appModeHelper->setFrameEditMode(true);
- layerPalette->setEnabled(false);
- outlinePalette->setEnabled(false);
- guidePalette->setEnabled(false);
- scrapbookPalette->setEnabled(false);
- pagePalette->setEnabled(false);
- bookmarkPalette->setEnabled(false);
- docCheckerPalette->setEnabled(false);
- inlinePalette->setEnabled(false);
- symbolPalette->setEnabled(false);
+ enablePalettes(false);
styleManager->setEnabled(false);
- alignDistributePalette->setEnabled(false);
pageSelector->setEnabled(false);
layerMenu->setEnabled(false);
if (!doc->m_Selection->isEmpty())
@@ -5729,17 +5736,8 @@
scrActions["toolsSelect"]->setChecked(true);
scrActions["toolsEditContents"]->setChecked(false);
scrActions["toolsEditWithStoryEditor"]->setChecked(false);
- layerPalette->setEnabled(true);
- outlinePalette->setEnabled(true);
- guidePalette->setEnabled(true);
- scrapbookPalette->setEnabled(true);
- pagePalette->setEnabled(true);
- bookmarkPalette->setEnabled(true);
- docCheckerPalette->setEnabled(true);
+ enablePalettes(true);
styleManager->setEnabled(true);
- alignDistributePalette->setEnabled(true);
- symbolPalette->setEnabled(true);
- inlinePalette->setEnabled(true);
pageSelector->setEnabled(true);
layerMenu->setEnabled(true);
if (HaveDoc)
Modified: trunk/Scribus/scribus/scribus.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19603&path=/trunk/Scribus/scribus/scribus.h
==============================================================================
--- trunk/Scribus/scribus/scribus.h (original)
+++ trunk/Scribus/scribus/scribus.h Tue Oct 21 19:23:42 2014
@@ -575,6 +575,7 @@
void testQT_slot4();
//void adjustCMS();
void changePreviewQuality(int index);
+ void enablePalettes(bool b);
void ToggleFrameEdit();
void NoFrameEdit();
More information about the scribus-commit
mailing list