Printer profile added in Preferences for soft-proofing
The output profiles now retain only 'Display' device class as well as the Monitor profile - and they both have to have rgb color space, the printer profile retain only 'Output' device class. MacOS can use soft-proofing but due to undocumented feature of OSX, and since Cairo assume that the image data are sRGB, the monitor profile is forced to 'RT_sRGB'. A warning message replace the combobox for this OS.
This commit is contained in:
@@ -38,7 +38,9 @@ using namespace rtengine::procparams;
|
||||
class EditorPanel::ColorManagementToolbar
|
||||
{
|
||||
private:
|
||||
#if !defined(__APPLE__) // monitor profile not supported on apple
|
||||
MyComboBoxText profileBox;
|
||||
#endif
|
||||
PopUpButton intentBox;
|
||||
Gtk::ToggleButton softProof;
|
||||
Gtk::ToggleButton spGamutCheck;
|
||||
@@ -47,6 +49,7 @@ private:
|
||||
rtengine::StagedImageProcessor* const& processor;
|
||||
|
||||
private:
|
||||
#if !defined(__APPLE__) // monitor profile not supported on apple
|
||||
void prepareProfileBox ()
|
||||
{
|
||||
profileBox.set_size_request (100, -1);
|
||||
@@ -58,13 +61,13 @@ private:
|
||||
#else
|
||||
profileBox.set_active (0);
|
||||
#endif
|
||||
|
||||
const std::vector<Glib::ustring> profiles = rtengine::iccStore->getProfiles (true);
|
||||
for (std::vector<Glib::ustring>::const_iterator iterator = profiles.begin (); iterator != profiles.end (); ++iterator) {
|
||||
profileBox.append_text (*iterator);
|
||||
const std::vector<Glib::ustring> profiles = rtengine::iccStore->getProfiles (rtengine::ICCStore::ProfileType::MONITOR);
|
||||
for (const auto profile: profiles) {
|
||||
profileBox.append_text (profile);
|
||||
}
|
||||
profileBox.set_tooltip_text (profileBox.get_active_text ());
|
||||
}
|
||||
#endif
|
||||
|
||||
void prepareIntentBox ()
|
||||
{
|
||||
@@ -121,12 +124,15 @@ private:
|
||||
|
||||
void updateParameters (bool noEvent = false)
|
||||
{
|
||||
#if !defined(__APPLE__) // monitor profile not supported on apple
|
||||
ConnectionBlocker profileBlocker (profileConn);
|
||||
#endif
|
||||
ConnectionBlocker intentBlocker (intentConn);
|
||||
|
||||
Glib::ustring profile;
|
||||
|
||||
#ifdef WIN32
|
||||
#if !defined(__APPLE__) // monitor profile not supported on apple
|
||||
#ifdef WIN32
|
||||
if (profileBox.get_active_row_number () == 1) {
|
||||
profile = rtengine::iccStore->getDefaultMonitorProfileName ();
|
||||
if (profile.empty ()) {
|
||||
@@ -138,10 +144,14 @@ private:
|
||||
} else if (profileBox.get_active_row_number () > 1) {
|
||||
profile = profileBox.get_active_text ();
|
||||
}
|
||||
#else
|
||||
#else
|
||||
profile = profileBox.get_active_row_number () > 0 ? profileBox.get_active_text () : Glib::ustring ();
|
||||
#endif
|
||||
#else
|
||||
profile = "RT_sRGB";
|
||||
#endif
|
||||
|
||||
#if !defined(__APPLE__) // monitor profile not supported on apple
|
||||
if (profileBox.get_active_row_number () == 0) {
|
||||
|
||||
profile.clear();
|
||||
@@ -178,7 +188,7 @@ private:
|
||||
|
||||
profileBox.set_tooltip_text (profileBox.get_active_text ());
|
||||
}
|
||||
|
||||
#endif
|
||||
rtengine::RenderingIntent intent;
|
||||
switch (intentBox.getSelected ()) {
|
||||
default:
|
||||
@@ -211,7 +221,9 @@ private:
|
||||
{
|
||||
spGamutCheck.set_sensitive(softProof.get_active());
|
||||
|
||||
#if !defined(__APPLE__) // monitor profile not supported on apple
|
||||
if (profileBox.get_active_row_number () > 0) {
|
||||
#endif
|
||||
if (!noEvent) {
|
||||
processor->beginUpdateParams ();
|
||||
}
|
||||
@@ -219,7 +231,9 @@ private:
|
||||
if (!noEvent) {
|
||||
processor->endUpdateParams (rtengine::EvMonitorTransform);
|
||||
}
|
||||
#if !defined(__APPLE__) // monitor profile not supported on apple
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
public:
|
||||
@@ -227,7 +241,9 @@ public:
|
||||
intentBox (Glib::ustring (), true),
|
||||
processor (ipc)
|
||||
{
|
||||
#if !defined(__APPLE__) // monitor profile not supported on apple
|
||||
prepareProfileBox ();
|
||||
#endif
|
||||
prepareIntentBox ();
|
||||
prepareSoftProofingBox ();
|
||||
|
||||
@@ -235,7 +251,9 @@ public:
|
||||
|
||||
softProof.signal_toggled().connect(sigc::mem_fun (this, &ColorManagementToolbar::softProofToggled));
|
||||
spGamutCheck.signal_toggled().connect(sigc::mem_fun (this, &ColorManagementToolbar::spGamutCheckToggled));;
|
||||
#if !defined(__APPLE__) // monitor profile not supported on apple
|
||||
profileConn = profileBox.signal_changed ().connect (sigc::mem_fun (this, &ColorManagementToolbar::profileBoxChanged));
|
||||
#endif
|
||||
intentConn = intentBox.signal_changed ().connect (sigc::mem_fun (this, &ColorManagementToolbar::intentBoxChanged));
|
||||
}
|
||||
|
||||
@@ -244,7 +262,9 @@ public:
|
||||
box->pack_end (spGamutCheck, Gtk::PACK_SHRINK, 0);
|
||||
box->pack_end (softProof, Gtk::PACK_SHRINK, 0);
|
||||
box->pack_end (*intentBox.buttonGroup, Gtk::PACK_SHRINK, 0);
|
||||
#if !defined(__APPLE__) // monitor profile not supported on apple
|
||||
box->pack_end (profileBox, Gtk::PACK_SHRINK, 0);
|
||||
#endif
|
||||
}
|
||||
|
||||
void updateProcessor()
|
||||
@@ -256,17 +276,19 @@ public:
|
||||
|
||||
void reset ()
|
||||
{
|
||||
ConnectionBlocker profileBlocker (profileConn);
|
||||
ConnectionBlocker intentBlocker (intentConn);
|
||||
#if !defined(__APPLE__) // monitor profile not supported on apple
|
||||
ConnectionBlocker profileBlocker (profileConn);
|
||||
|
||||
#ifdef WIN32
|
||||
#ifdef WIN32
|
||||
if (options.rtSettings.autoMonitorProfile) {
|
||||
setActiveTextOrIndex (profileBox, options.rtSettings.monitorProfile, 1);
|
||||
} else {
|
||||
setActiveTextOrIndex (profileBox, options.rtSettings.monitorProfile, 0);
|
||||
}
|
||||
#else
|
||||
#else
|
||||
setActiveTextOrIndex (profileBox, options.rtSettings.monitorProfile, 0);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
switch (options.rtSettings.monitorIntent)
|
||||
|
Reference in New Issue
Block a user