r14627 by cbradney - Rename vlna to sw in shortwords plugin

scribus-commit scribus-commit at lists.scribus.net
Tue Feb 2 22:40:30 CET 2010


Revision: 14627
Author: cbradney
Date: 2010-02-02T21:32:30.308392Z
Commit message: Rename vlna to sw in shortwords plugin

Changeset: 
M  /trunk/Scribus/scribus/plugins/short-words/CMakeLists.txt
A  /trunk/Scribus/scribus/plugins/short-words/swdialog.h
M  /trunk/Scribus/scribus/plugins/short-words/shortwords.cpp
D  /trunk/Scribus/scribus/plugins/short-words/vlnadialog.cpp
D  /trunk/Scribus/scribus/plugins/short-words/vlnadialog.h
A  /trunk/Scribus/scribus/plugins/short-words/swdialog.cpp

Diffs:
Index: scribus/plugins/short-words/vlnadialog.cpp
===================================================================
--- scribus/plugins/short-words/vlnadialog.cpp	(revision 14626)
+++ scribus/plugins/short-words/vlnadialog.cpp	(revision 14627)
@@ -1,139 +0,0 @@
-/*
-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.
-*/
-/* This is the Scribus Short Words GUI class implementation.
-
-This code is based on the Scribus-Vlna plug in rewritten for
-international use.
-
-2004 Petr Vanek <petr at yarpen.cz>
-
-This program is free software - see LICENSE file in the distribution
-or documentation
-*/
-
-#include "version.h"
-#include "vlnadialog.h"
-
-#include "scribus.h"
-#include "scpaths.h"
-#include "configuration.h"
-#include "ui/helpbrowser.h"
-
-#include <QGridLayout>
-#include <QHBoxLayout>
-#include <QVBoxLayout>
-#include <QSpacerItem>
-#include <QLabel>
-#include <QPushButton>
-#include <QGroupBox>
-#include <QRadioButton>
-#include <QToolTip>
-
-#include "commonstrings.h"
-#include "langmgr.h"
-
-SWDialog::SWDialog(QWidget* parent) : QDialog(parent)
-{
-	setupUi(this);
-
-	cfg = new SWConfig();
-
-	languageComboBox->addItems(cfg->getAvailableLanguagesList());
-
-	languageChange();
-	resize(minimumSizeHint());
-
-	// signals and slots connections
-	connect(buttonBox->button(QDialogButtonBox::Ok), SIGNAL(clicked()),
-			 this, SLOT(okButton_pressed()));
-	connect(buttonBox->button(QDialogButtonBox::Cancel), SIGNAL(clicked()),
-			 this, SLOT(cancelButton_pressed()));
-	connect(styleCheckBox, SIGNAL(toggled(bool)),
-			 languageComboBox, SLOT(setDisabled(bool)));
-
-	selectAction(cfg->action);
-	styleCheckBox->setChecked(cfg->useStyle);
-	languageComboBox->setCurrentIndex(cfg->currentLanguage);
-}
-
-/*
- *  Destroys the object and frees any allocated resources
- */
-SWDialog::~SWDialog()
-{
-}
-
-int SWDialog::actionSelected()
-{
-	if (frameRadio->isChecked())
-		return 0;
-	else if (pageRadio->isChecked())
-		return 1;
-	else if (allRadio->isChecked())
-		return 2;
-	return 0;
-}
-
-bool SWDialog::useStyleLang()
-{
-	return styleCheckBox->isChecked();
-}
-
-QString SWDialog::lang()
-{
-	return LanguageManager::instance()->getLangFromTransLang(languageComboBox->currentText());
-}
-
-void SWDialog::savePrefs()
-{
-	cfg->action = actionSelected();
-	cfg->useStyle = styleCheckBox->isChecked();
-	cfg->currentLanguage = languageComboBox->currentIndex();
-	cfg->saveConfig();
-}
-
-/*
- *  Sets the strings of the subwidgets using the current
- *  language.
- */
-void SWDialog::languageChange()
-{
-	setWindowTitle( tr("Short Words", "short words plugin"));
-	buttonGroup->setTitle( tr("Apply unbreakable space on:", "short words plugin"));
-	frameRadio->setText( tr("&Selected frames", "short words plugin"));
-	pageRadio->setText( tr("Active &page", "short words plugin"));
-	allRadio->setText( tr("&All items", "short words plugin"));
-// 	okButton->setText(CommonStrings::tr_OK);
-// 	cancelButton->setText(CommonStrings::tr_Cancel);
-	frameRadio->setToolTip( tr("Only selected frames processed.", "short words plugin"));
-	pageRadio->setToolTip( tr("Only actual page processed.", "short words plugin"));
-	allRadio->setToolTip( tr("All items in document processed.", "short words plugin"));
-}
-
-void SWDialog::okButton_pressed()
-{
-	savePrefs();
-	accept();
-}
-
-void SWDialog::cancelButton_pressed()
-{
-	savePrefs();
-	reject();
-}
-
-void SWDialog::selectAction(int aAction)
-{
-	if (aAction!=0 && aAction!=1 && aAction!=2)
-		aAction = 0;
-	if (aAction == 0)
-		frameRadio->setChecked(true);
-	else if (aAction == 1)
-		pageRadio->setChecked(true);
-	else if (aAction == 2)
-		allRadio->setChecked(true);
-}
Index: scribus/plugins/short-words/vlnadialog.h
===================================================================
--- scribus/plugins/short-words/vlnadialog.h	(revision 14626)
+++ scribus/plugins/short-words/vlnadialog.h	(revision 14627)
@@ -1,69 +0,0 @@
-/*
-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.
-*/
-/* This is the Scribus Short Words GUI class specification.
-
-This code is based on the Scribus-Vlna plug in rewritten for
-international use.
-
-2004 Petr Vanek <petr at yarpen.cz>
-
-This program is free software - see LICENSE file in the distribution
-or documentation
-*/
-
-#ifndef _SHORTWORDSDIALOG_H
-#define _SHORTWORDSDIALOG_H
-
-// #include <QDialog>
-#include "ui_swdialog.h"
-
-// class QVBoxLayout;
-// class QHBoxLayout;
-// class QGridLayout;
-// class QGroupBox;
-// class QRadioButton;
-// class QPushButton;
-// class QLabel;
-
-class SWConfig;
-
-/*! \brief GUI dialog for user to make decision.
-Generated from Qt designer UI file. Later changes by my hands :)
-\author Petr Vanek <petr at yarpen.cz>
-*/
-class SWDialog : public QDialog, public Ui::SWDialog
-{
-	Q_OBJECT
-
-	public:
-		SWDialog(QWidget* parent = 0);
-		~SWDialog();
-
-		int actionSelected();
-		bool useStyleLang();
-		QString lang();
-
-	protected slots:
-		virtual void languageChange();
-
-	private:
-		//! reference on the config structure
-		SWConfig *cfg;
-
-		/*! \brief  from config file */
-		void selectAction(int aAction);
-
-		void savePrefs();
-
-	private slots:
-		/*! \brief  run shorts processing */
-		virtual void okButton_pressed();
-		/*! \brief  cancel and quit */
-		virtual void cancelButton_pressed();
-};
-
-#endif // SWDialog_H
Index: scribus/plugins/short-words/swdialog.cpp
===================================================================
--- scribus/plugins/short-words/swdialog.cpp	(revision 0)
+++ scribus/plugins/short-words/swdialog.cpp	(revision 14627)
@@ -0,0 +1,139 @@
+/*
+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.
+*/
+/* This is the Scribus Short Words GUI class implementation.
+
+This code is based on the Scribus-Vlna plug in rewritten for
+international use.
+
+2004 Petr Vanek <petr at yarpen.cz>
+
+This program is free software - see LICENSE file in the distribution
+or documentation
+*/
+
+#include "version.h"
+#include "swdialog.h"
+
+#include "scribus.h"
+#include "scpaths.h"
+#include "configuration.h"
+#include "ui/helpbrowser.h"
+
+#include <QGridLayout>
+#include <QHBoxLayout>
+#include <QVBoxLayout>
+#include <QSpacerItem>
+#include <QLabel>
+#include <QPushButton>
+#include <QGroupBox>
+#include <QRadioButton>
+#include <QToolTip>
+
+#include "commonstrings.h"
+#include "langmgr.h"
+
+SWDialog::SWDialog(QWidget* parent) : QDialog(parent)
+{
+	setupUi(this);
+
+	cfg = new SWConfig();
+
+	languageComboBox->addItems(cfg->getAvailableLanguagesList());
+
+	languageChange();
+	resize(minimumSizeHint());
+
+	// signals and slots connections
+	connect(buttonBox->button(QDialogButtonBox::Ok), SIGNAL(clicked()),
+			 this, SLOT(okButton_pressed()));
+	connect(buttonBox->button(QDialogButtonBox::Cancel), SIGNAL(clicked()),
+			 this, SLOT(cancelButton_pressed()));
+	connect(styleCheckBox, SIGNAL(toggled(bool)),
+			 languageComboBox, SLOT(setDisabled(bool)));
+
+	selectAction(cfg->action);
+	styleCheckBox->setChecked(cfg->useStyle);
+	languageComboBox->setCurrentIndex(cfg->currentLanguage);
+}
+
+/*
+ *  Destroys the object and frees any allocated resources
+ */
+SWDialog::~SWDialog()
+{
+}
+
+int SWDialog::actionSelected()
+{
+	if (frameRadio->isChecked())
+		return 0;
+	else if (pageRadio->isChecked())
+		return 1;
+	else if (allRadio->isChecked())
+		return 2;
+	return 0;
+}
+
+bool SWDialog::useStyleLang()
+{
+	return styleCheckBox->isChecked();
+}
+
+QString SWDialog::lang()
+{
+	return LanguageManager::instance()->getLangFromTransLang(languageComboBox->currentText());
+}
+
+void SWDialog::savePrefs()
+{
+	cfg->action = actionSelected();
+	cfg->useStyle = styleCheckBox->isChecked();
+	cfg->currentLanguage = languageComboBox->currentIndex();
+	cfg->saveConfig();
+}
+
+/*
+ *  Sets the strings of the subwidgets using the current
+ *  language.
+ */
+void SWDialog::languageChange()
+{
+	setWindowTitle( tr("Short Words", "short words plugin"));
+	buttonGroup->setTitle( tr("Apply unbreakable space on:", "short words plugin"));
+	frameRadio->setText( tr("&Selected frames", "short words plugin"));
+	pageRadio->setText( tr("Active &page", "short words plugin"));
+	allRadio->setText( tr("&All items", "short words plugin"));
+// 	okButton->setText(CommonStrings::tr_OK);
+// 	cancelButton->setText(CommonStrings::tr_Cancel);
+	frameRadio->setToolTip( tr("Only selected frames processed.", "short words plugin"));
+	pageRadio->setToolTip( tr("Only actual page processed.", "short words plugin"));
+	allRadio->setToolTip( tr("All items in document processed.", "short words plugin"));
+}
+
+void SWDialog::okButton_pressed()
+{
+	savePrefs();
+	accept();
+}
+
+void SWDialog::cancelButton_pressed()
+{
+	savePrefs();
+	reject();
+}
+
+void SWDialog::selectAction(int aAction)
+{
+	if (aAction!=0 && aAction!=1 && aAction!=2)
+		aAction = 0;
+	if (aAction == 0)
+		frameRadio->setChecked(true);
+	else if (aAction == 1)
+		pageRadio->setChecked(true);
+	else if (aAction == 2)
+		allRadio->setChecked(true);
+}

Property changes on: scribus/plugins/short-words/swdialog.cpp
___________________________________________________________________
Added: svn:eol-style
   + native
Added: svn:keywords
   + Author Date Id Revision

Index: scribus/plugins/short-words/shortwords.cpp
===================================================================
--- scribus/plugins/short-words/shortwords.cpp	(revision 14626)
+++ scribus/plugins/short-words/shortwords.cpp	(revision 14627)
@@ -27,7 +27,7 @@
 
 #include "shortwords.h"
 #include "version.h"
-#include "vlnadialog.h"
+#include "swdialog.h"
 #include "configuration.h"
 #include "parse.h"
 #include "page.h"
Index: scribus/plugins/short-words/swdialog.h
===================================================================
--- scribus/plugins/short-words/swdialog.h	(revision 0)
+++ scribus/plugins/short-words/swdialog.h	(revision 14627)
@@ -0,0 +1,69 @@
+/*
+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.
+*/
+/* This is the Scribus Short Words GUI class specification.
+
+This code is based on the Scribus-Vlna plug in rewritten for
+international use.
+
+2004 Petr Vanek <petr at yarpen.cz>
+
+This program is free software - see LICENSE file in the distribution
+or documentation
+*/
+
+#ifndef _SHORTWORDSDIALOG_H
+#define _SHORTWORDSDIALOG_H
+
+// #include <QDialog>
+#include "ui_swdialog.h"
+
+// class QVBoxLayout;
+// class QHBoxLayout;
+// class QGridLayout;
+// class QGroupBox;
+// class QRadioButton;
+// class QPushButton;
+// class QLabel;
+
+class SWConfig;
+
+/*! \brief GUI dialog for user to make decision.
+Generated from Qt designer UI file. Later changes by my hands :)
+\author Petr Vanek <petr at yarpen.cz>
+*/
+class SWDialog : public QDialog, public Ui::SWDialog
+{
+	Q_OBJECT
+
+	public:
+		SWDialog(QWidget* parent = 0);
+		~SWDialog();
+
+		int actionSelected();
+		bool useStyleLang();
+		QString lang();
+
+	protected slots:
+		virtual void languageChange();
+
+	private:
+		//! reference on the config structure
+		SWConfig *cfg;
+
+		/*! \brief  from config file */
+		void selectAction(int aAction);
+
+		void savePrefs();
+
+	private slots:
+		/*! \brief  run shorts processing */
+		virtual void okButton_pressed();
+		/*! \brief  cancel and quit */
+		virtual void cancelButton_pressed();
+};
+
+#endif // SWDialog_H

Property changes on: scribus/plugins/short-words/swdialog.h
___________________________________________________________________
Added: svn:eol-style
   + native
Added: svn:keywords
   + Author Date Id Revision

Index: scribus/plugins/short-words/CMakeLists.txt
===================================================================
--- scribus/plugins/short-words/CMakeLists.txt	(revision 14626)
+++ scribus/plugins/short-words/CMakeLists.txt	(revision 14627)
@@ -14,7 +14,7 @@
   prefs_shortwords.h
   shortwords.h
   swprefsgui.h
-  vlnadialog.h
+  swdialog.h
 )
 
 SET(SHORTWORDS_PLUGIN_SOURCES
@@ -24,7 +24,7 @@
   shortwords.cpp
   swprefsgui.cpp
   swsyntaxhighlighter.cpp
-  vlnadialog.cpp
+  swdialog.cpp
 )
 
 SET(SCRIBUS_SHORTWORDS_PLUGIN "scribusshortwords")




More information about the scribus-commit mailing list