diff --git a/rtengine/FTblockDN.cc b/rtengine/FTblockDN.cc index abcb896ad..50b178388 100644 --- a/rtengine/FTblockDN.cc +++ b/rtengine/FTblockDN.cc @@ -3497,7 +3497,8 @@ SSEFUNCTION void ImProcFunctions::RGB_denoise_info(Imagefloat * src, Imagefloat bdecomp = new wavelet_decomposition (labdn->data + 2 * datalen, labdn->W, labdn->H, levwav, 1); } } - bool autoch = dnparams.autochroma; + const bool autoch = (settings->leveldnautsimpl == 1 && (dnparams.Cmethod == "AUT" || dnparams.Cmethod == "PRE")) || (settings->leveldnautsimpl == 0 && (dnparams.C2method == "AUTO" || dnparams.C2method == "PREV")); + if (comptlevel == 0) { WaveletDenoiseAll_info( diff --git a/rtengine/procevents.h b/rtengine/procevents.h index a41413682..d8ab2f6b6 100644 --- a/rtengine/procevents.h +++ b/rtengine/procevents.h @@ -73,7 +73,7 @@ enum ProcEvent { EvLDNRadius = 43, // obsolete EvLDNEdgeTolerance = 44, // obsolete EvCDNEnabled = 45, // obsolete - EvBlendCMSMatrix = 46, + EvBlendCMSMatrix = 46, // obsolete EvDCPToneCurve = 47, EvDCPIlluminant = 48, EvSHEnabled = 49, diff --git a/rtengine/procparams.cc b/rtengine/procparams.cc index fae6d3649..1e32817b7 100644 --- a/rtengine/procparams.cc +++ b/rtengine/procparams.cc @@ -835,7 +835,6 @@ void DirPyrDenoiseParams::setDefaults() enabled = false; enhance = false; median = false; - autochroma = false; perform = false; luma = 0; passes = 1; @@ -975,7 +974,6 @@ void RAWParams::setDefaults() void ColorManagementParams::setDefaults() { input = "(cameraICC)"; - blendCMSMatrix = false; toneCurve = false; applyLookTable = false; applyBaselineExposureOffset = true; @@ -2258,10 +2256,6 @@ int ProcParams::save (const Glib::ustring &fname, const Glib::ustring &fname2, b keyFile.set_boolean ("Directional Pyramid Denoising", "Median", dirpyrDenoise.median); } - if (!pedited || pedited->dirpyrDenoise.autochroma) { - keyFile.set_boolean ("Directional Pyramid Denoising", "Auto", dirpyrDenoise.autochroma); - } - // if (!pedited || pedited->dirpyrDenoise.perform) keyFile.set_boolean ("Directional Pyramid Denoising", "Perform", dirpyrDenoise.perform); if (!pedited || pedited->dirpyrDenoise.luma) { keyFile.set_double ("Directional Pyramid Denoising", "Luma", dirpyrDenoise.luma); @@ -2684,10 +2678,6 @@ int ProcParams::save (const Glib::ustring &fname, const Glib::ustring &fname2, b keyFile.set_boolean ("Color Management", "ApplyHueSatMap", icm.applyHueSatMap); } - if (!pedited || pedited->icm.blendCMSMatrix) { - keyFile.set_boolean ("Color Management", "BlendCMSMatrix", icm.blendCMSMatrix); - } - if (!pedited || pedited->icm.dcpIlluminant) { keyFile.set_integer ("Color Management", "DCPIlluminant", icm.dcpIlluminant); } @@ -5215,14 +5205,6 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) } } - if (keyFile.has_key ("Directional Pyramid Denoising", "Auto")) { - dirpyrDenoise.autochroma = keyFile.get_boolean ("Directional Pyramid Denoising", "Auto"); - - if (pedited) { - pedited->dirpyrDenoise.autochroma = true; - } - } - // if (keyFile.has_key ("Directional Pyramid Denoising", "Perform")) { dirpyrDenoise.perform = keyFile.get_boolean ("Directional Pyramid Denoising", "Perform"); if (pedited) pedited->dirpyrDenoise.perform = true; } if (keyFile.has_key ("Directional Pyramid Denoising", "Luma")) { dirpyrDenoise.luma = keyFile.get_double ("Directional Pyramid Denoising", "Luma"); @@ -6076,14 +6058,6 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) } } - if (keyFile.has_key ("Color Management", "BlendCMSMatrix")) { - icm.blendCMSMatrix = keyFile.get_boolean ("Color Management", "BlendCMSMatrix"); - - if (pedited) { - pedited->icm.blendCMSMatrix = true; - } - } - if (keyFile.has_key ("Color Management", "DCPIlluminant")) { icm.dcpIlluminant = keyFile.get_integer ("Color Management", "DCPIlluminant"); @@ -8198,7 +8172,6 @@ bool ProcParams::operator== (const ProcParams& other) && dirpyrDenoise.enabled == other.dirpyrDenoise.enabled && dirpyrDenoise.enhance == other.dirpyrDenoise.enhance && dirpyrDenoise.median == other.dirpyrDenoise.median - && dirpyrDenoise.autochroma == other.dirpyrDenoise.autochroma // && dirpyrDenoise.perform == other.dirpyrDenoise.perform && dirpyrDenoise.luma == other.dirpyrDenoise.luma && dirpyrDenoise.lcurve == other.dirpyrDenoise.lcurve @@ -8380,7 +8353,6 @@ bool ProcParams::operator== (const ProcParams& other) && icm.applyLookTable == other.icm.applyLookTable && icm.applyBaselineExposureOffset == other.icm.applyBaselineExposureOffset && icm.applyHueSatMap == other.icm.applyHueSatMap - && icm.blendCMSMatrix == other.icm.blendCMSMatrix && icm.dcpIlluminant == other.icm.dcpIlluminant && icm.working == other.icm.working && icm.output == other.icm.output diff --git a/rtengine/procparams.h b/rtengine/procparams.h index 00944bc59..a5b5f4fb2 100644 --- a/rtengine/procparams.h +++ b/rtengine/procparams.h @@ -690,7 +690,6 @@ public: bool enabled; bool enhance; bool median; - bool autochroma; bool perform; double luma; @@ -983,7 +982,6 @@ public: bool applyLookTable; bool applyBaselineExposureOffset; bool applyHueSatMap; - bool blendCMSMatrix; // setting no longer used int dcpIlluminant; Glib::ustring working; Glib::ustring output; diff --git a/rtengine/refreshmap.cc b/rtengine/refreshmap.cc index c5ebf8b1d..6f96d6be7 100644 --- a/rtengine/refreshmap.cc +++ b/rtengine/refreshmap.cc @@ -73,7 +73,7 @@ int refreshmap[rtengine::NUMOFEVENTS] = { 0, // EvLDNRadius: obsolete, 0, // EvLDNEdgeTolerance: obsolete, 0, // EvCDNEnabled:obsolete, - ALL, // EvBlendCMSMatrix, + 0, // free entry RGBCURVE, // EvDCPToneCurve, ALLNORAW, // EvDCPIlluminant, RETINEX, // EvSHEnabled, diff --git a/rtgui/coordinateadjuster.cc b/rtgui/coordinateadjuster.cc index ac8e5ea4e..c91ced052 100644 --- a/rtgui/coordinateadjuster.cc +++ b/rtgui/coordinateadjuster.cc @@ -42,13 +42,9 @@ void Axis::setValues(Glib::ustring label, unsigned int decimal, double increment CoordinateAdjuster::AxisAdjuster::AxisAdjuster(CoordinateAdjuster *parent, const Axis *axis, char index) : idx(index), parent(parent), rangeLowerBound(0.f), rangeUpperBound(0.f) { - label = Gtk::manage( new Gtk::Label(axis->label) ); - spinButton = Gtk::manage( new Gtk::SpinButton() ); - label = Gtk::manage (new Gtk::Label(axis->label)); - //label->set_alignment(Gtk::ALIGN_MIDDLE, Gtk::ALIGN_MIDDLE); - - spinButton = Gtk::manage (new Gtk::SpinButton()); + label = Gtk::manage(new Gtk::Label(axis->label)); + spinButton = Gtk::manage(new Gtk::SpinButton()); spinButton->set_name("AxisAdjuster"); spinButton->set_digits(axis->decimal); spinButton->set_increments(axis->increment, axis->pageIncrement); diff --git a/rtgui/dirpyrdenoise.cc b/rtgui/dirpyrdenoise.cc index 61b9bf55a..168a9df03 100644 --- a/rtgui/dirpyrdenoise.cc +++ b/rtgui/dirpyrdenoise.cc @@ -26,7 +26,7 @@ using namespace rtengine; using namespace rtengine::procparams; extern Options options; -DirPyrDenoise::DirPyrDenoise () : FoldableToolPanel(this, "dirpyrdenoise", M("TP_DIRPYRDENOISE_LABEL"), true, true), lastenhance(false), lastmedian(false), lastautochroma(false) +DirPyrDenoise::DirPyrDenoise () : FoldableToolPanel(this, "dirpyrdenoise", M("TP_DIRPYRDENOISE_LABEL"), true, true), lastmedian(false) { std::vector milestones; CurveListener::setMulti(true); @@ -83,10 +83,6 @@ DirPyrDenoise::DirPyrDenoise () : FoldableToolPanel(this, "dirpyrdenoise", M("TP Gtk::VBox *chromaVBox = Gtk::manage ( new Gtk::VBox()); chromaVBox->set_spacing(2); - autochroma = Gtk::manage (new Gtk::CheckButton (M("TP_DIRPYRDENOISE_AUTO"))); - autochroma->set_active (true); - autochroma->set_tooltip_text (M("TP_DIRPYRDENOISE_AUTO_TOOLTIP")); - ctboxC = Gtk::manage (new Gtk::HBox ()); Gtk::Label* labmC = Gtk::manage (new Gtk::Label (M("TP_DIRPYRDENOISE_CTYPE") + ":")); ctboxC->pack_start (*labmC, Gtk::PACK_SHRINK, 1); @@ -167,7 +163,6 @@ DirPyrDenoise::DirPyrDenoise () : FoldableToolPanel(this, "dirpyrdenoise", M("TP luma->hide(); Ldetail->show(); -// autochroma->show(); NoiseLabels->show(); TileLabels->show(); PrevLabels->show(); @@ -178,9 +173,6 @@ DirPyrDenoise::DirPyrDenoise () : FoldableToolPanel(this, "dirpyrdenoise", M("TP gamma->show(); // perform->set_active (true); - enhance = Gtk::manage (new Gtk::CheckButton (M("TP_DIRPYRDENOISE_ENH"))); - enhance->set_active (false); - enhance->set_tooltip_text (M("TP_DIRPYRDENOISE_ENH_TOOLTIP")); // ---- Median FIltering ---- Gtk::Frame* medianFrame = Gtk::manage (new Gtk::Frame ()); @@ -193,10 +185,6 @@ DirPyrDenoise::DirPyrDenoise () : FoldableToolPanel(this, "dirpyrdenoise", M("TP median->set_active (true); medianFrame->set_label_widget(*median); - - Gtk::HSeparator *hsep2 = Gtk::manage (new Gtk::HSeparator()); - hsep2->show (); - methodmed = Gtk::manage (new MyComboBoxText ()); methodmed->append (M("TP_DIRPYRDENOISE_LM")); methodmed->append (M("TP_DIRPYRDENOISE_ABM")); @@ -292,12 +280,10 @@ DirPyrDenoise::DirPyrDenoise () : FoldableToolPanel(this, "dirpyrdenoise", M("TP pack_start (*gamma); - //pack_start (*enhance); pack_start (*hsep4); // pack_start( *hb11, Gtk::PACK_SHRINK, 4); -// pack_start (*hsep2); // pack_start (*median); ctboxm->pack_start (*methodmed); @@ -318,8 +304,6 @@ DirPyrDenoise::DirPyrDenoise () : FoldableToolPanel(this, "dirpyrdenoise", M("TP // pack_start (*perform); - enhanConn = enhance->signal_toggled().connect( sigc::mem_fun(*this, &DirPyrDenoise::enhanceChanged) ); - autochromaConn = autochroma->signal_toggled().connect( sigc::mem_fun(*this, &DirPyrDenoise::autochromaChanged) ); medianConn = median->signal_toggled().connect( sigc::mem_fun(*this, &DirPyrDenoise::medianChanged) ); ctboxrgb->hide(); @@ -475,13 +459,11 @@ void DirPyrDenoise::read (const ProcParams* pp, const ParamsEdited* pedited) Cmethodconn.block(true); C2methodconn.block(true); smethodconn.block(true); - autochromaConn.block(true); medmethodconn.block(true); rgbmethodconn.block(true); methodmedconn.block(true); - autochromaChanged (); dmethod->set_active (0); if (pp->dirpyrDenoise.dmethod == "Lab") { @@ -641,7 +623,6 @@ void DirPyrDenoise::read (const ProcParams* pp, const ParamsEdited* pedited) gamma->setEditedState (pedited->dirpyrDenoise.gamma ? Edited : UnEdited); passes->setEditedState (pedited->dirpyrDenoise.passes ? Edited : UnEdited); set_inconsistent (multiImage && !pedited->dirpyrDenoise.enabled); - enhance->set_inconsistent (!pedited->dirpyrDenoise.enhance); median->set_inconsistent (!pedited->dirpyrDenoise.median); ccshape->setUnChanged (!pedited->dirpyrDenoise.cccurve); @@ -650,15 +631,11 @@ void DirPyrDenoise::read (const ProcParams* pp, const ParamsEdited* pedited) // perfconn.block (true); setEnabled(pp->dirpyrDenoise.enabled); - enhance->set_active (pp->dirpyrDenoise.enhance); // perform->set_active (pp->dirpyrDenoise.perform); median->set_active (pp->dirpyrDenoise.median); - autochroma->set_active (pp->dirpyrDenoise.autochroma); // perfconn.block (false); lastmedian = pp->dirpyrDenoise.median; - lastautochroma = pp->dirpyrDenoise.autochroma; - lastenhance = pp->dirpyrDenoise.enhance; // lastperform = pp->dirpyrDenoise.perform; luma->setValue (pp->dirpyrDenoise.luma); Ldetail->setValue (pp->dirpyrDenoise.Ldetail); @@ -671,7 +648,6 @@ void DirPyrDenoise::read (const ProcParams* pp, const ParamsEdited* pedited) lshape->setCurve (pp->dirpyrDenoise.lcurve); ccshape->setCurve (pp->dirpyrDenoise.cccurve); - autochromaConn.block(false); dmethodconn.block(false); Lmethodconn.block(false); @@ -708,10 +684,8 @@ void DirPyrDenoise::write (ProcParams* pp, ParamsEdited* pedited) pp->dirpyrDenoise.gamma = gamma->getValue (); pp->dirpyrDenoise.passes = passes->getValue (); pp->dirpyrDenoise.enabled = getEnabled(); - pp->dirpyrDenoise.enhance = enhance->get_active(); // pp->dirpyrDenoise.perform = perform->get_active(); pp->dirpyrDenoise.median = median->get_active(); - pp->dirpyrDenoise.autochroma = autochroma->get_active(); pp->dirpyrDenoise.lcurve = lshape->getCurve (); pp->dirpyrDenoise.cccurve = ccshape->getCurve (); @@ -732,9 +706,7 @@ void DirPyrDenoise::write (ProcParams* pp, ParamsEdited* pedited) pedited->dirpyrDenoise.gamma = gamma->getEditedState (); pedited->dirpyrDenoise.passes = passes->getEditedState (); pedited->dirpyrDenoise.enabled = !get_inconsistent(); - pedited->dirpyrDenoise.enhance = !enhance->get_inconsistent(); pedited->dirpyrDenoise.median = !median->get_inconsistent(); - pedited->dirpyrDenoise.autochroma = !autochroma->get_inconsistent(); pedited->dirpyrDenoise.lcurve = !lshape->isUnChanged (); pedited->dirpyrDenoise.cccurve = !ccshape->isUnChanged (); @@ -1086,32 +1058,6 @@ void DirPyrDenoise::enabledChanged () } } -void DirPyrDenoise::enhanceChanged () -{ - - if (batchMode) { - if (enhance->get_inconsistent()) { - enhance->set_inconsistent (false); - enhanConn.block (true); - enhance->set_active (false); - enhanConn.block (false); - } else if (lastenhance) { - enhance->set_inconsistent (true); - } - - lastenhance = enhance->get_active (); - } - - if (listener) { - - if (enhance->get_active ()) { - listener->panelChanged (EvDPDNenhance, M("GENERAL_ENABLED")); - } else { - listener->panelChanged (EvDPDNenhance, M("GENERAL_DISABLED")); - } - } -} - void DirPyrDenoise::medianChanged () { @@ -1138,49 +1084,6 @@ void DirPyrDenoise::medianChanged () } } -void DirPyrDenoise::autochromaChanged () -{ -// printf("Autochroma\n"); - if (batchMode) { - if (autochroma->get_inconsistent()) { - autochroma->set_inconsistent (false); - autochromaConn.block (true); - autochroma->set_active (false); - autochromaConn.block (false); - } else if (lastautochroma) { - autochroma->set_inconsistent (true); - } - - lastautochroma = autochroma->get_active (); - } - - if (autochroma->get_active ()) { - chroma->set_sensitive(false); - redchro->set_sensitive(false); - bluechro->set_sensitive(false); - } else { - chroma->set_sensitive(true); - redchro->set_sensitive(true); - bluechro->set_sensitive(true); - } - - if (listener) { - if (autochroma->get_active ()) { - listener->panelChanged (EvDPDNautochroma, M("GENERAL_ENABLED")); - // chroma->set_sensitive(false); - // redchro->set_sensitive(false); - // bluechro->set_sensitive(false); - } else { - listener->panelChanged (EvDPDNautochroma, M("GENERAL_DISABLED")); - //chroma->set_sensitive(true); - //redchro->set_sensitive(true); - //bluechro->set_sensitive(true); - } - - - } -} - /* void DirPyrDenoise::perform_toggled () { diff --git a/rtgui/dirpyrdenoise.h b/rtgui/dirpyrdenoise.h index 9745b374b..cc9a2b5bd 100644 --- a/rtgui/dirpyrdenoise.h +++ b/rtgui/dirpyrdenoise.h @@ -50,9 +50,7 @@ public: void adjusterChanged (Adjuster* a, double newval); void enabledChanged (); - void enhanceChanged (); void medianChanged (); - void autochromaChanged (); void chromaChanged (double autchroma, double autred, double autblue); bool chromaComputed_ (); void noiseChanged (double nresid, double highresid); @@ -92,13 +90,9 @@ private: FlatCurveEditor* lshape; FlatCurveEditor* ccshape; - Gtk::CheckButton* enhance; - bool lastenhance; - sigc::connection enhanConn, medianConn, autochromaConn; + sigc::connection medianConn; Gtk::CheckButton* median; bool lastmedian; - Gtk::CheckButton* autochroma; - bool lastautochroma; Gtk::Label* NoiseLabels; Gtk::Label* TileLabels; Gtk::Label* PrevLabels; diff --git a/rtgui/editorpanel.cc b/rtgui/editorpanel.cc index e10afa686..e9975196f 100644 --- a/rtgui/editorpanel.cc +++ b/rtgui/editorpanel.cc @@ -548,7 +548,6 @@ EditorPanel::EditorPanel (FilePanel* filePanel) Gtk::VSeparator* vsep1 = Gtk::manage (new Gtk::VSeparator ()); Gtk::VSeparator* vsep2 = Gtk::manage (new Gtk::VSeparator ()); - Gtk::VSeparator* vsep3 = Gtk::manage (new Gtk::VSeparator ()); iareapanel = new ImageAreaPanel (); tpc->setEditProvider (iareapanel->imageArea); @@ -699,6 +698,7 @@ EditorPanel::EditorPanel (FilePanel* filePanel) colorMgmtToolBar->pack_right_in (iops); if (!simpleEditor && !options.tabbedUI) { + Gtk::VSeparator* vsep3 = Gtk::manage (new Gtk::VSeparator ()); iops->attach_next_to (*vsep3, Gtk::POS_RIGHT, 1, 1); iops->attach_next_to (*navPrev, Gtk::POS_RIGHT, 1, 1); iops->attach_next_to (*navSync, Gtk::POS_RIGHT, 1, 1); diff --git a/rtgui/exifpanel.cc b/rtgui/exifpanel.cc index 3051e6e74..34cb2c064 100644 --- a/rtgui/exifpanel.cc +++ b/rtgui/exifpanel.cc @@ -88,10 +88,6 @@ ExifPanel::ExifPanel () : idata(nullptr) pack_start (*scrolledWindow); - Gtk::Grid* buttons = Gtk::manage(new Gtk::Grid()); - buttons->set_row_homogeneous(true); - buttons->set_column_homogeneous(true); - setExpandAlignProperties(buttons, false, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_CENTER); Gtk::Grid* buttons1 = Gtk::manage(new Gtk::Grid()); buttons1->set_row_homogeneous(true); buttons1->set_column_homogeneous(true); diff --git a/rtgui/guiutils.cc b/rtgui/guiutils.cc index 91348e52f..4d9dd3c5c 100644 --- a/rtgui/guiutils.cc +++ b/rtgui/guiutils.cc @@ -1330,26 +1330,6 @@ BackBuffer::BackBuffer(int width, int height, Cairo::Format format) : x(0), y(0) } } -BackBuffer::BackBuffer(int width, int height, Glib::RefPtr referenceWindow) : x(0), y(0), w(width), h(height), offset(0, 0), dirty(true) -{ - if (w > 0 && h > 0 && referenceWindow) { - Cairo::RefPtr surf = referenceWindow->create_similar_image_surface(Cairo::FORMAT_RGB24, w, h, 0); - Cairo::SurfaceType type = surf->get_type(); - - if (type == Cairo::SURFACE_TYPE_IMAGE || type == Cairo::SURFACE_TYPE_WIN32) { - surface = Cairo::RefPtr::cast_static(surf); - - if (!surface || !surface->get_width() || !surface->get_height()) { - printf("ERRRROOOOORRRR!\n"); - } - } else { - printf("ERROR: wrong surface type. 0 or 7 was expected, but we've got %d instead.\n", type); - } - } else { - w = h = 0; - } -} - void BackBuffer::setDestPosition(int x, int y) { // values will be clamped when used... diff --git a/rtgui/guiutils.h b/rtgui/guiutils.h index a6ec916f0..085027577 100644 --- a/rtgui/guiutils.h +++ b/rtgui/guiutils.h @@ -509,7 +509,6 @@ protected: public: BackBuffer(); BackBuffer(int w, int h, Cairo::Format format = Cairo::FORMAT_RGB24); - BackBuffer(int w, int h, Glib::RefPtr referenceWindow); // set the destination drawing rectangle; return true if the dimensions are different // Note: newW & newH must be > 0 diff --git a/rtgui/icmpanel.cc b/rtgui/icmpanel.cc index 232d626a0..e80b2028a 100644 --- a/rtgui/icmpanel.cc +++ b/rtgui/icmpanel.cc @@ -32,7 +32,7 @@ extern Options options; ICMPanel::ICMPanel () : FoldableToolPanel(this, "icm", M("TP_ICM_LABEL")), iunchanged(nullptr), icmplistener(nullptr), lastRefFilename(""), camName("") { - isBatchMode = lastToneCurve = lastApplyLookTable = lastApplyBaselineExposureOffset = lastApplyHueSatMap = lastBlendCMSMatrix = lastgamfree = false; + isBatchMode = lastToneCurve = lastApplyLookTable = lastApplyBaselineExposureOffset = lastApplyHueSatMap = lastgamfree = false; ipDialog = Gtk::manage (new MyFileChooserButton (M("TP_ICM_INPUTDLGLABEL"), Gtk::FILE_CHOOSER_ACTION_OPEN)); ipDialog->set_tooltip_text (M("TP_ICM_INPUTCUSTOM_TOOLTIP")); @@ -138,12 +138,6 @@ ICMPanel::ICMPanel () : FoldableToolPanel(this, "icm", M("TP_ICM_LABEL")), iunch dcpFrame->set_sensitive(false); iVBox->pack_start (*dcpFrame); - ckbBlendCMSMatrix = Gtk::manage (new Gtk::CheckButton (M("TP_ICM_BLENDCMSMATRIX"))); - ckbBlendCMSMatrix->set_sensitive (false); - ckbBlendCMSMatrix->set_tooltip_text (M("TP_ICM_BLENDCMSMATRIX_TOOLTIP")); - // blend cms matrix no longer used - //iVBox->pack_start (*ckbBlendCMSMatrix, Gtk::PACK_SHRINK, 2); - saveRef = Gtk::manage (new Gtk::Button (M("TP_ICM_SAVEREFERENCE"))); saveRef->set_image (*Gtk::manage (new RTImage ("gtk-save-large.png"))); saveRef->set_alignment (0.5f, 0.5f); @@ -318,7 +312,6 @@ ICMPanel::ICMPanel () : FoldableToolPanel(this, "icm", M("TP_ICM_LABEL")), iunch ltableconn = ckbApplyLookTable->signal_toggled().connect ( sigc::mem_fun(*this, &ICMPanel::applyLookTableChanged)); beoconn = ckbApplyBaselineExposureOffset->signal_toggled().connect ( sigc::mem_fun(*this, &ICMPanel::applyBaselineExposureOffsetChanged)); hsmconn = ckbApplyHueSatMap->signal_toggled().connect ( sigc::mem_fun(*this, &ICMPanel::applyHueSatMapChanged)); - blendcmsconn = ckbBlendCMSMatrix->signal_toggled().connect ( sigc::mem_fun(*this, &ICMPanel::blendCMSMatrixChanged)); icamera->signal_toggled().connect( sigc::mem_fun(*this, &ICMPanel::ipChanged) ); icameraICC->signal_toggled().connect( sigc::mem_fun(*this, &ICMPanel::ipChanged) ); @@ -494,7 +487,6 @@ void ICMPanel::read (const ProcParams* pp, const ParamsEdited* pedited) ConnectionBlocker ltableconn_(ltableconn); ConnectionBlocker beoconn_(beoconn); ConnectionBlocker hsmconn_(hsmconn); - ConnectionBlocker blendcmsconn_(blendcmsconn); ConnectionBlocker wnamesconn_(wnamesconn); ConnectionBlocker onamesconn_(onamesconn); ConnectionBlocker ointentconn_(ointentconn); @@ -507,50 +499,29 @@ void ICMPanel::read (const ProcParams* pp, const ParamsEdited* pedited) if (pp->icm.input == "(none)") { inone->set_active (true); - if (!batchMode) { - ckbBlendCMSMatrix->set_sensitive (false); - } updateDCP(pp->icm.dcpIlluminant, ""); } else if (pp->icm.input == "(embedded)" || ((pp->icm.input == "(camera)" || pp->icm.input == "") && icamera->get_state() == Gtk::STATE_INSENSITIVE)) { iembedded->set_active (true); - if (!batchMode) { - ckbBlendCMSMatrix->set_sensitive (false); - } updateDCP(pp->icm.dcpIlluminant, ""); } else if ((pp->icm.input == "(cameraICC)") && icameraICC->get_state() != Gtk::STATE_INSENSITIVE) { icameraICC->set_active (true); - if (!batchMode) { - ckbBlendCMSMatrix->set_sensitive (true); - } updateDCP(pp->icm.dcpIlluminant, "(cameraICC)"); } else if ((pp->icm.input == "(cameraICC)") && icamera->get_state() != Gtk::STATE_INSENSITIVE && icameraICC->get_state() == Gtk::STATE_INSENSITIVE) { // this is the case when (cameraICC) is instructed by packaged profiles, but ICC file is not found // therefore falling back UI to explicitly reflect the (camera) option icamera->set_active (true); - if (!batchMode) { - ckbBlendCMSMatrix->set_sensitive (false); - } updateDCP(pp->icm.dcpIlluminant, ""); } else if ((pp->icm.input == "(cameraICC)") && icamera->get_state() == Gtk::STATE_INSENSITIVE && icameraICC->get_state() == Gtk::STATE_INSENSITIVE) { // If neither (camera) nor (cameraICC) are available, as is the case when loading a non-raw, activate (embedded). iembedded->set_active (true); - if (!batchMode) { - ckbBlendCMSMatrix->set_sensitive (false); - } updateDCP(pp->icm.dcpIlluminant, "(cameraICC)"); } else if ((pp->icm.input == "(camera)" || pp->icm.input == "") && icamera->get_state() != Gtk::STATE_INSENSITIVE) { icamera->set_active (true); - if (!batchMode) { - ckbBlendCMSMatrix->set_sensitive (false); - } updateDCP(pp->icm.dcpIlluminant, ""); } else { ifromfile->set_active (true); oldip = pp->icm.input.substr(5); // cut of "file:" ipDialog->set_filename (pp->icm.input.substr(5)); - if (!batchMode) { - ckbBlendCMSMatrix->set_sensitive (true); - } updateDCP(pp->icm.dcpIlluminant, pp->icm.input.substr(5)); } @@ -578,9 +549,6 @@ void ICMPanel::read (const ProcParams* pp, const ParamsEdited* pedited) ckbApplyHueSatMap->set_active (pp->icm.applyHueSatMap); lastApplyHueSatMap = pp->icm.applyHueSatMap; - ckbBlendCMSMatrix->set_active (pp->icm.blendCMSMatrix); - lastBlendCMSMatrix = pp->icm.blendCMSMatrix; - freegamma->set_active (pp->icm.freegamma); lastgamfree = pp->icm.freegamma; @@ -602,7 +570,6 @@ void ICMPanel::read (const ProcParams* pp, const ParamsEdited* pedited) ckbApplyLookTable->set_inconsistent(!pedited->icm.applyLookTable); ckbApplyBaselineExposureOffset->set_inconsistent(!pedited->icm.applyBaselineExposureOffset); ckbApplyHueSatMap->set_inconsistent(!pedited->icm.applyHueSatMap); - ckbBlendCMSMatrix->set_inconsistent(!pedited->icm.blendCMSMatrix); freegamma->set_inconsistent (!pedited->icm.freegamma); if (!pedited->icm.working) { @@ -677,7 +644,6 @@ void ICMPanel::write (ProcParams* pp, ParamsEdited* pedited) pp->icm.applyLookTable = ckbApplyLookTable->get_active (); pp->icm.applyBaselineExposureOffset = ckbApplyBaselineExposureOffset->get_active (); pp->icm.applyHueSatMap = ckbApplyHueSatMap->get_active (); - pp->icm.blendCMSMatrix = ckbBlendCMSMatrix->get_active (); pp->icm.gampos = (double) gampos->getValue(); pp->icm.slpos = (double) slpos->getValue(); pp->icm.outputBPC = obpc->get_active (); @@ -693,7 +659,6 @@ void ICMPanel::write (ProcParams* pp, ParamsEdited* pedited) pedited->icm.applyLookTable = !ckbApplyLookTable->get_inconsistent (); pedited->icm.applyBaselineExposureOffset = !ckbApplyBaselineExposureOffset->get_inconsistent (); pedited->icm.applyHueSatMap = !ckbApplyHueSatMap->get_inconsistent (); - pedited->icm.blendCMSMatrix = !ckbBlendCMSMatrix->get_inconsistent (); pedited->icm.gamma = wgamma->get_active_text() != M("GENERAL_UNCHANGED"); pedited->icm.freegamma = !freegamma->get_inconsistent(); pedited->icm.gampos = gampos->getEditedState (); @@ -871,19 +836,14 @@ void ICMPanel::ipChanged () if (inone->get_active()) { profname = "(none)"; - ckbBlendCMSMatrix->set_sensitive(false); } else if (iembedded->get_active ()) { profname = "(embedded)"; - ckbBlendCMSMatrix->set_sensitive(false); } else if (icamera->get_active ()) { profname = "(camera)"; - ckbBlendCMSMatrix->set_sensitive(false); } else if (icameraICC->get_active ()) { profname = "(cameraICC)"; - ckbBlendCMSMatrix->set_sensitive(true); } else { profname = ipDialog->get_filename (); - ckbBlendCMSMatrix->set_sensitive(true); } updateDCP(-1, profname); @@ -895,32 +855,6 @@ void ICMPanel::ipChanged () oldip = profname; } -void ICMPanel::blendCMSMatrixChanged() -{ - if (multiImage) { - if (ckbBlendCMSMatrix->get_inconsistent()) { - ckbBlendCMSMatrix->set_inconsistent (false); - blendcmsconn.block (true); - ckbBlendCMSMatrix->set_active (false); - blendcmsconn.block (false); - } else if (lastBlendCMSMatrix) { - ckbBlendCMSMatrix->set_inconsistent (true); - } - - lastBlendCMSMatrix = ckbBlendCMSMatrix->get_active (); - } - - if (listener) { - if (ckbBlendCMSMatrix->get_inconsistent()) { - listener->panelChanged (EvBlendCMSMatrix, M("GENERAL_UNCHANGED")); - } else if (ckbBlendCMSMatrix->get_active()) { - listener->panelChanged (EvBlendCMSMatrix, M("GENERAL_ENABLED")); - } else { - listener->panelChanged (EvBlendCMSMatrix, M("GENERAL_DISABLED")); - } - } -} - void ICMPanel::GamChanged() { if (multiImage) { diff --git a/rtgui/icmpanel.h b/rtgui/icmpanel.h index 846129105..0e7deefa9 100644 --- a/rtgui/icmpanel.h +++ b/rtgui/icmpanel.h @@ -56,9 +56,7 @@ protected: sigc::connection hsmconn; bool lastobpc; sigc::connection obpcconn; - bool lastBlendCMSMatrix; bool isBatchMode; - sigc::connection blendcmsconn; private: Gtk::VBox * iVBox; @@ -78,7 +76,6 @@ private: Gtk::CheckButton* ckbApplyLookTable; Gtk::CheckButton* ckbApplyBaselineExposureOffset; Gtk::CheckButton* ckbApplyHueSatMap; - Gtk::CheckButton* ckbBlendCMSMatrix; MyComboBoxText* wnames; sigc::connection wnamesconn; MyComboBoxText* wgamma; @@ -119,7 +116,6 @@ public: void gpChanged (); void GamChanged (); void ipSelectionChanged (); - void blendCMSMatrixChanged(); void dcpIlluminantChanged(); void toneCurveChanged(); void applyLookTableChanged(); diff --git a/rtgui/paramsedited.cc b/rtgui/paramsedited.cc index cea9fc390..14da83268 100644 --- a/rtgui/paramsedited.cc +++ b/rtgui/paramsedited.cc @@ -235,7 +235,6 @@ void ParamsEdited::set (bool v) dirpyrDenoise.lcurve = v; dirpyrDenoise.cccurve = v; dirpyrDenoise.median = v; - dirpyrDenoise.autochroma = v; dirpyrDenoise.luma = v; dirpyrDenoise.Ldetail = v; dirpyrDenoise.chroma = v; @@ -349,7 +348,6 @@ void ParamsEdited::set (bool v) icm.applyLookTable = v; icm.applyBaselineExposureOffset = v; icm.applyHueSatMap = v; - icm.blendCMSMatrix = v; icm.dcpIlluminant = v; icm.working = v; icm.output = v; @@ -759,7 +757,6 @@ void ParamsEdited::initFrom (const std::vector dirpyrDenoise.enabled = dirpyrDenoise.enabled && p.dirpyrDenoise.enabled == other.dirpyrDenoise.enabled; dirpyrDenoise.enhance = dirpyrDenoise.enhance && p.dirpyrDenoise.enhance == other.dirpyrDenoise.enhance; dirpyrDenoise.median = dirpyrDenoise.median && p.dirpyrDenoise.median == other.dirpyrDenoise.median; - dirpyrDenoise.autochroma = dirpyrDenoise.autochroma && p.dirpyrDenoise.autochroma == other.dirpyrDenoise.autochroma; // dirpyrDenoise.perform = dirpyrDenoise.perform && p.dirpyrDenoise.perform == other.dirpyrDenoise.perform; dirpyrDenoise.luma = dirpyrDenoise.luma && p.dirpyrDenoise.luma == other.dirpyrDenoise.luma; dirpyrDenoise.lcurve = dirpyrDenoise.lcurve && p.dirpyrDenoise.lcurve == other.dirpyrDenoise.lcurve; @@ -876,7 +873,6 @@ void ParamsEdited::initFrom (const std::vector icm.applyLookTable = icm.applyLookTable && p.icm.applyLookTable == other.icm.applyLookTable; icm.applyBaselineExposureOffset = icm.applyBaselineExposureOffset && p.icm.applyBaselineExposureOffset == other.icm.applyBaselineExposureOffset; icm.applyHueSatMap = icm.applyHueSatMap && p.icm.applyHueSatMap == other.icm.applyHueSatMap; - icm.blendCMSMatrix = icm.blendCMSMatrix && p.icm.blendCMSMatrix == other.icm.blendCMSMatrix; icm.dcpIlluminant = icm.dcpIlluminant && p.icm.dcpIlluminant == other.icm.dcpIlluminant; icm.working = icm.working && p.icm.working == other.icm.working; icm.output = icm.output && p.icm.output == other.icm.output; @@ -1825,10 +1821,6 @@ void ParamsEdited::combine (rtengine::procparams::ProcParams& toEdit, const rten toEdit.dirpyrDenoise.median = mods.dirpyrDenoise.median; } - if (dirpyrDenoise.autochroma) { - toEdit.dirpyrDenoise.autochroma = mods.dirpyrDenoise.autochroma; - } - if (dirpyrDenoise.luma) { toEdit.dirpyrDenoise.luma = dontforceSet && options.baBehav[ADDSET_DIRPYRDN_LUMA] ? toEdit.dirpyrDenoise.luma + mods.dirpyrDenoise.luma : mods.dirpyrDenoise.luma; } @@ -2260,10 +2252,6 @@ void ParamsEdited::combine (rtengine::procparams::ProcParams& toEdit, const rten toEdit.icm.applyHueSatMap = mods.icm.applyHueSatMap; } - if (icm.blendCMSMatrix) { - toEdit.icm.blendCMSMatrix = mods.icm.blendCMSMatrix; - } - if (icm.dcpIlluminant) { toEdit.icm.dcpIlluminant = mods.icm.dcpIlluminant; } diff --git a/rtgui/paramsedited.h b/rtgui/paramsedited.h index 6e0af90cf..298384f5b 100644 --- a/rtgui/paramsedited.h +++ b/rtgui/paramsedited.h @@ -321,7 +321,6 @@ public: bool enabled; bool enhance; bool median; - bool autochroma; bool Ldetail; bool luma; bool chroma; @@ -540,7 +539,6 @@ public: bool applyLookTable; bool applyBaselineExposureOffset; bool applyHueSatMap; - bool blendCMSMatrix; bool dcpIlluminant; bool working; bool output; diff --git a/rtgui/thumbbrowserbase.cc b/rtgui/thumbbrowserbase.cc index d6c2acd9d..531ed8c25 100644 --- a/rtgui/thumbbrowserbase.cc +++ b/rtgui/thumbbrowserbase.cc @@ -697,10 +697,8 @@ void ThumbBrowserBase::Internal::on_realize() bgn = style->get_background_color(Gtk::STATE_FLAG_NORMAL); bgs = style->get_background_color(Gtk::STATE_FLAG_SELECTED); - Glib::RefPtr window = get_window(); set_can_focus(true); add_events(Gdk::EXPOSURE_MASK | Gdk::BUTTON_PRESS_MASK | Gdk::BUTTON_RELEASE_MASK | Gdk::POINTER_MOTION_MASK | Gdk::SCROLL_MASK | Gdk::KEY_PRESS_MASK); - //cc = window->create_cairo_context(); set_has_tooltip (true); signal_query_tooltip().connect( sigc::mem_fun(*this, &ThumbBrowserBase::Internal::on_query_tooltip) ); } @@ -842,8 +840,6 @@ bool ThumbBrowserBase::Internal::on_draw(const ::Cairo::RefPtr< Cairo::Context> dirty = false; - Glib::RefPtr window = get_window(); - int w = get_width(); int h = get_height(); diff --git a/rtgui/thumbbrowserentrybase.cc b/rtgui/thumbbrowserentrybase.cc index 6fa8eac52..cf0ce1bb3 100644 --- a/rtgui/thumbbrowserentrybase.cc +++ b/rtgui/thumbbrowserentrybase.cc @@ -56,20 +56,12 @@ void ThumbBrowserEntryBase::updateBackBuffer () Gtk::Widget* w = parent->getDrawingArea (); - Glib::RefPtr win = w->get_window(); - - if (!win) - // Nothing to draw on, so we return - { - return; - } - if (backBuffer && (backBuffer->getWidth() != exp_width || backBuffer->getHeight() != exp_height )) { // deleting the existing BackBuffer backBuffer.reset(); } if (!backBuffer) { - backBuffer = Glib::RefPtr ( new BackBuffer (exp_width, exp_height, win) ); + backBuffer = Glib::RefPtr(new BackBuffer(exp_width, exp_height)); } // If thumbnail is hidden by a filter, drawing to it will crash