r15084 by cbradney - Dont show User Interface prefs in Doc Setup. Change GS missing message as a test

scribus-commit scribus-commit at lists.scribus.net
Tue May 18 22:10:26 CEST 2010


Revision: 15084
Author: cbradney
Date: 2010-05-18T20:03:14.451084Z
Commit message: Dont show User Interface prefs in Doc Setup. Change GS missing message as a test

Changeset: 
M  /trunk/Scribus/scribus/scribus.cpp
M  /trunk/Scribus/scribus/ui/preferencesdialog.cpp

Diffs:
Index: scribus/ui/preferencesdialog.cpp
===================================================================
--- scribus/ui/preferencesdialog.cpp	(revision 15083)
+++ scribus/ui/preferencesdialog.cpp	(revision 15084)
@@ -62,10 +62,10 @@
 		exportButton->hide();
 		defaultsButton->hide();
 	}
-	prefs_UserInterface = new Prefs_UserInterface(prefsStackWidget, m_Doc);
-	addItem( tr("User Interface"), loadIcon("scribus.png"), prefs_UserInterface);
 	if (!doc)
 	{
+		prefs_UserInterface = new Prefs_UserInterface(prefsStackWidget, m_Doc);
+		addItem( tr("User Interface"), loadIcon("scribus.png"), prefs_UserInterface);
 		prefs_Paths = new Prefs_Paths(prefsStackWidget, m_Doc);
 		addItem( tr("Paths"), loadIcon("22/system-file-manager.png"), prefs_Paths);
 	}
@@ -168,7 +168,8 @@
 
 void PreferencesDialog::setupGui()
 {
-	prefs_UserInterface->restoreDefaults(&localPrefs);
+	if (prefs_UserInterface)
+		prefs_UserInterface->restoreDefaults(&localPrefs);
 	if (prefs_Paths)
 		prefs_Paths->restoreDefaults(&localPrefs);
 	prefs_DocumentSetup->restoreDefaults(&localPrefs);
@@ -207,7 +208,8 @@
 
 void PreferencesDialog::saveGuiToPrefs()
 {
-	prefs_UserInterface->saveGuiToPrefs(&localPrefs);
+	if (prefs_UserInterface)
+		prefs_UserInterface->saveGuiToPrefs(&localPrefs);
 	if (prefs_Paths)
 		prefs_Paths->saveGuiToPrefs(&localPrefs);
 	prefs_DocumentSetup->saveGuiToPrefs(&localPrefs);
Index: scribus/scribus.cpp
===================================================================
--- scribus/scribus.cpp	(revision 15083)
+++ scribus/scribus.cpp	(revision 15084)
@@ -7752,16 +7752,24 @@
 }
 void ScribusMainWindow::ShowSubs()
 {
-	QString mess;
 	if (!ScCore->haveGS())
 	{
-		mess = tr("The following programs are missing:")+"\n\n";
+		QMessageBox mb(this);
+		QString msg = tr("Ghostscript is not installed on your system, or Scribus is not configured with the path to the software.");
+		QString msg2("<qt>");
 #ifndef _WIN32
-		mess += tr("Ghostscript : You cannot use EPS images or Print Preview")+"\n\n";
+		msg2 += tr("Until this is remedied, you cannot import EPS images or use Print Preview. ")+"\n";
 #else
-		mess += tr("Ghostscript : You cannot use EPS images or PostScript Print Preview")+"\n\n";
+		msg2 += tr("Until this is remedied, you cannot import EPS images or use PostScript Print Preview. ")+"\n";
 #endif
-		QMessageBox::warning(this, CommonStrings::trWarning, mess, 1, 0, 0);
+		msg2 += tr("Please read our <a href=\"http://wiki.scribus.net/index.php/Ghostscript\">help and installation instructions</a>.") + "</qt>";
+		QMessageBox msgBox;
+		msgBox.addButton(QMessageBox::Ok);
+		msgBox.setIcon(QMessageBox::Warning);
+		msgBox.setWindowTitle( tr("Ghostscript is missing") );
+		msgBox.setText(msg);
+		msgBox.setInformativeText(msg2);
+		msgBox.exec();
 	}
 
 	propertiesPalette->startup();




More information about the scribus-commit mailing list