PIMPLed and streamlined ICCStore (#3691)

This commit is contained in:
Flössie
2017-03-18 11:57:29 +01:00
parent 567ed3629c
commit 97caf21b5c
22 changed files with 941 additions and 841 deletions

View File

@@ -96,12 +96,12 @@ private:
profileBox.append (M ("PREFERENCES_PROFILE_NONE"));
#ifdef WIN32
profileBox.append (M ("MONITOR_PROFILE_SYSTEM") + " (" + rtengine::iccStore->getDefaultMonitorProfileName() + ")");
profileBox.append (M ("MONITOR_PROFILE_SYSTEM") + " (" + rtengine::ICCStore::getInstance()->getDefaultMonitorProfileName() + ")");
profileBox.set_active (options.rtSettings.autoMonitorProfile ? 1 : 0);
#else
profileBox.set_active (0);
#endif
const std::vector<Glib::ustring> profiles = rtengine::iccStore->getProfiles (rtengine::ICCStore::ProfileType::MONITOR);
const std::vector<Glib::ustring> profiles = rtengine::ICCStore::getInstance()->getProfiles (rtengine::ICCStore::ProfileType::MONITOR);
for (const auto profile: profiles) {
profileBox.append (profile);
}
@@ -176,7 +176,7 @@ private:
#if !defined(__APPLE__) // monitor profile not supported on apple
#ifdef WIN32
if (profileBox.get_active_row_number () == 1) {
profile = rtengine::iccStore->getDefaultMonitorProfileName ();
profile = rtengine::ICCStore::getInstance()->getDefaultMonitorProfileName ();
if (profile.empty ()) {
profile = options.rtSettings.monitorProfile;
}
@@ -206,7 +206,7 @@ private:
profileBox.set_tooltip_text ("");
} else {
const uint8_t supportedIntents = rtengine::iccStore->getProofIntents (profile);
const uint8_t supportedIntents = rtengine::ICCStore::getInstance()->getProofIntents (profile);
const bool supportsRelativeColorimetric = supportedIntents & 1 << INTENT_RELATIVE_COLORIMETRIC;
const bool supportsPerceptual = supportedIntents & 1 << INTENT_PERCEPTUAL;
const bool supportsAbsoluteColorimetric = supportedIntents & 1 << INTENT_ABSOLUTE_COLORIMETRIC;

View File

@@ -166,7 +166,7 @@ ICMPanel::ICMPanel () : FoldableToolPanel(this, "icm", M("TP_ICM_LABEL")), iunch
wnames = Gtk::manage (new MyComboBoxText ());
wVBox->pack_start (*wnames, Gtk::PACK_SHRINK);
std::vector<Glib::ustring> wpnames = rtengine::getWorkingProfiles ();
std::vector<Glib::ustring> wpnames = rtengine::ICCStore::getWorkingProfiles();
for (size_t i = 0; i < wpnames.size(); i++) {
wnames->append (wpnames[i]);
@@ -193,7 +193,7 @@ ICMPanel::ICMPanel () : FoldableToolPanel(this, "icm", M("TP_ICM_LABEL")), iunch
onames->append (M("TP_ICM_NOICM"));
onames->set_active (0);
std::vector<Glib::ustring> opnames = iccStore->getProfiles (rtengine::ICCStore::ProfileType::OUTPUT);
std::vector<Glib::ustring> opnames = ICCStore::getInstance()->getProfiles (rtengine::ICCStore::ProfileType::OUTPUT);
for (size_t i = 0; i < opnames.size(); i++) {
onames->append (opnames[i]);
@@ -232,7 +232,7 @@ ICMPanel::ICMPanel () : FoldableToolPanel(this, "icm", M("TP_ICM_LABEL")), iunch
oVBox->pack_start(*gaHBox, Gtk::PACK_EXPAND_WIDGET);
std::vector<Glib::ustring> wpgamma = rtengine::getGamma ();
std::vector<Glib::ustring> wpgamma = rtengine::ICCStore::getGamma();
for (size_t i = 0; i < wpgamma.size(); i++) {
wgamma->append (wpgamma[i]);
@@ -332,7 +332,7 @@ ICMPanel::ICMPanel () : FoldableToolPanel(this, "icm", M("TP_ICM_LABEL")), iunch
}
void ICMPanel::updateRenderingIntent (const Glib::ustring &profile) {
const uint8_t supportedIntents = rtengine::iccStore->getOutputIntents (profile);
const uint8_t supportedIntents = rtengine::ICCStore::getInstance()->getOutputIntents (profile);
const bool supportsPerceptual = supportedIntents & 1 << INTENT_PERCEPTUAL;
const bool supportsRelative = supportedIntents & 1 << INTENT_RELATIVE_COLORIMETRIC;
const bool supportsSaturation = supportedIntents & 1 << INTENT_SATURATION;
@@ -1033,7 +1033,7 @@ void ICMPanel::setRawMeta (bool raw, const rtengine::ImageData* pMeta)
iembedded->set_active (!raw);
icamera->set_sensitive (raw);
camName = pMeta->getCamera();
icameraICC->set_sensitive (raw && (iccStore->getStdProfile(pMeta->getCamera()) != nullptr || DCPStore::getInstance()->getStdProfile(pMeta->getCamera()) != nullptr));
icameraICC->set_sensitive (raw && (ICCStore::getInstance()->getStdProfile(pMeta->getCamera()) != nullptr || DCPStore::getInstance()->getStdProfile(pMeta->getCamera()) != nullptr));
iembedded->set_sensitive (!raw);
enableListener ();