From 7f58a8b6a767c7f86df3e4498a53ffdb82f96960 Mon Sep 17 00:00:00 2001 From: jdc Date: Tue, 17 Dec 2013 07:15:46 +0100 Subject: [PATCH] Auto Eposure - Clean Old files and suppress Verbose issue2104 --- rtengine/improcfun.cc | 4 +- rtgui/hlrec.cc | 163 ------------------------------------------ rtgui/hlrec.h | 54 -------------- 3 files changed, 2 insertions(+), 219 deletions(-) delete mode 100644 rtgui/hlrec.cc delete mode 100644 rtgui/hlrec.h diff --git a/rtengine/improcfun.cc b/rtengine/improcfun.cc index 12013c3e3..39a25cab4 100644 --- a/rtengine/improcfun.cc +++ b/rtengine/improcfun.cc @@ -3856,7 +3856,7 @@ fclose(f);*/ //diagnostics //printf ("**************** AUTO LEVELS ****************\n"); - if (settings->verbose) { + /* if (settings->verbose) { printf ("expcomp1= %f expcomp2= %f gain= %f expcomp=%f\n",expcomp1,expcomp2,gain,expcomp); printf ("expo=%f\n",expo); printf ("median: %i average: %f median/average: %f\n",median,ave, median/ave); @@ -3871,7 +3871,7 @@ fclose(f);*/ printf ("ospread= %f\n",ospread); printf ("overexp= %i\n",overex); } - +*/ /* // %%%%%%%%%% LEGACY AUTOEXPOSURE CODE %%%%%%%%%%%%% // black point selection is based on the linear result (yielding better visual results) diff --git a/rtgui/hlrec.cc b/rtgui/hlrec.cc deleted file mode 100644 index 58bb77800..000000000 --- a/rtgui/hlrec.cc +++ /dev/null @@ -1,163 +0,0 @@ -/* - * This file is part of RawTherapee. - * - * Copyright (c) 2004-2010 Gabor Horvath - * - * RawTherapee is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * RawTherapee is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with RawTherapee. If not, see . - */ -#include "hlrec.h" -#include - -using namespace rtengine; -using namespace rtengine::procparams; - -HLRecovery::HLRecovery () : Gtk::VBox(), FoldableToolPanel(this) { - - set_border_width(4); - - enabled = Gtk::manage (new Gtk::CheckButton (M("GENERAL_ENABLE"))); - enabled->set_active (false); - enabled->set_tooltip_markup (M("TP_HLREC_ENA_TOOLTIP")); - - pack_start (*enabled); - - method = Gtk::manage (new MyComboBoxText ()); - method->append_text (M("TP_HLREC_LUMINANCE")); - method->append_text (M("TP_HLREC_CIELAB")); - method->append_text (M("TP_HLREC_COLOR")); - method->append_text (M("TP_HLREC_BLEND")); - - method->set_active (0); - Gtk::HBox* hb = Gtk::manage (new Gtk::HBox ()); - Gtk::Label* lab = Gtk::manage (new Gtk::Label (M("TP_HLREC_METHOD"))); - hb->pack_start (*lab, Gtk::PACK_SHRINK, 4); - hb->pack_start (*method); - pack_start (*hb); - - enaconn = enabled->signal_toggled().connect( sigc::mem_fun(*this, &HLRecovery::enabledChanged) ); - methconn = method->signal_changed().connect ( sigc::mem_fun(*this, &HLRecovery::methodChanged) ); - - show_all (); -} - -int HLChangedUI (void* data) { - GThreadLock lock; - (static_cast(data))->HLComputed_ (); - return 0; -} - - - -void HLRecovery::HLChanged (bool hlrbool){ - - nexthlrbool= hlrbool; - g_idle_add (HLChangedUI, this); -} -bool HLRecovery::HLComputed_ () { - enaconn.block (true); - enabled->set_active (nexthlrbool); - enaconn.block (false); - return false; -} - - -void HLRecovery::read (const ProcParams* pp, const ParamsEdited* pedited) { - - disableListener (); - - - if (pedited) - enabled->set_inconsistent (!pedited->hlrecovery.enabled); - enaconn.block (true); - enabled->set_active (pp->hlrecovery.enabled); - enaconn.block (false); - - if (pedited && !pedited->hlrecovery.method) - method->set_active (4); - else if (pp->hlrecovery.method=="Luminance") - method->set_active (0); - else if (pp->hlrecovery.method=="CIELab blending") - method->set_active (1); - else if (pp->hlrecovery.method=="Color") - method->set_active (2); - else if (pp->hlrecovery.method=="Blend") - method->set_active (3); - - lastEnabled = pp->hlrecovery.enabled; - - enableListener (); -} - -void HLRecovery::write (ProcParams* pp, ParamsEdited* pedited) { - - if (pedited) { - pedited->hlrecovery.method = method->get_active_row_number()!=4; - pedited->hlrecovery.enabled = !enabled->get_inconsistent(); - } - - pp->hlrecovery.enabled = enabled->get_active(); - if (method->get_active_row_number()==0) - pp->hlrecovery.method = "Luminance"; - else if (method->get_active_row_number()==1) - pp->hlrecovery.method = "CIELab blending"; - else if (method->get_active_row_number()==2) - pp->hlrecovery.method = "Color"; - else if (method->get_active_row_number()==3) - pp->hlrecovery.method = "Blend"; - -} - -void HLRecovery::enabledChanged () { - - if (batchMode) { - if (enabled->get_inconsistent()) { - enabled->set_inconsistent (false); - enaconn.block (true); - enabled->set_active (false); - enaconn.block (false); - } - else if (lastEnabled) - enabled->set_inconsistent (true); - - lastEnabled = enabled->get_active (); - } - - if (listener) { - if (enabled->get_active ()) - listener->panelChanged (EvHREnabled, M("GENERAL_ENABLED")); - else - listener->panelChanged (EvHREnabled, M("GENERAL_DISABLED")); - } -} - -void HLRecovery::methodChanged () { - - if (listener) { - if (enabled->get_active ()) - listener->panelChanged (EvHRMethod, method->get_active_text ()); - } -} - -void HLRecovery::setRaw (bool raw) { - - disableListener (); - set_sensitive (raw); - enableListener (); -} - -void HLRecovery::setBatchMode (bool batchMode) { - - ToolPanel::setBatchMode (batchMode); - method->append_text (M("GENERAL_UNCHANGED")); -} diff --git a/rtgui/hlrec.h b/rtgui/hlrec.h deleted file mode 100644 index 65467ace1..000000000 --- a/rtgui/hlrec.h +++ /dev/null @@ -1,54 +0,0 @@ -/* - * This file is part of RawTherapee. - * - * Copyright (c) 2004-2010 Gabor Horvath - * - * RawTherapee is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * RawTherapee is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with RawTherapee. If not, see . - */ -#ifndef _HLREC_H_ -#define _HLREC_H_ - -#include -#include "toolpanel.h" -#include "guiutils.h" - -class HLRecovery : public Gtk::VBox, public FoldableToolPanel, public rtengine::AutoHLListener{ - - protected: - Gtk::CheckButton* enabled; - MyComboBoxText* method; - sigc::connection methconn; - sigc::connection enaconn; - bool lastEnabled; - bool nexthlrbool; - - public: - - HLRecovery (); -// ~HLRecovery (); - - - void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited=NULL); - void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited=NULL); - void setBatchMode (bool batchMode); - - void setRaw (bool raw); - void HLChanged (bool hlrbool); - bool HLComputed_ (); - - void enabledChanged (); - void methodChanged (); -}; - -#endif