r15972 by craig - #2252: CM should not disappear from preferences when it is disabled due to missing files etc. Add warning into prefs, could add a link in future to help browser or wiki

scribus-commit scribus-commit at lists.scribus.net
Wed Nov 24 00:03:47 CET 2010


Author: craig
Date: Tue Nov 23 23:03:47 2010
New Revision: 15972

URL: http://scribus.info/websvn/listing.php?repname=Scribus&sc=1&rev=15972
Log:
#2252: CM should not disappear from preferences when it is disabled due to missing files etc. Add warning into prefs, could add a link in future to help browser or wiki

Modified:
    trunk/Scribus/scribus/ui/preferencesdialog.cpp
    trunk/Scribus/scribus/ui/prefs_colormanagement.cpp
    trunk/Scribus/scribus/ui/prefs_colormanagementbase.ui

Modified: trunk/Scribus/scribus/ui/preferencesdialog.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=15972&path=/trunk/Scribus/scribus/ui/preferencesdialog.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/preferencesdialog.cpp (original)
+++ trunk/Scribus/scribus/ui/preferencesdialog.cpp Tue Nov 23 23:03:47 2010
@@ -200,8 +200,8 @@
 	if (prefs_KeyboardShortcuts) prefs_KeyboardShortcuts->restoreDefaults(&localPrefs);
 	if (prefs_ColorManagement)
 	{
+		prefs_ColorManagement->setProfiles(&localPrefs, &ScCore->InputProfiles, &ScCore->InputProfilesCMYK, &ScCore->PrinterProfiles, &ScCore->MonitorProfiles);
 		prefs_ColorManagement->restoreDefaults(&localPrefs);
-		prefs_ColorManagement->setProfiles(&localPrefs, &ScCore->InputProfiles, &ScCore->InputProfilesCMYK, &ScCore->PrinterProfiles, &ScCore->MonitorProfiles);
 	}
 	if (prefs_Scrapbook) prefs_Scrapbook->restoreDefaults(&localPrefs);
 	if (prefs_Display) prefs_Display->restoreDefaults(&localPrefs);

Modified: trunk/Scribus/scribus/ui/prefs_colormanagement.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=15972&path=/trunk/Scribus/scribus/ui/prefs_colormanagement.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/prefs_colormanagement.cpp (original)
+++ trunk/Scribus/scribus/ui/prefs_colormanagement.cpp Tue Nov 23 23:03:47 2010
@@ -47,6 +47,16 @@
 
 void Prefs_ColorManagement::restoreDefaults(struct ApplicationPrefs *prefsData)
 {
+	if (!ScCore->haveCMS())
+	{
+		activateCMCheckBox->setEnabled(false);
+		warningLabel->setText("<qt><font color=\"red\">"+tr("Please add profiles so you can enable Color Management")+"</font></qt>");
+	}
+	else
+	{
+		warningLabel->resize(0,0);
+		warningLabel->hide();
+	}
 	activateCMCheckBox->setChecked(prefsData->colorPrefs.DCMSset.CMSinUse);
 
 	QString tmp_mp[] = { tr("Perceptual"), tr("Relative Colorimetric"),

Modified: trunk/Scribus/scribus/ui/prefs_colormanagementbase.ui
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=15972&path=/trunk/Scribus/scribus/ui/prefs_colormanagementbase.ui
==============================================================================
--- trunk/Scribus/scribus/ui/prefs_colormanagementbase.ui (original)
+++ trunk/Scribus/scribus/ui/prefs_colormanagementbase.ui Tue Nov 23 23:03:47 2010
@@ -31,6 +31,25 @@
     </widget>
    </item>
    <item>
+    <widget class="QLabel" name="warningLabel">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Preferred" vsizetype="Minimum">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="font">
+      <font>
+       <weight>75</weight>
+       <bold>true</bold>
+      </font>
+     </property>
+     <property name="text">
+      <string/>
+     </property>
+    </widget>
+   </item>
+   <item>
     <widget class="Line" name="line">
      <property name="orientation">
       <enum>Qt::Horizontal</enum>
@@ -47,7 +66,7 @@
        <rect>
         <x>0</x>
         <y>0</y>
-        <width>587</width>
+        <width>589</width>
         <height>631</height>
        </rect>
       </property>




More information about the scribus-commit mailing list