r19852 by craig - enum the guide status codes

scribus-commit scribus-commit at lists.scribus.net
Sun Feb 22 17:34:18 UTC 2015


Author: craig
Date: Sun Feb 22 17:34:18 2015
New Revision: 19852

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=19852
Log:
enum the guide status codes

Modified:
    trunk/Scribus/scribus/scribus.cpp
    trunk/Scribus/scribus/scribusstructs.h
    trunk/Scribus/scribus/ui/about.cpp

Modified: trunk/Scribus/scribus/scribus.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19852&path=/trunk/Scribus/scribus/scribus.cpp
==============================================================================
--- trunk/Scribus/scribus/scribus.cpp (original)
+++ trunk/Scribus/scribus/scribus.cpp Sun Feb 22 17:34:18 2015
@@ -534,7 +534,7 @@
 	for (int i=0; i<11 ; ++i)
 		palettesStatus[i] = false;
 	for (int i=0; i<13 ; ++i)
-		guidesStatus[0] = false;
+		guidesStatus[GS_ALL] = false;
 #ifdef HAVE_OSG
 	QStringList supportedExts;
 	supportedExts << "osg" << "dxf" << "flt" << "ive" << "geo" << "sta" << "stl" << "logo" << "3ds" << "ac" << "obj";
@@ -5474,21 +5474,21 @@
 	if (!doc)
 		return;
 	keyrep=false;
-	if (guidesStatus[0])
-	{
-		guidesStatus[0] = false;
-		doc->guidesPrefs().marginsShown = guidesStatus[1];
-		doc->guidesPrefs().framesShown = guidesStatus[2];
-		doc->guidesPrefs().gridShown = guidesStatus[3];
-		doc->guidesPrefs().guidesShown = guidesStatus[4];
-		doc->guidesPrefs().baselineGridShown = guidesStatus[5];
-		doc->guidesPrefs().linkShown = guidesStatus[6];
-		doc->guidesPrefs().showControls = guidesStatus[7];
-		doc->guidesPrefs().rulerMode = guidesStatus[8];
-		doc->guidesPrefs().rulersShown = guidesStatus[9];
-		doc->guidesPrefs().colBordersShown = guidesStatus[10];
-		doc->guidesPrefs().layerMarkersShown = guidesStatus[11] ;
-		doc->guidesPrefs().showBleed = guidesStatus[12] ;
+	if (guidesStatus[GS_ALL])
+	{
+		guidesStatus[GS_ALL] = false;
+		doc->guidesPrefs().marginsShown = guidesStatus[GS_MARGINS];
+		doc->guidesPrefs().framesShown = guidesStatus[GS_FRAMES];
+		doc->guidesPrefs().gridShown = guidesStatus[GS_GRID];
+		doc->guidesPrefs().guidesShown = guidesStatus[GS_GUIDES];
+		doc->guidesPrefs().baselineGridShown = guidesStatus[GS_BASELINE];
+		doc->guidesPrefs().linkShown = guidesStatus[GS_LINKS];
+		doc->guidesPrefs().showControls = guidesStatus[GS_CONTROLS];
+		doc->guidesPrefs().rulerMode = guidesStatus[GS_RULERMODE];
+		doc->guidesPrefs().rulersShown = guidesStatus[GS_RULERS];
+		doc->guidesPrefs().colBordersShown = guidesStatus[GS_COLUMNBORDERS];
+		doc->guidesPrefs().layerMarkersShown = guidesStatus[GS_LAYERMARKERS] ;
+		doc->guidesPrefs().showBleed = guidesStatus[GS_BLEED];
 		ToggleMarks();
 		ToggleFrames();
 		ToggleLayerMarkers();
@@ -5504,19 +5504,19 @@
 	}
 	else
 	{
-		guidesStatus[0] = true;
-		guidesStatus[1] = !doc->guidesPrefs().marginsShown;
-		guidesStatus[2] = !doc->guidesPrefs().framesShown;
-		guidesStatus[3] = !doc->guidesPrefs().gridShown;
-		guidesStatus[4] = !doc->guidesPrefs().guidesShown;
-		guidesStatus[5] = !doc->guidesPrefs().baselineGridShown;
-		guidesStatus[6] = !doc->guidesPrefs().linkShown;
-		guidesStatus[7] = !doc->guidesPrefs().showControls;
-		guidesStatus[8] = !doc->guidesPrefs().rulerMode;
-		guidesStatus[9] = !doc->guidesPrefs().rulersShown;
-		guidesStatus[10] = !doc->guidesPrefs().colBordersShown;
-		guidesStatus[11] = !doc->guidesPrefs().layerMarkersShown;
-		guidesStatus[12] = !doc->guidesPrefs().showBleed;
+		guidesStatus[GS_ALL] = true;
+		guidesStatus[GS_MARGINS] = !doc->guidesPrefs().marginsShown;
+		guidesStatus[GS_FRAMES] = !doc->guidesPrefs().framesShown;
+		guidesStatus[GS_GRID] = !doc->guidesPrefs().gridShown;
+		guidesStatus[GS_GUIDES] = !doc->guidesPrefs().guidesShown;
+		guidesStatus[GS_BASELINE] = !doc->guidesPrefs().baselineGridShown;
+		guidesStatus[GS_LINKS] = !doc->guidesPrefs().linkShown;
+		guidesStatus[GS_CONTROLS] = !doc->guidesPrefs().showControls;
+		guidesStatus[GS_RULERMODE] = !doc->guidesPrefs().rulerMode;
+		guidesStatus[GS_RULERS] = !doc->guidesPrefs().rulersShown;
+		guidesStatus[GS_COLUMNBORDERS] = !doc->guidesPrefs().colBordersShown;
+		guidesStatus[GS_LAYERMARKERS] = !doc->guidesPrefs().layerMarkersShown;
+		guidesStatus[GS_BLEED] = !doc->guidesPrefs().showBleed;
 		doc->guidesPrefs().marginsShown = false;
 		doc->guidesPrefs().framesShown = false;
 		doc->guidesPrefs().gridShown = false;
@@ -5550,7 +5550,7 @@
 {
 	if (!doc)
 		return;
-	guidesStatus[0] = false;
+	guidesStatus[GS_ALL] = false;
 	doc->guidesPrefs().marginsShown = !doc->guidesPrefs().marginsShown;
 	view->DrawNew();
 }
@@ -5559,7 +5559,7 @@
 {
 	if (!doc)
 		return;
-	guidesStatus[0] = false;
+	guidesStatus[GS_ALL] = false;
 	doc->guidesPrefs().showBleed = !doc->guidesPrefs().showBleed;
 	view->DrawNew();
 }
@@ -5568,7 +5568,7 @@
 {
 	if (!doc)
 		return;
-	guidesStatus[0] = false;
+	guidesStatus[GS_ALL] = false;
 	doc->guidesPrefs().framesShown = !doc->guidesPrefs().framesShown;
 	view->DrawNew();
 }
@@ -5577,7 +5577,7 @@
 {
 	if (!doc)
 		return;
-	guidesStatus[0] = false;
+	guidesStatus[GS_ALL] = false;
 	doc->guidesPrefs().layerMarkersShown = !doc->guidesPrefs().layerMarkersShown;
 	view->DrawNew();
 }
@@ -5586,7 +5586,7 @@
 {
 	if (!doc)
 		return;
-	guidesStatus[0] = false;
+	guidesStatus[GS_ALL] = false;
 	doc->guidesPrefs().gridShown = !doc->guidesPrefs().gridShown;
 	view->DrawNew();
 }
@@ -5595,7 +5595,7 @@
 {
 	if (!doc)
 		return;
-	guidesStatus[0] = false;
+	guidesStatus[GS_ALL] = false;
 	doc->guidesPrefs().guidesShown = !doc->guidesPrefs().guidesShown;
 	view->DrawNew();
 }
@@ -5604,7 +5604,7 @@
 {
 	if (!doc)
 		return;
-	guidesStatus[0] = false;
+	guidesStatus[GS_ALL] = false;
 	doc->guidesPrefs().colBordersShown = !doc->guidesPrefs().colBordersShown;
 	view->DrawNew();
 }
@@ -5613,7 +5613,7 @@
 {
 	if (!doc)
 		return;
-	guidesStatus[0] = false;
+	guidesStatus[GS_ALL] = false;
 	doc->guidesPrefs().baselineGridShown = !doc->guidesPrefs().baselineGridShown;
 	view->DrawNew();
 }
@@ -5622,7 +5622,7 @@
 {
 	if (!doc)
 		return;
-	guidesStatus[0] = false;
+	guidesStatus[GS_ALL] = false;
 	doc->guidesPrefs().linkShown = !doc->guidesPrefs().linkShown;
 	view->DrawNew();
 }
@@ -5631,7 +5631,7 @@
 {
 	if (!doc)
 		return;
-	guidesStatus[0] = false;
+	guidesStatus[GS_ALL] = false;
 	doc->guidesPrefs().showControls = !doc->guidesPrefs().showControls;
 	view->DrawNew();
 }
@@ -5640,7 +5640,7 @@
 {
 	if (!doc)
 		return;
-	guidesStatus[0] = false;
+	guidesStatus[GS_ALL] = false;
 	doc->guidesPrefs().rulersShown = !doc->guidesPrefs().rulersShown;
 	view->setRulersShown(doc->guidesPrefs().rulersShown);
 }
@@ -5649,7 +5649,7 @@
 {
 	if (!doc)
 		return;
-	guidesStatus[0] = false;
+	guidesStatus[GS_ALL] = false;
 	doc->guidesPrefs().rulerMode = !doc->guidesPrefs().rulerMode;
 	if (doc->guidesPrefs().rulerMode)
 	{

Modified: trunk/Scribus/scribus/scribusstructs.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19852&path=/trunk/Scribus/scribus/scribusstructs.h
==============================================================================
--- trunk/Scribus/scribus/scribusstructs.h (original)
+++ trunk/Scribus/scribus/scribusstructs.h Sun Feb 22 17:34:18 2015
@@ -397,5 +397,22 @@
 	DownloadState state;
 };
 
+enum
+{
+	GS_ALL,
+	GS_MARGINS,
+	GS_FRAMES,
+	GS_GRID,
+	GS_GUIDES,
+	GS_BASELINE,
+	GS_LINKS,
+	GS_CONTROLS,
+	GS_RULERMODE,
+	GS_RULERS,
+	GS_COLUMNBORDERS,
+	GS_LAYERMARKERS,
+	GS_BLEED
+};
+
 #endif
 

Modified: trunk/Scribus/scribus/ui/about.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19852&path=/trunk/Scribus/scribus/ui/about.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/about.cpp (original)
+++ trunk/Scribus/scribus/ui/about.cpp Sun Feb 22 17:34:18 2015
@@ -115,7 +115,7 @@
 	buildID = new QLabel( tab );
 	buildID->setAlignment(Qt::AlignCenter);
 	buildID->setTextInteractionFlags(Qt::TextSelectableByMouse);
-	QString BUILD_DAY = "07";
+	QString BUILD_DAY = "22";
 	QString BUILD_MONTH = CommonStrings::february;
 	QString BUILD_YEAR = "2015";
 	QString BUILD_TIME = "";




More information about the scribus-commit mailing list