r14603 by cbradney - New prefs for External Tools now works

scribus-commit scribus-commit at lists.scribus.net
Mon Feb 1 19:47:42 CET 2010


Revision: 14603
Author: cbradney
Date: 2010-01-30T23:43:56.387120Z
Commit message: New prefs for External Tools now works

Changeset: 
M  /trunk/Scribus/scribus/ui/preferencesdialog.cpp
M  /trunk/Scribus/scribus/ui/prefs_externaltools.cpp
M  /trunk/Scribus/scribus/ui/prefs_externaltools.h
M  /trunk/Scribus/scribus/ui/prefs_externaltoolsbase.ui

Diffs:
Index: scribus/ui/prefs_externaltoolsbase.ui
===================================================================
--- scribus/ui/prefs_externaltoolsbase.ui	(revision 14602)
+++ scribus/ui/prefs_externaltoolsbase.ui	(revision 14603)
@@ -6,8 +6,8 @@
    <rect>
     <x>0</x>
     <y>0</y>
-    <width>687</width>
-    <height>804</height>
+    <width>782</width>
+    <height>984</height>
    </rect>
   </property>
   <property name="windowTitle">
@@ -45,11 +45,11 @@
        <rect>
         <x>0</x>
         <y>0</y>
-        <width>644</width>
-        <height>782</height>
+        <width>739</width>
+        <height>877</height>
        </rect>
       </property>
-      <layout class="QVBoxLayout" name="verticalLayout_2">
+      <layout class="QVBoxLayout" name="verticalLayout_3">
        <item>
         <widget class="QLabel" name="label_2">
          <property name="font">
@@ -126,11 +126,11 @@
             <enum>Qt::Horizontal</enum>
            </property>
            <property name="sizeType">
-            <enum>QSizePolicy::Expanding</enum>
+            <enum>QSizePolicy::Minimum</enum>
            </property>
            <property name="sizeHint" stdset="0">
             <size>
-             <width>21</width>
+             <width>20</width>
              <height>20</height>
             </size>
            </property>
@@ -155,11 +155,11 @@
             <enum>Qt::Horizontal</enum>
            </property>
            <property name="sizeType">
-            <enum>QSizePolicy::Expanding</enum>
+            <enum>QSizePolicy::Minimum</enum>
            </property>
            <property name="sizeHint" stdset="0">
             <size>
-             <width>21</width>
+             <width>20</width>
              <height>20</height>
             </size>
            </property>
@@ -317,7 +317,7 @@
        <item>
         <layout class="QHBoxLayout" name="horizontalLayout_4">
          <item>
-          <widget class="QLabel" name="imageToolLabel_2">
+          <widget class="QLabel" name="webBrowserLabel">
            <property name="text">
             <string>Name of &amp;Executable:</string>
            </property>
@@ -330,14 +330,14 @@
           </widget>
          </item>
          <item>
-          <widget class="QLineEdit" name="imageToolLineEdit_2">
+          <widget class="QLineEdit" name="webBrowserLineEdit">
            <property name="toolTip">
             <string>&lt;qt&gt;File system location for graphics editor. If you use gimp and your distribution includes it, we recommend 'gimp-remote', as it allows you to edit the image in an already running instance of gimp.&lt;/qt&gt;</string>
            </property>
           </widget>
          </item>
          <item>
-          <widget class="QPushButton" name="imageToolChangeButton_2">
+          <widget class="QPushButton" name="webBrowserChangeButton">
            <property name="text">
             <string>&amp;Change...</string>
            </property>
@@ -365,6 +365,70 @@
         </spacer>
        </item>
        <item>
+        <widget class="QLabel" name="label_7">
+         <property name="font">
+          <font>
+           <pointsize>13</pointsize>
+           <weight>75</weight>
+           <bold>true</bold>
+          </font>
+         </property>
+         <property name="text">
+          <string>Uniconvertor</string>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <layout class="QHBoxLayout" name="horizontalLayout_5">
+         <item>
+          <widget class="QLabel" name="uniconverterLabel">
+           <property name="text">
+            <string>Name of &amp;Executable:</string>
+           </property>
+           <property name="wordWrap">
+            <bool>false</bool>
+           </property>
+           <property name="buddy">
+            <cstring>imageToolLineEdit</cstring>
+           </property>
+          </widget>
+         </item>
+         <item>
+          <widget class="QLineEdit" name="uniconvertorLineEdit">
+           <property name="toolTip">
+            <string>&lt;qt&gt;File system location for graphics editor. If you use gimp and your distribution includes it, we recommend 'gimp-remote', as it allows you to edit the image in an already running instance of gimp.&lt;/qt&gt;</string>
+           </property>
+          </widget>
+         </item>
+         <item>
+          <widget class="QPushButton" name="uniconvertorChangeButton">
+           <property name="text">
+            <string>&amp;Change...</string>
+           </property>
+           <property name="shortcut">
+            <string>Alt+C</string>
+           </property>
+          </widget>
+         </item>
+        </layout>
+       </item>
+       <item>
+        <spacer name="verticalSpacer_5">
+         <property name="orientation">
+          <enum>Qt::Vertical</enum>
+         </property>
+         <property name="sizeType">
+          <enum>QSizePolicy::Fixed</enum>
+         </property>
+         <property name="sizeHint" stdset="0">
+          <size>
+           <width>20</width>
+           <height>20</height>
+          </size>
+         </property>
+        </spacer>
+       </item>
+       <item>
         <widget class="QLabel" name="label_5">
          <property name="font">
           <font>
@@ -393,44 +457,51 @@
         </widget>
        </item>
        <item>
-        <layout class="QGridLayout">
-         <item row="0" column="1">
-          <widget class="QPushButton" name="latexConfigUpButton">
-           <property name="text">
-            <string>Up</string>
-           </property>
-          </widget>
-         </item>
-         <item row="1" column="1">
-          <widget class="QPushButton" name="latexConfigDownButton">
-           <property name="text">
-            <string>Down</string>
-           </property>
-          </widget>
-         </item>
-         <item row="2" column="1">
-          <widget class="QPushButton" name="latexConfigAddButton">
-           <property name="text">
-            <string>Add</string>
-           </property>
-          </widget>
-         </item>
-         <item row="3" column="1">
-          <widget class="QPushButton" name="latexConfigDeleteButton">
-           <property name="text">
-            <string>Delete</string>
-           </property>
-          </widget>
-         </item>
-         <item row="0" column="0" rowspan="5">
+        <layout class="QHBoxLayout" name="horizontalLayout">
+         <item>
           <widget class="QListWidget" name="latexConfigsListWidget"/>
          </item>
-         <item row="4" column="1">
-          <widget class="QPushButton" name="latexConfigChangeCommandButton">
-           <property name="text">
-            <string>Change...</string>
+         <item>
+          <layout class="QVBoxLayout" name="verticalLayout_2">
+           <property name="spacing">
+            <number>-1</number>
            </property>
-          </widget>
+           <item>
+            <widget class="QPushButton" name="latexConfigUpButton">
+             <property name="text">
+              <string>Up</string>
+             </property>
+            </widget>
+           </item>
+           <item>
+            <widget class="QPushButton" name="latexConfigDownButton">
+             <property name="text">
+              <string>Down</string>
+             </property>
+            </widget>
+           </item>
+           <item>
+            <widget class="QPushButton" name="latexConfigAddButton">
+             <property name="text">
+              <string>Add</string>
+             </property>
+            </widget>
+           </item>
+           <item>
+            <widget class="QPushButton" name="latexConfigDeleteButton">
+             <property name="text">
+              <string>Delete</string>
+             </property>
+            </widget>
+           </item>
+           <item>
+            <widget class="QPushButton" name="latexConfigChangeCommandButton">
+             <property name="text">
+              <string>Change...</string>
+             </property>
+            </widget>
+           </item>
+          </layout>
          </item>
         </layout>
        </item>
@@ -483,11 +554,11 @@
             <enum>Qt::Horizontal</enum>
            </property>
            <property name="sizeType">
-            <enum>QSizePolicy::Expanding</enum>
+            <enum>QSizePolicy::Minimum</enum>
            </property>
            <property name="sizeHint" stdset="0">
             <size>
-             <width>31</width>
+             <width>20</width>
              <height>20</height>
             </size>
            </property>
@@ -503,12 +574,25 @@
            </property>
           </widget>
          </item>
+         <item>
+          <spacer name="horizontalSpacer_2">
+           <property name="orientation">
+            <enum>Qt::Horizontal</enum>
+           </property>
+           <property name="sizeHint" stdset="0">
+            <size>
+             <width>40</width>
+             <height>20</height>
+            </size>
+           </property>
+          </spacer>
+         </item>
         </layout>
        </item>
        <item>
         <layout class="QHBoxLayout">
          <item>
-          <widget class="QCheckBox" name="latexForceDpiCheckBox">
+          <widget class="QCheckBox" name="latexForceDPICheckBox">
            <property name="toolTip">
             <string>Always use the configured DPI setting for calculating the size, even if the image file reports something different.</string>
            </property>
@@ -522,9 +606,12 @@
            <property name="orientation">
             <enum>Qt::Horizontal</enum>
            </property>
+           <property name="sizeType">
+            <enum>QSizePolicy::Fixed</enum>
+           </property>
            <property name="sizeHint" stdset="0">
             <size>
-             <width>40</width>
+             <width>20</width>
              <height>20</height>
             </size>
            </property>
@@ -556,6 +643,19 @@
            </property>
           </widget>
          </item>
+         <item>
+          <spacer name="horizontalSpacer_3">
+           <property name="orientation">
+            <enum>Qt::Horizontal</enum>
+           </property>
+           <property name="sizeHint" stdset="0">
+            <size>
+             <width>40</width>
+             <height>20</height>
+            </size>
+           </property>
+          </spacer>
+         </item>
         </layout>
        </item>
        <item>
@@ -628,7 +728,7 @@
   <tabstop>latexEditorChangeButton</tabstop>
   <tabstop>latexEmptyFrameCheckBox</tabstop>
   <tabstop>latexEmbeddedEditorCheckBox</tabstop>
-  <tabstop>latexForceDpiCheckBox</tabstop>
+  <tabstop>latexForceDPICheckBox</tabstop>
   <tabstop>latexResolutionSpinBox</tabstop>
   <tabstop>rescanButton</tabstop>
  </tabstops>
Index: scribus/ui/prefs_externaltools.cpp
===================================================================
--- scribus/ui/prefs_externaltools.cpp	(revision 14602)
+++ scribus/ui/prefs_externaltools.cpp	(revision 14603)
@@ -5,12 +5,33 @@
 for which a new license (GPL+exception) is in place.
 */
 
+#include <QFileDialog>
+#include <QInputDialog>
+#include <QProcess>
+#include <QMessageBox>
+#include "util_ghostscript.h"
+#include "scpaths.h"
+#include "prefsstructs.h"
+#include "latexhelpers.h"
+#include "commonstrings.h"
+
 #include "prefs_externaltools.h"
 
 Prefs_ExternalTools::Prefs_ExternalTools(QWidget* parent)
-	: QWidget(parent)
+	: Prefs_Pane(parent)
 {
 	setupUi(this);
+	connect(psToolChangeButton, SIGNAL(clicked()), this, SLOT(changePostScriptTool()));
+	connect(imageToolChangeButton, SIGNAL(clicked()), this, SLOT(changeImageTool()));
+	connect(webBrowserChangeButton, SIGNAL(clicked()), this, SLOT(changeWebBrowser()));
+	connect(rescanButton, SIGNAL(clicked()), this, SLOT(rescanForTools()));
+	connect(uniconvertorChangeButton, SIGNAL(clicked()), this, SLOT(changeUniconvertor()));
+	connect(latexConfigUpButton, SIGNAL(clicked()), this, SLOT(upButtonPressed()));
+	connect(latexConfigDownButton, SIGNAL(clicked()), this, SLOT(downButtonPressed()));
+	connect(latexConfigAddButton, SIGNAL(clicked()), this, SLOT(addConfig()));
+	connect(latexConfigDeleteButton, SIGNAL(clicked()), this, SLOT(deleteConfig()));
+	connect(latexEditorChangeButton, SIGNAL(clicked()), this, SLOT(changeLatexEditor()));
+	connect(latexConfigChangeCommandButton, SIGNAL(clicked()), this, SLOT(changeLatexPath()));
 
 }
 
@@ -18,3 +39,257 @@
 {
 }
 
+void Prefs_ExternalTools::languageChange()
+{
+}
+
+void Prefs_ExternalTools::restoreDefaults(struct ApplicationPrefs *prefsData)
+{
+	psToolLineEdit->setText(QDir::convertSeparators(prefsData->extToolPrefs.gs_exe));
+	psAntialiasTextCheckBox->setChecked(prefsData->extToolPrefs.gs_AntiAliasText);
+	psAntialiasGraphicsCheckBox->setChecked(prefsData->extToolPrefs.gs_AntiAliasGraphics);
+	psResolutionSpinBox->setValue(prefsData->extToolPrefs.gs_Resolution);
+	imageToolLineEdit->setText(QDir::convertSeparators(prefsData->extToolPrefs.imageEditorExecutable));
+	webBrowserLineEdit->setText(QDir::convertSeparators(prefsData->extToolPrefs.extBrowserExecutable));
+	uniconvertorLineEdit->setText(QDir::convertSeparators(prefsData->extToolPrefs.uniconvExecutable));
+	latexResolutionSpinBox->setValue(prefsData->extToolPrefs.latexResolution);
+	latexEditorLineEdit->setText(prefsData->extToolPrefs.latexEditorExecutable);
+	latexForceDPICheckBox->setCheckState(prefsData->extToolPrefs.latexForceDpi?Qt::Checked:Qt::Unchecked);
+	latexEmptyFrameCheckBox->setCheckState(prefsData->extToolPrefs.latexStartWithEmptyFrames?Qt::Checked:Qt::Unchecked);
+	latexConfigsListWidget->clear();
+	QStringList configs = prefsData->extToolPrefs.latexConfigs;
+	commands = prefsData->extToolPrefs.latexCommands;
+	foreach (QString config, configs)
+		insertConfigItem(config);
+	latexConfigsListWidget->setCurrentRow(0);
+}
+
+void Prefs_ExternalTools::saveGuiToPrefs(struct ApplicationPrefs *prefsData) const
+{
+	prefsData->extToolPrefs.gs_AntiAliasGraphics = psAntialiasGraphicsCheckBox->isChecked();
+	prefsData->extToolPrefs.gs_AntiAliasText = psAntialiasTextCheckBox->isChecked();
+	prefsData->extToolPrefs.gs_exe=QDir::fromNativeSeparators(psToolLineEdit->text());
+	prefsData->extToolPrefs.gs_Resolution = psResolutionSpinBox->value();;
+
+	prefsData->extToolPrefs.imageEditorExecutable=QDir::fromNativeSeparators(imageToolLineEdit->text());
+	prefsData->extToolPrefs.extBrowserExecutable=QDir::fromNativeSeparators(webBrowserLineEdit->text());
+
+	prefsData->extToolPrefs.latexResolution = latexResolutionSpinBox->value();
+	prefsData->extToolPrefs.latexForceDpi = latexForceDPICheckBox->checkState() == Qt::Checked;
+	prefsData->extToolPrefs.latexStartWithEmptyFrames = latexEmptyFrameCheckBox->checkState() == Qt::Checked;
+	QStringList configsList;
+	for (int i=0; i < latexConfigsListWidget->count(); i++)
+		configsList.append(latexConfigsListWidget->item(i)->data(Qt::UserRole).toString());
+	prefsData->extToolPrefs.latexConfigs=configsList;
+	prefsData->extToolPrefs.latexCommands=commands;
+	prefsData->extToolPrefs.latexEditorExecutable=QDir::fromNativeSeparators(latexEditorLineEdit->text());
+	prefsData->extToolPrefs.uniconvExecutable=QDir::fromNativeSeparators(uniconvertorLineEdit->text());
+}
+
+void Prefs_ExternalTools::changePostScriptTool()
+{
+	QFileInfo fi(psToolLineEdit->text());
+	QString s = QFileDialog::getOpenFileName(this, tr("Locate Ghostscript"), fi.path());
+	if (!s.isEmpty())
+		psToolLineEdit->setText( QDir::convertSeparators(s) );
+}
+
+void Prefs_ExternalTools::changeImageTool()
+{
+	QFileInfo fi(imageToolLineEdit->text());
+	QString s = QFileDialog::getOpenFileName(this, tr("Locate your image editor"), fi.path());
+	if (!s.isEmpty())
+		imageToolLineEdit->setText( QDir::convertSeparators(s) );
+}
+
+void Prefs_ExternalTools::changeWebBrowser()
+{
+	QFileInfo fi(webBrowserLineEdit->text());
+	QString s = QFileDialog::getOpenFileName(this, tr("Locate your web browser"), fi.path());
+	if (!s.isEmpty())
+		webBrowserLineEdit->setText( QDir::convertSeparators(s) );
+}
+
+void Prefs_ExternalTools::changeUniconvertor()
+{
+	QFileInfo fi(uniconvertorLineEdit->text());
+	QString s = QFileDialog::getOpenFileName(this, tr("Locate the uniconvertor executable"), fi.path());
+	if (!s.isEmpty())
+		uniconvertorLineEdit->setText( QDir::convertSeparators(s) );
+}
+
+void Prefs_ExternalTools::changeLatexEditor()
+{
+	QFileInfo fi(latexEditorLineEdit->text());
+	QString s = QFileDialog::getOpenFileName(this, tr("Locate your editor"), fi.path());
+	if (!s.isEmpty()) {
+		s = QDir::convertSeparators(s);
+		if (s.contains(' ') && !s.contains('"'))
+			s = QString("\"%1\"").arg(s);
+		latexEditorLineEdit->setText(s);
+	}
+}
+
+void Prefs_ExternalTools::rescanForTools()
+{
+	if (!fileInPath(psToolLineEdit->text()))
+	{
+		QString gsDef = getGSDefaultExeName();
+		psToolLineEdit->setText( QDir::convertSeparators(gsDef) );
+	}
+
+	if (!fileInPath(imageToolLineEdit->text()))
+		imageToolLineEdit->setText("gimp");
+
+	if (!fileInPath(uniconvertorLineEdit->text())) {
+		if (fileInPath("uniconvertor"))
+		{
+			uniconvertorLineEdit->setText("uniconvertor");
+		}
+		else if (fileInPath("uniconv"))
+		{
+			uniconvertorLineEdit->setText("uniconv");
+		}
+		else
+		{
+			QMessageBox::warning(0, CommonStrings::trWarning, tr("Uniconvertor executable not found!"), 1, 0, 0);
+			uniconvertorLineEdit->setText("");
+		}
+	}
+
+	if (!fileInPath(latexEditorLineEdit->text()))
+	{
+		QStringList editors;
+		editors <<
+				/*Linux */ "kwrite" << "kate" << "gedit" << "gvim" <<
+				/*Windows */ "notepad" <<
+				/*Mac OS*/ "open";
+		foreach (QString editor, editors)
+		{
+			if (fileInPath(editor)) {
+				latexEditorLineEdit->setText(editor);
+				break;
+			}
+		}
+	}
+}
+
+void Prefs_ExternalTools::upButtonPressed()
+{
+	if (latexConfigsListWidget->currentRow() < 1) return;
+	QListWidgetItem *old = latexConfigsListWidget->currentItem();
+	QString config = old->data(Qt::UserRole).toString();
+	insertConfigItem(config, latexConfigsListWidget->currentRow()-1);
+	delete old;
+}
+
+void Prefs_ExternalTools::downButtonPressed()
+{
+	if (latexConfigsListWidget->currentRow() >= latexConfigsListWidget->count()-1) return;
+	QListWidgetItem *old = latexConfigsListWidget->currentItem();
+	QString config = old->data(Qt::UserRole).toString();
+	insertConfigItem(config, latexConfigsListWidget->currentRow()+2);
+	delete old;
+}
+
+void Prefs_ExternalTools::addConfig()
+{
+	QString s = QFileDialog::getOpenFileName(this,
+		tr("Locate a Configuration file"),
+		LatexConfigParser::configBase(),
+		tr("Configuration files")+" (*.xml)");
+	if (!s.isEmpty()) {
+		insertConfigItem(s);
+	}
+}
+
+void Prefs_ExternalTools::deleteConfig()
+{
+	if (latexConfigsListWidget->currentItem()) {
+		delete latexConfigsListWidget->currentItem();
+	}
+}
+
+void Prefs_ExternalTools::changeLatexPath()
+{
+	QListWidgetItem *item = latexConfigsListWidget->currentItem();
+	QString config = item->data(Qt::UserRole).toString();
+	bool ok;
+	//TODO: Better dialog
+	QString oldCommand = commands[config];
+	if (oldCommand.isEmpty()) {
+		oldCommand = LatexConfigCache::instance()->parser(config)->executable();
+	}
+	QString newCommand = QInputDialog::getText(this, tr("Change Command"),
+		tr("Enter new command: (leave empty to reset to default command; use quotes around arguments with spaces)"), QLineEdit::Normal, oldCommand, &ok);
+	if (ok) {
+		commands[config] = newCommand;
+		setConfigItemText(item);
+	}
+}
+
+void Prefs_ExternalTools::insertConfigItem(QString config, int row)
+{
+	QListWidgetItem *item = new QListWidgetItem();
+	item->setData(Qt::UserRole, config);
+	setConfigItemText(item);
+	if (row == -1) {
+		latexConfigsListWidget->addItem(item);
+	} else {
+		latexConfigsListWidget->insertItem(row, item);
+	}
+	latexConfigsListWidget->setCurrentItem(item);
+}
+
+bool Prefs_ExternalTools::fileInPath(QString file)
+{
+	if (file.isEmpty())
+		return false;
+	file = file.split(' ', QString::SkipEmptyParts).at(0); //Ignore parameters
+
+	file = QDir::fromNativeSeparators(file);
+	if (file.indexOf('/') >= 0) {
+		//Looks like an absolute path
+		QFileInfo info(file);
+		return info.exists();
+	}
+
+	//Get $PATH
+	QStringList env = QProcess::systemEnvironment();
+	QString path;
+	foreach (QString line, env) {
+		if (line.indexOf("PATH") == 0) {
+			path = line.mid(5); //Strip "PATH="
+			break;
+		}
+	}
+	QStringList splitpath;
+	//TODO: Check this again! OS2? MacOS?
+	#ifdef _WIN32
+		splitpath = path.split(';', QString::SkipEmptyParts);
+	#else
+		splitpath = path.split(':', QString::SkipEmptyParts);
+	#endif
+	foreach (QString dir, splitpath) {
+		QFileInfo info(dir, file);
+		if (info.exists()) {
+			return true;
+		}
+	}
+	return false;
+}
+
+void Prefs_ExternalTools::setConfigItemText(QListWidgetItem *item)
+{
+	QString config = item->data(Qt::UserRole).toString();
+	QString description = LatexConfigCache::instance()->parser(config)->description();
+	QString command = commands[config];
+	if (command.isEmpty()) {
+		item->setText(description);
+	} else {
+		item->setText(QString("%1 (" + tr("Command: ") + "%2)" ).
+			arg(description).
+			arg(QDir::toNativeSeparators(QDir::cleanPath(command))));
+	}
+}
+
Index: scribus/ui/prefs_externaltools.h
===================================================================
--- scribus/ui/prefs_externaltools.h	(revision 14602)
+++ scribus/ui/prefs_externaltools.h	(revision 14603)
@@ -9,15 +9,42 @@
 #define PREFS_EXTERNALTOOLS_H
 
 #include "ui_prefs_externaltoolsbase.h"
+#include "prefs_pane.h"
 #include "scribusapi.h"
+#include "scribusstructs.h"
 
-class SCRIBUS_API Prefs_ExternalTools : public QWidget, Ui::Prefs_ExternalTools
+class SCRIBUS_API Prefs_ExternalTools : public Prefs_Pane, Ui::Prefs_ExternalTools
 {
 	Q_OBJECT
 
 	public:
 		Prefs_ExternalTools(QWidget* parent=0);
 		~Prefs_ExternalTools();
+		virtual void restoreDefaults(struct ApplicationPrefs *prefsData);
+		virtual void saveGuiToPrefs(struct ApplicationPrefs *prefsData) const;
+
+	public slots:
+		void languageChange();
+
+	protected:
+		bool fileInPath(QString file);
+		void insertConfigItem(QString config, int row = -1);
+		void setConfigItemText(QListWidgetItem *item);
+		QMap<QString, QString> commands;
+
+	protected slots:
+		void changePostScriptTool();
+		void changeImageTool();
+		void changeWebBrowser();
+		void changeUniconvertor();
+		void changeLatexEditor();
+		void rescanForTools();
+		void upButtonPressed();
+		void downButtonPressed();
+		void addConfig();
+		void deleteConfig();
+		void changeLatexPath();
+
 };
 
 #endif // PREFS_EXTERNALTOOLS_H
Index: scribus/ui/preferencesdialog.cpp
===================================================================
--- scribus/ui/preferencesdialog.cpp	(revision 14602)
+++ scribus/ui/preferencesdialog.cpp	(revision 14603)
@@ -132,6 +132,7 @@
 	prefs_ColorManagement->setProfiles(&localPrefs, &ScCore->InputProfiles, &ScCore->InputProfilesCMYK, &ScCore->PrinterProfiles, &ScCore->MonitorProfiles);
 	prefs_Scrapbook->restoreDefaults(&localPrefs);
 	prefs_Display->restoreDefaults(&localPrefs);
+	prefs_ExternalTools->restoreDefaults(&localPrefs);
 	prefs_ImageCache->restoreDefaults(&localPrefs);
 }
 
@@ -155,6 +156,7 @@
 	prefs_ColorManagement->saveGuiToPrefs(&localPrefs);
 	prefs_Scrapbook->saveGuiToPrefs(&localPrefs);
 	prefs_Display->saveGuiToPrefs(&localPrefs);
+	prefs_ExternalTools->saveGuiToPrefs(&localPrefs);
 	prefs_ImageCache->saveGuiToPrefs(&localPrefs);
 }
 




More information about the scribus-commit mailing list