r21926 by craig - Rename PaintManager to ColorsAndFills because Paint doesnt match the GUI or design at this point

scribus-commit scribus-commit at lists.scribus.net
Mon Apr 17 16:11:14 UTC 2017


Author: craig
Date: Mon Apr 17 16:11:14 2017
New Revision: 21926

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=21926
Log:
Rename PaintManager to ColorsAndFills because Paint doesnt match the GUI or design at this point

Added:
    trunk/Scribus/scribus/ui/colorsandfills.cpp
      - copied, changed from r21925, trunk/Scribus/scribus/ui/paintmanager.cpp
    trunk/Scribus/scribus/ui/colorsandfills.h
      - copied, changed from r21925, trunk/Scribus/scribus/ui/paintmanager.h
    trunk/Scribus/scribus/ui/colorsandfillsbase.ui
      - copied, changed from r21925, trunk/Scribus/scribus/ui/paintmanagerbase.ui
Modified:
    trunk/Scribus/scribus/CMakeLists.txt
    trunk/Scribus/scribus/actionmanager.cpp
    trunk/Scribus/scribus/loadsaveplugin.cpp
    trunk/Scribus/scribus/plugins/barcodegenerator/barcodegenerator.cpp
    trunk/Scribus/scribus/plugins/colorwheel/cwdialog.cpp
    trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp
    trunk/Scribus/scribus/scribus.cpp
    trunk/Scribus/scribus/scribus.h
    trunk/Scribus/scribus/ui/paintmanager.cpp
    trunk/Scribus/scribus/ui/paintmanager.h
    trunk/Scribus/scribus/ui/paintmanagerbase.ui

Modified: trunk/Scribus/scribus/CMakeLists.txt
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21926&path=/trunk/Scribus/scribus/CMakeLists.txt
==============================================================================
--- trunk/Scribus/scribus/CMakeLists.txt	(original)
+++ trunk/Scribus/scribus/CMakeLists.txt	Mon Apr 17 16:11:14 2017
@@ -101,6 +101,7 @@
 	ui/cmsprefsbase.ui
 	ui/cmykfwbase.ui
 	ui/colorpalette.ui
+	ui/colorsandfillsbase.ui
 	ui/downloadspalettebase.ui
 	ui/gradientaddedit.ui
 	ui/gradienteditor.ui
@@ -127,7 +128,6 @@
 	ui/pageitemattributes.ui
 	ui/pagepalette_pagesbase.ui
 	ui/pagepalette_masterpagesbase.ui
-	ui/paintmanagerbase.ui
 	ui/picsearch.ui
 	ui/picsearchoptions.ui
 	ui/picstatus.ui
@@ -335,6 +335,7 @@
 	ui/colorcombo.h
 	ui/colorlistbox.h
 	ui/colorlistmodel.h
+	ui/colorsandfills.h
 	ui/contextmenu.h
 	ui/cpalette.h
 	ui/cupsoptions.h
@@ -404,7 +405,6 @@
 	ui/pagepalette_widgets.h
 	ui/pagepropertiesdialog.h
 	ui/pageselector.h
-	ui/paintmanager.h
 	ui/patternpropsdialog.h
 	ui/pdfexportdialog.h
 	ui/picsearch.h
@@ -806,6 +806,7 @@
 	ui/colorcombo.cpp
 	ui/colorlistbox.cpp
 	ui/colorlistmodel.cpp
+	ui/colorsandfills.cpp
 	ui/contextmenu.cpp
 	ui/cpalette.cpp
 	ui/cupsoptions.cpp
@@ -876,7 +877,6 @@
 	ui/pagepalette_widgets.cpp
 	ui/pagepropertiesdialog.cpp
 	ui/pageselector.cpp
-	ui/paintmanager.cpp
 	ui/patternpropsdialog.cpp
 	ui/pdfexportdialog.cpp
 	ui/picsearch.cpp

Modified: trunk/Scribus/scribus/actionmanager.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21926&path=/trunk/Scribus/scribus/actionmanager.cpp
==============================================================================
--- trunk/Scribus/scribus/actionmanager.cpp	(original)
+++ trunk/Scribus/scribus/actionmanager.cpp	Mon Apr 17 16:11:14 2017
@@ -250,7 +250,7 @@
 	scrActions->insert(name, new ScrAction("", defaultKey(name), mainWindow));
 	name="editEditRenderSource";
 	scrActions->insert(name, new ScrAction("", defaultKey(name), mainWindow));
-	name="editColors";
+	name="editColorsAndFills";
 	scrActions->insert(name, new ScrAction("", defaultKey(name), mainWindow));
 	name="editReplaceColors";
 	scrActions->insert(name, new ScrAction("", defaultKey(name), mainWindow));
@@ -285,7 +285,7 @@
 	connect( (*scrActions)["editSearchReplace"], SIGNAL(triggered()), mainWindow, SLOT(SearchText()) );
 	connect( (*scrActions)["editEditWithImageEditor"], SIGNAL(triggered()), mainWindow, SLOT(callImageEditor()) );
 	connect( (*scrActions)["editEditRenderSource"], SIGNAL(triggered()), mainWindow, SLOT(callImageEditor()) );
-	connect( (*scrActions)["editColors"], SIGNAL(triggered()), mainWindow, SLOT(managePaints()) );
+	connect( (*scrActions)["editColorsAndFills"], SIGNAL(triggered()), mainWindow, SLOT(manageColorsAndFills()) );
 	connect( (*scrActions)["editReplaceColors"], SIGNAL(triggered()), mainWindow, SLOT(slotReplaceColors()) );
 	connect( (*scrActions)["editMasterPages"], SIGNAL(triggered()), mainWindow, SLOT(editMasterPagesStart()) );
 	connect( (*scrActions)["editJavascripts"], SIGNAL(triggered()), mainWindow, SLOT(ManageJava()) );
@@ -1524,7 +1524,7 @@
 	(*scrActions)["editSearchReplace"]->setTexts( tr("&Search/Replace..."));
 	(*scrActions)["editEditWithImageEditor"]->setTexts( tr("Edit Image..."));
 	(*scrActions)["editEditRenderSource"]->setTexts( tr("Edit Source..."));
-	(*scrActions)["editColors"]->setTexts( tr("Colors and Fills..."));
+	(*scrActions)["editColorsAndFills"]->setTexts( tr("Colors and Fills..."));
 	(*scrActions)["editReplaceColors"]->setTexts( tr("Replace Colors..."));
 	(*scrActions)["editStyles"]->setTexts( tr("S&tyles..."));
 	(*scrActions)["editMarks"]->setTexts( tr("Marks..."));
@@ -2098,7 +2098,7 @@
 		<< "toolsEditWithStoryEditor"
 		<< "editEditWithImageEditor"
 		<< "editEditRenderSource"
-		<< "editColors"
+		<< "editColorsAndFills"
 		<< "editReplaceColors"
 		<< "editStyles"
 		<< "editMarks"

Modified: trunk/Scribus/scribus/loadsaveplugin.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21926&path=/trunk/Scribus/scribus/loadsaveplugin.cpp
==============================================================================
--- trunk/Scribus/scribus/loadsaveplugin.cpp	(original)
+++ trunk/Scribus/scribus/loadsaveplugin.cpp	Mon Apr 17 16:11:14 2017
@@ -525,24 +525,18 @@
 
 bool FileFormat::loadPage(const QString & fileName, int pageNumber, bool Mpage, QString renamedPageName) const
 {
-	if (plug && load)
-	{
-		plug->clearLastError();
-		bool success = plug->loadPage(fileName, pageNumber, Mpage, renamedPageName);
-		if (!success && plug->hasLastError())
-		{
-			if (ScCore->usingGUI())
-			{
-				ScMessageBox::warning(ScCore->primaryMainWindow(), CommonStrings::trWarning, plug->lastError());
-			}
-			else
-			{
-				qDebug() << plug->lastError();
-			}
-		}
-		return success;
-	}
-	return false;
+	if (!plug || !load)
+		return false;
+	plug->clearLastError();
+	bool success = plug->loadPage(fileName, pageNumber, Mpage, renamedPageName);
+	if (!success && plug->hasLastError())
+	{
+		if (ScCore->usingGUI())
+			ScMessageBox::warning(ScCore->primaryMainWindow(), CommonStrings::trWarning, plug->lastError());
+		else
+			qDebug() << plug->lastError();
+	}
+	return success;
 }
 
 bool FileFormat::readStyles(const QString& fileName, ScribusDoc* doc, StyleSet<ParagraphStyle> &docParagraphStyles) const

Modified: trunk/Scribus/scribus/plugins/barcodegenerator/barcodegenerator.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21926&path=/trunk/Scribus/scribus/plugins/barcodegenerator/barcodegenerator.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/barcodegenerator/barcodegenerator.cpp	(original)
+++ trunk/Scribus/scribus/plugins/barcodegenerator/barcodegenerator.cpp	Mon Apr 17 16:11:14 2017
@@ -13,7 +13,7 @@
 #include "loadsaveplugin.h"
 #include "scpaths.h"
 #include "scribuscore.h"
-#include "ui/paintmanager.h"
+#include "ui/colorsandfills.h"
 #include "undomanager.h"
 
 
@@ -673,7 +673,7 @@
 
 void BarcodeGenerator::bgColorButton_pressed()
 {
-	PaintManagerDialog d(this, &ScCore->primaryMainWindow()->doc->docGradients, ScCore->primaryMainWindow()->doc->PageColors, "", &ScCore->primaryMainWindow()->doc->docPatterns, ScCore->primaryMainWindow()->doc, ScCore->primaryMainWindow());
+	ColorsAndFillsDialog d(this, &ScCore->primaryMainWindow()->doc->docGradients, ScCore->primaryMainWindow()->doc->PageColors, "", &ScCore->primaryMainWindow()->doc->docPatterns, ScCore->primaryMainWindow()->doc, ScCore->primaryMainWindow());
 	if (!d.exec())
 		return;
 	bgColor = d.selectedColor();
@@ -684,7 +684,7 @@
 
 void BarcodeGenerator::lnColorButton_pressed()
 {
-	PaintManagerDialog d(this, &ScCore->primaryMainWindow()->doc->docGradients, ScCore->primaryMainWindow()->doc->PageColors, "", &ScCore->primaryMainWindow()->doc->docPatterns, ScCore->primaryMainWindow()->doc, ScCore->primaryMainWindow());
+	ColorsAndFillsDialog d(this, &ScCore->primaryMainWindow()->doc->docGradients, ScCore->primaryMainWindow()->doc->PageColors, "", &ScCore->primaryMainWindow()->doc->docPatterns, ScCore->primaryMainWindow()->doc, ScCore->primaryMainWindow());
 	if (!d.exec())
 		return;
 	lnColor = d.selectedColor();
@@ -695,7 +695,7 @@
 
 void BarcodeGenerator::txtColorButton_pressed()
 {
-	PaintManagerDialog d(this, &ScCore->primaryMainWindow()->doc->docGradients, ScCore->primaryMainWindow()->doc->PageColors, "", &ScCore->primaryMainWindow()->doc->docPatterns, ScCore->primaryMainWindow()->doc, ScCore->primaryMainWindow());
+	ColorsAndFillsDialog d(this, &ScCore->primaryMainWindow()->doc->docGradients, ScCore->primaryMainWindow()->doc->PageColors, "", &ScCore->primaryMainWindow()->doc->docPatterns, ScCore->primaryMainWindow()->doc, ScCore->primaryMainWindow());
 	if (!d.exec())
 		return;
 	txtColor = d.selectedColor();

Modified: trunk/Scribus/scribus/plugins/colorwheel/cwdialog.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21926&path=/trunk/Scribus/scribus/plugins/colorwheel/cwdialog.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/colorwheel/cwdialog.cpp	(original)
+++ trunk/Scribus/scribus/plugins/colorwheel/cwdialog.cpp	Mon Apr 17 16:11:14 2017
@@ -339,7 +339,7 @@
 	if (err)
 	{
 		ScMessageBox::information(this, tr("Color Merging"), status);
-		m_Doc->scMW()->managePaints();
+		m_Doc->scMW()->manageColorsAndFills();
 		return;
 	}
 	m_Doc->scMW()->propertiesPalette->updateColorList();

Modified: trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21926&path=/trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp	(original)
+++ trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp	Mon Apr 17 16:11:14 2017
@@ -6027,7 +6027,7 @@
 			success = readColor(m_Doc->PageColors, attrs);
 			if (!success) break;
 		}
-		if (tagName == "Gradient" && attrs.valueAsString("NAME") != CommonStrings::None)
+		if (tagName == "Gradient" && attrs.valueAsString("Name") != CommonStrings::None)
 		{
 			VGradient gra;
 			QString grName = attrs.valueAsString("Name");

Modified: trunk/Scribus/scribus/scribus.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21926&path=/trunk/Scribus/scribus/scribus.cpp
==============================================================================
--- trunk/Scribus/scribus/scribus.cpp	(original)
+++ trunk/Scribus/scribus/scribus.cpp	Mon Apr 17 16:11:14 2017
@@ -212,7 +212,7 @@
 #include "ui/pagepalette.h"
 #include "ui/pagepropertiesdialog.h"
 #include "ui/pageselector.h"
-#include "ui/paintmanager.h"
+#include "ui/colorsandfills.h"
 #include "ui/pdfexportdialog.h"
 #include "ui/pdftoolbar.h"
 #include "ui/picstatus.h"
@@ -9226,7 +9226,7 @@
 	m_undoManager->setUndoEnabled(true);
 }
 
-void ScribusMainWindow::managePaints()
+void ScribusMainWindow::manageColorsAndFills()
 {
 	ColorList edc;
 	QHash<QString, VGradient> *Gradients;
@@ -9248,7 +9248,7 @@
 		doc = m_doc;
 	}
 	m_undoManager->setUndoEnabled(false);
-	PaintManagerDialog *dia = new PaintManagerDialog(this, Gradients, edc, m_prefsManager->colorSetName(), docPatterns, tmpDoc, this);
+	ColorsAndFillsDialog *dia = new ColorsAndFillsDialog(this, Gradients, edc, m_prefsManager->colorSetName(), docPatterns, tmpDoc, this);
 	if (dia->exec())
 	{
 		if (HaveDoc)

Modified: trunk/Scribus/scribus/scribus.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21926&path=/trunk/Scribus/scribus/scribus.h
==============================================================================
--- trunk/Scribus/scribus/scribus.h	(original)
+++ trunk/Scribus/scribus/scribus.h	Mon Apr 17 16:11:14 2017
@@ -541,7 +541,7 @@
 	//! \brief Transform an item
 	void slotItemTransform();
 	//! \brief manages paints
-	void managePaints();
+	void manageColorsAndFills();
 	//! \brief allow SE to get the SM for edit stlyes
 	StyleManager *styleMgr() const {return m_styleManager;};
 	//! \brief drawnew, call palettes to update for new page layout




More information about the scribus-commit mailing list