r16801 by jghali - fix some inconsistent line endings

scribus-commit scribus-commit at lists.scribus.net
Thu Aug 25 19:10:20 UTC 2011


Author: jghali
Date: Thu Aug 25 19:10:19 2011
New Revision: 16801

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=16801
Log:
fix some inconsistent line endings

Modified:
    trunk/Scribus/scribus/plugins/scriptplugin/prefs_scripter.cpp
    trunk/Scribus/scribus/plugins/scriptplugin/prefs_scripter.h

Modified: trunk/Scribus/scribus/plugins/scriptplugin/prefs_scripter.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16801&path=/trunk/Scribus/scribus/plugins/scriptplugin/prefs_scripter.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/scriptplugin/prefs_scripter.cpp (original)
+++ trunk/Scribus/scribus/plugins/scriptplugin/prefs_scripter.cpp Thu Aug 25 19:10:19 2011
@@ -1,92 +1,92 @@
-/*
-For general Scribus (>=1.3.2) copyright and licensing information please refer
-to the COPYING file provided with the program. Following this notice may exist
-a copyright and/or license notice that predates the release of Scribus 1.3.2
-for which a new license (GPL+exception) is in place.
-*/
-
-// include the python header first because on OSX that uses the name "slots"
-#include "cmdvar.h"
-
-#include <QColorDialog>
-#include <QFileDialog>
-#include <QPalette>
-
-#include "prefs_scripter.h"
-#include "scriptercore.h"
-#include "prefsfile.h"
-#include "prefscontext.h"
-#include "prefsmanager.h"
-#include "prefsstructs.h"
-
-Prefs_Scripter::Prefs_Scripter(QWidget* parent)
-	: Prefs_Pane(parent)
-{
-	setupUi(this);
-	languageChange();
-	setupSyntaxColors();
-
-	// Set the state of the ext script enable checkbox
-	extensionScriptsChk->setChecked(scripterCore->extensionsEnabled());
-	// The startup script box should be disabled  if ext scripts are off
-	startupScriptEdit->setEnabled(extensionScriptsChk->isChecked());
-	connect(extensionScriptsChk, SIGNAL(toggled(bool)),
-			startupScriptEdit, SLOT(setEnabled(bool)));
-
-	// signals and slots connections
-	connect(extensionScriptsChk, SIGNAL(toggled(bool)), startupScriptEdit, SLOT(setEnabled(bool)));
-	// colors
-	connect(textButton, SIGNAL(clicked()), this, SLOT(setColor()));
-	connect(commentButton, SIGNAL(clicked()), this, SLOT(setColor()));
-	connect(keywordButton, SIGNAL(clicked()), this, SLOT(setColor()));
-	connect(errorButton, SIGNAL(clicked()), this, SLOT(setColor()));
-	connect(signButton, SIGNAL(clicked()), this, SLOT(setColor()));
-	connect(stringButton, SIGNAL(clicked()), this, SLOT(setColor()));
-	connect(numberButton, SIGNAL(clicked()), this, SLOT(setColor()));
-	connect(startupScriptChangeButton, SIGNAL(clicked()), this, SLOT(changeStartupScript()));
-}
-
-Prefs_Scripter::~Prefs_Scripter()
-{
-}
-
-void Prefs_Scripter::languageChange()
-{
-}
-
-void Prefs_Scripter::restoreDefaults(struct ApplicationPrefs *prefsData)
-{
-}
-
-void Prefs_Scripter::saveGuiToPrefs(struct ApplicationPrefs *prefsData) const
-{
-}
-
-// Apply changes to prefs. Auto connected.
-void Prefs_Scripter::apply()
-{
-	scripterCore->setExtensionsEnabled(extensionScriptsChk->isChecked());
-	scripterCore->setStartupScript(startupScriptEdit->text());
-	// colors
-	PrefsContext* prefs = PrefsManager::instance()->prefsFile->getPluginContext("scriptplugin");
-	if (prefs)
-	{
-		prefs->set("syntaxerror", errorColor.name());
-		prefs->set("syntaxcomment", commentColor.name());
-		prefs->set("syntaxkeyword", keywordColor.name());
-		prefs->set("syntaxsign", signColor.name());
-		prefs->set("syntaxnumber", numberColor.name());
-		prefs->set("syntaxstring", stringColor.name());
-		prefs->set("syntaxtext", textColor.name());
-
-		emit prefsChanged();
-	}
-}
-
-void Prefs_Scripter::setColor()
-{
-	QPushButton* button = (QPushButton*) sender();
-
+/*
+For general Scribus (>=1.3.2) copyright and licensing information please refer
+to the COPYING file provided with the program. Following this notice may exist
+a copyright and/or license notice that predates the release of Scribus 1.3.2
+for which a new license (GPL+exception) is in place.
+*/
+
+// include the python header first because on OSX that uses the name "slots"
+#include "cmdvar.h"
+
+#include <QColorDialog>
+#include <QFileDialog>
+#include <QPalette>
+
+#include "prefs_scripter.h"
+#include "scriptercore.h"
+#include "prefsfile.h"
+#include "prefscontext.h"
+#include "prefsmanager.h"
+#include "prefsstructs.h"
+
+Prefs_Scripter::Prefs_Scripter(QWidget* parent)
+	: Prefs_Pane(parent)
+{
+	setupUi(this);
+	languageChange();
+	setupSyntaxColors();
+
+	// Set the state of the ext script enable checkbox
+	extensionScriptsChk->setChecked(scripterCore->extensionsEnabled());
+	// The startup script box should be disabled  if ext scripts are off
+	startupScriptEdit->setEnabled(extensionScriptsChk->isChecked());
+	connect(extensionScriptsChk, SIGNAL(toggled(bool)),
+			startupScriptEdit, SLOT(setEnabled(bool)));
+
+	// signals and slots connections
+	connect(extensionScriptsChk, SIGNAL(toggled(bool)), startupScriptEdit, SLOT(setEnabled(bool)));
+	// colors
+	connect(textButton, SIGNAL(clicked()), this, SLOT(setColor()));
+	connect(commentButton, SIGNAL(clicked()), this, SLOT(setColor()));
+	connect(keywordButton, SIGNAL(clicked()), this, SLOT(setColor()));
+	connect(errorButton, SIGNAL(clicked()), this, SLOT(setColor()));
+	connect(signButton, SIGNAL(clicked()), this, SLOT(setColor()));
+	connect(stringButton, SIGNAL(clicked()), this, SLOT(setColor()));
+	connect(numberButton, SIGNAL(clicked()), this, SLOT(setColor()));
+	connect(startupScriptChangeButton, SIGNAL(clicked()), this, SLOT(changeStartupScript()));
+}
+
+Prefs_Scripter::~Prefs_Scripter()
+{
+}
+
+void Prefs_Scripter::languageChange()
+{
+}
+
+void Prefs_Scripter::restoreDefaults(struct ApplicationPrefs *prefsData)
+{
+}
+
+void Prefs_Scripter::saveGuiToPrefs(struct ApplicationPrefs *prefsData) const
+{
+}
+
+// Apply changes to prefs. Auto connected.
+void Prefs_Scripter::apply()
+{
+	scripterCore->setExtensionsEnabled(extensionScriptsChk->isChecked());
+	scripterCore->setStartupScript(startupScriptEdit->text());
+	// colors
+	PrefsContext* prefs = PrefsManager::instance()->prefsFile->getPluginContext("scriptplugin");
+	if (prefs)
+	{
+		prefs->set("syntaxerror", errorColor.name());
+		prefs->set("syntaxcomment", commentColor.name());
+		prefs->set("syntaxkeyword", keywordColor.name());
+		prefs->set("syntaxsign", signColor.name());
+		prefs->set("syntaxnumber", numberColor.name());
+		prefs->set("syntaxstring", stringColor.name());
+		prefs->set("syntaxtext", textColor.name());
+
+		emit prefsChanged();
+	}
+}
+
+void Prefs_Scripter::setColor()
+{
+	QPushButton* button = (QPushButton*) sender();
+
 	QColor oldColor;
 	if (button == textButton)    oldColor = textColor;
 	if (button == commentButton) oldColor = commentColor;
@@ -94,70 +94,70 @@
  	if (button == errorButton)   oldColor = errorColor;
  	if (button == signButton)    oldColor = signColor;
  	if (button == stringButton)  oldColor = stringColor;
- 	if (button == numberButton)  oldColor = numberColor;
-
-	QColor color = QColorDialog::getColor(oldColor, this);
-	if (color.isValid() && button)
-	{
-		QPixmap pm(54, 14);
-		pm.fill(color);
-		button->setIcon(pm);
-		if (button==textButton)
-			textColor=color;
-		if (button==commentButton)
-			commentColor=color;
-		if (button==keywordButton)
-			keywordColor=color;
-		if (button==errorButton)
-			errorColor=color;
-		if (button==signButton)
-			signColor=color;
-		if (button==stringButton)
-			stringColor=color;
-		if (button==numberButton)
-			numberColor=color;
-	}
-}
-
-void Prefs_Scripter::setupSyntaxColors()
-{
-	SyntaxColors *syntax = new SyntaxColors();
-	textColor=syntax->textColor;
-	commentColor=syntax->commentColor;
-	keywordColor=syntax->keywordColor;
-	errorColor=syntax->errorColor;
-	signColor=syntax->signColor;
-	stringColor=syntax->stringColor;
-	numberColor=syntax->numberColor;
-
-	QPixmap pm(54, 14);
-	pm.fill(textColor);
-	textButton->setIcon(pm);
-	pm.fill(commentColor);
-	commentButton->setIcon(pm);
-	pm.fill(keywordColor);
-	keywordButton->setIcon(pm);
-	pm.fill(errorColor);
-	errorButton->setIcon(pm);
-	pm.fill(signColor);
-	signButton->setIcon(pm);
-	pm.fill(stringColor);
-	stringButton->setIcon(pm);
-	pm.fill(numberColor);
-	numberButton->setIcon(pm);
-
-	delete(syntax);
-}
-
-void Prefs_Scripter::changeStartupScript()
-{
-	QString currentScript=startupScriptEdit->text();
-	QFileInfo fi(startupScriptEdit->text());
-	if (!fi.exists())
-		currentScript = QDir::homePath();
-
-	QString s = QFileDialog::getOpenFileName(this, tr("Locate Startup Script"), currentScript, "Python Scripts (*.py *.PY)");
-	if (!s.isEmpty())
-		startupScriptEdit->setText(s);
-}
-
+ 	if (button == numberButton)  oldColor = numberColor;
+
+	QColor color = QColorDialog::getColor(oldColor, this);
+	if (color.isValid() && button)
+	{
+		QPixmap pm(54, 14);
+		pm.fill(color);
+		button->setIcon(pm);
+		if (button==textButton)
+			textColor=color;
+		if (button==commentButton)
+			commentColor=color;
+		if (button==keywordButton)
+			keywordColor=color;
+		if (button==errorButton)
+			errorColor=color;
+		if (button==signButton)
+			signColor=color;
+		if (button==stringButton)
+			stringColor=color;
+		if (button==numberButton)
+			numberColor=color;
+	}
+}
+
+void Prefs_Scripter::setupSyntaxColors()
+{
+	SyntaxColors *syntax = new SyntaxColors();
+	textColor=syntax->textColor;
+	commentColor=syntax->commentColor;
+	keywordColor=syntax->keywordColor;
+	errorColor=syntax->errorColor;
+	signColor=syntax->signColor;
+	stringColor=syntax->stringColor;
+	numberColor=syntax->numberColor;
+
+	QPixmap pm(54, 14);
+	pm.fill(textColor);
+	textButton->setIcon(pm);
+	pm.fill(commentColor);
+	commentButton->setIcon(pm);
+	pm.fill(keywordColor);
+	keywordButton->setIcon(pm);
+	pm.fill(errorColor);
+	errorButton->setIcon(pm);
+	pm.fill(signColor);
+	signButton->setIcon(pm);
+	pm.fill(stringColor);
+	stringButton->setIcon(pm);
+	pm.fill(numberColor);
+	numberButton->setIcon(pm);
+
+	delete(syntax);
+}
+
+void Prefs_Scripter::changeStartupScript()
+{
+	QString currentScript=startupScriptEdit->text();
+	QFileInfo fi(startupScriptEdit->text());
+	if (!fi.exists())
+		currentScript = QDir::homePath();
+
+	QString s = QFileDialog::getOpenFileName(this, tr("Locate Startup Script"), currentScript, "Python Scripts (*.py *.PY)");
+	if (!s.isEmpty())
+		startupScriptEdit->setText(s);
+}
+

Modified: trunk/Scribus/scribus/plugins/scriptplugin/prefs_scripter.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16801&path=/trunk/Scribus/scribus/plugins/scriptplugin/prefs_scripter.h
==============================================================================
--- trunk/Scribus/scribus/plugins/scriptplugin/prefs_scripter.h (original)
+++ trunk/Scribus/scribus/plugins/scriptplugin/prefs_scripter.h Thu Aug 25 19:10:19 2011
@@ -1,52 +1,52 @@
-/*
-For general Scribus (>=1.3.2) copyright and licensing information please refer
-to the COPYING file provided with the program. Following this notice may exist
-a copyright and/or license notice that predates the release of Scribus 1.3.2
-for which a new license (GPL+exception) is in place.
-*/
-
-#ifndef PREFS_SCRIPTER_H
-#define PREFS_SCRIPTER_H
-
-#include "ui_prefs_scripterbase.h"
-#include "ui/prefs_pane.h"
-#include "pconsole.h"
-
-class Prefs_Scripter : public Prefs_Pane, Ui::Prefs_Scripter
-{
-	Q_OBJECT
-
-	public:
-		Prefs_Scripter(QWidget* parent=0);
-		~Prefs_Scripter();
-		virtual void restoreDefaults(struct ApplicationPrefs *prefsData);
-		virtual void saveGuiToPrefs(struct ApplicationPrefs *prefsData) const;
-
-	public slots:
-		void languageChange();
-		//! \brief Apply changes to prefs. Auto connected.
-		void apply();
-
-
-	protected:
-		void setupSyntaxColors();
-		QColor textColor;
-		QColor commentColor;
-		QColor keywordColor;
-		QColor errorColor;
-		QColor signColor;
-		QColor stringColor;
-		QColor numberColor;
-
-	protected slots:
-		/*! \brief All requests for color change are handled here.
-		\author Petr Vanek
-		\warning I'm trying to handle multiple signals via single slot here. sender() Returns a pointer to the object that sent the signal, if called in a slot activated by a signal; otherwise the return value is undefined. This function will return something apparently correct in other cases as well. However, its value may change during any function call, depending on what signal-slot connections are activated during that call. In Qt 3.0 the value will change more often than in 2.x. This function violates the object-oriented principle of modularity. However, getting access to the sender might be useful when many signals are connected to a single slot. The sender is undefined if the slot is called as a normal C++ function. */
-		void setColor();
-		void changeStartupScript();
-
+/*
+For general Scribus (>=1.3.2) copyright and licensing information please refer
+to the COPYING file provided with the program. Following this notice may exist
+a copyright and/or license notice that predates the release of Scribus 1.3.2
+for which a new license (GPL+exception) is in place.
+*/
+
+#ifndef PREFS_SCRIPTER_H
+#define PREFS_SCRIPTER_H
+
+#include "ui_prefs_scripterbase.h"
+#include "ui/prefs_pane.h"
+#include "pconsole.h"
+
+class Prefs_Scripter : public Prefs_Pane, Ui::Prefs_Scripter
+{
+	Q_OBJECT
+
+	public:
+		Prefs_Scripter(QWidget* parent=0);
+		~Prefs_Scripter();
+		virtual void restoreDefaults(struct ApplicationPrefs *prefsData);
+		virtual void saveGuiToPrefs(struct ApplicationPrefs *prefsData) const;
+
+	public slots:
+		void languageChange();
+		//! \brief Apply changes to prefs. Auto connected.
+		void apply();
+
+
+	protected:
+		void setupSyntaxColors();
+		QColor textColor;
+		QColor commentColor;
+		QColor keywordColor;
+		QColor errorColor;
+		QColor signColor;
+		QColor stringColor;
+		QColor numberColor;
+
+	protected slots:
+		/*! \brief All requests for color change are handled here.
+		\author Petr Vanek
+		\warning I'm trying to handle multiple signals via single slot here. sender() Returns a pointer to the object that sent the signal, if called in a slot activated by a signal; otherwise the return value is undefined. This function will return something apparently correct in other cases as well. However, its value may change during any function call, depending on what signal-slot connections are activated during that call. In Qt 3.0 the value will change more often than in 2.x. This function violates the object-oriented principle of modularity. However, getting access to the sender might be useful when many signals are connected to a single slot. The sender is undefined if the slot is called as a normal C++ function. */
+		void setColor();
+		void changeStartupScript();
+
 	signals:
-		void prefsChanged();
-};
-
-#endif // PREFS_SCRIPTER_H
+		void prefsChanged();
+};
+
+#endif // PREFS_SCRIPTER_H




More information about the scribus-commit mailing list