GNOME Bugzilla – Bug 606045
The PreferencesDialog shows ICC profiles which are not applicable
Last modified: 2010-01-05 11:18:45 UTC
Currently the F-Spot PreferencesDialog shows all installed profiles for both screen and printing. However, for the screen, only "Display" profiles should be displayed and allowed to be chosen. And for printing, only "Output" profiles should be displayed and allowed to be chosen. The profile type can be determined via LCMS, using the DeviceClass/ProfileClass property in the profile header.
Created attachment 150789 [details] [review] PreferencesDialog shows only relevant ICC profiles for selection This patch fixed the above reported bug, and seems to work just fine. Additional testing would be appreciated.
Review of attachment 150789 [details] [review]: ::: f-spot-0.6.1.5-orig/src/Cms/NativeMethods.cs @@ +99,3 @@ + [DllImport ("liblcms-1.0.0.dll", EntryPoint = "cmsGetDeviceClass")] + public static extern uint cmsGetDeviceClass (HandleRef hprofile); the method name should be CmsGetDeviceClass, with an uppercase C ::: f-spot-0.6.1.5-orig/src/Cms/Profile.cs @@ +268,3 @@ } + + public uint DeviceClass { should return a IccDeviceClass, not an uint @@ +271,3 @@ + get { + return NativeMethods.cmsGetDeviceClass (this.handle); + } single line accessors are usually written on a single line (sic) ::: f-spot-0.6.1.5-orig/src/Core/ColorManagement.cs @@ +100,3 @@ } } there's no need to duplicate the profiles list. And it could cause problems, at the time you have a profile name, you don't know to which list it belongs, but you still need ot work with it ::: f-spot-0.6.1.5-orig/src/Makefile.in @@ +319,3 @@ $(srcdir)/Cms/Intent.cs \ $(srcdir)/Cms/NativeMethods.cs \ $(srcdir)/Cms/Profile.cs \ Makefile.in files aren't under revision control.
commit f06f5f4398aa89de50dd566e170205ced2e12872 Author: Stephane Delcroix <stephane@delcroix.org> Date: Tue Jan 5 12:17:42 2010 +0100 Only list applicable ICC profiles Only list Display profiles for displaying, and Output ones for printing. Based on a patch from Pascal de Bruijn. Fixes bgo#606045