r20383 by craig -

scribus-commit scribus-commit at lists.scribus.net
Mon Sep 14 21:57:10 UTC 2015


Author: craig
Date: Mon Sep 14 21:57:10 2015
New Revision: 20383

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=20383
Log:
#13228: Add better default app for Gimp on OSX

Modified:
    trunk/Scribus/scribus/prefsmanager.cpp
    trunk/Scribus/scribus/scpaths.cpp
    trunk/Scribus/scribus/scpaths.h

Modified: trunk/Scribus/scribus/prefsmanager.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=20383&path=/trunk/Scribus/scribus/prefsmanager.cpp
==============================================================================
--- trunk/Scribus/scribus/prefsmanager.cpp	(original)
+++ trunk/Scribus/scribus/prefsmanager.cpp	Mon Sep 14 21:57:10 2015
@@ -343,7 +343,7 @@
 	appPrefs.printPreviewPrefs.PrPr_K = true;
 	appPrefs.printPreviewPrefs.PrPr_InkCoverage = false;
 	appPrefs.printPreviewPrefs.PrPr_InkThreshold = 250;
-	appPrefs.extToolPrefs.imageEditorExecutable = "gimp";
+	appPrefs.extToolPrefs.imageEditorExecutable = ScPaths::defaultImageEditorApp();
 	appPrefs.extToolPrefs.extBrowserExecutable = "";
 	appPrefs.extToolPrefs.uniconvExecutable = "uniconv";
 	appPrefs.extToolPrefs.latexConfigs = LatexConfigCache::defaultConfigs();
@@ -2369,7 +2369,7 @@
 			appPrefs.extToolPrefs.latexResolution = dc.attribute("LatexResolution", "72").toInt();
 			appPrefs.extToolPrefs.latexForceDpi = static_cast<bool>(dc.attribute("LatexForceDpi", "1").toInt());
 			appPrefs.extToolPrefs.latexStartWithEmptyFrames = static_cast<bool>(dc.attribute("LatexStartWithEmptyFrames", "0").toInt());
-			setImageEditorExecutable(dc.attribute("ImageEditor", "gimp"));
+			setImageEditorExecutable(dc.attribute("ImageEditor", ScPaths::defaultImageEditorApp()));
 			setExtBrowserExecutable(dc.attribute("WebBrowser", ""));
 			setUniconvExecutable(dc.attribute("Uniconvertor", "uniconv"));
 			setLatexEditorExecutable(dc.attribute("LatexEditor", ""));

Modified: trunk/Scribus/scribus/scpaths.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=20383&path=/trunk/Scribus/scribus/scpaths.cpp
==============================================================================
--- trunk/Scribus/scribus/scpaths.cpp	(original)
+++ trunk/Scribus/scribus/scpaths.cpp	Mon Sep 14 21:57:10 2015
@@ -176,6 +176,17 @@
 	return QString::null;
 }
 
+QString ScPaths::defaultImageEditorApp()
+{
+#ifdef Q_OS_MAC
+	QString appName("/Applications/GIMP.app");
+	QFile app(appName);
+	if (app.exists())
+		return appName;
+#endif
+	return "gimp";
+}
+
 const QString&  ScPaths::docDir() const
 {
 	return m_docDir;

Modified: trunk/Scribus/scribus/scpaths.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=20383&path=/trunk/Scribus/scribus/scpaths.h
==============================================================================
--- trunk/Scribus/scribus/scpaths.h	(original)
+++ trunk/Scribus/scribus/scpaths.h	Mon Sep 14 21:57:10 2015
@@ -89,6 +89,10 @@
 	/** @brief Return path to Contents OSX subdirectory*/
 	QString bundleDir(void) const;
 
+
+	/** @brief Until we get enough of these, lets have this here for now, gs stuff is in util_ghostscript */
+	static QString defaultImageEditorApp();
+
 protected:
 	/** @brief Constructor. Use ScPaths::instance() instead. */
 	ScPaths();




More information about the scribus-commit mailing list