r23953 by jghali - #16190: When starting scribus with no documents, the status bar widgets are not disabled
scribus-commit
scribus-commit at lists.scribus.net
Tue Jul 28 19:12:15 UTC 2020
Author: jghali
Date: Tue Jul 28 19:12:15 2020
New Revision: 23953
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=23953
Log:
#16190: When starting scribus with no documents, the status bar widgets are not disabled
Modified:
trunk/Scribus/scribus/appmodehelper.cpp
trunk/Scribus/scribus/scribus.cpp
Modified: trunk/Scribus/scribus/appmodehelper.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23953&path=/trunk/Scribus/scribus/appmodehelper.cpp
==============================================================================
--- trunk/Scribus/scribus/appmodehelper.cpp (original)
+++ trunk/Scribus/scribus/appmodehelper.cpp Tue Jul 28 19:12:15 2020
@@ -1756,6 +1756,15 @@
(*a_scrActions)["tableDistributeColumnsEvenly"]->setEnabled(false);
(*a_scrActions)["tableAdjustFrameToTable"]->setEnabled(false);
(*a_scrActions)["tableAdjustTableToFrame"]->setEnabled(false);
+
+ ScribusMainWindow* scMW = ScCore->primaryMainWindow();
+ scMW->unitSwitcher->setEnabled(false);
+ scMW->zoomSpinBox->setEnabled(false);
+ scMW->zoomDefaultToolbarButton->setEnabled(false);
+ scMW->zoomOutToolbarButton->setEnabled(false);
+ scMW->zoomInToolbarButton->setEnabled(false);
+ scMW->pageSelector->setEnabled(false);
+ scMW->layerMenu->setEnabled(false);
}
void AppModeHelper::setPreviewMode(bool b)
@@ -1951,5 +1960,14 @@
(*a_scrActions)["tableDistributeColumnsEvenly"]->setEnabled(false);
(*a_scrActions)["tableAdjustFrameToTable"]->setEnabled(false);
(*a_scrActions)["tableAdjustTableToFrame"]->setEnabled(false);
-}
-
+
+ ScribusMainWindow* scMW = ScCore->primaryMainWindow();
+ scMW->unitSwitcher->setEnabled(false);
+ scMW->zoomSpinBox->setEnabled(false);
+ scMW->zoomDefaultToolbarButton->setEnabled(false);
+ scMW->zoomOutToolbarButton->setEnabled(false);
+ scMW->zoomInToolbarButton->setEnabled(false);
+ scMW->pageSelector->setEnabled(false);
+ scMW->layerMenu->setEnabled(false);
+}
+
Modified: trunk/Scribus/scribus/scribus.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23953&path=/trunk/Scribus/scribus/scribus.cpp
==============================================================================
--- trunk/Scribus/scribus/scribus.cpp (original)
+++ trunk/Scribus/scribus/scribus.cpp Tue Jul 28 19:12:15 2020
@@ -2618,11 +2618,17 @@
disconnect(doc, SIGNAL(addBookmark(PageItem *)), this, SLOT(AddBookMark(PageItem *)));
disconnect(doc, SIGNAL(deleteBookmark(PageItem *)), this, SLOT(DelBookMark(PageItem *)));
unitSwitcher->disconnect();
+ unitSwitcher->setEnabled(false);
zoomSpinBox->disconnect();
+ zoomSpinBox->setEnabled(false);
zoomDefaultToolbarButton->disconnect();
+ zoomDefaultToolbarButton->setEnabled(false);
zoomOutToolbarButton->disconnect();
+ zoomDefaultToolbarButton->setEnabled(false);
zoomInToolbarButton->disconnect();
+ zoomInToolbarButton->setEnabled(false);
layerMenu->disconnect();
+ layerMenu->setEnabled(false);
disconnect(viewToolBar->previewQualitySwitcher, SIGNAL(activated(int)), this, SLOT(changePreviewQuality(int)));
disconnect(viewToolBar->visualMenu, SIGNAL(activated(int)), doc->view(), SLOT(switchPreviewVisual(int)));
pageSelector->disconnect();
@@ -2638,11 +2644,17 @@
connect(doc, SIGNAL(addBookmark(PageItem*)), this, SLOT(AddBookMark(PageItem*)));
connect(doc, SIGNAL(deleteBookmark(PageItem*)), this, SLOT(DelBookMark(PageItem*)));
connect(unitSwitcher, SIGNAL(activated(int)), doc->view(), SLOT(ChgUnit(int)));
+ unitSwitcher->setEnabled(true);
connect(zoomSpinBox, SIGNAL(valueChanged(double)), doc->view(), SLOT(setZoom()));
+ zoomSpinBox->setEnabled(true);
connect(zoomDefaultToolbarButton, SIGNAL(clicked()), doc->view(), SLOT(slotZoom100()));
+ zoomDefaultToolbarButton->setEnabled(true);
connect(zoomOutToolbarButton, SIGNAL(clicked()), doc->view(), SLOT(slotZoomOut()));
+ zoomOutToolbarButton->setEnabled(true);
connect(zoomInToolbarButton, SIGNAL(clicked()), doc->view(), SLOT(slotZoomIn()));
+ zoomInToolbarButton->setEnabled(true);
connect(layerMenu, SIGNAL(activated(int)), doc->view(), SLOT(GotoLayer(int)));
+ layerMenu->setEnabled(true);
scrActions["viewPreviewMode"]->blockSignals(true);
scrActions["viewPreviewMode"]->setChecked(doc->drawAsPreview);
scrActions["viewPreviewMode"]->blockSignals(false);
@@ -6209,7 +6221,7 @@
view->deselectItems(true);
if (doc->Pages->count() == 1)
return;
- deletePage(pg+1, pg+1);
+ deletePage(pg + 1, pg + 1);
}
void ScribusMainWindow::deletePage()
More information about the scribus-commit
mailing list