From 7ce015146ff27ff81ec4cf91f77ee5b5bfc23863 Mon Sep 17 00:00:00 2001 From: Emil Martinec Date: Tue, 16 Nov 2010 19:32:38 -0600 Subject: [PATCH] Patch from Marco Bubke to allow bypassing the input color profile. --- rtgui/icmpanel.cc | 20 +++++++++++++++++--- rtgui/icmpanel.h | 3 ++- 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/rtgui/icmpanel.cc b/rtgui/icmpanel.cc index 5dd894061..82b2f486e 100644 --- a/rtgui/icmpanel.cc +++ b/rtgui/icmpanel.cc @@ -37,6 +37,9 @@ ICMPanel::ICMPanel () : ToolPanel(), iunchanged(NULL), icmplistener(NULL) { ilab->set_markup (Glib::ustring("") + M("TP_ICM_INPUTPROFILE") + ""); pack_start (*ilab, Gtk::PACK_SHRINK, 4); + inone = Gtk::manage (new Gtk::RadioButton (M("TP_ICM_INPUTNONE"))); + pack_start (*inone, Gtk::PACK_SHRINK, 4); + iembedded = Gtk::manage (new Gtk::RadioButton (M("TP_ICM_INPUTEMBEDDED"))); pack_start (*iembedded, Gtk::PACK_SHRINK, 4); @@ -53,6 +56,7 @@ ICMPanel::ICMPanel () : ToolPanel(), iunchanged(NULL), icmplistener(NULL) { opts = icamera->get_group(); iembedded->set_group (opts); ifromfile->set_group (opts); + inone->set_group (opts); igamma = Gtk::manage (new Gtk::CheckButton (M("TP_ICM_GAMMABEFOREINPUT"))); igamma->set_sensitive (false); @@ -137,7 +141,11 @@ void ICMPanel::read (const ProcParams* pp, const ParamsEdited* pedited) { disableListener (); ipc.block (true); - if (pp->icm.input == "(embedded)" || ((pp->icm.input == "(camera)" || pp->icm.input=="") && icamera->get_state()==Gtk::STATE_INSENSITIVE)) { + if (pp->icm.input == "(none)" && icamera->get_state()!=Gtk::STATE_INSENSITIVE) { + inone->set_active (true); + igamma->set_sensitive (false); + } + else if (pp->icm.input == "(embedded)" || ((pp->icm.input == "(camera)" || pp->icm.input=="") && icamera->get_state()==Gtk::STATE_INSENSITIVE)) { iembedded->set_active (true); igamma->set_sensitive (false); } @@ -179,7 +187,9 @@ void ICMPanel::read (const ProcParams* pp, const ParamsEdited* pedited) { void ICMPanel::write (ProcParams* pp, ParamsEdited* pedited) { - if (iembedded->get_active ()) + if (inone->get_active()) + pp->icm.input = "(none)"; + else if (iembedded->get_active ()) pp->icm.input = "(embedded)"; else if (icamera->get_active ()) pp->icm.input = "(camera)"; @@ -211,7 +221,11 @@ void ICMPanel::wpChanged () { void ICMPanel::ipChanged () { std::string profname; - if (iembedded->get_active ()) { + if (inone->get_active()) { + profname = "(none)"; + igamma->set_sensitive (false); + } + else if (iembedded->get_active ()) { profname = "(embedded)"; igamma->set_sensitive (false); } diff --git a/rtgui/icmpanel.h b/rtgui/icmpanel.h index 38a91562a..d022e9b4c 100644 --- a/rtgui/icmpanel.h +++ b/rtgui/icmpanel.h @@ -30,7 +30,8 @@ class ICMPanelListener { class ICMPanel : public Gtk::VBox, public ToolPanel { - private: + private: + Gtk::RadioButton* inone; Gtk::RadioButton* iembedded; Gtk::RadioButton* icamera; Gtk::RadioButton* ifromfile;