From b39f072baf024f6117a66a7f49093c78c13fce2e Mon Sep 17 00:00:00 2001 From: Alberto Griggio Date: Tue, 22 Aug 2017 08:53:17 +0200 Subject: [PATCH] run through astyle --- rtgui/exportpanel.cc | 314 ++++---- rtgui/main-cli.cc | 744 ++++++++--------- rtgui/main.cc | 339 ++++---- rtgui/options.cc | 39 +- rtgui/options.h | 56 +- rtgui/preferences.cc | 1803 +++++++++++++++++++++--------------------- rtgui/rtwindow.cc | 433 +++++----- 7 files changed, 1911 insertions(+), 1817 deletions(-) diff --git a/rtgui/exportpanel.cc b/rtgui/exportpanel.cc index 6f90792b3..7fdc3ae50 100644 --- a/rtgui/exportpanel.cc +++ b/rtgui/exportpanel.cc @@ -32,193 +32,193 @@ ExportPanel::ExportPanel () : listener (nullptr) pack_start(*enabled, Gtk::PACK_SHRINK, 4); pack_start (*Gtk::manage(new Gtk::HSeparator ()), Gtk::PACK_SHRINK, 2);*/ - Gtk::Label* labExportTitle = Gtk::manage ( new Gtk::Label (M("EXPORT_FASTEXPORTOPTIONS")) ); + Gtk::Label* labExportTitle = Gtk::manage ( new Gtk::Label (M ("EXPORT_FASTEXPORTOPTIONS")) ); labExportTitle->set_use_markup (true); - labExportTitle->set_tooltip_text (M("EXPORT_INSTRUCTIONS")); - labExportTitle->set_alignment(Gtk::ALIGN_START); - pack_start(*labExportTitle, Gtk::PACK_SHRINK, 4); + labExportTitle->set_tooltip_text (M ("EXPORT_INSTRUCTIONS")); + labExportTitle->set_alignment (Gtk::ALIGN_START); + pack_start (*labExportTitle, Gtk::PACK_SHRINK, 4); Gtk::RadioButton::Group pipeline_group; - use_fast_pipeline = Gtk::manage ( new Gtk::RadioButton (pipeline_group, M("EXPORT_USE_FAST_PIPELINE"))); - use_normal_pipeline = Gtk::manage ( new Gtk::RadioButton (pipeline_group, M("EXPORT_USE_NORMAL_PIPELINE"))); - bypass_box = Gtk::manage(new Gtk::VBox()); - bypass_ALL = Gtk::manage ( new Gtk::CheckButton (M("EXPORT_BYPASS_ALL"))); - use_fast_pipeline->set_tooltip_text(M("EXPORT_USE_FAST_PIPELINE_TIP")); - bypass_sharpening = Gtk::manage ( new Gtk::CheckButton (M("EXPORT_BYPASS_SHARPENING"))); - bypass_sharpenEdge = Gtk::manage ( new Gtk::CheckButton (M("EXPORT_BYPASS_SHARPENEDGE"))); - bypass_sharpenMicro = Gtk::manage ( new Gtk::CheckButton (M("EXPORT_BYPASS_SHARPENMICRO"))); + use_fast_pipeline = Gtk::manage ( new Gtk::RadioButton (pipeline_group, M ("EXPORT_USE_FAST_PIPELINE"))); + use_normal_pipeline = Gtk::manage ( new Gtk::RadioButton (pipeline_group, M ("EXPORT_USE_NORMAL_PIPELINE"))); + bypass_box = Gtk::manage (new Gtk::VBox()); + bypass_ALL = Gtk::manage ( new Gtk::CheckButton (M ("EXPORT_BYPASS_ALL"))); + use_fast_pipeline->set_tooltip_text (M ("EXPORT_USE_FAST_PIPELINE_TIP")); + bypass_sharpening = Gtk::manage ( new Gtk::CheckButton (M ("EXPORT_BYPASS_SHARPENING"))); + bypass_sharpenEdge = Gtk::manage ( new Gtk::CheckButton (M ("EXPORT_BYPASS_SHARPENEDGE"))); + bypass_sharpenMicro = Gtk::manage ( new Gtk::CheckButton (M ("EXPORT_BYPASS_SHARPENMICRO"))); //bypass_lumaDenoise = Gtk::manage ( new Gtk::CheckButton (M("EXPORT_BYPASS_LUMADENOISE"))); //bypass_colorDenoise = Gtk::manage ( new Gtk::CheckButton (M("EXPORT_BYPASS_COLORDENOISE"))); - bypass_defringe = Gtk::manage ( new Gtk::CheckButton (M("EXPORT_BYPASS_DEFRINGE"))); - bypass_dirpyrDenoise = Gtk::manage ( new Gtk::CheckButton (M("EXPORT_BYPASS_DIRPYRDENOISE"))); - bypass_sh_hq = Gtk::manage ( new Gtk::CheckButton (M("EXPORT_BYPASS_SH_HQ"))); - bypass_dirpyrequalizer = Gtk::manage ( new Gtk::CheckButton (M("EXPORT_BYPASS_DIRPYREQUALIZER"))); - bypass_wavelet = Gtk::manage ( new Gtk::CheckButton (M("EXPORT_BYPASS_EQUALIZER"))); - bypass_raw_ccSteps = Gtk::manage ( new Gtk::CheckButton (M("EXPORT_BYPASS_RAW_CCSTEPS"))); - bypass_raw_ca = Gtk::manage ( new Gtk::CheckButton (M("EXPORT_BYPASS_RAW_CA"))); - bypass_raw_df = Gtk::manage ( new Gtk::CheckButton (M("EXPORT_BYPASS_RAW_DF"))); - bypass_raw_ff = Gtk::manage ( new Gtk::CheckButton (M("EXPORT_BYPASS_RAW_FF"))); + bypass_defringe = Gtk::manage ( new Gtk::CheckButton (M ("EXPORT_BYPASS_DEFRINGE"))); + bypass_dirpyrDenoise = Gtk::manage ( new Gtk::CheckButton (M ("EXPORT_BYPASS_DIRPYRDENOISE"))); + bypass_sh_hq = Gtk::manage ( new Gtk::CheckButton (M ("EXPORT_BYPASS_SH_HQ"))); + bypass_dirpyrequalizer = Gtk::manage ( new Gtk::CheckButton (M ("EXPORT_BYPASS_DIRPYREQUALIZER"))); + bypass_wavelet = Gtk::manage ( new Gtk::CheckButton (M ("EXPORT_BYPASS_EQUALIZER"))); + bypass_raw_ccSteps = Gtk::manage ( new Gtk::CheckButton (M ("EXPORT_BYPASS_RAW_CCSTEPS"))); + bypass_raw_ca = Gtk::manage ( new Gtk::CheckButton (M ("EXPORT_BYPASS_RAW_CA"))); + bypass_raw_df = Gtk::manage ( new Gtk::CheckButton (M ("EXPORT_BYPASS_RAW_DF"))); + bypass_raw_ff = Gtk::manage ( new Gtk::CheckButton (M ("EXPORT_BYPASS_RAW_FF"))); // ---------------------- Bayer sensor frame ----------------------- - Gtk::Frame *bayerFrame = Gtk::manage( new Gtk::Frame(M("TP_RAW_SENSOR_BAYER"))); + Gtk::Frame *bayerFrame = Gtk::manage ( new Gtk::Frame (M ("TP_RAW_SENSOR_BAYER"))); Gtk::VBox* bayerFrameVBox = Gtk::manage (new Gtk::VBox ()); Gtk::HBox* hb_raw_bayer_method = Gtk::manage (new Gtk::HBox ()); - hb_raw_bayer_method->pack_start (*Gtk::manage (new Gtk::Label ( M("EXPORT_RAW_DMETHOD") + ": ")), Gtk::PACK_SHRINK, 4); + hb_raw_bayer_method->pack_start (*Gtk::manage (new Gtk::Label ( M ("EXPORT_RAW_DMETHOD") + ": ")), Gtk::PACK_SHRINK, 4); raw_bayer_method = Gtk::manage (new MyComboBoxText ()); - for( size_t i = 0; i < procparams::RAWParams::BayerSensor::numMethods; i++) { - raw_bayer_method->append(procparams::RAWParams::BayerSensor::methodstring[i]); + for ( size_t i = 0; i < procparams::RAWParams::BayerSensor::numMethods; i++) { + raw_bayer_method->append (procparams::RAWParams::BayerSensor::methodstring[i]); } - raw_bayer_method->set_active(0); + raw_bayer_method->set_active (0); hb_raw_bayer_method->pack_end (*raw_bayer_method, Gtk::PACK_EXPAND_WIDGET, 4); //bypass_raw_all_enhance = Gtk::manage ( new Gtk::CheckButton (M("EXPORT_BYPASS_RAW_ALL_ENHANCE"))); - bypass_raw_bayer_linenoise = Gtk::manage ( new Gtk::CheckButton (M("EXPORT_BYPASS_RAW_LINENOISE"))); - bypass_raw_bayer_greenthresh = Gtk::manage ( new Gtk::CheckButton (M("EXPORT_BYPASS_RAW_GREENTHRESH"))); - bypass_raw_bayer_dcb_iterations = Gtk::manage ( new Gtk::CheckButton (M("EXPORT_BYPASS_RAW_DCB_ITERATIONS"))); - bypass_raw_bayer_dcb_enhance = Gtk::manage ( new Gtk::CheckButton (M("EXPORT_BYPASS_RAW_DCB_ENHANCE"))); - bypass_raw_bayer_lmmse_iterations = Gtk::manage ( new Gtk::CheckButton (M("EXPORT_BYPASS_RAW_LMMSE_ITERATIONS"))); + bypass_raw_bayer_linenoise = Gtk::manage ( new Gtk::CheckButton (M ("EXPORT_BYPASS_RAW_LINENOISE"))); + bypass_raw_bayer_greenthresh = Gtk::manage ( new Gtk::CheckButton (M ("EXPORT_BYPASS_RAW_GREENTHRESH"))); + bypass_raw_bayer_dcb_iterations = Gtk::manage ( new Gtk::CheckButton (M ("EXPORT_BYPASS_RAW_DCB_ITERATIONS"))); + bypass_raw_bayer_dcb_enhance = Gtk::manage ( new Gtk::CheckButton (M ("EXPORT_BYPASS_RAW_DCB_ENHANCE"))); + bypass_raw_bayer_lmmse_iterations = Gtk::manage ( new Gtk::CheckButton (M ("EXPORT_BYPASS_RAW_LMMSE_ITERATIONS"))); // ---------------------- Bayer sensor frame ----------------------- - Gtk::Frame *xtransFrame = Gtk::manage( new Gtk::Frame(M("TP_RAW_SENSOR_XTRANS"))); + Gtk::Frame *xtransFrame = Gtk::manage ( new Gtk::Frame (M ("TP_RAW_SENSOR_XTRANS"))); Gtk::VBox* xtransFrameVBox = Gtk::manage (new Gtk::VBox ()); Gtk::HBox* hb_raw_xtrans_method = Gtk::manage (new Gtk::HBox ()); - hb_raw_xtrans_method->pack_start (*Gtk::manage (new Gtk::Label ( M("EXPORT_RAW_DMETHOD") + ": ")), Gtk::PACK_SHRINK, 4); + hb_raw_xtrans_method->pack_start (*Gtk::manage (new Gtk::Label ( M ("EXPORT_RAW_DMETHOD") + ": ")), Gtk::PACK_SHRINK, 4); raw_xtrans_method = Gtk::manage (new MyComboBoxText ()); - for( size_t i = 0; i < procparams::RAWParams::XTransSensor::numMethods; i++) { - raw_xtrans_method->append(procparams::RAWParams::XTransSensor::methodstring[i]); + for ( size_t i = 0; i < procparams::RAWParams::XTransSensor::numMethods; i++) { + raw_xtrans_method->append (procparams::RAWParams::XTransSensor::methodstring[i]); } - raw_xtrans_method->set_active(0); + raw_xtrans_method->set_active (0); hb_raw_xtrans_method->pack_end (*raw_xtrans_method, Gtk::PACK_EXPAND_WIDGET, 4); // ---------------------------------------------------------------- // start global packing Gtk::HBox* lblbox = Gtk::manage (new Gtk::HBox ()); - lblbox->pack_start (*Gtk::manage (new Gtk::Label (M("EXPORT_PIPELINE"))), Gtk::PACK_SHRINK, 4); + lblbox->pack_start (*Gtk::manage (new Gtk::Label (M ("EXPORT_PIPELINE"))), Gtk::PACK_SHRINK, 4); pack_start (*lblbox, Gtk::PACK_SHRINK, 4); - pack_start(*use_fast_pipeline , Gtk::PACK_SHRINK, 4); - pack_start(*use_normal_pipeline , Gtk::PACK_SHRINK, 4); + pack_start (*use_fast_pipeline, Gtk::PACK_SHRINK, 4); + pack_start (*use_normal_pipeline, Gtk::PACK_SHRINK, 4); - bypass_box->pack_start(*Gtk::manage(new Gtk::HSeparator ()), Gtk::PACK_SHRINK, 4); + bypass_box->pack_start (*Gtk::manage (new Gtk::HSeparator ()), Gtk::PACK_SHRINK, 4); lblbox = Gtk::manage (new Gtk::HBox ()); - lblbox->pack_start (*Gtk::manage (new Gtk::Label (M("EXPORT_BYPASS"))), Gtk::PACK_SHRINK, 4); + lblbox->pack_start (*Gtk::manage (new Gtk::Label (M ("EXPORT_BYPASS"))), Gtk::PACK_SHRINK, 4); bypass_box->pack_start (*lblbox, Gtk::PACK_SHRINK, 4); - bypass_box->pack_start(*bypass_ALL , Gtk::PACK_SHRINK, 4); + bypass_box->pack_start (*bypass_ALL, Gtk::PACK_SHRINK, 4); // bypass_box->pack_start(*Gtk::manage(new Gtk::HSeparator ()), Gtk::PACK_SHRINK, 4); - bypass_box->pack_start(*bypass_sharpening , Gtk::PACK_SHRINK, 4); - bypass_box->pack_start(*bypass_sharpenEdge , Gtk::PACK_SHRINK, 4); - bypass_box->pack_start(*bypass_sharpenMicro , Gtk::PACK_SHRINK, 4); + bypass_box->pack_start (*bypass_sharpening, Gtk::PACK_SHRINK, 4); + bypass_box->pack_start (*bypass_sharpenEdge, Gtk::PACK_SHRINK, 4); + bypass_box->pack_start (*bypass_sharpenMicro, Gtk::PACK_SHRINK, 4); //pack_start(*bypass_lumaDenoise , Gtk::PACK_SHRINK, 4); //pack_start(*bypass_colorDenoise , Gtk::PACK_SHRINK, 4); - bypass_box->pack_start(*bypass_defringe , Gtk::PACK_SHRINK, 4); - bypass_box->pack_start(*bypass_dirpyrDenoise, Gtk::PACK_SHRINK, 4); - bypass_box->pack_start(*bypass_sh_hq , Gtk::PACK_SHRINK, 4); - bypass_box->pack_start(*bypass_dirpyrequalizer , Gtk::PACK_SHRINK, 4); - bypass_box->pack_start(*bypass_wavelet , Gtk::PACK_SHRINK, 4); + bypass_box->pack_start (*bypass_defringe, Gtk::PACK_SHRINK, 4); + bypass_box->pack_start (*bypass_dirpyrDenoise, Gtk::PACK_SHRINK, 4); + bypass_box->pack_start (*bypass_sh_hq, Gtk::PACK_SHRINK, 4); + bypass_box->pack_start (*bypass_dirpyrequalizer, Gtk::PACK_SHRINK, 4); + bypass_box->pack_start (*bypass_wavelet, Gtk::PACK_SHRINK, 4); - bayerFrameVBox->pack_start(*hb_raw_bayer_method, Gtk::PACK_SHRINK, 4); + bayerFrameVBox->pack_start (*hb_raw_bayer_method, Gtk::PACK_SHRINK, 4); //bayerFrameVBox->pack_start(*bypass_raw_all_enhance , Gtk::PACK_SHRINK, 4); - bayerFrameVBox->pack_start(*bypass_raw_bayer_dcb_iterations, Gtk::PACK_SHRINK, 4); - bayerFrameVBox->pack_start(*bypass_raw_bayer_dcb_enhance , Gtk::PACK_SHRINK, 4); - bayerFrameVBox->pack_start(*bypass_raw_bayer_lmmse_iterations, Gtk::PACK_SHRINK, 4); - bayerFrameVBox->pack_start(*bypass_raw_bayer_linenoise , Gtk::PACK_SHRINK, 4); - bayerFrameVBox->pack_start(*bypass_raw_bayer_greenthresh , Gtk::PACK_SHRINK, 4); - bayerFrame->add(*bayerFrameVBox); + bayerFrameVBox->pack_start (*bypass_raw_bayer_dcb_iterations, Gtk::PACK_SHRINK, 4); + bayerFrameVBox->pack_start (*bypass_raw_bayer_dcb_enhance, Gtk::PACK_SHRINK, 4); + bayerFrameVBox->pack_start (*bypass_raw_bayer_lmmse_iterations, Gtk::PACK_SHRINK, 4); + bayerFrameVBox->pack_start (*bypass_raw_bayer_linenoise, Gtk::PACK_SHRINK, 4); + bayerFrameVBox->pack_start (*bypass_raw_bayer_greenthresh, Gtk::PACK_SHRINK, 4); + bayerFrame->add (*bayerFrameVBox); - xtransFrameVBox->pack_start(*hb_raw_xtrans_method, Gtk::PACK_SHRINK, 4); - xtransFrame->add(*xtransFrameVBox); + xtransFrameVBox->pack_start (*hb_raw_xtrans_method, Gtk::PACK_SHRINK, 4); + xtransFrame->add (*xtransFrameVBox); - bypass_box->pack_start(*bypass_raw_ccSteps , Gtk::PACK_SHRINK, 4); - bypass_box->pack_start(*bypass_raw_ca , Gtk::PACK_SHRINK, 4); + bypass_box->pack_start (*bypass_raw_ccSteps, Gtk::PACK_SHRINK, 4); + bypass_box->pack_start (*bypass_raw_ca, Gtk::PACK_SHRINK, 4); - bypass_box->pack_start(*bypass_raw_df , Gtk::PACK_SHRINK, 4); - bypass_box->pack_start(*bypass_raw_ff , Gtk::PACK_SHRINK, 4); + bypass_box->pack_start (*bypass_raw_df, Gtk::PACK_SHRINK, 4); + bypass_box->pack_start (*bypass_raw_ff, Gtk::PACK_SHRINK, 4); - pack_start(*bypass_box, Gtk::PACK_SHRINK); - - pack_start (*Gtk::manage(new Gtk::HSeparator ()), Gtk::PACK_SHRINK, 2); + pack_start (*bypass_box, Gtk::PACK_SHRINK); + + pack_start (*Gtk::manage (new Gtk::HSeparator ()), Gtk::PACK_SHRINK, 2); // Resize options Gtk::HBox* rmbox = Gtk::manage (new Gtk::HBox ()); - rmbox->pack_start (*Gtk::manage (new Gtk::Label (M("TP_RESIZE_LABEL"))), Gtk::PACK_SHRINK, 4); + rmbox->pack_start (*Gtk::manage (new Gtk::Label (M ("TP_RESIZE_LABEL"))), Gtk::PACK_SHRINK, 4); pack_start (*rmbox, Gtk::PACK_SHRINK, 4); Gtk::HBox* wbox = Gtk::manage (new Gtk::HBox ()); Gtk::HBox* hbox = Gtk::manage (new Gtk::HBox ()); MaxWidth = Gtk::manage (new MySpinButton ()); MaxHeight = Gtk::manage (new MySpinButton ()); - wbox->pack_start (*Gtk::manage (new Gtk::Label (M("EXPORT_MAXWIDTH"))), Gtk::PACK_SHRINK, 4); + wbox->pack_start (*Gtk::manage (new Gtk::Label (M ("EXPORT_MAXWIDTH"))), Gtk::PACK_SHRINK, 4); wbox->pack_start (*MaxWidth); - hbox->pack_start (*Gtk::manage (new Gtk::Label (M("EXPORT_MAXHEIGHT"))), Gtk::PACK_SHRINK, 4); + hbox->pack_start (*Gtk::manage (new Gtk::Label (M ("EXPORT_MAXHEIGHT"))), Gtk::PACK_SHRINK, 4); hbox->pack_start (*MaxHeight); pack_start (*wbox, Gtk::PACK_SHRINK, 4); pack_start (*hbox, Gtk::PACK_SHRINK, 4); MaxWidth->set_digits (0); - MaxWidth->set_width_chars(5); - MaxWidth->set_max_width_chars(5); + MaxWidth->set_width_chars (5); + MaxWidth->set_max_width_chars (5); MaxWidth->set_increments (1, 100); MaxWidth->set_value (options.fastexport_resize_width); MaxWidth->set_range (32, 10000); MaxHeight->set_digits (0); - MaxHeight->set_width_chars(5); - MaxHeight->set_max_width_chars(5); + MaxHeight->set_width_chars (5); + MaxHeight->set_max_width_chars (5); MaxHeight->set_increments (1, 100); MaxHeight->set_value (options.fastexport_resize_height); MaxHeight->set_range (32, 10000); // Buttons btnFastExport = Gtk::manage ( new Gtk::Button () ); - btnFastExport->set_tooltip_text(M("EXPORT_PUTTOQUEUEFAST")); + btnFastExport->set_tooltip_text (M ("EXPORT_PUTTOQUEUEFAST")); btnFastExport->set_image (*Gtk::manage (new RTImage ("processing.png"))); - pack_start(*btnFastExport, Gtk::PACK_SHRINK, 4); + pack_start (*btnFastExport, Gtk::PACK_SHRINK, 4); // add panel ending Gtk::VBox* vboxpe = Gtk::manage (new Gtk::VBox ()); Gtk::HSeparator* hseptpe = Gtk::manage (new Gtk::HSeparator ()); - Gtk::Image* peImg = Gtk::manage (new RTImage("PanelEnding.png")); - vboxpe->pack_start(*hseptpe, Gtk::PACK_SHRINK, 4); - vboxpe->pack_start(*peImg); - pack_start(*vboxpe, Gtk::PACK_SHRINK, 0); + Gtk::Image* peImg = Gtk::manage (new RTImage ("PanelEnding.png")); + vboxpe->pack_start (*hseptpe, Gtk::PACK_SHRINK, 4); + vboxpe->pack_start (*peImg); + pack_start (*vboxpe, Gtk::PACK_SHRINK, 0); - use_fast_pipeline->signal_toggled().connect(sigc::mem_fun(*this, &ExportPanel::use_fast_pipeline_toggled)); - btnFastExport->signal_clicked().connect( sigc::mem_fun(*this, &ExportPanel::FastExportPressed) ); + use_fast_pipeline->signal_toggled().connect (sigc::mem_fun (*this, &ExportPanel::use_fast_pipeline_toggled)); + btnFastExport->signal_clicked().connect ( sigc::mem_fun (*this, &ExportPanel::FastExportPressed) ); //btnExportLoadSettings->signal_clicked().connect( sigc::mem_fun(*this, &ExportPanel::LoadSettings) ); //btnExportSaveSettings->signal_clicked().connect( sigc::mem_fun(*this, &ExportPanel::SaveSettings) ); - bypass_ALLconn = bypass_ALL->signal_toggled().connect (sigc::mem_fun(*this, &ExportPanel::bypassALL_Toggled)); + bypass_ALLconn = bypass_ALL->signal_toggled().connect (sigc::mem_fun (*this, &ExportPanel::bypassALL_Toggled)); - bypass_sharpeningConn = bypass_sharpening->signal_toggled().connect (sigc::bind (sigc::mem_fun(*bypass_ALL, &Gtk::CheckButton::set_inconsistent), true)); - bypass_sharpenEdgeConn = bypass_sharpenEdge->signal_toggled().connect (sigc::bind (sigc::mem_fun(*bypass_ALL, &Gtk::CheckButton::set_inconsistent), true)); - bypass_sharpenMicroConn = bypass_sharpenMicro->signal_toggled().connect (sigc::bind (sigc::mem_fun(*bypass_ALL, &Gtk::CheckButton::set_inconsistent), true)); + bypass_sharpeningConn = bypass_sharpening->signal_toggled().connect (sigc::bind (sigc::mem_fun (*bypass_ALL, &Gtk::CheckButton::set_inconsistent), true)); + bypass_sharpenEdgeConn = bypass_sharpenEdge->signal_toggled().connect (sigc::bind (sigc::mem_fun (*bypass_ALL, &Gtk::CheckButton::set_inconsistent), true)); + bypass_sharpenMicroConn = bypass_sharpenMicro->signal_toggled().connect (sigc::bind (sigc::mem_fun (*bypass_ALL, &Gtk::CheckButton::set_inconsistent), true)); //bypass_lumaDenoiseConn = bypass_lumaDenoise->signal_toggled().connect (sigc::bind (sigc::mem_fun(*bypass_ALL, &Gtk::CheckButton::set_inconsistent), true)); //bypass_colorDenoiseConn = bypass_colorDenoise->signal_toggled().connect (sigc::bind (sigc::mem_fun(*bypass_ALL, &Gtk::CheckButton::set_inconsistent), true)); - bypass_defringeConn = bypass_defringe->signal_toggled().connect (sigc::bind (sigc::mem_fun(*bypass_ALL, &Gtk::CheckButton::set_inconsistent), true)); - bypass_dirpyrDenoiseConn = bypass_dirpyrDenoise->signal_toggled().connect (sigc::bind (sigc::mem_fun(*bypass_ALL, &Gtk::CheckButton::set_inconsistent), true)); - bypass_sh_hqConn = bypass_sh_hq->signal_toggled().connect (sigc::bind (sigc::mem_fun(*bypass_ALL, &Gtk::CheckButton::set_inconsistent), true)); - bypass_dirpyrequalizerConn = bypass_dirpyrequalizer->signal_toggled().connect (sigc::bind (sigc::mem_fun(*bypass_ALL, &Gtk::CheckButton::set_inconsistent), true)); - bypass_waveletConn = bypass_wavelet->signal_toggled().connect (sigc::bind (sigc::mem_fun(*bypass_ALL, &Gtk::CheckButton::set_inconsistent), true)); + bypass_defringeConn = bypass_defringe->signal_toggled().connect (sigc::bind (sigc::mem_fun (*bypass_ALL, &Gtk::CheckButton::set_inconsistent), true)); + bypass_dirpyrDenoiseConn = bypass_dirpyrDenoise->signal_toggled().connect (sigc::bind (sigc::mem_fun (*bypass_ALL, &Gtk::CheckButton::set_inconsistent), true)); + bypass_sh_hqConn = bypass_sh_hq->signal_toggled().connect (sigc::bind (sigc::mem_fun (*bypass_ALL, &Gtk::CheckButton::set_inconsistent), true)); + bypass_dirpyrequalizerConn = bypass_dirpyrequalizer->signal_toggled().connect (sigc::bind (sigc::mem_fun (*bypass_ALL, &Gtk::CheckButton::set_inconsistent), true)); + bypass_waveletConn = bypass_wavelet->signal_toggled().connect (sigc::bind (sigc::mem_fun (*bypass_ALL, &Gtk::CheckButton::set_inconsistent), true)); //bypass_raw_all_enhanceConn = bypass_raw_bayer_all_enhance->signal_toggled().connect (sigc::bind (sigc::mem_fun(*bypass_ALL, &Gtk::CheckButton::set_inconsistent), true)); - bypass_raw_bayer_dcb_iterationsConn = bypass_raw_bayer_dcb_iterations->signal_toggled().connect (sigc::bind (sigc::mem_fun(*bypass_ALL, &Gtk::CheckButton::set_inconsistent), true)); - bypass_raw_bayer_dcb_enhanceConn = bypass_raw_bayer_dcb_enhance->signal_toggled().connect (sigc::bind (sigc::mem_fun(*bypass_ALL, &Gtk::CheckButton::set_inconsistent), true)); - bypass_raw_bayer_lmmse_iterationsConn = bypass_raw_bayer_lmmse_iterations->signal_toggled().connect (sigc::bind (sigc::mem_fun(*bypass_ALL, &Gtk::CheckButton::set_inconsistent), true)); - bypass_raw_bayer_linenoiseConn = bypass_raw_bayer_linenoise->signal_toggled().connect (sigc::bind (sigc::mem_fun(*bypass_ALL, &Gtk::CheckButton::set_inconsistent), true)); - bypass_raw_bayer_greenthreshConn = bypass_raw_bayer_greenthresh->signal_toggled().connect (sigc::bind (sigc::mem_fun(*bypass_ALL, &Gtk::CheckButton::set_inconsistent), true)); - bypass_raw_ccStepsConn = bypass_raw_ccSteps->signal_toggled().connect (sigc::bind (sigc::mem_fun(*bypass_ALL, &Gtk::CheckButton::set_inconsistent), true)); - bypass_raw_caConn = bypass_raw_ca->signal_toggled().connect (sigc::bind (sigc::mem_fun(*bypass_ALL, &Gtk::CheckButton::set_inconsistent), true)); - bypass_raw_dfConn = bypass_raw_df->signal_toggled().connect (sigc::bind (sigc::mem_fun(*bypass_ALL, &Gtk::CheckButton::set_inconsistent), true)); - bypass_raw_ffConn = bypass_raw_ff->signal_toggled().connect (sigc::bind (sigc::mem_fun(*bypass_ALL, &Gtk::CheckButton::set_inconsistent), true)); + bypass_raw_bayer_dcb_iterationsConn = bypass_raw_bayer_dcb_iterations->signal_toggled().connect (sigc::bind (sigc::mem_fun (*bypass_ALL, &Gtk::CheckButton::set_inconsistent), true)); + bypass_raw_bayer_dcb_enhanceConn = bypass_raw_bayer_dcb_enhance->signal_toggled().connect (sigc::bind (sigc::mem_fun (*bypass_ALL, &Gtk::CheckButton::set_inconsistent), true)); + bypass_raw_bayer_lmmse_iterationsConn = bypass_raw_bayer_lmmse_iterations->signal_toggled().connect (sigc::bind (sigc::mem_fun (*bypass_ALL, &Gtk::CheckButton::set_inconsistent), true)); + bypass_raw_bayer_linenoiseConn = bypass_raw_bayer_linenoise->signal_toggled().connect (sigc::bind (sigc::mem_fun (*bypass_ALL, &Gtk::CheckButton::set_inconsistent), true)); + bypass_raw_bayer_greenthreshConn = bypass_raw_bayer_greenthresh->signal_toggled().connect (sigc::bind (sigc::mem_fun (*bypass_ALL, &Gtk::CheckButton::set_inconsistent), true)); + bypass_raw_ccStepsConn = bypass_raw_ccSteps->signal_toggled().connect (sigc::bind (sigc::mem_fun (*bypass_ALL, &Gtk::CheckButton::set_inconsistent), true)); + bypass_raw_caConn = bypass_raw_ca->signal_toggled().connect (sigc::bind (sigc::mem_fun (*bypass_ALL, &Gtk::CheckButton::set_inconsistent), true)); + bypass_raw_dfConn = bypass_raw_df->signal_toggled().connect (sigc::bind (sigc::mem_fun (*bypass_ALL, &Gtk::CheckButton::set_inconsistent), true)); + bypass_raw_ffConn = bypass_raw_ff->signal_toggled().connect (sigc::bind (sigc::mem_fun (*bypass_ALL, &Gtk::CheckButton::set_inconsistent), true)); LoadDefaultSettings(); } @@ -251,39 +251,39 @@ void ExportPanel::SaveSettingsAsDefault() } \ } while (false) // Save fast export settings to options - FE_OPT_STORE_(options.fastexport_bypass_sharpening, bypass_sharpening->get_active ()); - FE_OPT_STORE_(options.fastexport_bypass_sharpenEdge, bypass_sharpenEdge->get_active ()); - FE_OPT_STORE_(options.fastexport_bypass_sharpenMicro, bypass_sharpenMicro->get_active ()); + FE_OPT_STORE_ (options.fastexport_bypass_sharpening, bypass_sharpening->get_active ()); + FE_OPT_STORE_ (options.fastexport_bypass_sharpenEdge, bypass_sharpenEdge->get_active ()); + FE_OPT_STORE_ (options.fastexport_bypass_sharpenMicro, bypass_sharpenMicro->get_active ()); //options.fastexport_bypass_lumaDenoise = bypass_lumaDenoise->get_active (); //options.fastexport_bypass_colorDenoise = bypass_colorDenoise->get_active (); - FE_OPT_STORE_(options.fastexport_bypass_defringe, bypass_defringe->get_active ()); - FE_OPT_STORE_(options.fastexport_bypass_dirpyrDenoise, bypass_dirpyrDenoise->get_active ()); - FE_OPT_STORE_(options.fastexport_bypass_sh_hq, bypass_sh_hq->get_active ()); - FE_OPT_STORE_(options.fastexport_bypass_dirpyrequalizer, bypass_dirpyrequalizer->get_active ()); - FE_OPT_STORE_(options.fastexport_bypass_wavelet, bypass_wavelet->get_active ()); + FE_OPT_STORE_ (options.fastexport_bypass_defringe, bypass_defringe->get_active ()); + FE_OPT_STORE_ (options.fastexport_bypass_dirpyrDenoise, bypass_dirpyrDenoise->get_active ()); + FE_OPT_STORE_ (options.fastexport_bypass_sh_hq, bypass_sh_hq->get_active ()); + FE_OPT_STORE_ (options.fastexport_bypass_dirpyrequalizer, bypass_dirpyrequalizer->get_active ()); + FE_OPT_STORE_ (options.fastexport_bypass_wavelet, bypass_wavelet->get_active ()); //options.fastexport_bypass_raw_bayer_all_enhance = bypass_raw_all_enhance->get_active (); - FE_OPT_STORE_(options.fastexport_bypass_raw_bayer_dcb_iterations, bypass_raw_bayer_dcb_iterations->get_active ()); - FE_OPT_STORE_(options.fastexport_bypass_raw_bayer_dcb_enhance, bypass_raw_bayer_dcb_enhance->get_active ()); - FE_OPT_STORE_(options.fastexport_bypass_raw_bayer_lmmse_iterations, bypass_raw_bayer_lmmse_iterations->get_active()); - FE_OPT_STORE_(options.fastexport_bypass_raw_bayer_linenoise, bypass_raw_bayer_linenoise->get_active ()); - FE_OPT_STORE_(options.fastexport_bypass_raw_bayer_greenthresh, bypass_raw_bayer_greenthresh->get_active ()); - FE_OPT_STORE_(options.fastexport_bypass_raw_ccSteps, bypass_raw_ccSteps->get_active ()); - FE_OPT_STORE_(options.fastexport_bypass_raw_ca, bypass_raw_ca->get_active ()); - FE_OPT_STORE_(options.fastexport_bypass_raw_df, bypass_raw_df->get_active ()); - FE_OPT_STORE_(options.fastexport_bypass_raw_ff, bypass_raw_ff->get_active ()); + FE_OPT_STORE_ (options.fastexport_bypass_raw_bayer_dcb_iterations, bypass_raw_bayer_dcb_iterations->get_active ()); + FE_OPT_STORE_ (options.fastexport_bypass_raw_bayer_dcb_enhance, bypass_raw_bayer_dcb_enhance->get_active ()); + FE_OPT_STORE_ (options.fastexport_bypass_raw_bayer_lmmse_iterations, bypass_raw_bayer_lmmse_iterations->get_active()); + FE_OPT_STORE_ (options.fastexport_bypass_raw_bayer_linenoise, bypass_raw_bayer_linenoise->get_active ()); + FE_OPT_STORE_ (options.fastexport_bypass_raw_bayer_greenthresh, bypass_raw_bayer_greenthresh->get_active ()); + FE_OPT_STORE_ (options.fastexport_bypass_raw_ccSteps, bypass_raw_ccSteps->get_active ()); + FE_OPT_STORE_ (options.fastexport_bypass_raw_ca, bypass_raw_ca->get_active ()); + FE_OPT_STORE_ (options.fastexport_bypass_raw_df, bypass_raw_df->get_active ()); + FE_OPT_STORE_ (options.fastexport_bypass_raw_ff, bypass_raw_ff->get_active ()); //saving Bayer demosaic_method int currentRow = raw_bayer_method->get_active_row_number(); - if( currentRow >= 0 && currentRow < procparams::RAWParams::BayerSensor::numMethods) { - FE_OPT_STORE_(options.fastexport_raw_bayer_method, procparams::RAWParams::BayerSensor::methodstring[currentRow]); + if ( currentRow >= 0 && currentRow < procparams::RAWParams::BayerSensor::numMethods) { + FE_OPT_STORE_ (options.fastexport_raw_bayer_method, procparams::RAWParams::BayerSensor::methodstring[currentRow]); } //saving X-Trans demosaic_method currentRow = raw_xtrans_method->get_active_row_number(); - if( currentRow >= 0 && currentRow < procparams::RAWParams::XTransSensor::numMethods) { - FE_OPT_STORE_(options.fastexport_raw_xtrans_method, procparams::RAWParams::XTransSensor::methodstring[currentRow]); + if ( currentRow >= 0 && currentRow < procparams::RAWParams::XTransSensor::numMethods) { + FE_OPT_STORE_ (options.fastexport_raw_xtrans_method, procparams::RAWParams::XTransSensor::methodstring[currentRow]); } // options.fastexport_icm_input = icm_input ; @@ -295,18 +295,18 @@ void ExportPanel::SaveSettingsAsDefault() // options.fastexport_resize_appliesTo = resize_appliesTo; // options.fastexport_resize_dataspec = resize_dataspec ; - FE_OPT_STORE_(options.fastexport_resize_method, "Lanczos"); - FE_OPT_STORE_(options.fastexport_resize_width, MaxWidth->get_value_as_int ()); - FE_OPT_STORE_(options.fastexport_resize_height, MaxHeight->get_value_as_int ()); + FE_OPT_STORE_ (options.fastexport_resize_method, "Lanczos"); + FE_OPT_STORE_ (options.fastexport_resize_width, MaxWidth->get_value_as_int ()); + FE_OPT_STORE_ (options.fastexport_resize_height, MaxHeight->get_value_as_int ()); - FE_OPT_STORE_(options.fastexport_use_fast_pipeline, use_fast_pipeline->get_active()); + FE_OPT_STORE_ (options.fastexport_use_fast_pipeline, use_fast_pipeline->get_active()); #undef FE_OPT_STORE_ if (changed) { try { Options::save(); } catch (Options::Error &e) { - Gtk::MessageDialog msgd(getToplevelWindow(this), e.get_msg(), true, Gtk::MESSAGE_WARNING, Gtk::BUTTONS_CLOSE, true); + Gtk::MessageDialog msgd (getToplevelWindow (this), e.get_msg(), true, Gtk::MESSAGE_WARNING, Gtk::BUTTONS_CLOSE, true); msgd.run(); } } @@ -328,7 +328,7 @@ void ExportPanel::LoadDefaultSettings() //bypass_raw_bayer_all_enhance->set_active (options.fastexport_bypass_raw_bayer_all_enhance ); bypass_raw_bayer_dcb_iterations->set_active (options.fastexport_bypass_raw_bayer_dcb_iterations ); bypass_raw_bayer_dcb_enhance->set_active (options.fastexport_bypass_raw_bayer_dcb_enhance ); - bypass_raw_bayer_lmmse_iterations->set_active(options.fastexport_bypass_raw_bayer_lmmse_iterations); + bypass_raw_bayer_lmmse_iterations->set_active (options.fastexport_bypass_raw_bayer_lmmse_iterations); bypass_raw_bayer_linenoise->set_active (options.fastexport_bypass_raw_bayer_linenoise ); bypass_raw_bayer_greenthresh->set_active (options.fastexport_bypass_raw_bayer_greenthresh ); bypass_raw_ccSteps->set_active (options.fastexport_bypass_raw_ccSteps ); @@ -337,20 +337,20 @@ void ExportPanel::LoadDefaultSettings() bypass_raw_ff->set_active (options.fastexport_bypass_raw_ff ); // Bayer demosaic method - raw_bayer_method->set_active(procparams::RAWParams::BayerSensor::numMethods); + raw_bayer_method->set_active (procparams::RAWParams::BayerSensor::numMethods); - for( size_t i = 0; i < procparams::RAWParams::BayerSensor::numMethods; i++) - if( options.fastexport_raw_bayer_method == procparams::RAWParams::BayerSensor::methodstring[i]) { - raw_bayer_method->set_active(i); + for ( size_t i = 0; i < procparams::RAWParams::BayerSensor::numMethods; i++) + if ( options.fastexport_raw_bayer_method == procparams::RAWParams::BayerSensor::methodstring[i]) { + raw_bayer_method->set_active (i); break; } // X-Trans demosaic method - raw_xtrans_method->set_active(procparams::RAWParams::XTransSensor::numMethods); + raw_xtrans_method->set_active (procparams::RAWParams::XTransSensor::numMethods); - for( size_t i = 0; i < procparams::RAWParams::XTransSensor::numMethods; i++) - if( options.fastexport_raw_xtrans_method == procparams::RAWParams::XTransSensor::methodstring[i]) { - raw_xtrans_method->set_active(i); + for ( size_t i = 0; i < procparams::RAWParams::XTransSensor::numMethods; i++) + if ( options.fastexport_raw_xtrans_method == procparams::RAWParams::XTransSensor::methodstring[i]) { + raw_xtrans_method->set_active (i); break; } @@ -363,14 +363,14 @@ void ExportPanel::LoadDefaultSettings() // resize_appliesTo = options.fastexport_resize_appliesTo; // resize_dataspec = options.fastexport_resize_dataspec ; - MaxWidth->set_value(options.fastexport_resize_width); - MaxHeight->set_value(options.fastexport_resize_height); + MaxWidth->set_value (options.fastexport_resize_width); + MaxHeight->set_value (options.fastexport_resize_height); if (options.fastexport_use_fast_pipeline) { - use_fast_pipeline->set_active(true); - bypass_box->set_sensitive(false); + use_fast_pipeline->set_active (true); + bypass_box->set_sensitive (false); } else { - use_normal_pipeline->set_active(true); + use_normal_pipeline->set_active (true); } } @@ -410,26 +410,26 @@ void ExportPanel::bypassALL_Toggled() bypass_ALL->set_inconsistent (false); - bypass_sharpening->set_active(bypass_ALL->get_active()); - bypass_sharpenEdge->set_active(bypass_ALL->get_active()); - bypass_sharpenMicro->set_active(bypass_ALL->get_active()); + bypass_sharpening->set_active (bypass_ALL->get_active()); + bypass_sharpenEdge->set_active (bypass_ALL->get_active()); + bypass_sharpenMicro->set_active (bypass_ALL->get_active()); //bypass_lumaDenoise->set_active(bypass_ALL->get_active()); //bypass_colorDenoise->set_active(bypass_ALL->get_active()); - bypass_defringe->set_active(bypass_ALL->get_active()); - bypass_dirpyrDenoise->set_active(bypass_ALL->get_active()); - bypass_sh_hq->set_active(bypass_ALL->get_active()); - bypass_dirpyrequalizer->set_active(bypass_ALL->get_active()); - bypass_wavelet->set_active(bypass_ALL->get_active()); + bypass_defringe->set_active (bypass_ALL->get_active()); + bypass_dirpyrDenoise->set_active (bypass_ALL->get_active()); + bypass_sh_hq->set_active (bypass_ALL->get_active()); + bypass_dirpyrequalizer->set_active (bypass_ALL->get_active()); + bypass_wavelet->set_active (bypass_ALL->get_active()); //bypass_raw_bayer_all_enhance->set_active(bypass_ALL->get_active()); - bypass_raw_bayer_dcb_iterations->set_active(bypass_ALL->get_active()); - bypass_raw_bayer_dcb_enhance->set_active(bypass_ALL->get_active()); - bypass_raw_bayer_lmmse_iterations->set_active(bypass_ALL->get_active()); - bypass_raw_bayer_linenoise->set_active(bypass_ALL->get_active()); - bypass_raw_bayer_greenthresh->set_active(bypass_ALL->get_active()); - bypass_raw_ccSteps->set_active(bypass_ALL->get_active()); - bypass_raw_ca->set_active(bypass_ALL->get_active()); - bypass_raw_df->set_active(bypass_ALL->get_active()); - bypass_raw_ff->set_active(bypass_ALL->get_active()); + bypass_raw_bayer_dcb_iterations->set_active (bypass_ALL->get_active()); + bypass_raw_bayer_dcb_enhance->set_active (bypass_ALL->get_active()); + bypass_raw_bayer_lmmse_iterations->set_active (bypass_ALL->get_active()); + bypass_raw_bayer_linenoise->set_active (bypass_ALL->get_active()); + bypass_raw_bayer_greenthresh->set_active (bypass_ALL->get_active()); + bypass_raw_ccSteps->set_active (bypass_ALL->get_active()); + bypass_raw_ca->set_active (bypass_ALL->get_active()); + bypass_raw_df->set_active (bypass_ALL->get_active()); + bypass_raw_ff->set_active (bypass_ALL->get_active()); bypass_sharpeningConn.block (false); bypass_sharpenEdgeConn.block (false); @@ -455,7 +455,7 @@ void ExportPanel::bypassALL_Toggled() void ExportPanel::use_fast_pipeline_toggled() { - bypass_box->set_sensitive(!use_fast_pipeline->get_active()); + bypass_box->set_sensitive (!use_fast_pipeline->get_active()); } /* diff --git a/rtgui/main-cli.cc b/rtgui/main-cli.cc index 7c120e9cf..7908b9133 100644 --- a/rtgui/main-cli.cc +++ b/rtgui/main-cli.cc @@ -96,14 +96,14 @@ bool fast_export = false; * -1 if there is an error in parameters * -2 if an error occurred during processing * -3 if at least one required procparam file was not found */ -int processLineParams( int argc, char **argv ); +int processLineParams ( int argc, char **argv ); -bool dontLoadCache( int argc, char **argv ); +bool dontLoadCache ( int argc, char **argv ); -int main(int argc, char **argv) +int main (int argc, char **argv) { - setlocale(LC_ALL, ""); - setlocale(LC_NUMERIC, "C"); // to set decimal point to "." + setlocale (LC_ALL, ""); + setlocale (LC_NUMERIC, "C"); // to set decimal point to "." Gio::init (); @@ -116,33 +116,33 @@ int main(int argc, char **argv) #ifdef WIN32 WCHAR exnameU[512] = {0}; GetModuleFileNameW (NULL, exnameU, 511); - WideCharToMultiByte(CP_UTF8, 0, exnameU, -1, exname, 511, 0, 0 ); + WideCharToMultiByte (CP_UTF8, 0, exnameU, -1, exname, 511, 0, 0 ); #else - if (readlink("/proc/self/exe", exname, 511) < 0) { - strncpy(exname, argv[0], 511); + if (readlink ("/proc/self/exe", exname, 511) < 0) { + strncpy (exname, argv[0], 511); } #endif - exePath = Glib::path_get_dirname(exname); + exePath = Glib::path_get_dirname (exname); // set paths - if (Glib::path_is_absolute(DATA_SEARCH_PATH)) { + if (Glib::path_is_absolute (DATA_SEARCH_PATH)) { argv0 = DATA_SEARCH_PATH; } else { - argv0 = Glib::build_filename(exePath, DATA_SEARCH_PATH); + argv0 = Glib::build_filename (exePath, DATA_SEARCH_PATH); } - if (Glib::path_is_absolute(CREDITS_SEARCH_PATH)) { + if (Glib::path_is_absolute (CREDITS_SEARCH_PATH)) { creditsPath = CREDITS_SEARCH_PATH; } else { - creditsPath = Glib::build_filename(exePath, CREDITS_SEARCH_PATH); + creditsPath = Glib::build_filename (exePath, CREDITS_SEARCH_PATH); } - if (Glib::path_is_absolute(LICENCE_SEARCH_PATH)) { + if (Glib::path_is_absolute (LICENCE_SEARCH_PATH)) { licensePath = LICENCE_SEARCH_PATH; } else { - licensePath = Glib::build_filename(exePath, LICENCE_SEARCH_PATH); + licensePath = Glib::build_filename (exePath, LICENCE_SEARCH_PATH); } #else @@ -151,24 +151,24 @@ int main(int argc, char **argv) licensePath = LICENCE_SEARCH_PATH; #endif - bool quickstart = dontLoadCache(argc, argv); + bool quickstart = dontLoadCache (argc, argv); try { Options::load (quickstart); } catch (Options::Error &) { - printf("Fatal error!\nThe RT_SETTINGS and/or RT_PATH environment variables are set, but use a relative path. The path must be absolute!\n"); + printf ("Fatal error!\nThe RT_SETTINGS and/or RT_PATH environment variables are set, but use a relative path. The path must be absolute!\n"); return -2; } - rtengine::setPaths(options); + rtengine::setPaths (options); - TIFFSetWarningHandler(nullptr); // avoid annoying message boxes + TIFFSetWarningHandler (nullptr); // avoid annoying message boxes #ifndef WIN32 // Move the old path to the new one if the new does not exist - if (Glib::file_test(Glib::build_filename(options.rtdir, "cache"), Glib::FILE_TEST_IS_DIR) && !Glib::file_test(options.cacheBaseDir, Glib::FILE_TEST_IS_DIR)) { - g_rename(Glib::build_filename (options.rtdir, "cache").c_str (), options.cacheBaseDir.c_str ()); + if (Glib::file_test (Glib::build_filename (options.rtdir, "cache"), Glib::FILE_TEST_IS_DIR) && !Glib::file_test (options.cacheBaseDir, Glib::FILE_TEST_IS_DIR)) { + g_rename (Glib::build_filename (options.rtdir, "cache").c_str (), options.cacheBaseDir.c_str ()); } #endif @@ -177,57 +177,58 @@ int main(int argc, char **argv) bool consoleOpened = false; // suppression of annoying error boxes - SetErrorMode(SEM_FAILCRITICALERRORS | SEM_NOGPFAULTERRORBOX | SEM_NOOPENFILEERRORBOX); + SetErrorMode (SEM_FAILCRITICALERRORS | SEM_NOGPFAULTERRORBOX | SEM_NOOPENFILEERRORBOX); if (argc > 1 || options.rtSettings.verbose) { - Glib::ustring fname(fname_to_utf8 (argv[1])); + Glib::ustring fname (fname_to_utf8 (argv[1])); #if ECLIPSE_ARGS - fname = fname.substr(1, fname.length()-2); + fname = fname.substr (1, fname.length() - 2); #endif + if (options.rtSettings.verbose || ( !Glib::file_test (fname, Glib::FILE_TEST_EXISTS ) && !Glib::file_test (fname, Glib::FILE_TEST_IS_DIR))) { - bool stdoutRedirectedtoFile = (GetFileType(GetStdHandle(STD_OUTPUT_HANDLE)) == 0x0001); - bool stderrRedirectedtoFile = (GetFileType(GetStdHandle(STD_ERROR_HANDLE)) == 0x0001); + bool stdoutRedirectedtoFile = (GetFileType (GetStdHandle (STD_OUTPUT_HANDLE)) == 0x0001); + bool stderrRedirectedtoFile = (GetFileType (GetStdHandle (STD_ERROR_HANDLE)) == 0x0001); // no console, if stdout and stderr both are redirected to file - if( !(stdoutRedirectedtoFile && stderrRedirectedtoFile)) { + if ( ! (stdoutRedirectedtoFile && stderrRedirectedtoFile)) { // check if parameter -w was passed. // We have to do that in this step, because it controls whether to open a console to show the output of following steps bool Console = true; - for(int i = 1; i < argc; i++) - if(!strcmp(argv[i], "-w")) { + for (int i = 1; i < argc; i++) + if (!strcmp (argv[i], "-w")) { Console = false; break; } - if(Console && AllocConsole()) { - AttachConsole( GetCurrentProcessId() ) ; + if (Console && AllocConsole()) { + AttachConsole ( GetCurrentProcessId() ) ; // Don't allow CTRL-C in console to terminate RT - SetConsoleCtrlHandler( NULL, true ); + SetConsoleCtrlHandler ( NULL, true ); // Set title of console char consoletitle[128]; - sprintf(consoletitle, "RawTherapee %s Console", RTVERSION); - SetConsoleTitle(consoletitle); + sprintf (consoletitle, "RawTherapee %s Console", RTVERSION); + SetConsoleTitle (consoletitle); // increase size of screen buffer COORD c; c.X = 200; c.Y = 1000; - SetConsoleScreenBufferSize( GetStdHandle( STD_OUTPUT_HANDLE ), c ); + SetConsoleScreenBufferSize ( GetStdHandle ( STD_OUTPUT_HANDLE ), c ); // Disable console-Cursor CONSOLE_CURSOR_INFO cursorInfo; cursorInfo.dwSize = 100; cursorInfo.bVisible = false; - SetConsoleCursorInfo( GetStdHandle( STD_OUTPUT_HANDLE ), &cursorInfo ); + SetConsoleCursorInfo ( GetStdHandle ( STD_OUTPUT_HANDLE ), &cursorInfo ); - if(!stdoutRedirectedtoFile) { - freopen( "CON", "w", stdout ) ; + if (!stdoutRedirectedtoFile) { + freopen ( "CON", "w", stdout ) ; } - if(!stderrRedirectedtoFile) { - freopen( "CON", "w", stderr ) ; + if (!stderrRedirectedtoFile) { + freopen ( "CON", "w", stderr ) ; } - freopen( "CON", "r", stdin ) ; + freopen ( "CON", "r", stdin ) ; consoleOpened = true; @@ -238,31 +239,34 @@ int main(int argc, char **argv) } } } + #endif int ret = 0; // printing RT's version in all case, particularly useful for the 'verbose' mode, but also for the batch processing std::cout << "RawTherapee, version " << RTVERSION << ", command line" << std::endl; + if (argc > 1) { - ret = processLineParams(argc, argv); - } - else { + ret = processLineParams (argc, argv); + } else { std::cout << "Terminating without anything to do." << std::endl; } #ifdef WIN32 - if(consoleOpened) { - printf("Press any key to exit RawTherapee\n"); - FlushConsoleInputBuffer(GetStdHandle(STD_INPUT_HANDLE)); + + if (consoleOpened) { + printf ("Press any key to exit RawTherapee\n"); + FlushConsoleInputBuffer (GetStdHandle (STD_INPUT_HANDLE)); getch(); } + #endif return ret; } -void deleteProcParams(std::vector &pparams) +void deleteProcParams (std::vector &pparams) { for (unsigned int i = 0; i < pparams.size(); i++) { pparams[i]->deleteInstance(); @@ -274,14 +278,15 @@ void deleteProcParams(std::vector &pparam } -bool dontLoadCache( int argc, char **argv ) +bool dontLoadCache ( int argc, char **argv ) { for (int iArg = 1; iArg < argc; iArg++) { - Glib::ustring currParam(argv[iArg]); + Glib::ustring currParam (argv[iArg]); #if ECLIPSE_ARGS - currParam = currParam.substr(1, currParam.length()-2); + currParam = currParam.substr (1, currParam.length() - 2); #endif - if( currParam.at(0) == '-' && currParam.at(1) == 'q' ) { + + if ( currParam.at (0) == '-' && currParam.at (1) == 'q' ) { return true; } } @@ -289,7 +294,7 @@ bool dontLoadCache( int argc, char **argv ) return false; } -int processLineParams( int argc, char **argv ) +int processLineParams ( int argc, char **argv ) { rtengine::procparams::PartialProfile *rawParams = nullptr, *imgParams = nullptr; std::vector inputFiles; @@ -310,311 +315,316 @@ int processLineParams( int argc, char **argv ) std::string outputType = ""; unsigned errors = 0; - for( int iArg = 1; iArg < argc; iArg++) { - Glib::ustring currParam(argv[iArg]); + for ( int iArg = 1; iArg < argc; iArg++) { + Glib::ustring currParam (argv[iArg]); #if ECLIPSE_ARGS - currParam = currParam.substr(1, currParam.length()-2); -#endif - if( currParam.at(0) == '-' ) { - switch( currParam.at(1) ) { - case 'O': - copyParamsFile = true; - - case 'o': // outputfile or dir - if( iArg + 1 < argc ) { - iArg++; - outputPath = Glib::ustring(fname_to_utf8(argv[iArg])); -#if ECLIPSE_ARGS - outputPath = outputPath.substr(1, outputPath.length()-2); -#endif - if(outputPath.substr(0,9) == "/dev/null") { - outputPath.assign("/dev/null"); // removing any useless chars or filename - outputDirectory = false; - leaveUntouched = true; - } else if(Glib::file_test (outputPath, Glib::FILE_TEST_IS_DIR)) { - outputDirectory = true; - } - } - - break; - - case 'p': // processing parameters for all inputs; all set procparams are required, so - - // RT stop if any of them can't be loaded for any reason. - if( iArg + 1 < argc ) { - iArg++; - Glib::ustring fname(fname_to_utf8(argv[iArg])); -#if ECLIPSE_ARGS - fname = fname.substr(1, fname.length()-2); + currParam = currParam.substr (1, currParam.length() - 2); #endif - if (fname.at(0) == '-') { - std::cerr << "Error: filename missing next to the -p switch" << std::endl; - deleteProcParams(processingParams); - return -3; + if ( currParam.at (0) == '-' ) { + switch ( currParam.at (1) ) { + case 'O': + copyParamsFile = true; + + case 'o': // outputfile or dir + if ( iArg + 1 < argc ) { + iArg++; + outputPath = Glib::ustring (fname_to_utf8 (argv[iArg])); +#if ECLIPSE_ARGS + outputPath = outputPath.substr (1, outputPath.length() - 2); +#endif + + if (outputPath.substr (0, 9) == "/dev/null") { + outputPath.assign ("/dev/null"); // removing any useless chars or filename + outputDirectory = false; + leaveUntouched = true; + } else if (Glib::file_test (outputPath, Glib::FILE_TEST_IS_DIR)) { + outputDirectory = true; + } } - rtengine::procparams::PartialProfile* currentParams = new rtengine::procparams::PartialProfile(true); + break; - if (!(currentParams->load ( fname ))) { - processingParams.push_back(currentParams); + case 'p': // processing parameters for all inputs; all set procparams are required, so + + // RT stop if any of them can't be loaded for any reason. + if ( iArg + 1 < argc ) { + iArg++; + Glib::ustring fname (fname_to_utf8 (argv[iArg])); +#if ECLIPSE_ARGS + fname = fname.substr (1, fname.length() - 2); +#endif + + if (fname.at (0) == '-') { + std::cerr << "Error: filename missing next to the -p switch" << std::endl; + deleteProcParams (processingParams); + return -3; + } + + rtengine::procparams::PartialProfile* currentParams = new rtengine::procparams::PartialProfile (true); + + if (! (currentParams->load ( fname ))) { + processingParams.push_back (currentParams); + } else { + std::cerr << "Error: \"" << fname << "\" not found" << std::endl; + deleteProcParams (processingParams); + return -3; + } + } + + break; + + case 'S': + skipIfNoSidecar = true; + + case 's': // Processing params next to file (file extension appended) + sideProcParams = true; + sideCarFilePos = processingParams.size(); + break; + + case 'd': + useDefault = true; + break; + + case 'q': + break; + + case 'Y': + overwriteFiles = true; + break; + + case 'a': + allExtensions = true; + break; + + case 'j': + if (currParam.length() > 2 && currParam.at (2) == 's') { + if (currParam.length() == 3) { + std::cerr << "Error: the -js switch requires a mandatory value!" << std::endl; + deleteProcParams (processingParams); + return -3; + } + + // looking for the subsampling parameter + subsampling = atoi (currParam.substr (3).c_str()); + + if (subsampling < 1 || subsampling > 3) { + std::cerr << "Error: the value accompanying the -js switch has to be in the [1-3] range!" << std::endl; + deleteProcParams (processingParams); + return -3; + } } else { - std::cerr << "Error: \"" << fname << "\" not found" << std::endl; - deleteProcParams(processingParams); - return -3; + outputType = "jpg"; + compression = atoi (currParam.substr (2).c_str()); + + if (compression < 0 || compression > 100) { + std::cerr << "Error: the value accompanying the -j switch has to be in the [0-100] range!" << std::endl; + deleteProcParams (processingParams); + return -3; + } } - } - break; + break; - case 'S': - skipIfNoSidecar = true; + case 'b': + bits = atoi (currParam.substr (2).c_str()); - case 's': // Processing params next to file (file extension appended) - sideProcParams = true; - sideCarFilePos = processingParams.size(); - break; - - case 'd': - useDefault = true; - break; - - case 'q': - break; - - case 'Y': - overwriteFiles = true; - break; - - case 'a': - allExtensions = true; - break; - - case 'j': - if (currParam.length() > 2 && currParam.at(2) == 's') { - if (currParam.length() == 3) { - std::cerr << "Error: the -js switch requires a mandatory value!" << std::endl; - deleteProcParams(processingParams); + if (bits != 8 && bits != 16) { + std::cerr << "Error: specify -b8 for 8-bit or -b16 for 16-bit output." << std::endl; + deleteProcParams (processingParams); return -3; } - // looking for the subsampling parameter - subsampling = atoi(currParam.substr(3).c_str()); + break; - if (subsampling < 1 || subsampling > 3) { - std::cerr << "Error: the value accompanying the -js switch has to be in the [1-3] range!" << std::endl; - deleteProcParams(processingParams); - return -3; - } - } else { - outputType = "jpg"; - compression = atoi(currParam.substr(2).c_str()); + case 't': + outputType = "tif"; + compression = ((currParam.size() < 3 || currParam.at (2) != 'z') ? 0 : 1); + break; - if (compression < 0 || compression > 100) { - std::cerr << "Error: the value accompanying the -j switch has to be in the [0-100] range!" << std::endl; - deleteProcParams(processingParams); - return -3; - } - } + case 'n': + outputType = "png"; + compression = -1; + break; - break; + case 'f': + fast_export = true; + break; - case 'b': - bits = atoi(currParam.substr(2).c_str()); - - if (bits != 8 && bits != 16) { - std::cerr << "Error: specify -b8 for 8-bit or -b16 for 16-bit output." << std::endl; - deleteProcParams(processingParams); - return -3; - } - - break; - - case 't': - outputType = "tif"; - compression = ((currParam.size() < 3 || currParam.at(2) != 'z') ? 0 : 1); - break; - - case 'n': - outputType = "png"; - compression = -1; - break; - - case 'f': - fast_export = true; - break; - - case 'c': // MUST be last option - while (iArg + 1 < argc) { - iArg++; - Glib::ustring argument(fname_to_utf8(argv[iArg])); + case 'c': // MUST be last option + while (iArg + 1 < argc) { + iArg++; + Glib::ustring argument (fname_to_utf8 (argv[iArg])); #if ECLIPSE_ARGS - argument = argument.substr(1, argument.length()-2); + argument = argument.substr (1, argument.length() - 2); #endif - if (!Glib::file_test (argument, Glib::FILE_TEST_EXISTS)) { - std::cout << "\"" << argument << "\" doesn't exist !" << std::endl; - continue; - } - - if (Glib::file_test (argument, Glib::FILE_TEST_IS_REGULAR)) { - bool notAll = allExtensions && !options.is_parse_extention (argument); - bool notRetained = !allExtensions && !options.has_retained_extention (argument); - if (notAll || notRetained) { - if (notAll) { - std::cout << "\"" << argument << "\" is not one of the file format to process: skipped" << std::endl; - } else if (notRetained) { - std::cout << "\"" << argument << "\" is not one of the retained file format to process: skipped" << std::endl; - } - } - else { - inputFiles.emplace_back (argument); - } - continue; - - } - - if (Glib::file_test (argument, Glib::FILE_TEST_IS_DIR)) { - - auto dir = Gio::File::create_for_path (argument); - if (!dir || !dir->query_exists()) { + if (!Glib::file_test (argument, Glib::FILE_TEST_EXISTS)) { + std::cout << "\"" << argument << "\" doesn't exist !" << std::endl; continue; } - try { - - auto enumerator = dir->enumerate_children("standard::name,standard::type"); - - while (auto file = enumerator->next_file()) { - - const auto fileName = Glib::build_filename(argument, file->get_name()); - bool isDir = file->get_file_type() == Gio::FILE_TYPE_DIRECTORY; - bool notAll = allExtensions && !options.is_parse_extention(fileName); - bool notRetained = !allExtensions && !options.has_retained_extention(fileName); - - if (isDir || notAll || notRetained) { - if (isDir) { - std::cout << "\"" << fileName << "\" is a directory: skipped" << std::endl; - } else if (notAll) { - std::cout << "\"" << fileName << "\" is not one of the file format to process: skipped" << std::endl; - } else if (notRetained) { - std::cout << "\"" << fileName << "\" is not one of the retained file format to process: skipped" << std::endl; - } - continue; + if (Glib::file_test (argument, Glib::FILE_TEST_IS_REGULAR)) { + bool notAll = allExtensions && !options.is_parse_extention (argument); + bool notRetained = !allExtensions && !options.has_retained_extention (argument); + if (notAll || notRetained) { + if (notAll) { + std::cout << "\"" << argument << "\" is not one of the file format to process: skipped" << std::endl; + } else if (notRetained) { + std::cout << "\"" << argument << "\" is not one of the retained file format to process: skipped" << std::endl; } - - if (sideProcParams && skipIfNoSidecar) { - // look for the sidecar proc params - if (!Glib::file_test(fileName + paramFileExtension, Glib::FILE_TEST_EXISTS)) { - std::cout << "\"" << fileName << "\" has no side-car file: image skipped" << std::endl; - continue; - } - } - - inputFiles.emplace_back (fileName); + } else { + inputFiles.emplace_back (argument); } - } catch (Glib::Exception&) {} + continue; - continue; + } + + if (Glib::file_test (argument, Glib::FILE_TEST_IS_DIR)) { + + auto dir = Gio::File::create_for_path (argument); + + if (!dir || !dir->query_exists()) { + continue; + } + + try { + + auto enumerator = dir->enumerate_children ("standard::name,standard::type"); + + while (auto file = enumerator->next_file()) { + + const auto fileName = Glib::build_filename (argument, file->get_name()); + bool isDir = file->get_file_type() == Gio::FILE_TYPE_DIRECTORY; + bool notAll = allExtensions && !options.is_parse_extention (fileName); + bool notRetained = !allExtensions && !options.has_retained_extention (fileName); + + if (isDir || notAll || notRetained) { + if (isDir) { + std::cout << "\"" << fileName << "\" is a directory: skipped" << std::endl; + } else if (notAll) { + std::cout << "\"" << fileName << "\" is not one of the file format to process: skipped" << std::endl; + } else if (notRetained) { + std::cout << "\"" << fileName << "\" is not one of the retained file format to process: skipped" << std::endl; + } + + continue; + + } + + if (sideProcParams && skipIfNoSidecar) { + // look for the sidecar proc params + if (!Glib::file_test (fileName + paramFileExtension, Glib::FILE_TEST_EXISTS)) { + std::cout << "\"" << fileName << "\" has no side-car file: image skipped" << std::endl; + continue; + } + } + + inputFiles.emplace_back (fileName); + } + + } catch (Glib::Exception&) {} + + continue; + } + + std::cerr << "\"" << argument << "\" is neither a regular file nor a directory." << std::endl; } - std::cerr << "\"" << argument << "\" is neither a regular file nor a directory." << std::endl; + break; +#ifdef WIN32 + + case 'w': // This case is handled outside this function + break; +#endif + + case 'h': + case '?': + default: { + Glib::ustring pparamsExt = paramFileExtension.substr (1); + std::cout << " An advanced, cross-platform program for developing raw photos." << std::endl; + std::cout << std::endl; + std::cout << " Website: http://www.rawtherapee.com/" << std::endl; + std::cout << " Documentation: http://rawpedia.rawtherapee.com/" << std::endl; + std::cout << " Forum: https://discuss.pixls.us/c/software/rawtherapee" << std::endl; + std::cout << " Code and bug reports: https://github.com/Beep6581/RawTherapee" << std::endl; + std::cout << std::endl; + std::cout << "Symbols:" << std::endl; + std::cout << " indicate parameters you can change." << std::endl; + std::cout << " [Square brackets] mean the parameter is optional." << std::endl; + std::cout << " The pipe symbol | indicates a choice of one or the other." << std::endl; + std::cout << " The dash symbol - denotes a range of possible values from one to the other." << std::endl; + std::cout << std::endl; + std::cout << "Usage:" << std::endl; + std::cout << " " << Glib::path_get_basename (argv[0]) << " -c | Convert files in batch with default parameters." << std::endl; + std::cout << " " << Glib::path_get_basename (argv[0]) << " -c | Convert files in batch with your own settings." << std::endl; + std::cout << std::endl; +#ifdef WIN32 + std::cout << " -w Do not open the Windows console" << std::endl; + std::cout << std::endl; +#endif + std::cout << "Options:" << std::endl; + std::cout << " " << Glib::path_get_basename (argv[0]) << "[-o |-O ] [-q] [-a] [-s|-S] [-p [-p ...] ] [-d] [ -j[1-100] [-js<1-3>] | [-b<8|16>] [-t[z] | [-n]] ] [-Y] [-f] -c " << std::endl; + std::cout << std::endl; + std::cout << " -c Specify one or more input files or directory." << std::endl; + std::cout << " When specifying directories, Rawtherapee will look for images files that comply with the" << std::endl; + std::cout << " selected extensions (see also '-a')." << std::endl; + std::cout << " -c must be the last option." << std::endl; + std::cout << " -o | Set output file or folder." << std::endl; + std::cout << " Saves output file alongside input file if -o is not specified." << std::endl; + std::cout << " -O | Set output file or folder and copy " << pparamsExt << " file into it." << std::endl; + std::cout << " Saves output file alongside input file if -O is not specified." << std::endl; + std::cout << " -q Quick-start mode. Does not load cached files to speedup start time." << std::endl; + std::cout << " -a Process all supported image file types when specifying a folder, even those" << std::endl; + std::cout << " not currently selected in Preferences > File Browser > Parsed Extensions." << std::endl; + std::cout << " -s Use the existing sidecar file to build the processing parameters," << std::endl; + std::cout << " e.g. for photo.raw there should be a photo.raw." << pparamsExt << " file in the same folder." << std::endl; + std::cout << " If the sidecar file does not exist, neutral values will be used." << std::endl; + std::cout << " -S Like -s but skip if the sidecar file does not exist." << std::endl; + std::cout << " -p Specify processing profile to be used for all conversions." << std::endl; + std::cout << " You can specify as many sets of \"-p \" options as you like," << std::endl; + std::cout << " each will be built on top of the previous one, as explained below." << std::endl; + std::cout << " -d Use the default raw or non-raw processing profile as set in" << std::endl; + std::cout << " Preferences > Image Processing > Default Processing Profile" << std::endl; + std::cout << " -j[1-100] Specify output to be JPEG (default, if -t and -n are not set)." << std::endl; + std::cout << " Optionally, specify compression 1-100 (default value: 92)." << std::endl; + std::cout << " -js<1-3> Specify the JPEG chroma subsampling parameter, where:" << std::endl; + std::cout << " 1 = Best compression: 2x2, 1x1, 1x1 (4:2:0)" << std::endl; + std::cout << " Chroma halved vertically and horizontally." << std::endl; + std::cout << " 2 = Balanced (default): 2x1, 1x1, 1x1 (4:2:2)" << std::endl; + std::cout << " Chroma halved horizontally." << std::endl; + std::cout << " 3 = Best quality: 1x1, 1x1, 1x1 (4:4:4)" << std::endl; + std::cout << " No chroma subsampling." << std::endl; + std::cout << " -b<8|16> Specify bit depth per channel (default value: 16 for TIFF, 8 for PNG)." << std::endl; + std::cout << " Only applies to TIFF and PNG output, JPEG is always 8." << std::endl; + std::cout << " -t[z] Specify output to be TIFF." << std::endl; + std::cout << " Uncompressed by default, or deflate compression with 'z'." << std::endl; + std::cout << " -n Specify output to be compressed PNG." << std::endl; + std::cout << " Compression is hard-coded to 6." << std::endl; + std::cout << " -Y Overwrite output if present." << std::endl; + std::cout << " -f Use the custom fast-export processing pipeline." << std::endl; + std::cout << std::endl; + std::cout << "Your " << pparamsExt << " files can be incomplete, RawTherapee will build the final values as follows:" << std::endl; + std::cout << " 1- A new processing profile is created using neutral values," << std::endl; + std::cout << " 2- If the \"-d\" option is set, the values are overridden by those found in" << std::endl; + std::cout << " the default raw or non-raw processing profile." << std::endl; + std::cout << " 3- If one or more \"-p\" options are set, the values are overridden by those" << std::endl; + std::cout << " found in these processing profiles." << std::endl; + std::cout << " 4- If the \"-s\" or \"-S\" options are set, the values are finally overridden by those" << std::endl; + std::cout << " found in the sidecar files." << std::endl; + std::cout << " The processing profiles are processed in the order specified on the command line." << std::endl; + return -1; } - - break; -#ifdef WIN32 - - case 'w': // This case is handled outside this function - break; -#endif - - case 'h': - case '?': - default: { - Glib::ustring pparamsExt = paramFileExtension.substr(1); - std::cout << " An advanced, cross-platform program for developing raw photos." << std::endl; - std::cout << std::endl; - std::cout << " Website: http://www.rawtherapee.com/" << std::endl; - std::cout << " Documentation: http://rawpedia.rawtherapee.com/" << std::endl; - std::cout << " Forum: https://discuss.pixls.us/c/software/rawtherapee" << std::endl; - std::cout << " Code and bug reports: https://github.com/Beep6581/RawTherapee" << std::endl; - std::cout << std::endl; - std::cout << "Symbols:" << std::endl; - std::cout << " indicate parameters you can change." << std::endl; - std::cout << " [Square brackets] mean the parameter is optional." << std::endl; - std::cout << " The pipe symbol | indicates a choice of one or the other." << std::endl; - std::cout << " The dash symbol - denotes a range of possible values from one to the other." << std::endl; - std::cout << std::endl; - std::cout << "Usage:" << std::endl; - std::cout << " " << Glib::path_get_basename(argv[0]) << " -c | Convert files in batch with default parameters." << std::endl; - std::cout << " " << Glib::path_get_basename(argv[0]) << " -c | Convert files in batch with your own settings." << std::endl; - std::cout << std::endl; -#ifdef WIN32 - std::cout << " -w Do not open the Windows console" << std::endl; - std::cout << std::endl; -#endif - std::cout << "Options:" << std::endl; - std::cout << " " << Glib::path_get_basename(argv[0]) << "[-o |-O ] [-q] [-a] [-s|-S] [-p [-p ...] ] [-d] [ -j[1-100] [-js<1-3>] | [-b<8|16>] [-t[z] | [-n]] ] [-Y] [-f] -c " << std::endl; - std::cout << std::endl; - std::cout << " -c Specify one or more input files or directory." << std::endl; - std::cout << " When specifying directories, Rawtherapee will look for images files that comply with the" << std::endl; - std::cout << " selected extensions (see also '-a')." << std::endl; - std::cout << " -c must be the last option." << std::endl; - std::cout << " -o | Set output file or folder." << std::endl; - std::cout << " Saves output file alongside input file if -o is not specified." << std::endl; - std::cout << " -O | Set output file or folder and copy " << pparamsExt << " file into it." << std::endl; - std::cout << " Saves output file alongside input file if -O is not specified." << std::endl; - std::cout << " -q Quick-start mode. Does not load cached files to speedup start time." << std::endl; - std::cout << " -a Process all supported image file types when specifying a folder, even those" << std::endl; - std::cout << " not currently selected in Preferences > File Browser > Parsed Extensions." << std::endl; - std::cout << " -s Use the existing sidecar file to build the processing parameters," << std::endl; - std::cout << " e.g. for photo.raw there should be a photo.raw." << pparamsExt << " file in the same folder." << std::endl; - std::cout << " If the sidecar file does not exist, neutral values will be used." << std::endl; - std::cout << " -S Like -s but skip if the sidecar file does not exist." << std::endl; - std::cout << " -p Specify processing profile to be used for all conversions." << std::endl; - std::cout << " You can specify as many sets of \"-p \" options as you like," << std::endl; - std::cout << " each will be built on top of the previous one, as explained below." << std::endl; - std::cout << " -d Use the default raw or non-raw processing profile as set in" << std::endl; - std::cout << " Preferences > Image Processing > Default Processing Profile" << std::endl; - std::cout << " -j[1-100] Specify output to be JPEG (default, if -t and -n are not set)." << std::endl; - std::cout << " Optionally, specify compression 1-100 (default value: 92)." << std::endl; - std::cout << " -js<1-3> Specify the JPEG chroma subsampling parameter, where:" << std::endl; - std::cout << " 1 = Best compression: 2x2, 1x1, 1x1 (4:2:0)" << std::endl; - std::cout << " Chroma halved vertically and horizontally." << std::endl; - std::cout << " 2 = Balanced (default): 2x1, 1x1, 1x1 (4:2:2)" << std::endl; - std::cout << " Chroma halved horizontally." << std::endl; - std::cout << " 3 = Best quality: 1x1, 1x1, 1x1 (4:4:4)" << std::endl; - std::cout << " No chroma subsampling." << std::endl; - std::cout << " -b<8|16> Specify bit depth per channel (default value: 16 for TIFF, 8 for PNG)." << std::endl; - std::cout << " Only applies to TIFF and PNG output, JPEG is always 8." << std::endl; - std::cout << " -t[z] Specify output to be TIFF." << std::endl; - std::cout << " Uncompressed by default, or deflate compression with 'z'." << std::endl; - std::cout << " -n Specify output to be compressed PNG." << std::endl; - std::cout << " Compression is hard-coded to 6." << std::endl; - std::cout << " -Y Overwrite output if present." << std::endl; - std::cout << " -f Use the custom fast-export processing pipeline." << std::endl; - std::cout << std::endl; - std::cout << "Your " << pparamsExt << " files can be incomplete, RawTherapee will build the final values as follows:" << std::endl; - std::cout << " 1- A new processing profile is created using neutral values," << std::endl; - std::cout << " 2- If the \"-d\" option is set, the values are overridden by those found in" << std::endl; - std::cout << " the default raw or non-raw processing profile." << std::endl; - std::cout << " 3- If one or more \"-p\" options are set, the values are overridden by those" << std::endl; - std::cout << " found in these processing profiles." << std::endl; - std::cout << " 4- If the \"-s\" or \"-S\" options are set, the values are finally overridden by those" << std::endl; - std::cout << " found in the sidecar files." << std::endl; - std::cout << " The processing profiles are processed in the order specified on the command line." << std::endl; - return -1; - } } } else { - argv1 = Glib::ustring(fname_to_utf8(argv[iArg])); + argv1 = Glib::ustring (fname_to_utf8 (argv[iArg])); #if ECLIPSE_ARGS - argv1 = argv1.substr(1, argv1.length()-2); + argv1 = argv1.substr (1, argv1.length() - 2); #endif - if( outputDirectory ) { + if ( outputDirectory ) { options.savePathFolder = outputPath; options.saveUsePathTemplate = false; } else { @@ -641,41 +651,41 @@ int processLineParams( int argc, char **argv ) } } - if( !argv1.empty() ) { + if ( !argv1.empty() ) { return 1; } - if( inputFiles.empty() ) { + if ( inputFiles.empty() ) { return 2; } if (useDefault) { - rawParams = new rtengine::procparams::PartialProfile(true, true); - Glib::ustring profPath = options.findProfilePath(options.defProfRaw); + rawParams = new rtengine::procparams::PartialProfile (true, true); + Glib::ustring profPath = options.findProfilePath (options.defProfRaw); - if (options.is_defProfRawMissing() || profPath.empty() || (profPath != DEFPROFILE_DYNAMIC && rawParams->load(profPath == DEFPROFILE_INTERNAL ? DEFPROFILE_INTERNAL : Glib::build_filename(profPath, Glib::path_get_basename(options.defProfRaw) + paramFileExtension)))) { + if (options.is_defProfRawMissing() || profPath.empty() || (profPath != DEFPROFILE_DYNAMIC && rawParams->load (profPath == DEFPROFILE_INTERNAL ? DEFPROFILE_INTERNAL : Glib::build_filename (profPath, Glib::path_get_basename (options.defProfRaw) + paramFileExtension)))) { std::cerr << "Error: default raw processing profile not found" << std::endl; rawParams->deleteInstance(); delete rawParams; - deleteProcParams(processingParams); + deleteProcParams (processingParams); return -3; } - imgParams = new rtengine::procparams::PartialProfile(true); - profPath = options.findProfilePath(options.defProfImg); + imgParams = new rtengine::procparams::PartialProfile (true); + profPath = options.findProfilePath (options.defProfImg); - if (options.is_defProfImgMissing() || profPath.empty() || (profPath != DEFPROFILE_DYNAMIC && imgParams->load(profPath == DEFPROFILE_INTERNAL ? DEFPROFILE_INTERNAL : Glib::build_filename(profPath, Glib::path_get_basename(options.defProfImg) + paramFileExtension)))) { + if (options.is_defProfImgMissing() || profPath.empty() || (profPath != DEFPROFILE_DYNAMIC && imgParams->load (profPath == DEFPROFILE_INTERNAL ? DEFPROFILE_INTERNAL : Glib::build_filename (profPath, Glib::path_get_basename (options.defProfImg) + paramFileExtension)))) { std::cerr << "Error: default non-raw processing profile not found" << std::endl; imgParams->deleteInstance(); delete imgParams; rawParams->deleteInstance(); delete rawParams; - deleteProcParams(processingParams); + deleteProcParams (processingParams); return -3; } } - for( size_t iFile = 0; iFile < inputFiles.size(); iFile++) { + for ( size_t iFile = 0; iFile < inputFiles.size(); iFile++) { // Has to be reinstanciated at each profile to have a ProcParams object with default values rtengine::procparams::ProcParams currentParams; @@ -690,34 +700,34 @@ int processLineParams( int argc, char **argv ) Glib::ustring outputFile; - if( outputType.empty() ) { + if ( outputType.empty() ) { outputType = "jpg"; } - if( outputPath.empty() ) { + if ( outputPath.empty() ) { Glib::ustring s = inputFile; - Glib::ustring::size_type ext = s.find_last_of('.'); - outputFile = s.substr(0, ext) + "." + outputType; - } else if( outputDirectory ) { - Glib::ustring s = Glib::path_get_basename( inputFile ); - Glib::ustring::size_type ext = s.find_last_of('.'); - outputFile = Glib::build_filename(outputPath, s.substr(0, ext) + "." + outputType); + Glib::ustring::size_type ext = s.find_last_of ('.'); + outputFile = s.substr (0, ext) + "." + outputType; + } else if ( outputDirectory ) { + Glib::ustring s = Glib::path_get_basename ( inputFile ); + Glib::ustring::size_type ext = s.find_last_of ('.'); + outputFile = Glib::build_filename (outputPath, s.substr (0, ext) + "." + outputType); } else { if (leaveUntouched) { outputFile = outputPath; } else { Glib::ustring s = outputPath; - Glib::ustring::size_type ext = s.find_last_of('.'); - outputFile = s.substr(0, ext) + "." + outputType; + Glib::ustring::size_type ext = s.find_last_of ('.'); + outputFile = s.substr (0, ext) + "." + outputType; } } - if( inputFile == outputFile) { + if ( inputFile == outputFile) { std::cerr << "Cannot overwrite: " << inputFile << std::endl; continue; } - if( !overwriteFiles && Glib::file_test( outputFile , Glib::FILE_TEST_EXISTS ) ) { + if ( !overwriteFiles && Glib::file_test ( outputFile, Glib::FILE_TEST_EXISTS ) ) { std::cerr << outputFile << " already exists: use -Y option to overwrite. This image has been skipped." << std::endl; continue; } @@ -743,18 +753,20 @@ int processLineParams( int argc, char **argv ) if (options.defProfRaw == DEFPROFILE_DYNAMIC) { rawParams->deleteInstance(); delete rawParams; - rawParams = ProfileStore::getInstance()->loadDynamicProfile(ii->getMetaData()); + rawParams = ProfileStore::getInstance()->loadDynamicProfile (ii->getMetaData()); } + std::cout << " Merging default raw processing profile" << std::endl; - rawParams->applyTo(¤tParams); - } else { + rawParams->applyTo (¤tParams); + } else { if (options.defProfImg == DEFPROFILE_DYNAMIC) { imgParams->deleteInstance(); delete imgParams; - imgParams = ProfileStore::getInstance()->loadDynamicProfile(ii->getMetaData()); + imgParams = ProfileStore::getInstance()->loadDynamicProfile (ii->getMetaData()); } + std::cout << " Merging default non-raw processing profile" << std::endl; - imgParams->applyTo(¤tParams); + imgParams->applyTo (¤tParams); } } @@ -768,7 +780,7 @@ int processLineParams( int argc, char **argv ) Glib::ustring sideProcessingParams = inputFile + paramFileExtension; // the "load" method don't reset the procparams values anymore, so values found in the procparam file override the one of currentParams - if( !Glib::file_test( sideProcessingParams, Glib::FILE_TEST_EXISTS ) || currentParams.load ( sideProcessingParams )) { + if ( !Glib::file_test ( sideProcessingParams, Glib::FILE_TEST_EXISTS ) || currentParams.load ( sideProcessingParams )) { std::cerr << "Warning: sidecar file requested but not found for: " << sideProcessingParams << std::endl; } else { sideCarFound = true; @@ -776,15 +788,15 @@ int processLineParams( int argc, char **argv ) } } - if( processingParams.size() > i ) { + if ( processingParams.size() > i ) { std::cout << " Merging procparams #" << i << std::endl; - processingParams[i]->applyTo(¤tParams); + processingParams[i]->applyTo (¤tParams); } i++; } while (i < processingParams.size() + (sideProcParams ? 1 : 0)); - if( sideProcParams && !sideCarFound && skipIfNoSidecar ) { + if ( sideProcParams && !sideCarFound && skipIfNoSidecar ) { delete ii; errors++; std::cerr << "Error: no sidecar procparams found for: " << inputFile << std::endl; @@ -793,7 +805,7 @@ int processLineParams( int argc, char **argv ) job = rtengine::ProcessingJob::create (ii, currentParams, fast_export); - if( !job ) { + if ( !job ) { errors++; std::cerr << "Error creating processing for: " << inputFile << std::endl; ii->decreaseRef(); @@ -803,31 +815,31 @@ int processLineParams( int argc, char **argv ) // Process image rtengine::IImage16* resultImage = rtengine::processImage (job, errorCode, nullptr, options.tunnelMetaData); - if( !resultImage ) { + if ( !resultImage ) { errors++; std::cerr << "Error processing: " << inputFile << std::endl; - rtengine::ProcessingJob::destroy( job ); + rtengine::ProcessingJob::destroy ( job ); continue; } // save image to disk - if( outputType == "jpg" ) { - errorCode = resultImage->saveAsJPEG( outputFile, compression, subsampling ); - } else if( outputType == "tif" ) { - errorCode = resultImage->saveAsTIFF( outputFile, bits, compression == 0 ); - } else if( outputType == "png" ) { - errorCode = resultImage->saveAsPNG( outputFile, compression, bits ); + if ( outputType == "jpg" ) { + errorCode = resultImage->saveAsJPEG ( outputFile, compression, subsampling ); + } else if ( outputType == "tif" ) { + errorCode = resultImage->saveAsTIFF ( outputFile, bits, compression == 0 ); + } else if ( outputType == "png" ) { + errorCode = resultImage->saveAsPNG ( outputFile, compression, bits ); } else { errorCode = resultImage->saveToFile (outputFile); } - if(errorCode) { + if (errorCode) { errors++; std::cerr << "Error saving to: " << outputFile << std::endl; } else { - if( copyParamsFile ) { + if ( copyParamsFile ) { Glib::ustring outputProcessingParams = outputFile + paramFileExtension; - currentParams.save( outputProcessingParams ); + currentParams.save ( outputProcessingParams ); } } @@ -845,7 +857,7 @@ int processLineParams( int argc, char **argv ) delete rawParams; } - deleteProcParams(processingParams); + deleteProcParams (processingParams); return errors > 0 ? -2 : 0; } diff --git a/rtgui/main.cc b/rtgui/main.cc index 1e329c284..1f952fb2a 100644 --- a/rtgui/main.cc +++ b/rtgui/main.cc @@ -118,83 +118,89 @@ static void myGdkLockLeave() * -1 if there is an error in parameters * -2 if an error occurred during processing * -3 if at least one required procparam file was not found */ -int processLineParams( int argc, char **argv ) +int processLineParams ( int argc, char **argv ) { - for( int iArg = 1; iArg < argc; iArg++) { - Glib::ustring currParam(argv[iArg]); + for ( int iArg = 1; iArg < argc; iArg++) { + Glib::ustring currParam (argv[iArg]); #if ECLIPSE_ARGS - currParam = currParam.substr(1, currParam.length()-2); + currParam = currParam.substr (1, currParam.length() - 2); #endif - if( currParam.at(0) == '-' ) { - switch( currParam.at(1) ) { + + if ( currParam.at (0) == '-' ) { + switch ( currParam.at (1) ) { #ifdef WIN32 - case 'w': // This case is handled outside this function - break; + case 'w': // This case is handled outside this function + break; #endif - case 'v': - return 0; + + case 'v': + return 0; #ifndef __APPLE__ // TODO agriggio - there seems to be already some "single instance app" support for OSX in rtwindow. Disabling it here until I understand how to merge the two - case 'R': - if (!gimpPlugin) { - remote = true; - } - break; -#endif - - case 'g': - if (currParam == "-gimp") { - gimpPlugin = true; - simpleEditor = true; - remote = false; + + case 'R': + if (!gimpPlugin) { + remote = true; + } + break; - } +#endif + + case 'g': + if (currParam == "-gimp") { + gimpPlugin = true; + simpleEditor = true; + remote = false; + break; + } + // no break here on purpose - case 'h': - case '?': - default: { - Glib::ustring pparamsExt = paramFileExtension.substr(1); - std::cout << " An advanced, cross-platform program for developing raw photos." << std::endl; - std::cout << std::endl; - std::cout << " Website: http://www.rawtherapee.com/" << std::endl; - std::cout << " Documentation: http://rawpedia.rawtherapee.com/" << std::endl; - std::cout << " Forum: https://discuss.pixls.us/c/software/rawtherapee" << std::endl; - std::cout << " Code and bug reports: https://github.com/Beep6581/RawTherapee" << std::endl; - std::cout << std::endl; - std::cout << "Symbols:" << std::endl; - std::cout << " indicate parameters you can change." << std::endl; - //std::cout << " [Square brackets] mean the parameter is optional." << std::endl; - //std::cout << " The pipe symbol | indicates a choice of one or the other." << std::endl; - //std::cout << " The dash symbol - denotes a range of possible values from one to the other." << std::endl; - std::cout << std::endl; - std::cout << "Usage:" << std::endl; - std::cout << " " << Glib::path_get_basename(argv[0]) << " Start File Browser inside folder." << std::endl; - std::cout << " " << Glib::path_get_basename(argv[0]) << " Start Image Editor with file." << std::endl; - std::cout << std::endl; - std::cout << "Options:" << std::endl; + case 'h': + case '?': + default: { + Glib::ustring pparamsExt = paramFileExtension.substr (1); + std::cout << " An advanced, cross-platform program for developing raw photos." << std::endl; + std::cout << std::endl; + std::cout << " Website: http://www.rawtherapee.com/" << std::endl; + std::cout << " Documentation: http://rawpedia.rawtherapee.com/" << std::endl; + std::cout << " Forum: https://discuss.pixls.us/c/software/rawtherapee" << std::endl; + std::cout << " Code and bug reports: https://github.com/Beep6581/RawTherapee" << std::endl; + std::cout << std::endl; + std::cout << "Symbols:" << std::endl; + std::cout << " indicate parameters you can change." << std::endl; + //std::cout << " [Square brackets] mean the parameter is optional." << std::endl; + //std::cout << " The pipe symbol | indicates a choice of one or the other." << std::endl; + //std::cout << " The dash symbol - denotes a range of possible values from one to the other." << std::endl; + std::cout << std::endl; + std::cout << "Usage:" << std::endl; + std::cout << " " << Glib::path_get_basename (argv[0]) << " Start File Browser inside folder." << std::endl; + std::cout << " " << Glib::path_get_basename (argv[0]) << " Start Image Editor with file." << std::endl; + std::cout << std::endl; + std::cout << "Options:" << std::endl; #ifdef WIN32 - std::cout << " -w Do not open the Windows console" << std::endl; + std::cout << " -w Do not open the Windows console" << std::endl; #endif - std::cout << " -v Print RawTherapee version number and exit" << std::endl; + std::cout << " -v Print RawTherapee version number and exit" << std::endl; #ifndef __APPLE__ - std::cout << " -R Raise an already running RawTherapee instance (if available)" << std::endl; + std::cout << " -R Raise an already running RawTherapee instance (if available)" << std::endl; #endif - std::cout << " -h -? Display this help message" << std::endl; - return -1; - } + std::cout << " -h -? Display this help message" << std::endl; + return -1; + } } } else { if (argv1.empty()) { - argv1 = Glib::ustring(fname_to_utf8(argv[iArg])); + argv1 = Glib::ustring (fname_to_utf8 (argv[iArg])); #if ECLIPSE_ARGS - argv1 = argv1.substr(1, argv1.length()-2); + argv1 = argv1.substr (1, argv1.length() - 2); #endif } else if (gimpPlugin) { - argv2 = Glib::ustring(fname_to_utf8(argv[iArg])); + argv2 = Glib::ustring (fname_to_utf8 (argv[iArg])); break; } + if (!gimpPlugin) { break; } @@ -217,15 +223,15 @@ bool init_rt() extProgStore->init(); SoundManager::init(); - if( !options.rtSettings.verbose ) { - TIFFSetWarningHandler(nullptr); // avoid annoying message boxes + if ( !options.rtSettings.verbose ) { + TIFFSetWarningHandler (nullptr); // avoid annoying message boxes } #ifndef WIN32 // Move the old path to the new one if the new does not exist - if (Glib::file_test(Glib::build_filename(options.rtdir, "cache"), Glib::FILE_TEST_IS_DIR) && !Glib::file_test(options.cacheBaseDir, Glib::FILE_TEST_IS_DIR)) { - g_rename(Glib::build_filename (options.rtdir, "cache").c_str (), options.cacheBaseDir.c_str ()); + if (Glib::file_test (Glib::build_filename (options.rtdir, "cache"), Glib::FILE_TEST_IS_DIR) && !Glib::file_test (options.cacheBaseDir, Glib::FILE_TEST_IS_DIR)) { + g_rename (Glib::build_filename (options.rtdir, "cache").c_str (), options.cacheBaseDir.c_str ()); } #endif @@ -242,11 +248,11 @@ void cleanup_rt() RTWindow *create_rt_window() { - Glib::ustring icon_path = Glib::build_filename(argv0, "images"); + Glib::ustring icon_path = Glib::build_filename (argv0, "images"); Glib::RefPtr defaultIconTheme = Gtk::IconTheme::get_default(); - defaultIconTheme->append_search_path(icon_path); + defaultIconTheme->append_search_path (icon_path); - rtengine::setPaths(options); + rtengine::setPaths (options); MyExpander::init(); // has to stay AFTER rtengine::setPaths // ------- loading theme files @@ -254,30 +260,34 @@ RTWindow *create_rt_window() Glib::RefPtr screen = Gdk::Screen::get_default(); if (screen) { - Gtk::Settings::get_for_screen(screen)->property_gtk_theme_name() = "Adwaita"; - Gtk::Settings::get_for_screen(screen)->property_gtk_application_prefer_dark_theme() = true; + Gtk::Settings::get_for_screen (screen)->property_gtk_theme_name() = "Adwaita"; + Gtk::Settings::get_for_screen (screen)->property_gtk_application_prefer_dark_theme() = true; - Glib::RefPtr regex = Glib::Regex::create(THEMEREGEXSTR, Glib::RegexCompileFlags::REGEX_CASELESS); - Glib::ustring filename = Glib::build_filename(argv0, "themes", options.theme + ".css"); - if (!regex->match(options.theme + ".css") || !Glib::file_test(filename, Glib::FILE_TEST_EXISTS)) { + Glib::RefPtr regex = Glib::Regex::create (THEMEREGEXSTR, Glib::RegexCompileFlags::REGEX_CASELESS); + Glib::ustring filename = Glib::build_filename (argv0, "themes", options.theme + ".css"); + + if (!regex->match (options.theme + ".css") || !Glib::file_test (filename, Glib::FILE_TEST_EXISTS)) { options.theme = "RawTherapee-GTK"; + // We're not testing GTK_MAJOR_VERSION == 3 here, since this branch requires Gtk3 only if (GTK_MINOR_VERSION < 20) { options.theme = options.theme + "3-_19"; } else { options.theme = options.theme + "3-20_"; } - filename = Glib::build_filename(argv0, "themes", options.theme + ".css"); + + filename = Glib::build_filename (argv0, "themes", options.theme + ".css"); } + cssRT = Gtk::CssProvider::create(); try { cssRT->load_from_path (filename); - Gtk::StyleContext::add_provider_for_screen(screen, cssRT, GTK_STYLE_PROVIDER_PRIORITY_APPLICATION); + Gtk::StyleContext::add_provider_for_screen (screen, cssRT, GTK_STYLE_PROVIDER_PRIORITY_APPLICATION); } catch (Glib::Error &err) { - printf("Error: Can't load css file \"%s\"\nMessage: %s\n", filename.c_str(), err.what().c_str()); + printf ("Error: Can't load css file \"%s\"\nMessage: %s\n", filename.c_str(), err.what().c_str()); } catch (...) { - printf("Error: Can't load css file \"%s\"\n", filename.c_str()); + printf ("Error: Can't load css file \"%s\"\n", filename.c_str()); } // Set the font face and size @@ -286,23 +296,23 @@ RTWindow *create_rt_window() cssForced = Gtk::CssProvider::create(); //GTK318 #if GTK_MAJOR_VERSION == 3 && GTK_MINOR_VERSION < 20 - cssForced->load_from_data (Glib::ustring::compose("* { font-family: %1; font-size: %2px }", options.fontFamily, options.fontSize)); + cssForced->load_from_data (Glib::ustring::compose ("* { font-family: %1; font-size: %2px }", options.fontFamily, options.fontSize)); #else - cssForced->load_from_data (Glib::ustring::compose("* { font-family: %1; font-size: %2pt }", options.fontFamily, options.fontSize)); + cssForced->load_from_data (Glib::ustring::compose ("* { font-family: %1; font-size: %2pt }", options.fontFamily, options.fontSize)); #endif //GTK318 - Gtk::StyleContext::add_provider_for_screen(screen, cssForced, GTK_STYLE_PROVIDER_PRIORITY_APPLICATION); + Gtk::StyleContext::add_provider_for_screen (screen, cssForced, GTK_STYLE_PROVIDER_PRIORITY_APPLICATION); } catch (Glib::Error &err) { - printf("Error: \"%s\"\n", err.what().c_str()); + printf ("Error: \"%s\"\n", err.what().c_str()); } catch (...) { - printf("Error: Can't find the font named \"%s\"\n", options.fontFamily.c_str()); + printf ("Error: Can't find the font named \"%s\"\n", options.fontFamily.c_str()); } } } #ifndef NDEBUG else if (!screen) { - printf("ERROR: Can't get default screen!\n"); + printf ("ERROR: Can't get default screen!\n"); } #endif @@ -314,12 +324,12 @@ RTWindow *create_rt_window() // alerting users if the default raw and image profiles are missing if (options.is_defProfRawMissing()) { - Gtk::MessageDialog msgd (Glib::ustring::compose(M("OPTIONS_DEFRAW_MISSING"), options.defProfRaw), true, Gtk::MESSAGE_ERROR, Gtk::BUTTONS_OK, true); + Gtk::MessageDialog msgd (Glib::ustring::compose (M ("OPTIONS_DEFRAW_MISSING"), options.defProfRaw), true, Gtk::MESSAGE_ERROR, Gtk::BUTTONS_OK, true); msgd.run (); } if (options.is_defProfImgMissing()) { - Gtk::MessageDialog msgd (Glib::ustring::compose(M("OPTIONS_DEFIMG_MISSING"), options.defProfImg), true, Gtk::MESSAGE_ERROR, Gtk::BUTTONS_OK, true); + Gtk::MessageDialog msgd (Glib::ustring::compose (M ("OPTIONS_DEFIMG_MISSING"), options.defProfImg), true, Gtk::MESSAGE_ERROR, Gtk::BUTTONS_OK, true); msgd.run (); } @@ -327,12 +337,13 @@ RTWindow *create_rt_window() } -class RTApplication: public Gtk::Application { +class RTApplication: public Gtk::Application +{ public: RTApplication(): - Gtk::Application("com.rawtherapee.application", - Gio::APPLICATION_HANDLES_OPEN), - rtWindow(nullptr) + Gtk::Application ("com.rawtherapee.application", + Gio::APPLICATION_HANDLES_OPEN), + rtWindow (nullptr) { } @@ -341,6 +352,7 @@ public: if (rtWindow) { delete rtWindow; } + cleanup_rt(); } @@ -350,19 +362,19 @@ private: if (rtWindow) { return true; } - + if (!init_rt()) { Gtk::MessageDialog msgd ("Fatal error!\nThe RT_SETTINGS and/or RT_PATH environment variables are set, but use a relative path. The path must be absolute!", true, Gtk::MESSAGE_ERROR, Gtk::BUTTONS_OK, true); - add_window(msgd); + add_window (msgd); msgd.run (); return false; } else { rtWindow = create_rt_window(); - add_window(*rtWindow); + add_window (*rtWindow); return true; } } - + // Override default signal handlers: void on_activate() override { @@ -370,9 +382,9 @@ private: rtWindow->present(); } } - - void on_open(const Gio::Application::type_vec_files& files, - const Glib::ustring& hint) override + + void on_open (const Gio::Application::type_vec_files& files, + const Glib::ustring& hint) override { if (create_window()) { struct Data { @@ -382,29 +394,30 @@ private: }; Data *d = new Data; d->filecatalog = rtWindow->fpanel->fileCatalog; - + for (const auto &f : files) { - Thumbnail *thm = cacheMgr->getEntry(f->get_path()); + Thumbnail *thm = cacheMgr->getEntry (f->get_path()); + if (thm) { - d->entries.push_back(thm); + d->entries.push_back (thm); d->lastfilename = f->get_path(); } } - + if (!d->entries.empty()) { const auto doit = - [](gpointer data) -> gboolean - { - Data *d = static_cast(data); - d->filecatalog->openRequested(d->entries); - d->filecatalog->selectImage(d->lastfilename, true); - delete d; - return FALSE; - }; - gdk_threads_add_idle(doit, d); + [] (gpointer data) -> gboolean { + Data *d = static_cast (data); + d->filecatalog->openRequested (d->entries); + d->filecatalog->selectImage (d->lastfilename, true); + delete d; + return FALSE; + }; + gdk_threads_add_idle (doit, d); } else { delete d; } + rtWindow->present(); } } @@ -416,10 +429,10 @@ private: } // namespace -int main(int argc, char **argv) +int main (int argc, char **argv) { - setlocale(LC_ALL, ""); - setlocale(LC_NUMERIC, "C"); // to set decimal point to "." + setlocale (LC_ALL, ""); + setlocale (LC_NUMERIC, "C"); // to set decimal point to "." simpleEditor = false; gimpPlugin = false; @@ -429,7 +442,7 @@ int main(int argc, char **argv) argv2 = ""; Glib::init(); // called by Gtk::Main, but this may be important for thread handling, so we call it ourselves now - gdk_threads_set_lock_functions(G_CALLBACK(myGdkLockEnter), (G_CALLBACK(myGdkLockLeave))); + gdk_threads_set_lock_functions (G_CALLBACK (myGdkLockEnter), (G_CALLBACK (myGdkLockLeave))); gdk_threads_init(); gtk_init (&argc, &argv); // use the "--g-fatal-warnings" command line flag to make warnings fatal Gio::init (); @@ -442,33 +455,33 @@ int main(int argc, char **argv) #ifdef WIN32 WCHAR exnameU[512] = {0}; GetModuleFileNameW (NULL, exnameU, 511); - WideCharToMultiByte(CP_UTF8, 0, exnameU, -1, exname, 511, 0, 0 ); + WideCharToMultiByte (CP_UTF8, 0, exnameU, -1, exname, 511, 0, 0 ); #else - if (readlink("/proc/self/exe", exname, 511) < 0) { - strncpy(exname, argv[0], 511); + if (readlink ("/proc/self/exe", exname, 511) < 0) { + strncpy (exname, argv[0], 511); } #endif - exePath = Glib::path_get_dirname(exname); + exePath = Glib::path_get_dirname (exname); // set paths - if (Glib::path_is_absolute(DATA_SEARCH_PATH)) { + if (Glib::path_is_absolute (DATA_SEARCH_PATH)) { argv0 = DATA_SEARCH_PATH; } else { - argv0 = Glib::build_filename(exePath, DATA_SEARCH_PATH); + argv0 = Glib::build_filename (exePath, DATA_SEARCH_PATH); } - if (Glib::path_is_absolute(CREDITS_SEARCH_PATH)) { + if (Glib::path_is_absolute (CREDITS_SEARCH_PATH)) { creditsPath = CREDITS_SEARCH_PATH; } else { - creditsPath = Glib::build_filename(exePath, CREDITS_SEARCH_PATH); + creditsPath = Glib::build_filename (exePath, CREDITS_SEARCH_PATH); } - if (Glib::path_is_absolute(LICENCE_SEARCH_PATH)) { + if (Glib::path_is_absolute (LICENCE_SEARCH_PATH)) { licensePath = LICENCE_SEARCH_PATH; } else { - licensePath = Glib::build_filename(exePath, LICENCE_SEARCH_PATH); + licensePath = Glib::build_filename (exePath, LICENCE_SEARCH_PATH); } #else @@ -476,60 +489,61 @@ int main(int argc, char **argv) creditsPath = CREDITS_SEARCH_PATH; licensePath = LICENCE_SEARCH_PATH; #endif - - + + #ifdef WIN32 bool consoleOpened = false; // suppression of annoying error boxes - SetErrorMode(SEM_FAILCRITICALERRORS | SEM_NOGPFAULTERRORBOX | SEM_NOOPENFILEERRORBOX); + SetErrorMode (SEM_FAILCRITICALERRORS | SEM_NOGPFAULTERRORBOX | SEM_NOOPENFILEERRORBOX); + + if (argc > 1) { + int ret = processLineParams ( argc, argv); - if(argc > 1) { - int ret = processLineParams( argc, argv); if (options.rtSettings.verbose || (!remote && !Glib::file_test (argv1, Glib::FILE_TEST_EXISTS ) && !Glib::file_test (argv1, Glib::FILE_TEST_IS_DIR))) { - bool stdoutRedirectedtoFile = (GetFileType(GetStdHandle(STD_OUTPUT_HANDLE)) == 0x0001); - bool stderrRedirectedtoFile = (GetFileType(GetStdHandle(STD_ERROR_HANDLE)) == 0x0001); + bool stdoutRedirectedtoFile = (GetFileType (GetStdHandle (STD_OUTPUT_HANDLE)) == 0x0001); + bool stderrRedirectedtoFile = (GetFileType (GetStdHandle (STD_ERROR_HANDLE)) == 0x0001); // no console, if stdout and stderr both are redirected to file - if( !(stdoutRedirectedtoFile && stderrRedirectedtoFile)) { + if ( ! (stdoutRedirectedtoFile && stderrRedirectedtoFile)) { // check if parameter -w was passed. // We have to do that in this step, because it controls whether to open a console to show the output of following steps bool Console = true; - for(int i = 1; i < argc; i++) - if(!strcmp(argv[i], "-w")) { + for (int i = 1; i < argc; i++) + if (!strcmp (argv[i], "-w")) { Console = false; break; } - if(Console && AllocConsole()) { - AttachConsole( GetCurrentProcessId() ) ; + if (Console && AllocConsole()) { + AttachConsole ( GetCurrentProcessId() ) ; // Don't allow CTRL-C in console to terminate RT - SetConsoleCtrlHandler( NULL, true ); + SetConsoleCtrlHandler ( NULL, true ); // Set title of console char consoletitle[128]; - sprintf(consoletitle, "RawTherapee %s Console", RTVERSION); - SetConsoleTitle(consoletitle); + sprintf (consoletitle, "RawTherapee %s Console", RTVERSION); + SetConsoleTitle (consoletitle); // increase size of screen buffer COORD c; c.X = 200; c.Y = 1000; - SetConsoleScreenBufferSize( GetStdHandle( STD_OUTPUT_HANDLE ), c ); + SetConsoleScreenBufferSize ( GetStdHandle ( STD_OUTPUT_HANDLE ), c ); // Disable console-Cursor CONSOLE_CURSOR_INFO cursorInfo; cursorInfo.dwSize = 100; cursorInfo.bVisible = false; - SetConsoleCursorInfo( GetStdHandle( STD_OUTPUT_HANDLE ), &cursorInfo ); + SetConsoleCursorInfo ( GetStdHandle ( STD_OUTPUT_HANDLE ), &cursorInfo ); - if(!stdoutRedirectedtoFile) { - freopen( "CON", "w", stdout ) ; + if (!stdoutRedirectedtoFile) { + freopen ( "CON", "w", stdout ) ; } - if(!stderrRedirectedtoFile) { - freopen( "CON", "w", stderr ) ; + if (!stderrRedirectedtoFile) { + freopen ( "CON", "w", stderr ) ; } - freopen( "CON", "r", stdin ) ; + freopen ( "CON", "r", stdin ) ; consoleOpened = true; @@ -540,10 +554,10 @@ int main(int argc, char **argv) } } - if( ret <= 0 ) { - if(consoleOpened) { - printf("Press any key to exit RawTherapee\n"); - FlushConsoleInputBuffer(GetStdHandle(STD_INPUT_HANDLE)); + if ( ret <= 0 ) { + if (consoleOpened) { + printf ("Press any key to exit RawTherapee\n"); + FlushConsoleInputBuffer (GetStdHandle (STD_INPUT_HANDLE)); getch(); } @@ -561,9 +575,9 @@ int main(int argc, char **argv) #endif if (argc > 1) { - int ret = processLineParams( argc, argv); + int ret = processLineParams ( argc, argv); - if( ret <= 0 ) { + if ( ret <= 0 ) { return ret; } } @@ -572,51 +586,56 @@ int main(int argc, char **argv) #endif if (gimpPlugin) { - if (!Glib::file_test(argv1, Glib::FILE_TEST_EXISTS) || Glib::file_test(argv1, Glib::FILE_TEST_IS_DIR)) { - printf("Error: argv1 doesn't exist\n"); + if (!Glib::file_test (argv1, Glib::FILE_TEST_EXISTS) || Glib::file_test (argv1, Glib::FILE_TEST_IS_DIR)) { + printf ("Error: argv1 doesn't exist\n"); return 1; } + if (argv2.empty()) { - printf("Error: -gimp requires two arguments\n"); + printf ("Error: -gimp requires two arguments\n"); return 1; } - } else if (!remote && Glib::file_test(argv1, Glib::FILE_TEST_EXISTS)) { + } else if (!remote && Glib::file_test (argv1, Glib::FILE_TEST_EXISTS)) { simpleEditor = true; } int ret = 0; + if (remote) { - char *app_argv[2] = { const_cast(argv0.c_str()) }; + char *app_argv[2] = { const_cast (argv0.c_str()) }; int app_argc = 1; + if (!argv1.empty()) { app_argc = 2; - app_argv[1] = const_cast(argv1.c_str()); + app_argv[1] = const_cast (argv1.c_str()); } + RTApplication app; - ret = app.run(app_argc, app_argv); + ret = app.run (app_argc, app_argv); } else { if (init_rt()) { - Gtk::Main m(&argc, &argv); + Gtk::Main m (&argc, &argv); gdk_threads_enter(); - const std::unique_ptr rtWindow(create_rt_window()); - m.run(*rtWindow); + const std::unique_ptr rtWindow (create_rt_window()); + m.run (*rtWindow); gdk_threads_leave(); if (gimpPlugin && - rtWindow->epanel && rtWindow->epanel->isRealized()) { + rtWindow->epanel && rtWindow->epanel->isRealized()) { SaveFormat sf; sf.format = "tif"; sf.tiffBits = 16; sf.tiffUncompressed = true; sf.saveParams = true; - - if (!rtWindow->epanel->saveImmediately(argv2, sf)) { + + if (!rtWindow->epanel->saveImmediately (argv2, sf)) { ret = -2; } } + cleanup_rt(); } else { - Gtk::Main m(&argc, &argv); + Gtk::Main m (&argc, &argv); Gtk::MessageDialog msgd ("Fatal error!\nThe RT_SETTINGS and/or RT_PATH environment variables are set, but use a relative path. The path must be absolute!", true, Gtk::MESSAGE_ERROR, Gtk::BUTTONS_OK, true); msgd.run (); ret = -2; @@ -626,8 +645,8 @@ int main(int argc, char **argv) #ifdef WIN32 if (consoleOpened) { - printf("Press any key to exit RawTherapee\n"); - FlushConsoleInputBuffer(GetStdHandle(STD_INPUT_HANDLE)); + printf ("Press any key to exit RawTherapee\n"); + FlushConsoleInputBuffer (GetStdHandle (STD_INPUT_HANDLE)); getch(); } diff --git a/rtgui/options.cc b/rtgui/options.cc index 39d633e90..fdfa209dc 100644 --- a/rtgui/options.cc +++ b/rtgui/options.cc @@ -750,8 +750,8 @@ void Options::readFromFile (Glib::ustring fname) Glib::KeyFile keyFile; if ( !Glib::file_test (fname, Glib::FILE_TEST_EXISTS)) { - Glib::ustring msg = Glib::ustring::compose("Options file %1 does not exist", fname); - throw Error(msg); + Glib::ustring msg = Glib::ustring::compose ("Options file %1 does not exist", fname); + throw Error (msg); } try { @@ -1831,6 +1831,7 @@ void Options::readFromFile (Glib::ustring fname) if (keyFile.has_key ("Fast Export", "fastexport_resize_height" )) { fastexport_resize_height = keyFile.get_integer ("Fast Export", "fastexport_resize_height" ); } + if (keyFile.has_key ("Fast Export", "fastexport_use_fast_pipeline" )) { fastexport_use_fast_pipeline = keyFile.get_integer ("Fast Export", "fastexport_use_fast_pipeline" ); } @@ -1863,17 +1864,21 @@ void Options::readFromFile (Glib::ustring fname) } } catch (Glib::Error &err) { - Glib::ustring msg = Glib::ustring::compose("Options::readFromFile / Error code %1 while reading values from \"%2\":\n%3", err.code(), fname, err.what()); - if (options.rtSettings.verbose) { - printf("%s\n", msg.c_str()); - } - throw Error(msg); - } catch (...) { - Glib::ustring msg = Glib::ustring::compose("Options::readFromFile / Unknown exception while trying to load \"%1\"!", fname); + Glib::ustring msg = Glib::ustring::compose ("Options::readFromFile / Error code %1 while reading values from \"%2\":\n%3", err.code(), fname, err.what()); + if (options.rtSettings.verbose) { printf ("%s\n", msg.c_str()); } - throw Error(msg); + + throw Error (msg); + } catch (...) { + Glib::ustring msg = Glib::ustring::compose ("Options::readFromFile / Unknown exception while trying to load \"%1\"!", fname); + + if (options.rtSettings.verbose) { + printf ("%s\n", msg.c_str()); + } + + throw Error (msg); } } @@ -2223,15 +2228,15 @@ void Options::saveToFile (Glib::ustring fname) keyData = keyFile.to_data (); } catch (Glib::KeyFileError &e) { - throw Error(e.what()); + throw Error (e.what()); } FILE *f = g_fopen (fname.c_str (), "wt"); if (f == nullptr) { std::cout << "Warning! Unable to save your preferences to: " << fname << std::endl; - Glib::ustring msg_ = Glib::ustring::compose(M("MAIN_MSG_WRITEFAILED"), fname.c_str()); - throw Error(msg_); + Glib::ustring msg_ = Glib::ustring::compose (M ("MAIN_MSG_WRITEFAILED"), fname.c_str()); + throw Error (msg_); } else { fprintf (f, "%s", keyData.c_str ()); fclose (f); @@ -2252,8 +2257,8 @@ void Options::load (bool lightweight) rtdir = Glib::ustring (path); if (!Glib::path_is_absolute (rtdir)) { - Glib::ustring msg = Glib::ustring::compose("Settings path %1 is not absolute", rtdir); - throw Error(msg); + Glib::ustring msg = Glib::ustring::compose ("Settings path %1 is not absolute", rtdir); + throw Error (msg); } } else { #ifdef WIN32 @@ -2291,8 +2296,8 @@ void Options::load (bool lightweight) cacheBaseDir = Glib::ustring (path); if (!Glib::path_is_absolute (cacheBaseDir)) { - Glib::ustring msg = Glib::ustring::compose("Cache base dir %1 is not absolute", cacheBaseDir); - throw Error(msg); + Glib::ustring msg = Glib::ustring::compose ("Cache base dir %1 is not absolute", cacheBaseDir); + throw Error (msg); } } // No environment variable provided, so falling back to the multi user mode, is enabled diff --git a/rtgui/options.h b/rtgui/options.h index 0b5882df0..320f75ee1 100644 --- a/rtgui/options.h +++ b/rtgui/options.h @@ -43,17 +43,16 @@ // Special name for the Dynamic profile #define DEFPROFILE_DYNAMIC "Dynamic" -struct SaveFormat -{ +struct SaveFormat { SaveFormat() : - format("jpg"), - pngBits(8), - pngCompression(6), - jpegQuality(90), - jpegSubSamp(2), - tiffBits(8), - tiffUncompressed(true), - saveParams(true) + format ("jpg"), + pngBits (8), + pngCompression (6), + jpegQuality (90), + jpegSubSamp (2), + tiffBits (8), + tiffUncompressed (true), + saveParams (true) { } @@ -75,11 +74,18 @@ enum prevdemo_t {PD_Sidecar = 1, PD_Fast = 0}; class Options { public: - class Error: public std::exception { + class Error: public std::exception + { public: - Error(const Glib::ustring &msg): msg_(msg) {} - const char *what() const throw() { return msg_.c_str(); } - const Glib::ustring &get_msg() const throw() { return msg_; } + Error (const Glib::ustring &msg): msg_ (msg) {} + const char *what() const throw() + { + return msg_.c_str(); + } + const Glib::ustring &get_msg() const throw() + { + return msg_; + } private: Glib::ustring msg_; @@ -90,8 +96,8 @@ private: bool defProfImgMissing; Glib::ustring userProfilePath; Glib::ustring globalProfilePath; - bool checkProfilePath(Glib::ustring &path); - bool checkDirPath(Glib::ustring &path, Glib::ustring errString); + bool checkProfilePath (Glib::ustring &path); + bool checkDirPath (Glib::ustring &path, Glib::ustring errString); void updatePaths(); int getString (const char* src, char* dst); void error (int line); @@ -106,8 +112,8 @@ private: * @param destination destination variable to store to * @return @c true if @p destination was changed */ - bool safeDirGet(const Glib::KeyFile& keyFile, const Glib::ustring& section, - const Glib::ustring& entryName, Glib::ustring& destination); + bool safeDirGet (const Glib::KeyFile& keyFile, const Glib::ustring& section, + const Glib::ustring& entryName, Glib::ustring& destination); public: @@ -336,9 +342,9 @@ public: Options* copyFrom (Options* other); void filterOutParsedExtensions (); void setDefaults (); - void readFromFile(Glib::ustring fname); - void saveToFile(Glib::ustring fname); - static void load(bool lightweight = false); + void readFromFile (Glib::ustring fname); + void saveToFile (Glib::ustring fname); + static void load (bool lightweight = false); static void save(); // if multiUser=false, send back the global profile path @@ -351,10 +357,10 @@ public: { return globalProfilePath; } - Glib::ustring findProfilePath(Glib::ustring &profName); + Glib::ustring findProfilePath (Glib::ustring &profName); bool is_parse_extention (Glib::ustring fname); bool has_retained_extention (Glib::ustring fname); - bool is_extention_enabled(Glib::ustring ext); + bool is_extention_enabled (Glib::ustring ext); bool is_defProfRawMissing() { return defProfRawMissing; @@ -363,11 +369,11 @@ public: { return defProfImgMissing; } - void setDefProfRawMissing(bool value) + void setDefProfRawMissing (bool value) { defProfRawMissing = value; } - void setDefProfImgMissing(bool value) + void setDefProfImgMissing (bool value) { defProfImgMissing = value; } diff --git a/rtgui/preferences.cc b/rtgui/preferences.cc index d9e016ae9..82b90dfb9 100644 --- a/rtgui/preferences.cc +++ b/rtgui/preferences.cc @@ -37,7 +37,7 @@ Glib::RefPtr themecss; Glib::RefPtr fontcss; Preferences::Preferences (RTWindow *rtwindow) - : Gtk::Dialog (M("MAIN_BUTTON_PREFERENCES"), *rtwindow, true) + : Gtk::Dialog (M ("MAIN_BUTTON_PREFERENCES"), *rtwindow, true) , splash (nullptr) , rprofiles (nullptr) , iprofiles (nullptr) @@ -45,7 +45,7 @@ Preferences::Preferences (RTWindow *rtwindow) , newFont (false) , newCPFont (false) { - regex = Glib::Regex::create(THEMEREGEXSTR, Glib::RegexCompileFlags::REGEX_CASELESS); + regex = Glib::Regex::create (THEMEREGEXSTR, Glib::RegexCompileFlags::REGEX_CASELESS); moptions.copyFrom (&options); @@ -66,7 +66,7 @@ Preferences::Preferences (RTWindow *rtwindow) Gtk::Box* mainBox = get_content_area (); //GTK318 #if GTK_MAJOR_VERSION == 3 && GTK_MINOR_VERSION < 20 - mainBox->set_spacing(8); + mainBox->set_spacing (8); #endif //GTK318 //set_has_separator (false); @@ -75,32 +75,32 @@ Preferences::Preferences (RTWindow *rtwindow) nb->set_name ("PrefNotebook"); mainBox->pack_start (*nb); - Gtk::Button* about = Gtk::manage (new Gtk::Button (M("GENERAL_ABOUT"))); - Gtk::Button* ok = Gtk::manage (new Gtk::Button (M("GENERAL_OK"))); - Gtk::Button* cancel = Gtk::manage (new Gtk::Button (M("GENERAL_CANCEL"))); + Gtk::Button* about = Gtk::manage (new Gtk::Button (M ("GENERAL_ABOUT"))); + Gtk::Button* ok = Gtk::manage (new Gtk::Button (M ("GENERAL_OK"))); + Gtk::Button* cancel = Gtk::manage (new Gtk::Button (M ("GENERAL_CANCEL"))); - about->signal_clicked().connect( sigc::mem_fun(*this, &Preferences::aboutPressed) ); - ok->signal_clicked().connect( sigc::mem_fun(*this, &Preferences::okPressed) ); - cancel->signal_clicked().connect( sigc::mem_fun(*this, &Preferences::cancelPressed) ); + about->signal_clicked().connect ( sigc::mem_fun (*this, &Preferences::aboutPressed) ); + ok->signal_clicked().connect ( sigc::mem_fun (*this, &Preferences::okPressed) ); + cancel->signal_clicked().connect ( sigc::mem_fun (*this, &Preferences::cancelPressed) ); get_action_area()->pack_start (*about); get_action_area()->pack_end (*ok); get_action_area()->pack_end (*cancel); - nb->append_page (*getGeneralPanel(), M("PREFERENCES_TAB_GENERAL")); - nb->append_page (*getProcParamsPanel(), M("PREFERENCES_TAB_IMPROC")); - nb->append_page (*getDynProfilePanel(), M("PREFERENCES_TAB_DYNAMICPROFILE")); - nb->append_page (*getFileBrowserPanel(), M("PREFERENCES_TAB_BROWSER")); - nb->append_page (*getColorManagementPanel(), M("PREFERENCES_TAB_COLORMGR")); - nb->append_page (*getBatchProcPanel(), M("PREFERENCES_BATCH_PROCESSING")); - nb->append_page (*getPerformancePanel(), M("PREFERENCES_TAB_PERFORMANCE")); + nb->append_page (*getGeneralPanel(), M ("PREFERENCES_TAB_GENERAL")); + nb->append_page (*getProcParamsPanel(), M ("PREFERENCES_TAB_IMPROC")); + nb->append_page (*getDynProfilePanel(), M ("PREFERENCES_TAB_DYNAMICPROFILE")); + nb->append_page (*getFileBrowserPanel(), M ("PREFERENCES_TAB_BROWSER")); + nb->append_page (*getColorManagementPanel(), M ("PREFERENCES_TAB_COLORMGR")); + nb->append_page (*getBatchProcPanel(), M ("PREFERENCES_BATCH_PROCESSING")); + nb->append_page (*getPerformancePanel(), M ("PREFERENCES_TAB_PERFORMANCE")); // Sounds only on Windows and Linux #if defined(WIN32) || defined(__linux__) - nb->append_page (*getSoundPanel(), M("PREFERENCES_TAB_SOUND")); + nb->append_page (*getSoundPanel(), M ("PREFERENCES_TAB_SOUND")); #endif nb->set_current_page (0); - ProfileStore::getInstance()->addListener(this); + ProfileStore::getInstance()->addListener (this); fillPreferences (); @@ -111,20 +111,21 @@ Preferences::Preferences (RTWindow *rtwindow) Preferences::~Preferences () { - ProfileStore::getInstance()->removeListener(this); - get_size(options.preferencesWidth, options.preferencesHeight); + ProfileStore::getInstance()->removeListener (this); + get_size (options.preferencesWidth, options.preferencesHeight); } -int Preferences::getThemeRowNumber(Glib::ustring& longThemeFName) +int Preferences::getThemeRowNumber (Glib::ustring& longThemeFName) { - if (regex->match(longThemeFName + ".css", matchInfo)) { - for (size_t i=0 ; imatch (longThemeFName + ".css", matchInfo)) { + for (size_t i = 0 ; i < themeFNames.size(); ++i) { + if (themeFNames.at (i).longFName == longThemeFName) { return (int)i; } } } + return -1; } @@ -135,10 +136,10 @@ Gtk::Widget* Preferences::getBatchProcPanel () Gtk::ScrolledWindow* behscrollw = Gtk::manage (new Gtk::ScrolledWindow ()); behscrollw->set_policy (Gtk::POLICY_AUTOMATIC, Gtk::POLICY_AUTOMATIC); - behscrollw->set_size_request(-1, 60); - Gtk::VBox* vbbeh = Gtk::manage( new Gtk::VBox () ); + behscrollw->set_size_request (-1, 60); + Gtk::VBox* vbbeh = Gtk::manage ( new Gtk::VBox () ); vbbeh->pack_start (*behscrollw, Gtk::PACK_EXPAND_WIDGET); - Gtk::Frame* behFrame = Gtk::manage (new Gtk::Frame (M("PREFERENCES_BEHAVIOR"))); + Gtk::Frame* behFrame = Gtk::manage (new Gtk::Frame (M ("PREFERENCES_BEHAVIOR"))); behFrame->add (*vbbeh); //mvbpp->pack_start (*behFrame); mvbpp->pack_start (*behFrame, Gtk::PACK_EXPAND_WIDGET, 4); @@ -148,25 +149,25 @@ Gtk::Widget* Preferences::getBatchProcPanel () behModel = Gtk::TreeStore::create (behavColumns); behTreeView->set_model (behModel); - behTreeView->append_column (M("PREFERENCES_PROPERTY"), behavColumns.label); - behTreeView->append_column_editable (M("PREFERENCES_ADD"), behavColumns.badd); - behTreeView->append_column_editable (M("PREFERENCES_SET"), behavColumns.bset); + behTreeView->append_column (M ("PREFERENCES_PROPERTY"), behavColumns.label); + behTreeView->append_column_editable (M ("PREFERENCES_ADD"), behavColumns.badd); + behTreeView->append_column_editable (M ("PREFERENCES_SET"), behavColumns.bset); Gtk::CellRendererToggle* cr_add = static_cast (behTreeView->get_column (1)->get_first_cell()); Gtk::CellRendererToggle* cr_set = static_cast (behTreeView->get_column (2)->get_first_cell()); cr_add->set_radio (true); - cr_add->set_property("xalign", 0.0f); + cr_add->set_property ("xalign", 0.0f); sigc::connection addc = cr_add->signal_toggled().connect (sigc::mem_fun (*this, &Preferences::behAddRadioToggled)); cr_set->set_radio (true); - cr_set->set_property("xalign", 0.0f); + cr_set->set_property ("xalign", 0.0f); sigc::connection setc = cr_set->signal_toggled().connect (sigc::mem_fun (*this, &Preferences::behSetRadioToggled)); behTreeView->get_column (1)->add_attribute (*cr_add, "visible", behavColumns.visible); - behTreeView->get_column (1)->set_sizing(Gtk::TREE_VIEW_COLUMN_FIXED); + behTreeView->get_column (1)->set_sizing (Gtk::TREE_VIEW_COLUMN_FIXED); behTreeView->get_column (1)->set_fixed_width (50); behTreeView->get_column (2)->add_attribute (*cr_set, "visible", behavColumns.visible); - behTreeView->get_column (2)->set_sizing(Gtk::TREE_VIEW_COLUMN_FIXED); + behTreeView->get_column (2)->set_sizing (Gtk::TREE_VIEW_COLUMN_FIXED); behTreeView->get_column (2)->set_fixed_width (50); // fill model @@ -176,216 +177,216 @@ Gtk::Widget* Preferences::getBatchProcPanel () * The TRUE/FALSE values of appendBehavList are replaced by the one defined in options.cc, */ mi = behModel->append (); - mi->set_value (behavColumns.label, M("TP_EXPOSURE_LABEL")); - appendBehavList (mi, M("TP_EXPOSURE_EXPCOMP"), ADDSET_TC_EXPCOMP, false); - appendBehavList (mi, M("TP_EXPOSURE_COMPRHIGHLIGHTS"), ADDSET_TC_HLCOMPAMOUNT, false); - appendBehavList (mi, M("TP_EXPOSURE_COMPRHIGHLIGHTSTHRESHOLD"), ADDSET_TC_HLCOMPTHRESH, false); - appendBehavList (mi, M("TP_EXPOSURE_BLACKLEVEL"), ADDSET_TC_BLACKLEVEL, false); - appendBehavList (mi, M("TP_EXPOSURE_COMPRSHADOWS"), ADDSET_TC_SHCOMP, false); - appendBehavList (mi, M("TP_EXPOSURE_BRIGHTNESS"), ADDSET_TC_BRIGHTNESS, false); - appendBehavList (mi, M("TP_EXPOSURE_CONTRAST"), ADDSET_TC_CONTRAST, false); - appendBehavList (mi, M("TP_EXPOSURE_SATURATION"), ADDSET_TC_SATURATION, false); + mi->set_value (behavColumns.label, M ("TP_EXPOSURE_LABEL")); + appendBehavList (mi, M ("TP_EXPOSURE_EXPCOMP"), ADDSET_TC_EXPCOMP, false); + appendBehavList (mi, M ("TP_EXPOSURE_COMPRHIGHLIGHTS"), ADDSET_TC_HLCOMPAMOUNT, false); + appendBehavList (mi, M ("TP_EXPOSURE_COMPRHIGHLIGHTSTHRESHOLD"), ADDSET_TC_HLCOMPTHRESH, false); + appendBehavList (mi, M ("TP_EXPOSURE_BLACKLEVEL"), ADDSET_TC_BLACKLEVEL, false); + appendBehavList (mi, M ("TP_EXPOSURE_COMPRSHADOWS"), ADDSET_TC_SHCOMP, false); + appendBehavList (mi, M ("TP_EXPOSURE_BRIGHTNESS"), ADDSET_TC_BRIGHTNESS, false); + appendBehavList (mi, M ("TP_EXPOSURE_CONTRAST"), ADDSET_TC_CONTRAST, false); + appendBehavList (mi, M ("TP_EXPOSURE_SATURATION"), ADDSET_TC_SATURATION, false); mi = behModel->append (); - mi->set_value (behavColumns.label, M("TP_RETINEX_LABEL")); - appendBehavList (mi, M("TP_RETINEX_STRENGTH"), ADDSET_RETI_STR, false); - appendBehavList (mi, M("TP_RETINEX_NEIGHBOR"), ADDSET_RETI_NEIGH, false); - appendBehavList (mi, M("TP_RETINEX_VARIANCE"), ADDSET_RETI_VART, false); - appendBehavList (mi, M("TP_RETINEX_GAMMA"), ADDSET_RETI_GAM, false); - appendBehavList (mi, M("TP_RETINEX_SLOPE"), ADDSET_RETI_SLO, false); - appendBehavList (mi, M("TP_RETINEX_GAIN"), ADDSET_RETI_GAIN, false); - appendBehavList (mi, M("TP_RETINEX_OFFSET"), ADDSET_RETI_OFFS, false); - appendBehavList (mi, M("TP_RETINEX_THRESHOLD"), ADDSET_RETI_LIMD, false); + mi->set_value (behavColumns.label, M ("TP_RETINEX_LABEL")); + appendBehavList (mi, M ("TP_RETINEX_STRENGTH"), ADDSET_RETI_STR, false); + appendBehavList (mi, M ("TP_RETINEX_NEIGHBOR"), ADDSET_RETI_NEIGH, false); + appendBehavList (mi, M ("TP_RETINEX_VARIANCE"), ADDSET_RETI_VART, false); + appendBehavList (mi, M ("TP_RETINEX_GAMMA"), ADDSET_RETI_GAM, false); + appendBehavList (mi, M ("TP_RETINEX_SLOPE"), ADDSET_RETI_SLO, false); + appendBehavList (mi, M ("TP_RETINEX_GAIN"), ADDSET_RETI_GAIN, false); + appendBehavList (mi, M ("TP_RETINEX_OFFSET"), ADDSET_RETI_OFFS, false); + appendBehavList (mi, M ("TP_RETINEX_THRESHOLD"), ADDSET_RETI_LIMD, false); mi = behModel->append (); - mi->set_value (behavColumns.label, M("TP_SHADOWSHLIGHTS_LABEL")); - appendBehavList (mi, M("TP_SHADOWSHLIGHTS_HIGHLIGHTS"), ADDSET_SH_HIGHLIGHTS, false); - appendBehavList (mi, M("TP_SHADOWSHLIGHTS_SHADOWS"), ADDSET_SH_SHADOWS, false); - appendBehavList (mi, M("TP_SHADOWSHLIGHTS_LOCALCONTR"), ADDSET_SH_LOCALCONTRAST, false); + mi->set_value (behavColumns.label, M ("TP_SHADOWSHLIGHTS_LABEL")); + appendBehavList (mi, M ("TP_SHADOWSHLIGHTS_HIGHLIGHTS"), ADDSET_SH_HIGHLIGHTS, false); + appendBehavList (mi, M ("TP_SHADOWSHLIGHTS_SHADOWS"), ADDSET_SH_SHADOWS, false); + appendBehavList (mi, M ("TP_SHADOWSHLIGHTS_LOCALCONTR"), ADDSET_SH_LOCALCONTRAST, false); mi = behModel->append (); - mi->set_value (behavColumns.label, M("TP_LABCURVE_LABEL")); - appendBehavList (mi, M("TP_LABCURVE_BRIGHTNESS"), ADDSET_LC_BRIGHTNESS, false); - appendBehavList (mi, M("TP_LABCURVE_CONTRAST"), ADDSET_LC_CONTRAST, false); - appendBehavList (mi, M("TP_LABCURVE_CHROMATICITY"), ADDSET_LC_CHROMATICITY, false); + mi->set_value (behavColumns.label, M ("TP_LABCURVE_LABEL")); + appendBehavList (mi, M ("TP_LABCURVE_BRIGHTNESS"), ADDSET_LC_BRIGHTNESS, false); + appendBehavList (mi, M ("TP_LABCURVE_CONTRAST"), ADDSET_LC_CONTRAST, false); + appendBehavList (mi, M ("TP_LABCURVE_CHROMATICITY"), ADDSET_LC_CHROMATICITY, false); mi = behModel->append (); - mi->set_value (behavColumns.label, M("TP_SHARPENING_LABEL")); - appendBehavList (mi, M("TP_SHARPENING_AMOUNT"), ADDSET_SHARP_AMOUNT, false); + mi->set_value (behavColumns.label, M ("TP_SHARPENING_LABEL")); + appendBehavList (mi, M ("TP_SHARPENING_AMOUNT"), ADDSET_SHARP_AMOUNT, false); mi = behModel->append (); - mi->set_value (behavColumns.label, M("TP_SHARPENEDGE_LABEL")); - appendBehavList (mi, M("TP_SHARPENEDGE_PASSES"), ADDSET_SHARPENEDGE_PASS, false); - appendBehavList (mi, M("TP_SHARPENEDGE_AMOUNT"), ADDSET_SHARPENEDGE_AMOUNT, false); + mi->set_value (behavColumns.label, M ("TP_SHARPENEDGE_LABEL")); + appendBehavList (mi, M ("TP_SHARPENEDGE_PASSES"), ADDSET_SHARPENEDGE_PASS, false); + appendBehavList (mi, M ("TP_SHARPENEDGE_AMOUNT"), ADDSET_SHARPENEDGE_AMOUNT, false); mi = behModel->append (); - mi->set_value (behavColumns.label, M("TP_SHARPENMICRO_LABEL")); - appendBehavList (mi, M("TP_SHARPENMICRO_AMOUNT"), ADDSET_SHARPENMICRO_AMOUNT, false); - appendBehavList (mi, M("TP_SHARPENMICRO_UNIFORMITY"), ADDSET_SHARPENMICRO_UNIFORMITY, false); + mi->set_value (behavColumns.label, M ("TP_SHARPENMICRO_LABEL")); + appendBehavList (mi, M ("TP_SHARPENMICRO_AMOUNT"), ADDSET_SHARPENMICRO_AMOUNT, false); + appendBehavList (mi, M ("TP_SHARPENMICRO_UNIFORMITY"), ADDSET_SHARPENMICRO_UNIFORMITY, false); mi = behModel->append (); - mi->set_value (behavColumns.label, M("TP_DIRPYRDENOISE_LABEL")); + mi->set_value (behavColumns.label, M ("TP_DIRPYRDENOISE_LABEL")); // appendBehavList (mi, M("TP_DIRPYRDENOISE_LUMA")+", "+M("TP_DIRPYRDENOISE_CHROMA"), ADDSET_DIRPYRDN_CHLUM, true); - appendBehavList (mi, M("TP_DIRPYRDENOISE_LUMA"), ADDSET_DIRPYRDN_LUMA, true); - appendBehavList (mi, M("TP_DIRPYRDENOISE_LDETAIL"), ADDSET_DIRPYRDN_LUMDET, true); - appendBehavList (mi, M("TP_DIRPYRDENOISE_CHROMA"), ADDSET_DIRPYRDN_CHROMA, true); - appendBehavList (mi, M("TP_DIRPYRDENOISE_RED"), ADDSET_DIRPYRDN_CHROMARED, true); - appendBehavList (mi, M("TP_DIRPYRDENOISE_BLUE"), ADDSET_DIRPYRDN_CHROMABLUE, true); - appendBehavList (mi, M("TP_DIRPYRDENOISE_GAMMA"), ADDSET_DIRPYRDN_GAMMA, true); - appendBehavList (mi, M("TP_DIRPYRDENOISE_PASSES"), ADDSET_DIRPYRDN_PASSES, true); + appendBehavList (mi, M ("TP_DIRPYRDENOISE_LUMA"), ADDSET_DIRPYRDN_LUMA, true); + appendBehavList (mi, M ("TP_DIRPYRDENOISE_LDETAIL"), ADDSET_DIRPYRDN_LUMDET, true); + appendBehavList (mi, M ("TP_DIRPYRDENOISE_CHROMA"), ADDSET_DIRPYRDN_CHROMA, true); + appendBehavList (mi, M ("TP_DIRPYRDENOISE_RED"), ADDSET_DIRPYRDN_CHROMARED, true); + appendBehavList (mi, M ("TP_DIRPYRDENOISE_BLUE"), ADDSET_DIRPYRDN_CHROMABLUE, true); + appendBehavList (mi, M ("TP_DIRPYRDENOISE_GAMMA"), ADDSET_DIRPYRDN_GAMMA, true); + appendBehavList (mi, M ("TP_DIRPYRDENOISE_PASSES"), ADDSET_DIRPYRDN_PASSES, true); mi = behModel->append (); - mi->set_value (behavColumns.label, M("TP_WBALANCE_LABEL")); - appendBehavList (mi, M("TP_WBALANCE_TEMPERATURE"), ADDSET_WB_TEMPERATURE, true); - appendBehavList (mi, M("TP_WBALANCE_GREEN"), ADDSET_WB_GREEN, true); - appendBehavList (mi, M("TP_WBALANCE_EQBLUERED"), ADDSET_WB_EQUAL, true); - appendBehavList (mi, M("TP_WBALANCE_TEMPBIAS"), ADDSET_WB_TEMPBIAS, true); + mi->set_value (behavColumns.label, M ("TP_WBALANCE_LABEL")); + appendBehavList (mi, M ("TP_WBALANCE_TEMPERATURE"), ADDSET_WB_TEMPERATURE, true); + appendBehavList (mi, M ("TP_WBALANCE_GREEN"), ADDSET_WB_GREEN, true); + appendBehavList (mi, M ("TP_WBALANCE_EQBLUERED"), ADDSET_WB_EQUAL, true); + appendBehavList (mi, M ("TP_WBALANCE_TEMPBIAS"), ADDSET_WB_TEMPBIAS, true); mi = behModel->append (); - mi->set_value (behavColumns.label, M("TP_COLORAPP_LABEL")); - appendBehavList (mi, M("TP_COLORAPP_CIECAT_DEGREE"), ADDSET_CAT_DEGREE, true); - appendBehavList (mi, M("TP_COLORAPP_ADAPTSCENE"), ADDSET_CAT_ADAPTSCENE, true); - appendBehavList (mi, M("TP_COLORAPP_LIGHT"), ADDSET_CAT_LIGHT, true); - appendBehavList (mi, M("TP_COLORAPP_BRIGHT"), ADDSET_CAT_BRIGHT, true); - appendBehavList (mi, M("TP_COLORAPP_CHROMA"), ADDSET_CAT_CHROMA, true); - appendBehavList (mi, M("TP_COLORAPP_RSTPRO"), ADDSET_CAT_RSTPRO, true); - appendBehavList (mi, M("TP_COLORAPP_CONTRAST"), ADDSET_CAT_CONTRAST, true); - appendBehavList (mi, M("TP_COLORAPP_CONTRAST_Q"), ADDSET_CAT_CONTRAST_Q, true); - appendBehavList (mi, M("TP_COLORAPP_CHROMA_S"), ADDSET_CAT_CHROMA_S, true); - appendBehavList (mi, M("TP_COLORAPP_CHROMA_M"), ADDSET_CAT_CHROMA_M, true); - appendBehavList (mi, M("TP_COLORAPP_HUE"), ADDSET_CAT_HUE, true); - appendBehavList (mi, M("TP_COLORAPP_ADAPTVIEWING"), ADDSET_CAT_ADAPTVIEWING, true); - appendBehavList (mi, M("TP_COLORAPP_BADPIXSL"), ADDSET_CAT_BADPIX, true); + mi->set_value (behavColumns.label, M ("TP_COLORAPP_LABEL")); + appendBehavList (mi, M ("TP_COLORAPP_CIECAT_DEGREE"), ADDSET_CAT_DEGREE, true); + appendBehavList (mi, M ("TP_COLORAPP_ADAPTSCENE"), ADDSET_CAT_ADAPTSCENE, true); + appendBehavList (mi, M ("TP_COLORAPP_LIGHT"), ADDSET_CAT_LIGHT, true); + appendBehavList (mi, M ("TP_COLORAPP_BRIGHT"), ADDSET_CAT_BRIGHT, true); + appendBehavList (mi, M ("TP_COLORAPP_CHROMA"), ADDSET_CAT_CHROMA, true); + appendBehavList (mi, M ("TP_COLORAPP_RSTPRO"), ADDSET_CAT_RSTPRO, true); + appendBehavList (mi, M ("TP_COLORAPP_CONTRAST"), ADDSET_CAT_CONTRAST, true); + appendBehavList (mi, M ("TP_COLORAPP_CONTRAST_Q"), ADDSET_CAT_CONTRAST_Q, true); + appendBehavList (mi, M ("TP_COLORAPP_CHROMA_S"), ADDSET_CAT_CHROMA_S, true); + appendBehavList (mi, M ("TP_COLORAPP_CHROMA_M"), ADDSET_CAT_CHROMA_M, true); + appendBehavList (mi, M ("TP_COLORAPP_HUE"), ADDSET_CAT_HUE, true); + appendBehavList (mi, M ("TP_COLORAPP_ADAPTVIEWING"), ADDSET_CAT_ADAPTVIEWING, true); + appendBehavList (mi, M ("TP_COLORAPP_BADPIXSL"), ADDSET_CAT_BADPIX, true); mi = behModel->append (); - mi->set_value (behavColumns.label, M("TP_VIBRANCE_LABEL")); - appendBehavList (mi, M("TP_VIBRANCE_PASTELS"), ADDSET_VIBRANCE_PASTELS, false); - appendBehavList (mi, M("TP_VIBRANCE_SATURATED"), ADDSET_VIBRANCE_SATURATED, false); + mi->set_value (behavColumns.label, M ("TP_VIBRANCE_LABEL")); + appendBehavList (mi, M ("TP_VIBRANCE_PASTELS"), ADDSET_VIBRANCE_PASTELS, false); + appendBehavList (mi, M ("TP_VIBRANCE_SATURATED"), ADDSET_VIBRANCE_SATURATED, false); mi = behModel->append (); - mi->set_value (behavColumns.label, M("TP_GAMMA_OUTPUT")); - appendBehavList (mi, M("TP_GAMMA_CURV"), ADDSET_FREE_OUPUT_GAMMA, false); - appendBehavList (mi, M("TP_GAMMA_SLOP"), ADDSET_FREE_OUTPUT_SLOPE, false); + mi->set_value (behavColumns.label, M ("TP_GAMMA_OUTPUT")); + appendBehavList (mi, M ("TP_GAMMA_CURV"), ADDSET_FREE_OUPUT_GAMMA, false); + appendBehavList (mi, M ("TP_GAMMA_SLOP"), ADDSET_FREE_OUTPUT_SLOPE, false); mi = behModel->append (); - mi->set_value (behavColumns.label, M("TP_CHMIXER_LABEL")); - appendBehavList (mi, M("TP_CHMIXER_RED") + ", " + M("TP_CHMIXER_GREEN") + ", " + M("TP_CHMIXER_BLUE"), ADDSET_CHMIXER, false); + mi->set_value (behavColumns.label, M ("TP_CHMIXER_LABEL")); + appendBehavList (mi, M ("TP_CHMIXER_RED") + ", " + M ("TP_CHMIXER_GREEN") + ", " + M ("TP_CHMIXER_BLUE"), ADDSET_CHMIXER, false); mi = behModel->append (); - mi->set_value (behavColumns.label, M("TP_BWMIX_LABEL")); - appendBehavList (mi, M("TP_BWMIX_MIXC"), ADDSET_BLACKWHITE_HUES, false); - appendBehavList (mi, M("TP_BWMIX_GAMMA"), ADDSET_BLACKWHITE_GAMMA, false); + mi->set_value (behavColumns.label, M ("TP_BWMIX_LABEL")); + appendBehavList (mi, M ("TP_BWMIX_MIXC"), ADDSET_BLACKWHITE_HUES, false); + appendBehavList (mi, M ("TP_BWMIX_GAMMA"), ADDSET_BLACKWHITE_GAMMA, false); mi = behModel->append (); - mi->set_value( behavColumns.label, M("TP_FILMSIMULATION_LABEL") ); - appendBehavList( mi, M( "TP_FILMSIMULATION_STRENGTH" ), ADDSET_FILMSIMULATION_STRENGTH, true ); + mi->set_value ( behavColumns.label, M ("TP_FILMSIMULATION_LABEL") ); + appendBehavList ( mi, M ( "TP_FILMSIMULATION_STRENGTH" ), ADDSET_FILMSIMULATION_STRENGTH, true ); mi = behModel->append (); - mi->set_value (behavColumns.label, M("TP_COLORTONING_LABEL")); - appendBehavList (mi, M("TP_COLORTONING_SPLITCOCO"), ADDSET_COLORTONING_SPLIT , true); - appendBehavList (mi, M("TP_COLORTONING_SATURATIONTHRESHOLD"), ADDSET_COLORTONING_SATTHRESHOLD , true); - appendBehavList (mi, M("TP_COLORTONING_SATURATEDOPACITY"), ADDSET_COLORTONING_SATOPACITY , true); - appendBehavList (mi, M("TP_COLORTONING_BALANCE"), ADDSET_COLORTONING_BALANCE , true); - appendBehavList (mi, M("TP_COLORTONING_STRENGTH"), ADDSET_COLORTONING_STRENGTH , true); + mi->set_value (behavColumns.label, M ("TP_COLORTONING_LABEL")); + appendBehavList (mi, M ("TP_COLORTONING_SPLITCOCO"), ADDSET_COLORTONING_SPLIT, true); + appendBehavList (mi, M ("TP_COLORTONING_SATURATIONTHRESHOLD"), ADDSET_COLORTONING_SATTHRESHOLD, true); + appendBehavList (mi, M ("TP_COLORTONING_SATURATEDOPACITY"), ADDSET_COLORTONING_SATOPACITY, true); + appendBehavList (mi, M ("TP_COLORTONING_BALANCE"), ADDSET_COLORTONING_BALANCE, true); + appendBehavList (mi, M ("TP_COLORTONING_STRENGTH"), ADDSET_COLORTONING_STRENGTH, true); mi = behModel->append (); - mi->set_value (behavColumns.label, M("TP_ROTATE_LABEL")); - appendBehavList (mi, M("TP_ROTATE_DEGREE"), ADDSET_ROTATE_DEGREE, false); + mi->set_value (behavColumns.label, M ("TP_ROTATE_LABEL")); + appendBehavList (mi, M ("TP_ROTATE_DEGREE"), ADDSET_ROTATE_DEGREE, false); mi = behModel->append (); - mi->set_value (behavColumns.label, M("TP_DISTORTION_LABEL")); - appendBehavList (mi, M("TP_DISTORTION_AMOUNT"), ADDSET_DIST_AMOUNT, false); + mi->set_value (behavColumns.label, M ("TP_DISTORTION_LABEL")); + appendBehavList (mi, M ("TP_DISTORTION_AMOUNT"), ADDSET_DIST_AMOUNT, false); mi = behModel->append (); - mi->set_value (behavColumns.label, M("TP_PERSPECTIVE_LABEL")); - appendBehavList (mi, M("TP_PERSPECTIVE_HORIZONTAL") + ", " + M("TP_PERSPECTIVE_VERTICAL"), ADDSET_PERSPECTIVE, false); + mi->set_value (behavColumns.label, M ("TP_PERSPECTIVE_LABEL")); + appendBehavList (mi, M ("TP_PERSPECTIVE_HORIZONTAL") + ", " + M ("TP_PERSPECTIVE_VERTICAL"), ADDSET_PERSPECTIVE, false); mi = behModel->append (); - mi->set_value (behavColumns.label, M("TP_GRADIENT_LABEL")); - appendBehavList (mi, M("TP_GRADIENT_DEGREE"), ADDSET_GRADIENT_DEGREE, false); - appendBehavList (mi, M("TP_GRADIENT_FEATHER"), ADDSET_GRADIENT_FEATHER, false); - appendBehavList (mi, M("TP_GRADIENT_STRENGTH"), ADDSET_GRADIENT_STRENGTH, false); - appendBehavList (mi, M("TP_GRADIENT_CENTER_X") + ", " + M("TP_GRADIENT_CENTER_Y"), ADDSET_GRADIENT_CENTER, false); + mi->set_value (behavColumns.label, M ("TP_GRADIENT_LABEL")); + appendBehavList (mi, M ("TP_GRADIENT_DEGREE"), ADDSET_GRADIENT_DEGREE, false); + appendBehavList (mi, M ("TP_GRADIENT_FEATHER"), ADDSET_GRADIENT_FEATHER, false); + appendBehavList (mi, M ("TP_GRADIENT_STRENGTH"), ADDSET_GRADIENT_STRENGTH, false); + appendBehavList (mi, M ("TP_GRADIENT_CENTER_X") + ", " + M ("TP_GRADIENT_CENTER_Y"), ADDSET_GRADIENT_CENTER, false); mi = behModel->append (); - mi->set_value (behavColumns.label, M("TP_PCVIGNETTE_LABEL")); - appendBehavList (mi, M("TP_PCVIGNETTE_STRENGTH"), ADDSET_PCVIGNETTE_STRENGTH, false); - appendBehavList (mi, M("TP_PCVIGNETTE_FEATHER"), ADDSET_PCVIGNETTE_FEATHER, false); - appendBehavList (mi, M("TP_PCVIGNETTE_ROUNDNESS"), ADDSET_PCVIGNETTE_ROUNDNESS, false); + mi->set_value (behavColumns.label, M ("TP_PCVIGNETTE_LABEL")); + appendBehavList (mi, M ("TP_PCVIGNETTE_STRENGTH"), ADDSET_PCVIGNETTE_STRENGTH, false); + appendBehavList (mi, M ("TP_PCVIGNETTE_FEATHER"), ADDSET_PCVIGNETTE_FEATHER, false); + appendBehavList (mi, M ("TP_PCVIGNETTE_ROUNDNESS"), ADDSET_PCVIGNETTE_ROUNDNESS, false); mi = behModel->append (); - mi->set_value (behavColumns.label, M("TP_CACORRECTION_LABEL")); - appendBehavList (mi, M("TP_CACORRECTION_BLUE") + ", " + M("TP_CACORRECTION_RED"), ADDSET_CA, true); + mi->set_value (behavColumns.label, M ("TP_CACORRECTION_LABEL")); + appendBehavList (mi, M ("TP_CACORRECTION_BLUE") + ", " + M ("TP_CACORRECTION_RED"), ADDSET_CA, true); mi = behModel->append (); - mi->set_value (behavColumns.label, M("TP_VIGNETTING_LABEL")); - appendBehavList (mi, M("TP_VIGNETTING_AMOUNT"), ADDSET_VIGN_AMOUNT, false); - appendBehavList (mi, M("TP_VIGNETTING_RADIUS"), ADDSET_VIGN_RADIUS, false); - appendBehavList (mi, M("TP_VIGNETTING_STRENGTH"), ADDSET_VIGN_STRENGTH, false); - appendBehavList (mi, M("TP_VIGNETTING_CENTER_X") + ", " + M("TP_VIGNETTING_CENTER_Y"), ADDSET_VIGN_CENTER, false); + mi->set_value (behavColumns.label, M ("TP_VIGNETTING_LABEL")); + appendBehavList (mi, M ("TP_VIGNETTING_AMOUNT"), ADDSET_VIGN_AMOUNT, false); + appendBehavList (mi, M ("TP_VIGNETTING_RADIUS"), ADDSET_VIGN_RADIUS, false); + appendBehavList (mi, M ("TP_VIGNETTING_STRENGTH"), ADDSET_VIGN_STRENGTH, false); + appendBehavList (mi, M ("TP_VIGNETTING_CENTER_X") + ", " + M ("TP_VIGNETTING_CENTER_Y"), ADDSET_VIGN_CENTER, false); mi = behModel->append (); - mi->set_value (behavColumns.label, M("TP_DIRPYREQUALIZER_LABEL")); - appendBehavList (mi, M("TP_EXPOSURE_CONTRAST"), ADDSET_DIRPYREQ, true); - appendBehavList (mi, M("TP_DIRPYREQUALIZER_THRESHOLD"), ADDSET_DIRPYREQ_THRESHOLD, true); - appendBehavList (mi, M("TP_DIRPYREQUALIZER_SKIN"), ADDSET_DIRPYREQ_SKINPROTECT, true); + mi->set_value (behavColumns.label, M ("TP_DIRPYREQUALIZER_LABEL")); + appendBehavList (mi, M ("TP_EXPOSURE_CONTRAST"), ADDSET_DIRPYREQ, true); + appendBehavList (mi, M ("TP_DIRPYREQUALIZER_THRESHOLD"), ADDSET_DIRPYREQ_THRESHOLD, true); + appendBehavList (mi, M ("TP_DIRPYREQUALIZER_SKIN"), ADDSET_DIRPYREQ_SKINPROTECT, true); mi = behModel->append (); - mi->set_value (behavColumns.label, M("TP_WAVELET_LABEL")); - appendBehavList (mi, M("TP_WAVELET_LEVELS"), ADDSET_WA_THRES, true); + mi->set_value (behavColumns.label, M ("TP_WAVELET_LABEL")); + appendBehavList (mi, M ("TP_WAVELET_LEVELS"), ADDSET_WA_THRES, true); // appendBehavList (mi, M("TP_WAVELET_CONTRAST"), ADDSET_WA, true); - appendBehavList (mi, M("TP_WAVELET_THRESHOLD"), ADDSET_WA_THRESHOLD, true); - appendBehavList (mi, M("TP_WAVELET_THRESHOLD2"), ADDSET_WA_THRESHOLD2, true); - appendBehavList (mi, M("TP_WAVELET_CHRO"), ADDSET_WA_CHRO, true); - appendBehavList (mi, M("TP_WAVELET_CHR"), ADDSET_WA_CHROMA, true); - appendBehavList (mi, M("TP_WAVELET_SKIN"), ADDSET_WA_SKINPROTECT, true); - appendBehavList (mi, M("TP_WAVELET_EDRAD"), ADDSET_WA_EDGRAD, true); - appendBehavList (mi, M("TP_WAVELET_EDVAL"), ADDSET_WA_EDGVAL, true); - appendBehavList (mi, M("TP_WAVELET_RESCON"), ADDSET_WA_RESCON, true); - appendBehavList (mi, M("TP_WAVELET_THR"), ADDSET_WA_THRR, true); - appendBehavList (mi, M("TP_WAVELET_RESCONH"), ADDSET_WA_RESCONH, true); - appendBehavList (mi, M("TP_WAVELET_THRH"), ADDSET_WA_THRRH, true); - appendBehavList (mi, M("TP_WAVELET_RESCHRO"), ADDSET_WA_RESCHRO, true); - appendBehavList (mi, M("TP_WAVELET_TMSTRENGTH"), ADDSET_WA_TMRS, true); - appendBehavList (mi, M("TP_WAVELET_SKY"), ADDSET_WA_SKYPROTECT, true); - appendBehavList (mi, M("TP_WAVELET_CONTRA"), ADDSET_WA_CONTRAST, true); - appendBehavList (mi, M("TP_WAVELET_STRENGTH"), ADDSET_WA_STRENGTH, true); - appendBehavList (mi, M("TP_WAVELET_COMPGAMMA"), ADDSET_WA_GAMMA, true); - appendBehavList (mi, M("TP_WAVELET_EDGEDETECT"), ADDSET_WA_EDGEDETECT, true); - appendBehavList (mi, M("TP_WAVELET_EDGEDETECTTHR"), ADDSET_WA_EDGEDETECTTHR, true); - appendBehavList (mi, M("TP_WAVELET_EDGEDETECTTHR2"), ADDSET_WA_EDGEDETECTTHR2, true); + appendBehavList (mi, M ("TP_WAVELET_THRESHOLD"), ADDSET_WA_THRESHOLD, true); + appendBehavList (mi, M ("TP_WAVELET_THRESHOLD2"), ADDSET_WA_THRESHOLD2, true); + appendBehavList (mi, M ("TP_WAVELET_CHRO"), ADDSET_WA_CHRO, true); + appendBehavList (mi, M ("TP_WAVELET_CHR"), ADDSET_WA_CHROMA, true); + appendBehavList (mi, M ("TP_WAVELET_SKIN"), ADDSET_WA_SKINPROTECT, true); + appendBehavList (mi, M ("TP_WAVELET_EDRAD"), ADDSET_WA_EDGRAD, true); + appendBehavList (mi, M ("TP_WAVELET_EDVAL"), ADDSET_WA_EDGVAL, true); + appendBehavList (mi, M ("TP_WAVELET_RESCON"), ADDSET_WA_RESCON, true); + appendBehavList (mi, M ("TP_WAVELET_THR"), ADDSET_WA_THRR, true); + appendBehavList (mi, M ("TP_WAVELET_RESCONH"), ADDSET_WA_RESCONH, true); + appendBehavList (mi, M ("TP_WAVELET_THRH"), ADDSET_WA_THRRH, true); + appendBehavList (mi, M ("TP_WAVELET_RESCHRO"), ADDSET_WA_RESCHRO, true); + appendBehavList (mi, M ("TP_WAVELET_TMSTRENGTH"), ADDSET_WA_TMRS, true); + appendBehavList (mi, M ("TP_WAVELET_SKY"), ADDSET_WA_SKYPROTECT, true); + appendBehavList (mi, M ("TP_WAVELET_CONTRA"), ADDSET_WA_CONTRAST, true); + appendBehavList (mi, M ("TP_WAVELET_STRENGTH"), ADDSET_WA_STRENGTH, true); + appendBehavList (mi, M ("TP_WAVELET_COMPGAMMA"), ADDSET_WA_GAMMA, true); + appendBehavList (mi, M ("TP_WAVELET_EDGEDETECT"), ADDSET_WA_EDGEDETECT, true); + appendBehavList (mi, M ("TP_WAVELET_EDGEDETECTTHR"), ADDSET_WA_EDGEDETECTTHR, true); + appendBehavList (mi, M ("TP_WAVELET_EDGEDETECTTHR2"), ADDSET_WA_EDGEDETECTTHR2, true); mi = behModel->append (); - mi->set_value (behavColumns.label, M("TP_PREPROCESS_LABEL")); - appendBehavList (mi, M("TP_PREPROCESS_GREENEQUIL"), ADDSET_PREPROCESS_GREENEQUIL, false); - appendBehavList (mi, M("TP_PREPROCESS_LINEDENOISE"), ADDSET_PREPROCESS_LINEDENOISE, true); + mi->set_value (behavColumns.label, M ("TP_PREPROCESS_LABEL")); + appendBehavList (mi, M ("TP_PREPROCESS_GREENEQUIL"), ADDSET_PREPROCESS_GREENEQUIL, false); + appendBehavList (mi, M ("TP_PREPROCESS_LINEDENOISE"), ADDSET_PREPROCESS_LINEDENOISE, true); mi = behModel->append (); - mi->set_value (behavColumns.label, M("TP_EXPOS_WHITEPOINT_LABEL")); - appendBehavList (mi, M("TP_RAWEXPOS_LINEAR"), ADDSET_RAWEXPOS_LINEAR, false); - appendBehavList (mi, M("TP_RAWEXPOS_PRESER"), ADDSET_RAWEXPOS_PRESER, false); + mi->set_value (behavColumns.label, M ("TP_EXPOS_WHITEPOINT_LABEL")); + appendBehavList (mi, M ("TP_RAWEXPOS_LINEAR"), ADDSET_RAWEXPOS_LINEAR, false); + appendBehavList (mi, M ("TP_RAWEXPOS_PRESER"), ADDSET_RAWEXPOS_PRESER, false); mi = behModel->append (); - mi->set_value (behavColumns.label, M("TP_RAWEXPOS_BLACKS")); - appendBehavList (mi, M("TP_RAWEXPOS_RGB"), ADDSET_RAWEXPOS_BLACKS, false); + mi->set_value (behavColumns.label, M ("TP_RAWEXPOS_BLACKS")); + appendBehavList (mi, M ("TP_RAWEXPOS_RGB"), ADDSET_RAWEXPOS_BLACKS, false); mi = behModel->append (); - mi->set_value (behavColumns.label, M("TP_FLATFIELD_LABEL")); - appendBehavList (mi, M("TP_FLATFIELD_CLIPCONTROL"), ADDSET_RAWFFCLIPCONTROL, true); + mi->set_value (behavColumns.label, M ("TP_FLATFIELD_LABEL")); + appendBehavList (mi, M ("TP_FLATFIELD_CLIPCONTROL"), ADDSET_RAWFFCLIPCONTROL, true); mi = behModel->append (); - mi->set_value (behavColumns.label, M("TP_CHROMATABERR_LABEL")); - appendBehavList (mi, M("TP_RAWCACORR_CARED") + ", " + M("TP_RAWCACORR_CABLUE"), ADDSET_RAWCACORR, true); + mi->set_value (behavColumns.label, M ("TP_CHROMATABERR_LABEL")); + appendBehavList (mi, M ("TP_RAWCACORR_CARED") + ", " + M ("TP_RAWCACORR_CABLUE"), ADDSET_RAWCACORR, true); behTreeView->expand_all (); - behAddAll = Gtk::manage( new Gtk::Button (M("PREFERENCES_BEHADDALL")) ); - behSetAll = Gtk::manage( new Gtk::Button (M("PREFERENCES_BEHSETALL")) ); - behAddAll->set_tooltip_markup (M("PREFERENCES_BEHADDALLHINT")); - behSetAll->set_tooltip_markup (M("PREFERENCES_BEHSETALLHINT")); + behAddAll = Gtk::manage ( new Gtk::Button (M ("PREFERENCES_BEHADDALL")) ); + behSetAll = Gtk::manage ( new Gtk::Button (M ("PREFERENCES_BEHSETALL")) ); + behAddAll->set_tooltip_markup (M ("PREFERENCES_BEHADDALLHINT")); + behSetAll->set_tooltip_markup (M ("PREFERENCES_BEHSETALLHINT")); - behAddAll->signal_clicked().connect( sigc::mem_fun(*this, &Preferences::behAddAllPressed) ); - behSetAll->signal_clicked().connect( sigc::mem_fun(*this, &Preferences::behSetAllPressed) ); + behAddAll->signal_clicked().connect ( sigc::mem_fun (*this, &Preferences::behAddAllPressed) ); + behSetAll->signal_clicked().connect ( sigc::mem_fun (*this, &Preferences::behSetAllPressed) ); Gtk::HBox* buttonpanel1 = Gtk::manage (new Gtk::HBox ()); //buttonpanel1->set_spacing(8); @@ -393,8 +394,8 @@ Gtk::Widget* Preferences::getBatchProcPanel () buttonpanel1->pack_end (*behAddAll, Gtk::PACK_SHRINK, 4); vbbeh->pack_start (*buttonpanel1, Gtk::PACK_SHRINK, 4); - chOverwriteOutputFile = Gtk::manage( new Gtk::CheckButton (M("PREFERENCES_OVERWRITEOUTPUTFILE")) ); - mvbpp->pack_start(*chOverwriteOutputFile, Gtk::PACK_SHRINK, 4); + chOverwriteOutputFile = Gtk::manage ( new Gtk::CheckButton (M ("PREFERENCES_OVERWRITEOUTPUTFILE")) ); + mvbpp->pack_start (*chOverwriteOutputFile, Gtk::PACK_SHRINK, 4); return mvbpp; } @@ -431,7 +432,7 @@ void Preferences::behSetRadioToggled (const Glib::ustring& path) Gtk::Widget *Preferences::getDynProfilePanel() { - dynProfilePanel = Gtk::manage(new DynamicProfilePanel()); + dynProfilePanel = Gtk::manage (new DynamicProfilePanel()); return dynProfilePanel; } @@ -441,43 +442,43 @@ Gtk::Widget* Preferences::getProcParamsPanel () Gtk::VBox* mvbpp = Gtk::manage (new Gtk::VBox ()); - Gtk::Frame* fpp = Gtk::manage (new Gtk::Frame (M("PREFERENCES_IMPROCPARAMS"))); + Gtk::Frame* fpp = Gtk::manage (new Gtk::Frame (M ("PREFERENCES_IMPROCPARAMS"))); Gtk::VBox* vbpp = Gtk::manage (new Gtk::VBox ()); - Gtk::Label* drlab = Gtk::manage (new Gtk::Label (M("PREFERENCES_FORRAW") + ":", Gtk::ALIGN_START)); + Gtk::Label* drlab = Gtk::manage (new Gtk::Label (M ("PREFERENCES_FORRAW") + ":", Gtk::ALIGN_START)); rprofiles = Gtk::manage (new ProfileStoreComboBox ()); const ProfileStoreEntry* dynpse = ProfileStore::getInstance()->getInternalDynamicPSE(); - rprofiles->addRow(dynpse); - setExpandAlignProperties(rprofiles, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); - rprofiles->set_size_request(50, -1); - rpconn = rprofiles->signal_changed().connect( sigc::mem_fun(*this, &Preferences::forRAWComboChanged) ); - Gtk::Label* drimg = Gtk::manage (new Gtk::Label (M("PREFERENCES_FORIMAGE") + ":", Gtk::ALIGN_START)); + rprofiles->addRow (dynpse); + setExpandAlignProperties (rprofiles, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); + rprofiles->set_size_request (50, -1); + rpconn = rprofiles->signal_changed().connect ( sigc::mem_fun (*this, &Preferences::forRAWComboChanged) ); + Gtk::Label* drimg = Gtk::manage (new Gtk::Label (M ("PREFERENCES_FORIMAGE") + ":", Gtk::ALIGN_START)); iprofiles = Gtk::manage (new ProfileStoreComboBox ()); - iprofiles->addRow(dynpse); - iprofiles->set_size_request(50, -1); - setExpandAlignProperties(iprofiles, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_FILL); - ipconn = iprofiles->signal_changed().connect( sigc::mem_fun(*this, &Preferences::forImageComboChanged) ); + iprofiles->addRow (dynpse); + iprofiles->set_size_request (50, -1); + setExpandAlignProperties (iprofiles, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_FILL); + ipconn = iprofiles->signal_changed().connect ( sigc::mem_fun (*this, &Preferences::forImageComboChanged) ); Gtk::Table* defpt = Gtk::manage (new Gtk::Table (2, 2)); defpt->attach (*drlab, 0, 1, 0, 1, Gtk::FILL, Gtk::SHRINK, 2, 2); defpt->attach (*rprofiles, 1, 2, 0, 1, Gtk::EXPAND | Gtk::FILL | Gtk::SHRINK, Gtk::SHRINK, 2, 2); defpt->attach (*drimg, 0, 1, 1, 2, Gtk::FILL, Gtk::SHRINK, 2, 2); defpt->attach (*iprofiles, 1, 2, 1, 2, Gtk::EXPAND | Gtk::FILL | Gtk::SHRINK, Gtk::SHRINK, 2, 2); vbpp->pack_start (*defpt, Gtk::PACK_SHRINK, 4); - useBundledProfiles = Gtk::manage (new Gtk::CheckButton (M("PREFERENCES_USEBUNDLEDPROFILES"))); - bpconn = useBundledProfiles->signal_clicked().connect ( sigc::mem_fun(*this, &Preferences::bundledProfilesChanged) ); + useBundledProfiles = Gtk::manage (new Gtk::CheckButton (M ("PREFERENCES_USEBUNDLEDPROFILES"))); + bpconn = useBundledProfiles->signal_clicked().connect ( sigc::mem_fun (*this, &Preferences::bundledProfilesChanged) ); vbpp->pack_start (*useBundledProfiles, Gtk::PACK_SHRINK, 4); fpp->add (*vbpp); mvbpp->pack_start (*fpp, Gtk::PACK_SHRINK, 4); // Custom profile builder box - Gtk::Frame* cpfrm = Gtk::manage( new Gtk::Frame (M("PREFERENCES_CUSTPROFBUILD")) ); - Gtk::Label* cplab = Gtk::manage( new Gtk::Label (M("PREFERENCES_CUSTPROFBUILDPATH") + ":", Gtk::ALIGN_START) ); - txtCustProfBuilderPath = Gtk::manage( new Gtk::Entry () ); - txtCustProfBuilderPath->set_tooltip_markup (M("PREFERENCES_CUSTPROFBUILDHINT")); - Gtk::Label* cpltypelab = Gtk::manage( new Gtk::Label (M("PREFERENCES_CUSTPROFBUILDKEYFORMAT") + ":", Gtk::ALIGN_START) ); + Gtk::Frame* cpfrm = Gtk::manage ( new Gtk::Frame (M ("PREFERENCES_CUSTPROFBUILD")) ); + Gtk::Label* cplab = Gtk::manage ( new Gtk::Label (M ("PREFERENCES_CUSTPROFBUILDPATH") + ":", Gtk::ALIGN_START) ); + txtCustProfBuilderPath = Gtk::manage ( new Gtk::Entry () ); + txtCustProfBuilderPath->set_tooltip_markup (M ("PREFERENCES_CUSTPROFBUILDHINT")); + Gtk::Label* cpltypelab = Gtk::manage ( new Gtk::Label (M ("PREFERENCES_CUSTPROFBUILDKEYFORMAT") + ":", Gtk::ALIGN_START) ); custProfBuilderLabelType = Gtk::manage (new Gtk::ComboBoxText ()); - custProfBuilderLabelType->append (M("PREFERENCES_CUSTPROFBUILDKEYFORMAT_TID")); - custProfBuilderLabelType->append (M("PREFERENCES_CUSTPROFBUILDKEYFORMAT_NAME")); - custProfBuilderLabelType->append (M("PREFERENCES_CUSTPROFBUILDKEYFORMAT_TID") + "_" + M("PREFERENCES_CUSTPROFBUILDKEYFORMAT_NAME")); + custProfBuilderLabelType->append (M ("PREFERENCES_CUSTPROFBUILDKEYFORMAT_TID")); + custProfBuilderLabelType->append (M ("PREFERENCES_CUSTPROFBUILDKEYFORMAT_NAME")); + custProfBuilderLabelType->append (M ("PREFERENCES_CUSTPROFBUILDKEYFORMAT_TID") + "_" + M ("PREFERENCES_CUSTPROFBUILDKEYFORMAT_NAME")); Gtk::Table* cpbt = Gtk::manage (new Gtk::Table (2, 2)); cpbt->attach (*cplab, 0, 1, 0, 1, Gtk::FILL, Gtk::SHRINK, 2, 2); cpbt->attach (*txtCustProfBuilderPath, 1, 2, 0, 1, Gtk::EXPAND | Gtk::FILL | Gtk::SHRINK, Gtk::SHRINK, 2, 2); @@ -486,72 +487,72 @@ Gtk::Widget* Preferences::getProcParamsPanel () cpfrm->add (*cpbt); mvbpp->pack_start (*cpfrm, Gtk::PACK_SHRINK, 4); - Gtk::Frame* fdp = Gtk::manage (new Gtk::Frame (M("PREFERENCES_PROFILEHANDLING"))); + Gtk::Frame* fdp = Gtk::manage (new Gtk::Frame (M ("PREFERENCES_PROFILEHANDLING"))); Gtk::Table* vbdp = Gtk::manage (new Gtk::Table (2, 2)); saveParamsPreference = Gtk::manage (new Gtk::ComboBoxText ()); - saveParamsPreference->append(M("PREFERENCES_PROFILESAVEINPUT")); - saveParamsPreference->append(M("PREFERENCES_PROFILESAVECACHE")); - saveParamsPreference->append(M("PREFERENCES_PROFILESAVEBOTH")); - Gtk::Label *splab = Gtk::manage(new Gtk::Label(M("PREFERENCES_PROFILESAVELOCATION") + ":")); - vbdp->attach(*splab, 0, 1, 0, 1, Gtk::FILL, Gtk::SHRINK, 2, 2); - vbdp->attach(*saveParamsPreference, 1, 2, 0, 1, Gtk::EXPAND | Gtk::FILL | Gtk::SHRINK, Gtk::SHRINK, 2, 2); - Gtk::Label* lplab = Gtk::manage (new Gtk::Label (M("PREFERENCES_PROFILELOADPR") + ":")); + saveParamsPreference->append (M ("PREFERENCES_PROFILESAVEINPUT")); + saveParamsPreference->append (M ("PREFERENCES_PROFILESAVECACHE")); + saveParamsPreference->append (M ("PREFERENCES_PROFILESAVEBOTH")); + Gtk::Label *splab = Gtk::manage (new Gtk::Label (M ("PREFERENCES_PROFILESAVELOCATION") + ":")); + vbdp->attach (*splab, 0, 1, 0, 1, Gtk::FILL, Gtk::SHRINK, 2, 2); + vbdp->attach (*saveParamsPreference, 1, 2, 0, 1, Gtk::EXPAND | Gtk::FILL | Gtk::SHRINK, Gtk::SHRINK, 2, 2); + Gtk::Label* lplab = Gtk::manage (new Gtk::Label (M ("PREFERENCES_PROFILELOADPR") + ":")); loadParamsPreference = Gtk::manage (new Gtk::ComboBoxText ()); - loadParamsPreference->append (M("PREFERENCES_PROFILEPRCACHE")); - loadParamsPreference->append (M("PREFERENCES_PROFILEPRFILE")); - vbdp->attach(*lplab, 0, 1, 1, 2, Gtk::FILL, Gtk::SHRINK, 2, 2); - vbdp->attach(*loadParamsPreference, 1, 2, 1, 2, Gtk::EXPAND | Gtk::FILL | Gtk::SHRINK, Gtk::SHRINK, 2, 2); + loadParamsPreference->append (M ("PREFERENCES_PROFILEPRCACHE")); + loadParamsPreference->append (M ("PREFERENCES_PROFILEPRFILE")); + vbdp->attach (*lplab, 0, 1, 1, 2, Gtk::FILL, Gtk::SHRINK, 2, 2); + vbdp->attach (*loadParamsPreference, 1, 2, 1, 2, Gtk::EXPAND | Gtk::FILL | Gtk::SHRINK, Gtk::SHRINK, 2, 2); fdp->add (*vbdp); mvbpp->pack_start (*fdp, Gtk::PACK_SHRINK, 4); - Gtk::Frame* fdf = Gtk::manage (new Gtk::Frame (M("PREFERENCES_DARKFRAME")) ); + Gtk::Frame* fdf = Gtk::manage (new Gtk::Frame (M ("PREFERENCES_DARKFRAME")) ); Gtk::HBox* hb42 = Gtk::manage (new Gtk::HBox ()); - darkFrameDir = Gtk::manage(new Gtk::FileChooserButton(M("PREFERENCES_DIRDARKFRAMES"), Gtk::FILE_CHOOSER_ACTION_SELECT_FOLDER)); - Gtk::Label *dfLab = Gtk::manage(new Gtk::Label(M("PREFERENCES_DIRDARKFRAMES") + ":")); - hb42->pack_start(*dfLab , Gtk::PACK_SHRINK, 4 ); - hb42->pack_start(*darkFrameDir, Gtk::PACK_EXPAND_WIDGET, 4); - dfLabel = Gtk::manage(new Gtk::Label("Found:")); + darkFrameDir = Gtk::manage (new Gtk::FileChooserButton (M ("PREFERENCES_DIRDARKFRAMES"), Gtk::FILE_CHOOSER_ACTION_SELECT_FOLDER)); + Gtk::Label *dfLab = Gtk::manage (new Gtk::Label (M ("PREFERENCES_DIRDARKFRAMES") + ":")); + hb42->pack_start (*dfLab, Gtk::PACK_SHRINK, 4 ); + hb42->pack_start (*darkFrameDir, Gtk::PACK_EXPAND_WIDGET, 4); + dfLabel = Gtk::manage (new Gtk::Label ("Found:")); Gtk::VBox* vbdf = Gtk::manage (new Gtk::VBox ()); - vbdf->pack_start( *hb42, Gtk::PACK_SHRINK, 4); - vbdf->pack_start( *dfLabel, Gtk::PACK_SHRINK, 4 ); - fdf->add( *vbdf ); - mvbpp->pack_start ( *fdf , Gtk::PACK_SHRINK, 4); + vbdf->pack_start ( *hb42, Gtk::PACK_SHRINK, 4); + vbdf->pack_start ( *dfLabel, Gtk::PACK_SHRINK, 4 ); + fdf->add ( *vbdf ); + mvbpp->pack_start ( *fdf, Gtk::PACK_SHRINK, 4); //dfconn = darkFrameDir->signal_file_set().connect ( sigc::mem_fun(*this, &Preferences::darkFrameChanged), true); - dfconn = darkFrameDir->signal_selection_changed().connect ( sigc::mem_fun(*this, &Preferences::darkFrameChanged), true); + dfconn = darkFrameDir->signal_selection_changed().connect ( sigc::mem_fun (*this, &Preferences::darkFrameChanged), true); // FLATFIELD - Gtk::Frame* fff = Gtk::manage (new Gtk::Frame (M("PREFERENCES_FLATFIELD")) ); + Gtk::Frame* fff = Gtk::manage (new Gtk::Frame (M ("PREFERENCES_FLATFIELD")) ); Gtk::HBox* hb43 = Gtk::manage (new Gtk::HBox ()); - flatFieldDir = Gtk::manage(new Gtk::FileChooserButton(M("PREFERENCES_FLATFIELDSDIR"), Gtk::FILE_CHOOSER_ACTION_SELECT_FOLDER)); - Gtk::Label *ffLab = Gtk::manage(new Gtk::Label(M("PREFERENCES_FLATFIELDSDIR") + ":")); - hb43->pack_start(*ffLab , Gtk::PACK_SHRINK, 4 ); - hb43->pack_start(*flatFieldDir); - ffLabel = Gtk::manage(new Gtk::Label("Found:")); + flatFieldDir = Gtk::manage (new Gtk::FileChooserButton (M ("PREFERENCES_FLATFIELDSDIR"), Gtk::FILE_CHOOSER_ACTION_SELECT_FOLDER)); + Gtk::Label *ffLab = Gtk::manage (new Gtk::Label (M ("PREFERENCES_FLATFIELDSDIR") + ":")); + hb43->pack_start (*ffLab, Gtk::PACK_SHRINK, 4 ); + hb43->pack_start (*flatFieldDir); + ffLabel = Gtk::manage (new Gtk::Label ("Found:")); Gtk::VBox* vbff = Gtk::manage (new Gtk::VBox ()); - vbff->pack_start( *hb43, Gtk::PACK_SHRINK, 4); - vbff->pack_start( *ffLabel, Gtk::PACK_SHRINK, 4 ); - fff->add( *vbff ); - mvbpp->pack_start ( *fff , Gtk::PACK_SHRINK, 4); + vbff->pack_start ( *hb43, Gtk::PACK_SHRINK, 4); + vbff->pack_start ( *ffLabel, Gtk::PACK_SHRINK, 4 ); + fff->add ( *vbff ); + mvbpp->pack_start ( *fff, Gtk::PACK_SHRINK, 4); //ffconn = flatFieldDir->signal_file_set().connect ( sigc::mem_fun(*this, &Preferences::flatFieldChanged), true); - ffconn = flatFieldDir->signal_selection_changed().connect ( sigc::mem_fun(*this, &Preferences::flatFieldChanged), true); + ffconn = flatFieldDir->signal_selection_changed().connect ( sigc::mem_fun (*this, &Preferences::flatFieldChanged), true); //Cluts Dir - Gtk::Frame* clutsDirFrame = Gtk::manage (new Gtk::Frame (M("PREFERENCES_FILMSIMULATION")) ); + Gtk::Frame* clutsDirFrame = Gtk::manage (new Gtk::Frame (M ("PREFERENCES_FILMSIMULATION")) ); Gtk::HBox* clutsDirBox = Gtk::manage (new Gtk::HBox ()); - clutsDir = Gtk::manage(new Gtk::FileChooserButton(M("PREFERENCES_CLUTSDIR"), Gtk::FILE_CHOOSER_ACTION_SELECT_FOLDER)); - Gtk::Label *clutsDirLabel = Gtk::manage(new Gtk::Label(M("PREFERENCES_CLUTSDIR") + ":")); - Gtk::Label* clutsRestartNeeded = Gtk::manage( new Gtk::Label (Glib::ustring(" (") + M("PREFERENCES_APPLNEXTSTARTUP") + ")") ); - clutsDirBox->pack_start( *clutsDirLabel, Gtk::PACK_SHRINK, 4 ); - clutsDirBox->pack_start( *clutsDir ); - clutsDirBox->pack_start( *clutsRestartNeeded, Gtk::PACK_SHRINK, 4 ); - clutsDirFrame->add( *clutsDirBox ); - mvbpp->pack_start( *clutsDirFrame, Gtk::PACK_SHRINK, 4 ); + clutsDir = Gtk::manage (new Gtk::FileChooserButton (M ("PREFERENCES_CLUTSDIR"), Gtk::FILE_CHOOSER_ACTION_SELECT_FOLDER)); + Gtk::Label *clutsDirLabel = Gtk::manage (new Gtk::Label (M ("PREFERENCES_CLUTSDIR") + ":")); + Gtk::Label* clutsRestartNeeded = Gtk::manage ( new Gtk::Label (Glib::ustring (" (") + M ("PREFERENCES_APPLNEXTSTARTUP") + ")") ); + clutsDirBox->pack_start ( *clutsDirLabel, Gtk::PACK_SHRINK, 4 ); + clutsDirBox->pack_start ( *clutsDir ); + clutsDirBox->pack_start ( *clutsRestartNeeded, Gtk::PACK_SHRINK, 4 ); + clutsDirFrame->add ( *clutsDirBox ); + mvbpp->pack_start ( *clutsDirFrame, Gtk::PACK_SHRINK, 4 ); - Gtk::Frame* fmd = Gtk::manage (new Gtk::Frame (M("PREFERENCES_METADATA"))); + Gtk::Frame* fmd = Gtk::manage (new Gtk::Frame (M ("PREFERENCES_METADATA"))); Gtk::VBox* vbmd = Gtk::manage (new Gtk::VBox ()); - ckbTunnelMetaData = Gtk::manage (new Gtk::CheckButton (M("PREFERENCES_TUNNELMETADATA"))); + ckbTunnelMetaData = Gtk::manage (new Gtk::CheckButton (M ("PREFERENCES_TUNNELMETADATA"))); vbmd->pack_start (*ckbTunnelMetaData, Gtk::PACK_SHRINK, 4); fmd->add (*vbmd); mvbpp->pack_start (*fmd, Gtk::PACK_SHRINK, 4); @@ -561,37 +562,37 @@ Gtk::Widget* Preferences::getProcParamsPanel () Gtk::Widget* Preferences::getPerformancePanel () { - Gtk::VBox* mainContainer = Gtk::manage( new Gtk::VBox () ); - mainContainer->set_spacing(4); + Gtk::VBox* mainContainer = Gtk::manage ( new Gtk::VBox () ); + mainContainer->set_spacing (4); - Gtk::Frame* fprevdemo = Gtk::manage (new Gtk::Frame (M("PREFERENCES_PREVDEMO"))); + Gtk::Frame* fprevdemo = Gtk::manage (new Gtk::Frame (M ("PREFERENCES_PREVDEMO"))); Gtk::HBox* hbprevdemo = Gtk::manage (new Gtk::HBox (false, 4)); - Gtk::Label* lprevdemo = Gtk::manage (new Gtk::Label (M("PREFERENCES_PREVDEMO_LABEL"))); + Gtk::Label* lprevdemo = Gtk::manage (new Gtk::Label (M ("PREFERENCES_PREVDEMO_LABEL"))); cprevdemo = Gtk::manage (new Gtk::ComboBoxText ()); - cprevdemo->append (M("PREFERENCES_PREVDEMO_FAST")); - cprevdemo->append (M("PREFERENCES_PREVDEMO_SIDECAR")); + cprevdemo->append (M ("PREFERENCES_PREVDEMO_FAST")); + cprevdemo->append (M ("PREFERENCES_PREVDEMO_SIDECAR")); cprevdemo->set_active (1); hbprevdemo->pack_start (*lprevdemo, Gtk::PACK_SHRINK); hbprevdemo->pack_start (*cprevdemo); fprevdemo->add (*hbprevdemo); mainContainer->pack_start (*fprevdemo, Gtk::PACK_SHRINK, 4); - Gtk::Frame* ftiffserialize = Gtk::manage (new Gtk::Frame (M("PREFERENCES_SERIALIZE_TIFF_READ"))); + Gtk::Frame* ftiffserialize = Gtk::manage (new Gtk::Frame (M ("PREFERENCES_SERIALIZE_TIFF_READ"))); Gtk::HBox* htiffserialize = Gtk::manage (new Gtk::HBox (false, 4)); - ctiffserialize = Gtk::manage( new Gtk::CheckButton (M("PREFERENCES_SERIALIZE_TIFF_READ_LABEL")) ); - ctiffserialize->set_tooltip_text(M("PREFERENCES_SERIALIZE_TIFF_READ_TOOLTIP")); + ctiffserialize = Gtk::manage ( new Gtk::CheckButton (M ("PREFERENCES_SERIALIZE_TIFF_READ_LABEL")) ); + ctiffserialize->set_tooltip_text (M ("PREFERENCES_SERIALIZE_TIFF_READ_TOOLTIP")); htiffserialize->pack_start (*ctiffserialize); ftiffserialize->add (*htiffserialize); mainContainer->pack_start (*ftiffserialize, Gtk::PACK_SHRINK, 4); - Gtk::Frame* fclut = Gtk::manage( new Gtk::Frame (M("PREFERENCES_CLUTSCACHE")) ); - Gtk::HBox* clutCacheSizeHB = Gtk::manage( new Gtk::HBox () ); - clutCacheSizeHB->set_spacing(4); - Gtk::Label* CLUTLl = Gtk::manage( new Gtk::Label (M("PREFERENCES_CLUTSCACHE_LABEL") + ":", Gtk::ALIGN_START)); - clutCacheSizeSB = Gtk::manage( new Gtk::SpinButton () ); + Gtk::Frame* fclut = Gtk::manage ( new Gtk::Frame (M ("PREFERENCES_CLUTSCACHE")) ); + Gtk::HBox* clutCacheSizeHB = Gtk::manage ( new Gtk::HBox () ); + clutCacheSizeHB->set_spacing (4); + Gtk::Label* CLUTLl = Gtk::manage ( new Gtk::Label (M ("PREFERENCES_CLUTSCACHE_LABEL") + ":", Gtk::ALIGN_START)); + clutCacheSizeSB = Gtk::manage ( new Gtk::SpinButton () ); clutCacheSizeSB->set_digits (0); clutCacheSizeSB->set_increments (1, 5); - clutCacheSizeSB->set_max_length(2); // Will this be sufficient? :) + clutCacheSizeSB->set_max_length (2); // Will this be sufficient? :) #ifdef _OPENMP clutCacheSizeSB->set_range (1, 3 * omp_get_num_procs()); #else @@ -602,32 +603,32 @@ Gtk::Widget* Preferences::getPerformancePanel () fclut->add (*clutCacheSizeHB); mainContainer->pack_start (*fclut, Gtk::PACK_SHRINK, 4); - Gtk::Frame* finspect = Gtk::manage( new Gtk::Frame (M("PREFERENCES_INSPECT_LABEL")) ); - Gtk::HBox* maxIBuffersHB = Gtk::manage( new Gtk::HBox () ); - maxIBuffersHB->set_spacing(4); - maxIBuffersHB->set_tooltip_text(M("PREFERENCES_INSPECT_MAXBUFFERS_TOOLTIP")); - Gtk::Label* maxIBufferLbl = Gtk::manage( new Gtk::Label (M("PREFERENCES_INSPECT_MAXBUFFERS_LABEL") + ":", Gtk::ALIGN_START)); - maxInspectorBuffersSB = Gtk::manage( new Gtk::SpinButton () ); + Gtk::Frame* finspect = Gtk::manage ( new Gtk::Frame (M ("PREFERENCES_INSPECT_LABEL")) ); + Gtk::HBox* maxIBuffersHB = Gtk::manage ( new Gtk::HBox () ); + maxIBuffersHB->set_spacing (4); + maxIBuffersHB->set_tooltip_text (M ("PREFERENCES_INSPECT_MAXBUFFERS_TOOLTIP")); + Gtk::Label* maxIBufferLbl = Gtk::manage ( new Gtk::Label (M ("PREFERENCES_INSPECT_MAXBUFFERS_LABEL") + ":", Gtk::ALIGN_START)); + maxInspectorBuffersSB = Gtk::manage ( new Gtk::SpinButton () ); maxInspectorBuffersSB->set_digits (0); maxInspectorBuffersSB->set_increments (1, 5); - maxInspectorBuffersSB->set_max_length(2); + maxInspectorBuffersSB->set_max_length (2); maxInspectorBuffersSB->set_range (1, 12); // ... we have to set a limit, 12 seem to be enough even for systems with tons of RAM maxIBuffersHB->pack_start (*maxIBufferLbl, Gtk::PACK_SHRINK, 0); maxIBuffersHB->pack_end (*maxInspectorBuffersSB, Gtk::PACK_SHRINK, 0); - finspect->add(*maxIBuffersHB); - mainContainer->pack_start(*finspect, Gtk::PACK_SHRINK, 4); + finspect->add (*maxIBuffersHB); + mainContainer->pack_start (*finspect, Gtk::PACK_SHRINK, 4); - Gtk::Frame* fdenoise = Gtk::manage( new Gtk::Frame (M("PREFERENCES_NOISE")) ); - Gtk::VBox* vbdenoise = Gtk::manage( new Gtk::VBox (Gtk::PACK_SHRINK, 4) ); + Gtk::Frame* fdenoise = Gtk::manage ( new Gtk::Frame (M ("PREFERENCES_NOISE")) ); + Gtk::VBox* vbdenoise = Gtk::manage ( new Gtk::VBox (Gtk::PACK_SHRINK, 4) ); - Gtk::Label* lreloadneeded2 = Gtk::manage (new Gtk::Label (M("PREFERENCES_IMG_RELOAD_NEEDED"), Gtk::ALIGN_START)); + Gtk::Label* lreloadneeded2 = Gtk::manage (new Gtk::Label (M ("PREFERENCES_IMG_RELOAD_NEEDED"), Gtk::ALIGN_START)); Gtk::HBox* threadLimitHB = Gtk::manage (new Gtk::HBox (Gtk::PACK_SHRINK, 4)); - threadLimitHB->set_tooltip_text(M("PREFERENCES_RGBDTL_TOOLTIP")); - Gtk::Label* RGBDTLl = Gtk::manage( new Gtk::Label (M("PREFERENCES_RGBDTL_LABEL") + ":", Gtk::ALIGN_START)); - rgbDenoiseTreadLimitSB = Gtk::manage( new Gtk::SpinButton () ); + threadLimitHB->set_tooltip_text (M ("PREFERENCES_RGBDTL_TOOLTIP")); + Gtk::Label* RGBDTLl = Gtk::manage ( new Gtk::Label (M ("PREFERENCES_RGBDTL_LABEL") + ":", Gtk::ALIGN_START)); + rgbDenoiseTreadLimitSB = Gtk::manage ( new Gtk::SpinButton () ); rgbDenoiseTreadLimitSB->set_digits (0); rgbDenoiseTreadLimitSB->set_increments (1, 5); - rgbDenoiseTreadLimitSB->set_max_length(2); // Will this be sufficient? :) + rgbDenoiseTreadLimitSB->set_max_length (2); // Will this be sufficient? :) #ifdef _OPENMP int maxThreadNumber = omp_get_max_threads(); #else @@ -637,40 +638,40 @@ Gtk::Widget* Preferences::getPerformancePanel () threadLimitHB->pack_start (*RGBDTLl, Gtk::PACK_SHRINK, 2); threadLimitHB->pack_end (*rgbDenoiseTreadLimitSB, Gtk::PACK_SHRINK, 2); - Gtk::Label* dnlab = Gtk::manage (new Gtk::Label (M("PREFERENCES_LEVDN") + ":", Gtk::ALIGN_START)); - Gtk::Label* dnautlab = Gtk::manage (new Gtk::Label (M("PREFERENCES_LEVAUTDN") + ":", Gtk::ALIGN_START)); - Gtk::Label* dnautsimpllab = Gtk::manage (new Gtk::Label (M("PREFERENCES_SIMPLAUT") + ":", Gtk::ALIGN_START)); - Gtk::Label* dntilab = Gtk::manage (new Gtk::Label (M("PREFERENCES_TINB") + ":", Gtk::ALIGN_START)); - Gtk::Label* dnwavlab = Gtk::manage (new Gtk::Label (M("PREFERENCES_WAVLEV") + ":", Gtk::ALIGN_START)); - Gtk::Label* dnlisslab = Gtk::manage (new Gtk::Label (M("PREFERENCES_LISS") + ":", Gtk::ALIGN_START)); + Gtk::Label* dnlab = Gtk::manage (new Gtk::Label (M ("PREFERENCES_LEVDN") + ":", Gtk::ALIGN_START)); + Gtk::Label* dnautlab = Gtk::manage (new Gtk::Label (M ("PREFERENCES_LEVAUTDN") + ":", Gtk::ALIGN_START)); + Gtk::Label* dnautsimpllab = Gtk::manage (new Gtk::Label (M ("PREFERENCES_SIMPLAUT") + ":", Gtk::ALIGN_START)); + Gtk::Label* dntilab = Gtk::manage (new Gtk::Label (M ("PREFERENCES_TINB") + ":", Gtk::ALIGN_START)); + Gtk::Label* dnwavlab = Gtk::manage (new Gtk::Label (M ("PREFERENCES_WAVLEV") + ":", Gtk::ALIGN_START)); + Gtk::Label* dnlisslab = Gtk::manage (new Gtk::Label (M ("PREFERENCES_LISS") + ":", Gtk::ALIGN_START)); dnv = Gtk::manage (new Gtk::ComboBoxText ()); - dnv->append (M("PREFERENCES_MIN")); - dnv->append (M("PREFERENCES_SMA")); - dnv->append (M("PREFERENCES_MED")); - dnv->append (M("PREFERENCES_MAX")); + dnv->append (M ("PREFERENCES_MIN")); + dnv->append (M ("PREFERENCES_SMA")); + dnv->append (M ("PREFERENCES_MED")); + dnv->append (M ("PREFERENCES_MAX")); dnaut = Gtk::manage (new Gtk::ComboBoxText ()); - dnaut->append (M("PREFERENCES_AUTLOW")); - dnaut->append (M("PREFERENCES_AUTSTD")); + dnaut->append (M ("PREFERENCES_AUTLOW")); + dnaut->append (M ("PREFERENCES_AUTSTD")); dnautsimpl = Gtk::manage (new Gtk::ComboBoxText ()); - dnautsimpl->append (M("PREFERENCES_STDAUT")); - dnautsimpl->append (M("PREFERENCES_EXPAUT")); + dnautsimpl->append (M ("PREFERENCES_STDAUT")); + dnautsimpl->append (M ("PREFERENCES_EXPAUT")); dnliss = Gtk::manage (new Gtk::ComboBoxText ()); - dnliss->append (M("PREFERENCES_AUTLISVLOW"));//very low - dnliss->append (M("PREFERENCES_AUTLISLOW"));//low - dnliss->append (M("PREFERENCES_AUTLISSTD"));//med - dnliss->append (M("PREFERENCES_AUTLISMAX"));//max + dnliss->append (M ("PREFERENCES_AUTLISVLOW")); //very low + dnliss->append (M ("PREFERENCES_AUTLISLOW")); //low + dnliss->append (M ("PREFERENCES_AUTLISSTD")); //med + dnliss->append (M ("PREFERENCES_AUTLISMAX")); //max dnti = Gtk::manage (new Gtk::ComboBoxText ()); - dnti->append (M("PREFERENCES_TISTD")); - dnti->append (M("PREFERENCES_TIMAX")); + dnti->append (M ("PREFERENCES_TISTD")); + dnti->append (M ("PREFERENCES_TIMAX")); dnwavlev = Gtk::manage (new Gtk::ComboBoxText ()); - dnwavlev->append (M("PREFERENCES_WLZER")); - dnwavlev->append (M("PREFERENCES_WLONE")); - dnwavlev->append (M("PREFERENCES_WLTWO")); + dnwavlev->append (M ("PREFERENCES_WLZER")); + dnwavlev->append (M ("PREFERENCES_WLONE")); + dnwavlev->append (M ("PREFERENCES_WLTWO")); Gtk::Table* colon = Gtk::manage (new Gtk::Table (6, 2)); colon->attach (*dnlab, 0, 1, 0, 1, Gtk::FILL, Gtk::SHRINK, 2, 2); @@ -688,10 +689,10 @@ Gtk::Widget* Preferences::getPerformancePanel () vbdenoise->pack_start (*lreloadneeded2, Gtk::PACK_SHRINK); vbdenoise->pack_start (*colon, Gtk::PACK_SHRINK); - vbdenoise->pack_start(*threadLimitHB, Gtk::PACK_SHRINK); + vbdenoise->pack_start (*threadLimitHB, Gtk::PACK_SHRINK); // <--- To be hard-coded and removed once tested - cbdaubech = Gtk::manage (new Gtk::CheckButton (M("PREFERENCES_DAUB_LABEL"), Gtk::ALIGN_START)); - cbdaubech->set_tooltip_markup (M("PREFERENCES_DAUB_TOOLTIP")); + cbdaubech = Gtk::manage (new Gtk::CheckButton (M ("PREFERENCES_DAUB_LABEL"), Gtk::ALIGN_START)); + cbdaubech->set_tooltip_markup (M ("PREFERENCES_DAUB_TOOLTIP")); // vbdenoise->pack_start (*cbdaubech, Gtk::PACK_SHRINK); // ---> fdenoise->add (*vbdenoise); @@ -706,10 +707,10 @@ Gtk::Widget* Preferences::getColorManagementPanel () Gtk::VBox* mvbcm = Gtk::manage (new Gtk::VBox ()); mvbcm->set_spacing (4); - iccDir = Gtk::manage (new Gtk::FileChooserButton (M("PREFERENCES_ICCDIR"), Gtk::FILE_CHOOSER_ACTION_SELECT_FOLDER)); - setExpandAlignProperties(iccDir, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); - Gtk::Label* pdlabel = Gtk::manage (new Gtk::Label (M("PREFERENCES_ICCDIR") + ":", Gtk::ALIGN_START)); - setExpandAlignProperties(pdlabel, false, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); + iccDir = Gtk::manage (new Gtk::FileChooserButton (M ("PREFERENCES_ICCDIR"), Gtk::FILE_CHOOSER_ACTION_SELECT_FOLDER)); + setExpandAlignProperties (iccDir, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); + Gtk::Label* pdlabel = Gtk::manage (new Gtk::Label (M ("PREFERENCES_ICCDIR") + ":", Gtk::ALIGN_START)); + setExpandAlignProperties (pdlabel, false, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); Gtk::Grid* iccdgrid = Gtk::manage (new Gtk::Grid ()); setExpandAlignProperties (iccdgrid, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_FILL); @@ -720,56 +721,57 @@ Gtk::Widget* Preferences::getColorManagementPanel () iccDir->signal_selection_changed ().connect (sigc::mem_fun (this, &Preferences::iccDirChanged)); - mvbcm->pack_start(*iccdgrid, Gtk::PACK_SHRINK); + mvbcm->pack_start (*iccdgrid, Gtk::PACK_SHRINK); //------------------------- MONITOR ---------------------- - Gtk::Frame* fmonitor = Gtk::manage( new Gtk::Frame (M("PREFERENCES_MONITOR")) ); - Gtk::Grid* gmonitor = Gtk::manage( new Gtk::Grid () ); + Gtk::Frame* fmonitor = Gtk::manage ( new Gtk::Frame (M ("PREFERENCES_MONITOR")) ); + Gtk::Grid* gmonitor = Gtk::manage ( new Gtk::Grid () ); gmonitor->set_column_spacing (4); monProfile = Gtk::manage (new Gtk::ComboBoxText ()); - setExpandAlignProperties(monProfile, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); - Gtk::Label* mplabel = Gtk::manage (new Gtk::Label (M("PREFERENCES_MONPROFILE") + ":", Gtk::ALIGN_START)); - setExpandAlignProperties(mplabel, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); + setExpandAlignProperties (monProfile, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); + Gtk::Label* mplabel = Gtk::manage (new Gtk::Label (M ("PREFERENCES_MONPROFILE") + ":", Gtk::ALIGN_START)); + setExpandAlignProperties (mplabel, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); monIntent = Gtk::manage (new Gtk::ComboBoxText ()); - setExpandAlignProperties(monIntent, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); - Gtk::Label* milabel = Gtk::manage (new Gtk::Label (M("PREFERENCES_MONINTENT")+":", Gtk::ALIGN_START)); - setExpandAlignProperties(milabel, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); + setExpandAlignProperties (monIntent, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); + Gtk::Label* milabel = Gtk::manage (new Gtk::Label (M ("PREFERENCES_MONINTENT") + ":", Gtk::ALIGN_START)); + setExpandAlignProperties (milabel, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); - monProfile->append (M("PREFERENCES_PROFILE_NONE")); + monProfile->append (M ("PREFERENCES_PROFILE_NONE")); monProfile->set_active (0); const std::vector profiles = rtengine::ICCStore::getInstance ()->getProfiles (rtengine::ICCStore::ProfileType::MONITOR); + for (const auto profile : profiles) { - if (profile.find("file:") != 0) { + if (profile.find ("file:") != 0) { monProfile->append (profile); } } // same order as the enum - monIntent->append (M("PREFERENCES_INTENT_PERCEPTUAL")); - monIntent->append (M("PREFERENCES_INTENT_RELATIVE")); - monIntent->append (M("PREFERENCES_INTENT_ABSOLUTE")); + monIntent->append (M ("PREFERENCES_INTENT_PERCEPTUAL")); + monIntent->append (M ("PREFERENCES_INTENT_RELATIVE")); + monIntent->append (M ("PREFERENCES_INTENT_ABSOLUTE")); monIntent->set_active (1); - monIntent->set_size_request(120, -1); + monIntent->set_size_request (120, -1); - monBPC = Gtk::manage (new Gtk::CheckButton (M("PREFERENCES_CMMBPC"))); - setExpandAlignProperties(monBPC, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); + monBPC = Gtk::manage (new Gtk::CheckButton (M ("PREFERENCES_CMMBPC"))); + setExpandAlignProperties (monBPC, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); monBPC->set_active (true); //#if defined(WIN32) // Auto-detection not implemented for Linux, see issue 851 - cbAutoMonProfile = Gtk::manage (new Gtk::CheckButton (M("PREFERENCES_AUTOMONPROFILE"))); - setExpandAlignProperties(cbAutoMonProfile, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); - autoMonProfileConn = cbAutoMonProfile->signal_toggled().connect (sigc::mem_fun(*this, &Preferences::autoMonProfileToggled)); + cbAutoMonProfile = Gtk::manage (new Gtk::CheckButton (M ("PREFERENCES_AUTOMONPROFILE"))); + setExpandAlignProperties (cbAutoMonProfile, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); + autoMonProfileConn = cbAutoMonProfile->signal_toggled().connect (sigc::mem_fun (*this, &Preferences::autoMonProfileToggled)); //#endif int row = 0; gmonitor->attach (*mplabel, 0, row, 1, 1); #if defined(__APPLE__) // monitor profile not supported on apple - Gtk::Label *osxwarn = Gtk::manage (new Gtk::Label (M("PREFERENCES_MONPROFILE_WARNOSX"), Gtk::ALIGN_START)); - setExpandAlignProperties(osxwarn, false, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_CENTER); + Gtk::Label *osxwarn = Gtk::manage (new Gtk::Label (M ("PREFERENCES_MONPROFILE_WARNOSX"), Gtk::ALIGN_START)); + setExpandAlignProperties (osxwarn, false, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_CENTER); gmonitor->attach (*osxwarn, 1, row, 1, 1); #else gmonitor->attach (*monProfile, 1, row, 1, 1); @@ -788,40 +790,42 @@ Gtk::Widget* Preferences::getColorManagementPanel () autoMonProfileToggled(); //#endif - fmonitor->add(*gmonitor); + fmonitor->add (*gmonitor); - mvbcm->pack_start(*fmonitor, Gtk::PACK_SHRINK); + mvbcm->pack_start (*fmonitor, Gtk::PACK_SHRINK); //------------------------- PRINTER ---------------------- - Gtk::Frame* fprinter = Gtk::manage( new Gtk::Frame (M("PREFERENCES_PRINTER")) ); - Gtk::Grid* gprinter = Gtk::manage( new Gtk::Grid () ); + Gtk::Frame* fprinter = Gtk::manage ( new Gtk::Frame (M ("PREFERENCES_PRINTER")) ); + Gtk::Grid* gprinter = Gtk::manage ( new Gtk::Grid () ); gprinter->set_column_spacing (4); prtProfile = Gtk::manage (new Gtk::ComboBoxText ()); - setExpandAlignProperties(prtProfile, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); - Gtk::Label* pplabel = Gtk::manage (new Gtk::Label (M("PREFERENCES_PRTPROFILE") + ":")); - setExpandAlignProperties(pplabel, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); + setExpandAlignProperties (prtProfile, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); + Gtk::Label* pplabel = Gtk::manage (new Gtk::Label (M ("PREFERENCES_PRTPROFILE") + ":")); + setExpandAlignProperties (pplabel, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); prtIntent = Gtk::manage (new Gtk::ComboBoxText ()); - setExpandAlignProperties(prtIntent, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); - Gtk::Label* pilabel = Gtk::manage (new Gtk::Label (M("PREFERENCES_PRTINTENT")+":")); - setExpandAlignProperties(pilabel, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); + setExpandAlignProperties (prtIntent, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); + Gtk::Label* pilabel = Gtk::manage (new Gtk::Label (M ("PREFERENCES_PRTINTENT") + ":")); + setExpandAlignProperties (pilabel, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); - prtProfile->append (M("PREFERENCES_PROFILE_NONE")); + prtProfile->append (M ("PREFERENCES_PROFILE_NONE")); prtProfile->set_active (0); const std::vector prtprofiles = rtengine::ICCStore::getInstance ()->getProfiles (rtengine::ICCStore::ProfileType::PRINTER); - for (const auto prtprofile : prtprofiles) + + for (const auto prtprofile : prtprofiles) { prtProfile->append (prtprofile); + } // same order as the enum - prtIntent->append (M("PREFERENCES_INTENT_PERCEPTUAL")); - prtIntent->append (M("PREFERENCES_INTENT_RELATIVE")); - prtIntent->append (M("PREFERENCES_INTENT_ABSOLUTE")); + prtIntent->append (M ("PREFERENCES_INTENT_PERCEPTUAL")); + prtIntent->append (M ("PREFERENCES_INTENT_RELATIVE")); + prtIntent->append (M ("PREFERENCES_INTENT_ABSOLUTE")); prtIntent->set_active (1); - prtBPC = Gtk::manage (new Gtk::CheckButton (M("PREFERENCES_CMMBPC"))); - setExpandAlignProperties(prtBPC, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); + prtBPC = Gtk::manage (new Gtk::CheckButton (M ("PREFERENCES_CMMBPC"))); + setExpandAlignProperties (prtBPC, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); prtBPC->set_active (true); row = 0; @@ -837,52 +841,52 @@ Gtk::Widget* Preferences::getColorManagementPanel () autoMonProfileToggled(); //#endif - fprinter->add(*gprinter); + fprinter->add (*gprinter); - mvbcm->pack_start(*fprinter, Gtk::PACK_SHRINK); + mvbcm->pack_start (*fprinter, Gtk::PACK_SHRINK); //------------------------- CIECAM ---------------------- - Gtk::Label* viewlab = Gtk::manage (new Gtk::Label (M("PREFERENCES_VIEW") + ":", Gtk::ALIGN_START)); - setExpandAlignProperties(viewlab, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); + Gtk::Label* viewlab = Gtk::manage (new Gtk::Label (M ("PREFERENCES_VIEW") + ":", Gtk::ALIGN_START)); + setExpandAlignProperties (viewlab, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); view = Gtk::manage (new Gtk::ComboBoxText ()); - setExpandAlignProperties(view, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); - view->append (M("PREFERENCES_D50")); - view->append (M("PREFERENCES_D55")); - view->append (M("PREFERENCES_D60")); - view->append (M("PREFERENCES_D65")); - view->append (M("PREFERENCES_BLACKBODY")); - view->append (M("PREFERENCES_FLUOF2")); - view->append (M("PREFERENCES_FLUOF7")); - view->append (M("PREFERENCES_FLUOF11")); + setExpandAlignProperties (view, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); + view->append (M ("PREFERENCES_D50")); + view->append (M ("PREFERENCES_D55")); + view->append (M ("PREFERENCES_D60")); + view->append (M ("PREFERENCES_D65")); + view->append (M ("PREFERENCES_BLACKBODY")); + view->append (M ("PREFERENCES_FLUOF2")); + view->append (M ("PREFERENCES_FLUOF7")); + view->append (M ("PREFERENCES_FLUOF11")); - Gtk::Label* greylab = Gtk::manage (new Gtk::Label (M("PREFERENCES_GREY") + ":", Gtk::ALIGN_START)); - setExpandAlignProperties(greylab, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); + Gtk::Label* greylab = Gtk::manage (new Gtk::Label (M ("PREFERENCES_GREY") + ":", Gtk::ALIGN_START)); + setExpandAlignProperties (greylab, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); grey = Gtk::manage (new Gtk::ComboBoxText ()); - setExpandAlignProperties(grey, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); - grey->append (M("PREFERENCES_GREY05")); - grey->append (M("PREFERENCES_GREY10")); - grey->append (M("PREFERENCES_GREY15")); - grey->append (M("PREFERENCES_GREY18")); - grey->append (M("PREFERENCES_GREY23")); - grey->append (M("PREFERENCES_GREY30")); - grey->append (M("PREFERENCES_GREY40")); + setExpandAlignProperties (grey, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); + grey->append (M ("PREFERENCES_GREY05")); + grey->append (M ("PREFERENCES_GREY10")); + grey->append (M ("PREFERENCES_GREY15")); + grey->append (M ("PREFERENCES_GREY18")); + grey->append (M ("PREFERENCES_GREY23")); + grey->append (M ("PREFERENCES_GREY30")); + grey->append (M ("PREFERENCES_GREY40")); - Gtk::Label* greySclab = Gtk::manage (new Gtk::Label (M("PREFERENCES_GREYSC") + ":", Gtk::ALIGN_START)); - setExpandAlignProperties(greySclab, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); + Gtk::Label* greySclab = Gtk::manage (new Gtk::Label (M ("PREFERENCES_GREYSC") + ":", Gtk::ALIGN_START)); + setExpandAlignProperties (greySclab, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); greySc = Gtk::manage (new Gtk::ComboBoxText ()); - setExpandAlignProperties(greySc, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); - greySc->append (M("PREFERENCES_GREYSCA")); - greySc->append (M("PREFERENCES_GREYSC18")); + setExpandAlignProperties (greySc, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); + greySc->append (M ("PREFERENCES_GREYSCA")); + greySc->append (M ("PREFERENCES_GREYSC18")); - Gtk::Frame* fcielab = Gtk::manage( new Gtk::Frame (M("PREFERENCES_CIEART_FRAME")) ); - setExpandAlignProperties(fcielab, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START); + Gtk::Frame* fcielab = Gtk::manage ( new Gtk::Frame (M ("PREFERENCES_CIEART_FRAME")) ); + setExpandAlignProperties (fcielab, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START); Gtk::Grid* colo = Gtk::manage (new Gtk::Grid ()); - setExpandAlignProperties(colo, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_FILL); - Gtk::Label* lreloadneeded1 = Gtk::manage (new Gtk::Label (M("PREFERENCES_IMG_RELOAD_NEEDED"), Gtk::ALIGN_START)); - setExpandAlignProperties(lreloadneeded1, true, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); + setExpandAlignProperties (colo, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_FILL); + Gtk::Label* lreloadneeded1 = Gtk::manage (new Gtk::Label (M ("PREFERENCES_IMG_RELOAD_NEEDED"), Gtk::ALIGN_START)); + setExpandAlignProperties (lreloadneeded1, true, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); colo->attach (*lreloadneeded1, 0, 0, 2, 1); colo->attach (*viewlab, 0, 1, 1, 1); colo->attach (*view, 1, 1, 1, 1); @@ -890,10 +894,10 @@ Gtk::Widget* Preferences::getColorManagementPanel () colo->attach (*grey, 1, 2, 1, 1); colo->attach (*greySclab, 0, 3, 1, 1); colo->attach (*greySc, 1, 3, 1, 1); - cbciecamfloat = Gtk::manage (new Gtk::CheckButton (M("PREFERENCES_CIEART_LABEL"))); - setExpandAlignProperties(cbciecamfloat, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); + cbciecamfloat = Gtk::manage (new Gtk::CheckButton (M ("PREFERENCES_CIEART_LABEL"))); + setExpandAlignProperties (cbciecamfloat, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); colo->attach (*cbciecamfloat, 0, 4, 2, 1); - cbciecamfloat->set_tooltip_markup (M("PREFERENCES_CIEART_TOOLTIP")); + cbciecamfloat->set_tooltip_markup (M ("PREFERENCES_CIEART_TOOLTIP")); fcielab->add (*colo); mvbcm->pack_start (*fcielab, Gtk::PACK_SHRINK, 4); @@ -904,96 +908,96 @@ Gtk::Widget* Preferences::getColorManagementPanel () Gtk::Widget* Preferences::getGeneralPanel () { - Gtk::Grid* mvbsd = Gtk::manage( new Gtk::Grid () ); - mvbsd->set_column_spacing(4); - mvbsd->set_row_spacing(4); + Gtk::Grid* mvbsd = Gtk::manage ( new Gtk::Grid () ); + mvbsd->set_column_spacing (4); + mvbsd->set_row_spacing (4); - Gtk::Frame* fworklflow = Gtk::manage (new Gtk::Frame (M("PREFERENCES_WORKFLOW"))); - setExpandAlignProperties(fworklflow, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START); + Gtk::Frame* fworklflow = Gtk::manage (new Gtk::Frame (M ("PREFERENCES_WORKFLOW"))); + setExpandAlignProperties (fworklflow, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START); Gtk::Grid* workflowGrid = Gtk::manage (new Gtk::Grid()); - workflowGrid->set_column_spacing(4); - workflowGrid->set_row_spacing(4); - setExpandAlignProperties(workflowGrid, false, false, Gtk::ALIGN_FILL, Gtk::ALIGN_FILL); + workflowGrid->set_column_spacing (4); + workflowGrid->set_row_spacing (4); + setExpandAlignProperties (workflowGrid, false, false, Gtk::ALIGN_FILL, Gtk::ALIGN_FILL); - Gtk::Label* flayoutlab = Gtk::manage (new Gtk::Label (M("PREFERENCES_EDITORLAYOUT") + ":")); - setExpandAlignProperties(flayoutlab, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE); + Gtk::Label* flayoutlab = Gtk::manage (new Gtk::Label (M ("PREFERENCES_EDITORLAYOUT") + ":")); + setExpandAlignProperties (flayoutlab, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE); editorLayout = Gtk::manage (new Gtk::ComboBoxText ()); - setExpandAlignProperties(editorLayout, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_BASELINE); - editorLayout->append (M("PREFERENCES_SINGLETAB")); - editorLayout->append (M("PREFERENCES_SINGLETABVERTAB")); - editorLayout->append (M("PREFERENCES_MULTITAB")); - editorLayout->append (M("PREFERENCES_MULTITABDUALMON")); + setExpandAlignProperties (editorLayout, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_BASELINE); + editorLayout->append (M ("PREFERENCES_SINGLETAB")); + editorLayout->append (M ("PREFERENCES_SINGLETABVERTAB")); + editorLayout->append (M ("PREFERENCES_MULTITAB")); + editorLayout->append (M ("PREFERENCES_MULTITABDUALMON")); editorLayout->set_active (2); - Gtk::CellRendererText* cellRenderer = dynamic_cast(editorLayout->get_first_cell()); + Gtk::CellRendererText* cellRenderer = dynamic_cast (editorLayout->get_first_cell()); cellRenderer->property_ellipsize() = Pango::ELLIPSIZE_MIDDLE; cellRenderer->property_ellipsize_set() = true; - editorLayout->signal_changed().connect (sigc::mem_fun(*this, &Preferences::layoutComboChanged)); + editorLayout->signal_changed().connect (sigc::mem_fun (*this, &Preferences::layoutComboChanged)); layoutComboChanged(); // update the tooltip - Gtk::Label* lNextStart = Gtk::manage( new Gtk::Label (Glib::ustring("(") + M("PREFERENCES_APPLNEXTSTARTUP") + ")") ); - setExpandAlignProperties(lNextStart, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE); - workflowGrid->attach_next_to(*flayoutlab, Gtk::POS_LEFT, 1, 1); - workflowGrid->attach_next_to(*editorLayout, *flayoutlab, Gtk::POS_RIGHT, 1, 1); - workflowGrid->attach_next_to(*lNextStart, *editorLayout, Gtk::POS_RIGHT, 1, 1); + Gtk::Label* lNextStart = Gtk::manage ( new Gtk::Label (Glib::ustring ("(") + M ("PREFERENCES_APPLNEXTSTARTUP") + ")") ); + setExpandAlignProperties (lNextStart, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE); + workflowGrid->attach_next_to (*flayoutlab, Gtk::POS_LEFT, 1, 1); + workflowGrid->attach_next_to (*editorLayout, *flayoutlab, Gtk::POS_RIGHT, 1, 1); + workflowGrid->attach_next_to (*lNextStart, *editorLayout, Gtk::POS_RIGHT, 1, 1); - Gtk::Label* curveBBoxPosL = Gtk::manage (new Gtk::Label (M("PREFERENCES_CURVEBBOXPOS") + ":")); - setExpandAlignProperties(curveBBoxPosL, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE); + Gtk::Label* curveBBoxPosL = Gtk::manage (new Gtk::Label (M ("PREFERENCES_CURVEBBOXPOS") + ":")); + setExpandAlignProperties (curveBBoxPosL, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE); curveBBoxPosC = Gtk::manage (new Gtk::ComboBoxText ()); - setExpandAlignProperties(curveBBoxPosC, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_BASELINE); - curveBBoxPosC->append (M("PREFERENCES_CURVEBBOXPOS_ABOVE")); - curveBBoxPosC->append (M("PREFERENCES_CURVEBBOXPOS_RIGHT")); - curveBBoxPosC->append (M("PREFERENCES_CURVEBBOXPOS_BELOW")); - curveBBoxPosC->append (M("PREFERENCES_CURVEBBOXPOS_LEFT")); + setExpandAlignProperties (curveBBoxPosC, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_BASELINE); + curveBBoxPosC->append (M ("PREFERENCES_CURVEBBOXPOS_ABOVE")); + curveBBoxPosC->append (M ("PREFERENCES_CURVEBBOXPOS_RIGHT")); + curveBBoxPosC->append (M ("PREFERENCES_CURVEBBOXPOS_BELOW")); + curveBBoxPosC->append (M ("PREFERENCES_CURVEBBOXPOS_LEFT")); curveBBoxPosC->set_active (1); - Gtk::Label* curveBBoxPosRestartL = Gtk::manage (new Gtk::Label (Glib::ustring("(") + M("PREFERENCES_APPLNEXTSTARTUP") + ")")); - setExpandAlignProperties(curveBBoxPosRestartL, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE); - workflowGrid->attach_next_to(*curveBBoxPosL, *flayoutlab, Gtk::POS_BOTTOM, 1, 1); - workflowGrid->attach_next_to(*curveBBoxPosC, *editorLayout, Gtk::POS_BOTTOM, 1, 1); - workflowGrid->attach_next_to(*curveBBoxPosRestartL, *lNextStart, Gtk::POS_BOTTOM, 1, 1); + Gtk::Label* curveBBoxPosRestartL = Gtk::manage (new Gtk::Label (Glib::ustring ("(") + M ("PREFERENCES_APPLNEXTSTARTUP") + ")")); + setExpandAlignProperties (curveBBoxPosRestartL, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE); + workflowGrid->attach_next_to (*curveBBoxPosL, *flayoutlab, Gtk::POS_BOTTOM, 1, 1); + workflowGrid->attach_next_to (*curveBBoxPosC, *editorLayout, Gtk::POS_BOTTOM, 1, 1); + workflowGrid->attach_next_to (*curveBBoxPosRestartL, *lNextStart, Gtk::POS_BOTTOM, 1, 1); - ckbHistogramPositionLeft = Gtk::manage( new Gtk::CheckButton (M("PREFERENCES_HISTOGRAMPOSITIONLEFT")) ); - setExpandAlignProperties(ckbHistogramPositionLeft, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE); - ckbHistogramWorking = Gtk::manage( new Gtk::CheckButton (M("PREFERENCES_HISTOGRAMWORKING")) ); - setExpandAlignProperties(ckbHistogramWorking, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE); - ckbHistogramWorking->set_tooltip_markup (M("PREFERENCES_HISTOGRAM_TOOLTIP")); - workflowGrid->attach_next_to(*ckbHistogramPositionLeft, *curveBBoxPosL, Gtk::POS_BOTTOM, 1, 1); - workflowGrid->attach_next_to(*ckbHistogramWorking, *curveBBoxPosC, Gtk::POS_BOTTOM, 2, 1); + ckbHistogramPositionLeft = Gtk::manage ( new Gtk::CheckButton (M ("PREFERENCES_HISTOGRAMPOSITIONLEFT")) ); + setExpandAlignProperties (ckbHistogramPositionLeft, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE); + ckbHistogramWorking = Gtk::manage ( new Gtk::CheckButton (M ("PREFERENCES_HISTOGRAMWORKING")) ); + setExpandAlignProperties (ckbHistogramWorking, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE); + ckbHistogramWorking->set_tooltip_markup (M ("PREFERENCES_HISTOGRAM_TOOLTIP")); + workflowGrid->attach_next_to (*ckbHistogramPositionLeft, *curveBBoxPosL, Gtk::POS_BOTTOM, 1, 1); + workflowGrid->attach_next_to (*ckbHistogramWorking, *curveBBoxPosC, Gtk::POS_BOTTOM, 2, 1); - ckbFileBrowserToolbarSingleRow = Gtk::manage( new Gtk::CheckButton (M("PREFERENCES_FILEBROWSERTOOLBARSINGLEROW")) ); - setExpandAlignProperties(ckbFileBrowserToolbarSingleRow, false, false, Gtk::ALIGN_START, Gtk::ALIGN_START); - ckbShowFilmStripToolBar = Gtk::manage( new Gtk::CheckButton (M("PREFERENCES_SHOWFILMSTRIPTOOLBAR")) ); - setExpandAlignProperties(ckbShowFilmStripToolBar, false, false, Gtk::ALIGN_START, Gtk::ALIGN_START); - workflowGrid->attach_next_to(*ckbFileBrowserToolbarSingleRow, *ckbHistogramPositionLeft, Gtk::POS_BOTTOM, 1, 1); - workflowGrid->attach_next_to(*ckbShowFilmStripToolBar, *ckbHistogramWorking, Gtk::POS_BOTTOM, 2, 1); + ckbFileBrowserToolbarSingleRow = Gtk::manage ( new Gtk::CheckButton (M ("PREFERENCES_FILEBROWSERTOOLBARSINGLEROW")) ); + setExpandAlignProperties (ckbFileBrowserToolbarSingleRow, false, false, Gtk::ALIGN_START, Gtk::ALIGN_START); + ckbShowFilmStripToolBar = Gtk::manage ( new Gtk::CheckButton (M ("PREFERENCES_SHOWFILMSTRIPTOOLBAR")) ); + setExpandAlignProperties (ckbShowFilmStripToolBar, false, false, Gtk::ALIGN_START, Gtk::ALIGN_START); + workflowGrid->attach_next_to (*ckbFileBrowserToolbarSingleRow, *ckbHistogramPositionLeft, Gtk::POS_BOTTOM, 1, 1); + workflowGrid->attach_next_to (*ckbShowFilmStripToolBar, *ckbHistogramWorking, Gtk::POS_BOTTOM, 2, 1); - Gtk::Label* hb4label = Gtk::manage( new Gtk::Label (M("PREFERENCES_TP_LABEL")) ); - setExpandAlignProperties(hb4label, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE); - ckbHideTPVScrollbar = Gtk::manage( new Gtk::CheckButton (M("PREFERENCES_TP_VSCROLLBAR")) ); - setExpandAlignProperties(ckbHideTPVScrollbar, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE); - ckbUseIconNoText = Gtk::manage( new Gtk::CheckButton (M("PREFERENCES_TP_USEICONORTEXT")) ); - setExpandAlignProperties(ckbUseIconNoText, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE); - workflowGrid->attach_next_to(*hb4label, *ckbFileBrowserToolbarSingleRow, Gtk::POS_BOTTOM, 1, 1); - workflowGrid->attach_next_to(*ckbHideTPVScrollbar, *hb4label, Gtk::POS_RIGHT, 1, 1); - workflowGrid->attach_next_to(*ckbUseIconNoText, *ckbHideTPVScrollbar, Gtk::POS_RIGHT, 1, 1); + Gtk::Label* hb4label = Gtk::manage ( new Gtk::Label (M ("PREFERENCES_TP_LABEL")) ); + setExpandAlignProperties (hb4label, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE); + ckbHideTPVScrollbar = Gtk::manage ( new Gtk::CheckButton (M ("PREFERENCES_TP_VSCROLLBAR")) ); + setExpandAlignProperties (ckbHideTPVScrollbar, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE); + ckbUseIconNoText = Gtk::manage ( new Gtk::CheckButton (M ("PREFERENCES_TP_USEICONORTEXT")) ); + setExpandAlignProperties (ckbUseIconNoText, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE); + workflowGrid->attach_next_to (*hb4label, *ckbFileBrowserToolbarSingleRow, Gtk::POS_BOTTOM, 1, 1); + workflowGrid->attach_next_to (*ckbHideTPVScrollbar, *hb4label, Gtk::POS_RIGHT, 1, 1); + workflowGrid->attach_next_to (*ckbUseIconNoText, *ckbHideTPVScrollbar, Gtk::POS_RIGHT, 1, 1); fworklflow->add (*workflowGrid); - mvbsd->attach_next_to(*fworklflow, Gtk::POS_TOP, 2, 1); + mvbsd->attach_next_to (*fworklflow, Gtk::POS_TOP, 2, 1); // --------------------------------------------- - Gtk::Frame* flang = Gtk::manage( new Gtk::Frame (M("PREFERENCES_DEFAULTLANG")) ); - setExpandAlignProperties(flang, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START); - Gtk::Grid* langGrid = Gtk::manage( new Gtk::Grid() ); - langGrid->set_column_spacing(4); - langGrid->set_row_spacing(4); - setExpandAlignProperties(langGrid, false, false, Gtk::ALIGN_FILL, Gtk::ALIGN_BASELINE); + Gtk::Frame* flang = Gtk::manage ( new Gtk::Frame (M ("PREFERENCES_DEFAULTLANG")) ); + setExpandAlignProperties (flang, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START); + Gtk::Grid* langGrid = Gtk::manage ( new Gtk::Grid() ); + langGrid->set_column_spacing (4); + langGrid->set_row_spacing (4); + setExpandAlignProperties (langGrid, false, false, Gtk::ALIGN_FILL, Gtk::ALIGN_BASELINE); - ckbLangAutoDetect = Gtk::manage( new Gtk::CheckButton (M("PREFERENCES_LANGAUTODETECT")) ); - setExpandAlignProperties(ckbLangAutoDetect, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE); + ckbLangAutoDetect = Gtk::manage ( new Gtk::CheckButton (M ("PREFERENCES_LANGAUTODETECT")) ); + setExpandAlignProperties (ckbLangAutoDetect, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE); - Gtk::Label* langlab = Gtk::manage( new Gtk::Label (M("PREFERENCES_SELECTLANG") + ":") ); - setExpandAlignProperties(langlab, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE); - languages = Gtk::manage( new Gtk::ComboBoxText () ); - setExpandAlignProperties(languages, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE); + Gtk::Label* langlab = Gtk::manage ( new Gtk::Label (M ("PREFERENCES_SELECTLANG") + ":") ); + setExpandAlignProperties (langlab, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE); + languages = Gtk::manage ( new Gtk::ComboBoxText () ); + setExpandAlignProperties (languages, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE); std::vector langs; parseDir (argv0 + "/languages", langs, ""); @@ -1004,214 +1008,216 @@ Gtk::Widget* Preferences::getGeneralPanel () } } - Gtk::Label* langw = Gtk::manage( new Gtk::Label (Glib::ustring(" (") + M("PREFERENCES_APPLNEXTSTARTUP") + ")") ); - setExpandAlignProperties(langw, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE); - langGrid->attach_next_to(*ckbLangAutoDetect, Gtk::POS_LEFT, 3, 1); - langGrid->attach_next_to(*langlab, *ckbLangAutoDetect, Gtk::POS_BOTTOM, 1, 1); - langGrid->attach_next_to(*languages, *langlab, Gtk::POS_RIGHT, 1, 1); - langGrid->attach_next_to(*langw, *languages, Gtk::POS_RIGHT, 1, 1); + Gtk::Label* langw = Gtk::manage ( new Gtk::Label (Glib::ustring (" (") + M ("PREFERENCES_APPLNEXTSTARTUP") + ")") ); + setExpandAlignProperties (langw, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE); + langGrid->attach_next_to (*ckbLangAutoDetect, Gtk::POS_LEFT, 3, 1); + langGrid->attach_next_to (*langlab, *ckbLangAutoDetect, Gtk::POS_BOTTOM, 1, 1); + langGrid->attach_next_to (*languages, *langlab, Gtk::POS_RIGHT, 1, 1); + langGrid->attach_next_to (*langw, *languages, Gtk::POS_RIGHT, 1, 1); flang->add (*langGrid); - mvbsd->attach_next_to(*flang, *fworklflow, Gtk::POS_BOTTOM, 2, 1); + mvbsd->attach_next_to (*flang, *fworklflow, Gtk::POS_BOTTOM, 2, 1); // --------------------------------------------- - Gtk::Frame* ftheme = Gtk::manage( new Gtk::Frame (M("PREFERENCES_DEFAULTTHEME")) ); - setExpandAlignProperties(ftheme, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START); - Gtk::Grid* themeGrid = Gtk::manage( new Gtk::Grid() ); - themeGrid->set_column_spacing(4); - themeGrid->set_row_spacing(4); - setExpandAlignProperties(themeGrid, false, false, Gtk::ALIGN_FILL, Gtk::ALIGN_FILL); + Gtk::Frame* ftheme = Gtk::manage ( new Gtk::Frame (M ("PREFERENCES_DEFAULTTHEME")) ); + setExpandAlignProperties (ftheme, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START); + Gtk::Grid* themeGrid = Gtk::manage ( new Gtk::Grid() ); + themeGrid->set_column_spacing (4); + themeGrid->set_row_spacing (4); + setExpandAlignProperties (themeGrid, false, false, Gtk::ALIGN_FILL, Gtk::ALIGN_FILL); - Gtk::Label* themelab = Gtk::manage( new Gtk::Label (M("PREFERENCES_SELECTTHEME") + ":") ); - setExpandAlignProperties(themelab, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE); - theme = Gtk::manage( new Gtk::ComboBoxText () ); - setExpandAlignProperties(theme, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE); + Gtk::Label* themelab = Gtk::manage ( new Gtk::Label (M ("PREFERENCES_SELECTTHEME") + ":") ); + setExpandAlignProperties (themelab, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE); + theme = Gtk::manage ( new Gtk::ComboBoxText () ); + setExpandAlignProperties (theme, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE); theme->set_active (0); - parseThemeDir (Glib::build_filename(argv0, "themes")); + parseThemeDir (Glib::build_filename (argv0, "themes")); for (size_t i = 0; i < themeFNames.size(); i++) { - theme->append (themeFNames.at(i).shortFName); + theme->append (themeFNames.at (i).shortFName); } - themeGrid->attach_next_to(*themelab, Gtk::POS_LEFT, 1, 1); - themeGrid->attach_next_to(*theme, *themelab, Gtk::POS_RIGHT, 1, 1); + themeGrid->attach_next_to (*themelab, Gtk::POS_LEFT, 1, 1); + themeGrid->attach_next_to (*theme, *themelab, Gtk::POS_RIGHT, 1, 1); + + Gtk::Label* fontlab = Gtk::manage ( new Gtk::Label (M ("PREFERENCES_SELECTFONT")) ); + setExpandAlignProperties (fontlab, false, false, Gtk::ALIGN_FILL, Gtk::ALIGN_BASELINE); + fontButton = Gtk::manage ( new Gtk::FontButton ()); + setExpandAlignProperties (fontButton, false, false, Gtk::ALIGN_FILL, Gtk::ALIGN_BASELINE); + fontButton->set_use_size (true); - Gtk::Label* fontlab = Gtk::manage( new Gtk::Label (M("PREFERENCES_SELECTFONT")) ); - setExpandAlignProperties(fontlab, false, false, Gtk::ALIGN_FILL, Gtk::ALIGN_BASELINE); - fontButton = Gtk::manage( new Gtk::FontButton ()); - setExpandAlignProperties(fontButton, false, false, Gtk::ALIGN_FILL, Gtk::ALIGN_BASELINE); - fontButton->set_use_size(true); if (options.fontFamily == "default") { - fontButton->set_font_name (Glib::ustring::compose("%1 %2", initialFontFamily, initialFontSize)); + fontButton->set_font_name (Glib::ustring::compose ("%1 %2", initialFontFamily, initialFontSize)); } else { - fontButton->set_font_name (Glib::ustring::compose("%1 %2", options.fontFamily, options.fontSize)); + fontButton->set_font_name (Glib::ustring::compose ("%1 %2", options.fontFamily, options.fontSize)); } - themeGrid->attach_next_to(*fontlab, *theme, Gtk::POS_RIGHT, 1, 1); - themeGrid->attach_next_to(*fontButton, *fontlab, Gtk::POS_RIGHT, 1, 1); + themeGrid->attach_next_to (*fontlab, *theme, Gtk::POS_RIGHT, 1, 1); + themeGrid->attach_next_to (*fontButton, *fontlab, Gtk::POS_RIGHT, 1, 1); + + Gtk::Label* cpfontlab = Gtk::manage ( new Gtk::Label (M ("PREFERENCES_SELECTFONT_COLPICKER") + ":") ); + setExpandAlignProperties (cpfontlab, false, false, Gtk::ALIGN_FILL, Gtk::ALIGN_BASELINE); + colorPickerFontButton = Gtk::manage ( new Gtk::FontButton ()); + setExpandAlignProperties (fontButton, false, false, Gtk::ALIGN_FILL, Gtk::ALIGN_BASELINE); + colorPickerFontButton->set_use_size (true); - Gtk::Label* cpfontlab = Gtk::manage( new Gtk::Label (M("PREFERENCES_SELECTFONT_COLPICKER") + ":") ); - setExpandAlignProperties(cpfontlab, false, false, Gtk::ALIGN_FILL, Gtk::ALIGN_BASELINE); - colorPickerFontButton = Gtk::manage( new Gtk::FontButton ()); - setExpandAlignProperties(fontButton, false, false, Gtk::ALIGN_FILL, Gtk::ALIGN_BASELINE); - colorPickerFontButton->set_use_size(true); if (options.fontFamily == "default") { - colorPickerFontButton->set_font_name (Glib::ustring::compose("%1 %2", initialFontFamily, initialFontSize)); + colorPickerFontButton->set_font_name (Glib::ustring::compose ("%1 %2", initialFontFamily, initialFontSize)); } else { - colorPickerFontButton->set_font_name (Glib::ustring::compose("%1 %2", options.CPFontFamily, options.CPFontSize)); + colorPickerFontButton->set_font_name (Glib::ustring::compose ("%1 %2", options.CPFontFamily, options.CPFontSize)); } - themeGrid->attach_next_to(*cpfontlab, *fontButton, Gtk::POS_RIGHT, 1, 1); - themeGrid->attach_next_to(*colorPickerFontButton, *cpfontlab, Gtk::POS_RIGHT, 1, 1); + themeGrid->attach_next_to (*cpfontlab, *fontButton, Gtk::POS_RIGHT, 1, 1); + themeGrid->attach_next_to (*colorPickerFontButton, *cpfontlab, Gtk::POS_RIGHT, 1, 1); - Gtk::Label* cutOverlayLabel = Gtk::manage( new Gtk::Label (M("PREFERENCES_CUTOVERLAYBRUSH") + ":") ); - setExpandAlignProperties(cutOverlayLabel, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE); - butCropCol = Gtk::manage( new Gtk::ColorButton() ); - setExpandAlignProperties(butCropCol, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); - butCropCol->set_use_alpha(true); - themeGrid->attach_next_to(*cutOverlayLabel, *themelab, Gtk::POS_BOTTOM, 1, 1); - themeGrid->attach_next_to(*butCropCol, *cutOverlayLabel, Gtk::POS_RIGHT, 1, 1); + Gtk::Label* cutOverlayLabel = Gtk::manage ( new Gtk::Label (M ("PREFERENCES_CUTOVERLAYBRUSH") + ":") ); + setExpandAlignProperties (cutOverlayLabel, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE); + butCropCol = Gtk::manage ( new Gtk::ColorButton() ); + setExpandAlignProperties (butCropCol, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); + butCropCol->set_use_alpha (true); + themeGrid->attach_next_to (*cutOverlayLabel, *themelab, Gtk::POS_BOTTOM, 1, 1); + themeGrid->attach_next_to (*butCropCol, *cutOverlayLabel, Gtk::POS_RIGHT, 1, 1); - Gtk::Label* navGuideLabel = Gtk::manage( new Gtk::Label (M("PREFERENCES_NAVGUIDEBRUSH") + ":") ); - setExpandAlignProperties(navGuideLabel, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE); - butNavGuideCol = Gtk::manage( new Gtk::ColorButton() ); - setExpandAlignProperties(butNavGuideCol, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); - butNavGuideCol->set_use_alpha(true); - themeGrid->attach_next_to(*navGuideLabel, *butCropCol, Gtk::POS_RIGHT, 2, 1); - themeGrid->attach_next_to(*butNavGuideCol, *navGuideLabel, Gtk::POS_RIGHT, 1, 1); + Gtk::Label* navGuideLabel = Gtk::manage ( new Gtk::Label (M ("PREFERENCES_NAVGUIDEBRUSH") + ":") ); + setExpandAlignProperties (navGuideLabel, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE); + butNavGuideCol = Gtk::manage ( new Gtk::ColorButton() ); + setExpandAlignProperties (butNavGuideCol, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); + butNavGuideCol->set_use_alpha (true); + themeGrid->attach_next_to (*navGuideLabel, *butCropCol, Gtk::POS_RIGHT, 2, 1); + themeGrid->attach_next_to (*butNavGuideCol, *navGuideLabel, Gtk::POS_RIGHT, 1, 1); ftheme->add (*themeGrid); - mvbsd->attach_next_to(*ftheme, *flang, Gtk::POS_BOTTOM, 2, 1); + mvbsd->attach_next_to (*ftheme, *flang, Gtk::POS_BOTTOM, 2, 1); // --------------------------------------------- - Gtk::Frame* fclip = Gtk::manage( new Gtk::Frame (M("PREFERENCES_CLIPPINGIND"))); - setExpandAlignProperties(fclip, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_FILL); - Gtk::Grid* clipGrid = Gtk::manage( new Gtk::Grid() ); - clipGrid->set_column_spacing(4); - clipGrid->set_row_spacing(4); - setExpandAlignProperties(clipGrid, false, false, Gtk::ALIGN_FILL, Gtk::ALIGN_FILL); + Gtk::Frame* fclip = Gtk::manage ( new Gtk::Frame (M ("PREFERENCES_CLIPPINGIND"))); + setExpandAlignProperties (fclip, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_FILL); + Gtk::Grid* clipGrid = Gtk::manage ( new Gtk::Grid() ); + clipGrid->set_column_spacing (4); + clipGrid->set_row_spacing (4); + setExpandAlignProperties (clipGrid, false, false, Gtk::ALIGN_FILL, Gtk::ALIGN_FILL); - Gtk::Label* hll = Gtk::manage( new Gtk::Label (M("PREFERENCES_HLTHRESHOLD") + ": ")); - setExpandAlignProperties(hll, true, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE); - hlThresh = Gtk::manage( new Gtk::SpinButton () ); - setExpandAlignProperties(hlThresh, false, false, Gtk::ALIGN_END, Gtk::ALIGN_BASELINE); + Gtk::Label* hll = Gtk::manage ( new Gtk::Label (M ("PREFERENCES_HLTHRESHOLD") + ": ")); + setExpandAlignProperties (hll, true, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE); + hlThresh = Gtk::manage ( new Gtk::SpinButton () ); + setExpandAlignProperties (hlThresh, false, false, Gtk::ALIGN_END, Gtk::ALIGN_BASELINE); hlThresh->set_digits (0); hlThresh->set_increments (1, 10); hlThresh->set_range (0, 255); - clipGrid->attach_next_to(*hll, Gtk::POS_LEFT, 1, 1); - clipGrid->attach_next_to(*hlThresh, *hll, Gtk::POS_RIGHT, 1, 1); + clipGrid->attach_next_to (*hll, Gtk::POS_LEFT, 1, 1); + clipGrid->attach_next_to (*hlThresh, *hll, Gtk::POS_RIGHT, 1, 1); - Gtk::Label* shl = Gtk::manage( new Gtk::Label (M("PREFERENCES_SHTHRESHOLD") + ": ") ); - setExpandAlignProperties(shl, true, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE); - shThresh = Gtk::manage( new Gtk::SpinButton () ); - setExpandAlignProperties(shThresh, false, false, Gtk::ALIGN_END, Gtk::ALIGN_BASELINE); + Gtk::Label* shl = Gtk::manage ( new Gtk::Label (M ("PREFERENCES_SHTHRESHOLD") + ": ") ); + setExpandAlignProperties (shl, true, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE); + shThresh = Gtk::manage ( new Gtk::SpinButton () ); + setExpandAlignProperties (shThresh, false, false, Gtk::ALIGN_END, Gtk::ALIGN_BASELINE); shThresh->show (); shThresh->set_digits (0); shThresh->set_increments (1, 10); shThresh->set_range (0, 255); - clipGrid->attach_next_to(*shl, *hll, Gtk::POS_BOTTOM, 1, 1); - clipGrid->attach_next_to(*shThresh, *shl, Gtk::POS_RIGHT, 1, 1); + clipGrid->attach_next_to (*shl, *hll, Gtk::POS_BOTTOM, 1, 1); + clipGrid->attach_next_to (*shThresh, *shl, Gtk::POS_RIGHT, 1, 1); fclip->add (*clipGrid); - mvbsd->attach_next_to(*fclip, *ftheme, Gtk::POS_BOTTOM, 1, 1); + mvbsd->attach_next_to (*fclip, *ftheme, Gtk::POS_BOTTOM, 1, 1); // --------------------------------------------- - Gtk::Frame* fnav = Gtk::manage( new Gtk::Frame (M("PREFERENCES_NAVIGATIONFRAME")) ); - setExpandAlignProperties(fclip, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_FILL); - Gtk::Grid* navigationGrid = Gtk::manage( new Gtk::Grid() ); - navigationGrid->set_column_spacing(4); - navigationGrid->set_row_spacing(4); - setExpandAlignProperties(fclip, false, false, Gtk::ALIGN_START, Gtk::ALIGN_FILL); + Gtk::Frame* fnav = Gtk::manage ( new Gtk::Frame (M ("PREFERENCES_NAVIGATIONFRAME")) ); + setExpandAlignProperties (fclip, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_FILL); + Gtk::Grid* navigationGrid = Gtk::manage ( new Gtk::Grid() ); + navigationGrid->set_column_spacing (4); + navigationGrid->set_row_spacing (4); + setExpandAlignProperties (fclip, false, false, Gtk::ALIGN_START, Gtk::ALIGN_FILL); - Gtk::Label* panFactorLabel = Gtk::manage( new Gtk::Label (M("PREFERENCES_PANFACTORLABEL") + ":", Gtk::ALIGN_START)); - setExpandAlignProperties(panFactorLabel, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE); - panFactor = Gtk::manage( new Gtk::SpinButton () ); - setExpandAlignProperties(panFactor, true, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE); + Gtk::Label* panFactorLabel = Gtk::manage ( new Gtk::Label (M ("PREFERENCES_PANFACTORLABEL") + ":", Gtk::ALIGN_START)); + setExpandAlignProperties (panFactorLabel, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE); + panFactor = Gtk::manage ( new Gtk::SpinButton () ); + setExpandAlignProperties (panFactor, true, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE); panFactor->set_digits (0); panFactor->set_increments (1, 5); panFactor->set_range (1, 10); - navigationGrid->attach_next_to(*panFactorLabel, Gtk::POS_LEFT, 1, 1); - navigationGrid->attach_next_to(*panFactor, *panFactorLabel, Gtk::POS_RIGHT, 1, 1); + navigationGrid->attach_next_to (*panFactorLabel, Gtk::POS_LEFT, 1, 1); + navigationGrid->attach_next_to (*panFactor, *panFactorLabel, Gtk::POS_RIGHT, 1, 1); - rememberZoomPanCheckbutton = Gtk::manage( new Gtk::CheckButton (M("PREFERENCES_REMEMBERZOOMPAN")) ); - setExpandAlignProperties(rememberZoomPanCheckbutton, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE); - rememberZoomPanCheckbutton->set_tooltip_text(M("PREFERENCES_REMEMBERZOOMPAN_TOOLTIP")); + rememberZoomPanCheckbutton = Gtk::manage ( new Gtk::CheckButton (M ("PREFERENCES_REMEMBERZOOMPAN")) ); + setExpandAlignProperties (rememberZoomPanCheckbutton, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE); + rememberZoomPanCheckbutton->set_tooltip_text (M ("PREFERENCES_REMEMBERZOOMPAN_TOOLTIP")); - navigationGrid->attach_next_to(*rememberZoomPanCheckbutton, *panFactorLabel, Gtk::POS_BOTTOM, 2, 1); + navigationGrid->attach_next_to (*rememberZoomPanCheckbutton, *panFactorLabel, Gtk::POS_BOTTOM, 2, 1); fnav->add (*navigationGrid); - mvbsd->attach_next_to(*fnav, *fclip, Gtk::POS_RIGHT, 1, 1); + mvbsd->attach_next_to (*fnav, *fclip, Gtk::POS_RIGHT, 1, 1); // --------------------------------------------- - Gtk::Frame* fdg = Gtk::manage( new Gtk::Frame (M("PREFERENCES_EXTERNALEDITOR")) ); - setExpandAlignProperties(fdg, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_FILL); - Gtk::Grid* externaleditorGrid = Gtk::manage( new Gtk::Grid() ); - externaleditorGrid->set_column_spacing(4); - externaleditorGrid->set_row_spacing(4); - setExpandAlignProperties(externaleditorGrid, false, false, Gtk::ALIGN_FILL, Gtk::ALIGN_FILL); + Gtk::Frame* fdg = Gtk::manage ( new Gtk::Frame (M ("PREFERENCES_EXTERNALEDITOR")) ); + setExpandAlignProperties (fdg, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_FILL); + Gtk::Grid* externaleditorGrid = Gtk::manage ( new Gtk::Grid() ); + externaleditorGrid->set_column_spacing (4); + externaleditorGrid->set_row_spacing (4); + setExpandAlignProperties (externaleditorGrid, false, false, Gtk::ALIGN_FILL, Gtk::ALIGN_FILL); - edOther = Gtk::manage( new Gtk::RadioButton (M("PREFERENCES_EDITORCMDLINE") + ":")); - setExpandAlignProperties(edOther, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); - editorToSendTo = Gtk::manage( new Gtk::Entry () ); - setExpandAlignProperties(editorToSendTo, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_BASELINE); + edOther = Gtk::manage ( new Gtk::RadioButton (M ("PREFERENCES_EDITORCMDLINE") + ":")); + setExpandAlignProperties (edOther, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); + editorToSendTo = Gtk::manage ( new Gtk::Entry () ); + setExpandAlignProperties (editorToSendTo, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_BASELINE); Gtk::RadioButton::Group ge = edOther->get_group(); #ifdef __APPLE__ - edGimp = Gtk::manage( new Gtk::RadioButton ("GIMP") ); - setExpandAlignProperties(edGimp, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); + edGimp = Gtk::manage ( new Gtk::RadioButton ("GIMP") ); + setExpandAlignProperties (edGimp, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); edGimp->set_group (ge); - externaleditorGrid->attach_next_to(*edGimp, Gtk::POS_TOP, 2, 1); + externaleditorGrid->attach_next_to (*edGimp, Gtk::POS_TOP, 2, 1); - edPS = Gtk::manage( new Gtk::RadioButton (M("PREFERENCES_PSPATH") + ":")); - setExpandAlignProperties(edPS, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); - psDir = Gtk::manage( new Gtk::FileChooserButton (M("PREFERENCES_PSPATH"), Gtk::FILE_CHOOSER_ACTION_SELECT_FOLDER) ); - setExpandAlignProperties(psDir, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); - externaleditorGrid->attach_next_to(*edPS, *edGimp, Gtk::POS_BOTTOM, 1, 1); - externaleditorGrid->attach_next_to(*psDir, *edPS, Gtk::POS_RIGHT, 1, 1); + edPS = Gtk::manage ( new Gtk::RadioButton (M ("PREFERENCES_PSPATH") + ":")); + setExpandAlignProperties (edPS, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); + psDir = Gtk::manage ( new Gtk::FileChooserButton (M ("PREFERENCES_PSPATH"), Gtk::FILE_CHOOSER_ACTION_SELECT_FOLDER) ); + setExpandAlignProperties (psDir, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); + externaleditorGrid->attach_next_to (*edPS, *edGimp, Gtk::POS_BOTTOM, 1, 1); + externaleditorGrid->attach_next_to (*psDir, *edPS, Gtk::POS_RIGHT, 1, 1); edPS->set_group (ge); - externaleditorGrid->attach_next_to(*edOther, *edPS, Gtk::POS_BOTTOM, 1, 1); - externaleditorGrid->attach_next_to(*editorToSendTo, *edOther, Gtk::POS_RIGHT, 1, 1); + externaleditorGrid->attach_next_to (*edOther, *edPS, Gtk::POS_BOTTOM, 1, 1); + externaleditorGrid->attach_next_to (*editorToSendTo, *edOther, Gtk::POS_RIGHT, 1, 1); #elif defined WIN32 - edGimp = Gtk::manage( new Gtk::RadioButton (M("PREFERENCES_GIMPPATH") + ":") ); - setExpandAlignProperties(edGimp, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); - gimpDir = Gtk::manage( new Gtk::FileChooserButton (M("PREFERENCES_GIMPPATH"), Gtk::FILE_CHOOSER_ACTION_SELECT_FOLDER) ); - setExpandAlignProperties(gimpDir, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); - externaleditorGrid->attach_next_to(*edGimp, Gtk::POS_TOP, 1, 1); - externaleditorGrid->attach_next_to(*gimpDir, *edGimp, Gtk::POS_RIGHT, 1, 1); + edGimp = Gtk::manage ( new Gtk::RadioButton (M ("PREFERENCES_GIMPPATH") + ":") ); + setExpandAlignProperties (edGimp, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); + gimpDir = Gtk::manage ( new Gtk::FileChooserButton (M ("PREFERENCES_GIMPPATH"), Gtk::FILE_CHOOSER_ACTION_SELECT_FOLDER) ); + setExpandAlignProperties (gimpDir, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); + externaleditorGrid->attach_next_to (*edGimp, Gtk::POS_TOP, 1, 1); + externaleditorGrid->attach_next_to (*gimpDir, *edGimp, Gtk::POS_RIGHT, 1, 1); edGimp->set_group (ge); - edPS = Gtk::manage( new Gtk::RadioButton (M("PREFERENCES_PSPATH") + ":") ); - setExpandAlignProperties(edPS, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); - psDir = Gtk::manage( new Gtk::FileChooserButton (M("PREFERENCES_PSPATH"), Gtk::FILE_CHOOSER_ACTION_SELECT_FOLDER) ); - setExpandAlignProperties(psDir, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); - externaleditorGrid->attach_next_to(*edPS, *edGimp, Gtk::POS_BOTTOM, 1, 1); - externaleditorGrid->attach_next_to(*psDir, *edPS, Gtk::POS_RIGHT, 1, 1); + edPS = Gtk::manage ( new Gtk::RadioButton (M ("PREFERENCES_PSPATH") + ":") ); + setExpandAlignProperties (edPS, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); + psDir = Gtk::manage ( new Gtk::FileChooserButton (M ("PREFERENCES_PSPATH"), Gtk::FILE_CHOOSER_ACTION_SELECT_FOLDER) ); + setExpandAlignProperties (psDir, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); + externaleditorGrid->attach_next_to (*edPS, *edGimp, Gtk::POS_BOTTOM, 1, 1); + externaleditorGrid->attach_next_to (*psDir, *edPS, Gtk::POS_RIGHT, 1, 1); edPS->set_group (ge); - externaleditorGrid->attach_next_to(*edOther, *edPS, Gtk::POS_BOTTOM, 1, 1); - externaleditorGrid->attach_next_to(*editorToSendTo, *edOther, Gtk::POS_RIGHT, 1, 1); + externaleditorGrid->attach_next_to (*edOther, *edPS, Gtk::POS_BOTTOM, 1, 1); + externaleditorGrid->attach_next_to (*editorToSendTo, *edOther, Gtk::POS_RIGHT, 1, 1); #else - edGimp = Gtk::manage( new Gtk::RadioButton ("GIMP") ); - setExpandAlignProperties(edGimp, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); - externaleditorGrid->attach_next_to(*edGimp, Gtk::POS_TOP, 2, 1); + edGimp = Gtk::manage ( new Gtk::RadioButton ("GIMP") ); + setExpandAlignProperties (edGimp, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); + externaleditorGrid->attach_next_to (*edGimp, Gtk::POS_TOP, 2, 1); edGimp->set_group (ge); - externaleditorGrid->attach_next_to(*edOther, *edGimp, Gtk::POS_BOTTOM, 1, 1); - externaleditorGrid->attach_next_to(*editorToSendTo, *edOther, Gtk::POS_RIGHT, 1, 1); + externaleditorGrid->attach_next_to (*edOther, *edGimp, Gtk::POS_BOTTOM, 1, 1); + externaleditorGrid->attach_next_to (*editorToSendTo, *edOther, Gtk::POS_RIGHT, 1, 1); #endif fdg->add (*externaleditorGrid); - mvbsd->attach_next_to(*fdg, *fclip, Gtk::POS_BOTTOM, 2, 1); + mvbsd->attach_next_to (*fdg, *fclip, Gtk::POS_BOTTOM, 2, 1); - langAutoDetectConn = ckbLangAutoDetect->signal_toggled().connect (sigc::mem_fun(*this, &Preferences::langAutoDetectToggled)); - tconn = theme->signal_changed().connect( sigc::mem_fun(*this, &Preferences::themeChanged) ); - fconn = fontButton->signal_font_set().connect( sigc::mem_fun(*this, &Preferences::fontChanged) ); - cpfconn = colorPickerFontButton->signal_font_set().connect( sigc::mem_fun(*this, &Preferences::cpFontChanged) ); + langAutoDetectConn = ckbLangAutoDetect->signal_toggled().connect (sigc::mem_fun (*this, &Preferences::langAutoDetectToggled)); + tconn = theme->signal_changed().connect ( sigc::mem_fun (*this, &Preferences::themeChanged) ); + fconn = fontButton->signal_font_set().connect ( sigc::mem_fun (*this, &Preferences::fontChanged) ); + cpfconn = colorPickerFontButton->signal_font_set().connect ( sigc::mem_fun (*this, &Preferences::cpFontChanged) ); return mvbsd; } @@ -1219,29 +1225,29 @@ Gtk::Widget* Preferences::getGeneralPanel () Gtk::Widget* Preferences::getFileBrowserPanel () { - Gtk::VBox* mvbfb = Gtk::manage( new Gtk::VBox () ); + Gtk::VBox* mvbfb = Gtk::manage ( new Gtk::VBox () ); - Gtk::Frame* fsd = Gtk::manage( new Gtk::Frame (M("PREFERENCES_STARTUPIMDIR")) ); + Gtk::Frame* fsd = Gtk::manage ( new Gtk::Frame (M ("PREFERENCES_STARTUPIMDIR")) ); - sdcurrent = Gtk::manage( new Gtk::RadioButton (M("PREFERENCES_DIRSOFTWARE")) ); - sdlast = Gtk::manage( new Gtk::RadioButton (M("PREFERENCES_DIRLAST")) ); - sdhome = Gtk::manage( new Gtk::RadioButton (M("PREFERENCES_DIRHOME")) ); - sdother = Gtk::manage( new Gtk::RadioButton (M("PREFERENCES_DIROTHER") + ": ") ); - startupdir = Gtk::manage( new Gtk::Entry () ); + sdcurrent = Gtk::manage ( new Gtk::RadioButton (M ("PREFERENCES_DIRSOFTWARE")) ); + sdlast = Gtk::manage ( new Gtk::RadioButton (M ("PREFERENCES_DIRLAST")) ); + sdhome = Gtk::manage ( new Gtk::RadioButton (M ("PREFERENCES_DIRHOME")) ); + sdother = Gtk::manage ( new Gtk::RadioButton (M ("PREFERENCES_DIROTHER") + ": ") ); + startupdir = Gtk::manage ( new Gtk::Entry () ); - Gtk::Button* sdselect = Gtk::manage( new Gtk::Button () ); - sdselect->set_image (*Gtk::manage(new RTImage ("gtk-open.png"))); + Gtk::Button* sdselect = Gtk::manage ( new Gtk::Button () ); + sdselect->set_image (*Gtk::manage (new RTImage ("gtk-open.png"))); Gtk::RadioButton::Group opts = sdcurrent->get_group(); sdlast->set_group (opts); sdhome->set_group (opts); sdother->set_group (opts); - Gtk::VBox* vbsd = Gtk::manage( new Gtk::VBox () ); + Gtk::VBox* vbsd = Gtk::manage ( new Gtk::VBox () ); vbsd->pack_start (*sdcurrent, Gtk::PACK_SHRINK, 0); vbsd->pack_start (*sdlast, Gtk::PACK_SHRINK, 0); vbsd->pack_start (*sdhome, Gtk::PACK_SHRINK, 0); - Gtk::HBox* otherbox = Gtk::manage( new Gtk::HBox () ); + Gtk::HBox* otherbox = Gtk::manage ( new Gtk::HBox () ); otherbox->pack_start (*sdother, Gtk::PACK_SHRINK); otherbox->pack_start (*startupdir); otherbox->pack_end (*sdselect, Gtk::PACK_SHRINK, 4); @@ -1250,29 +1256,29 @@ Gtk::Widget* Preferences::getFileBrowserPanel () fsd->add (*vbsd); mvbfb->pack_start (*fsd, Gtk::PACK_SHRINK, 4); - sdselect->signal_clicked().connect( sigc::mem_fun(*this, &Preferences::selectStartupDir) ); + sdselect->signal_clicked().connect ( sigc::mem_fun (*this, &Preferences::selectStartupDir) ); //--- - Gtk::Frame* fro = Gtk::manage( new Gtk::Frame (M("PREFERENCES_FBROWSEROPTS")) ); - showDateTime = Gtk::manage( new Gtk::CheckButton (M("PREFERENCES_SHOWDATETIME")) ); - showBasicExif = Gtk::manage( new Gtk::CheckButton (M("PREFERENCES_SHOWBASICEXIF")) ); - showExpComp = Gtk::manage( new Gtk::CheckButton (M("PREFERENCES_SHOWEXPOSURECOMPENSATION")) ); - Gtk::VBox* vbro = Gtk::manage( new Gtk::VBox () ); - Gtk::HBox* hbro1 = Gtk::manage( new Gtk::HBox () ); - Gtk::HBox* hbro0 = Gtk::manage( new Gtk::HBox () ); - overlayedFileNames = Gtk::manage( new Gtk::CheckButton (M("PREFERENCES_OVERLAY_FILENAMES")) ); - filmStripOverlayedFileNames = Gtk::manage( new Gtk::CheckButton (M("PREFERENCES_OVERLAY_FILENAMES_FILMSTRIP")) ); - sameThumbSize = Gtk::manage( new Gtk::CheckButton (M("PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT")) ); - sameThumbSize->set_tooltip_text(M("PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT_HINT")); - ckbInternalThumbIfUntouched = Gtk::manage( new Gtk::CheckButton (M("PREFERENCES_INTERNALTHUMBIFUNTOUCHED"))); + Gtk::Frame* fro = Gtk::manage ( new Gtk::Frame (M ("PREFERENCES_FBROWSEROPTS")) ); + showDateTime = Gtk::manage ( new Gtk::CheckButton (M ("PREFERENCES_SHOWDATETIME")) ); + showBasicExif = Gtk::manage ( new Gtk::CheckButton (M ("PREFERENCES_SHOWBASICEXIF")) ); + showExpComp = Gtk::manage ( new Gtk::CheckButton (M ("PREFERENCES_SHOWEXPOSURECOMPENSATION")) ); + Gtk::VBox* vbro = Gtk::manage ( new Gtk::VBox () ); + Gtk::HBox* hbro1 = Gtk::manage ( new Gtk::HBox () ); + Gtk::HBox* hbro0 = Gtk::manage ( new Gtk::HBox () ); + overlayedFileNames = Gtk::manage ( new Gtk::CheckButton (M ("PREFERENCES_OVERLAY_FILENAMES")) ); + filmStripOverlayedFileNames = Gtk::manage ( new Gtk::CheckButton (M ("PREFERENCES_OVERLAY_FILENAMES_FILMSTRIP")) ); + sameThumbSize = Gtk::manage ( new Gtk::CheckButton (M ("PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT")) ); + sameThumbSize->set_tooltip_text (M ("PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT_HINT")); + ckbInternalThumbIfUntouched = Gtk::manage ( new Gtk::CheckButton (M ("PREFERENCES_INTERNALTHUMBIFUNTOUCHED"))); vbro->pack_start (*showDateTime, Gtk::PACK_SHRINK, 0); - Gtk::Label* dflab = Gtk::manage( new Gtk::Label (M("PREFERENCES_DATEFORMAT") + ":", Gtk::ALIGN_START)); - dateformat = Gtk::manage( new Gtk::Entry () ); - dateformat->set_tooltip_markup (M("PREFERENCES_DATEFORMATHINT")); - dflab->set_tooltip_markup (M("PREFERENCES_DATEFORMATHINT")); + Gtk::Label* dflab = Gtk::manage ( new Gtk::Label (M ("PREFERENCES_DATEFORMAT") + ":", Gtk::ALIGN_START)); + dateformat = Gtk::manage ( new Gtk::Entry () ); + dateformat->set_tooltip_markup (M ("PREFERENCES_DATEFORMATHINT")); + dflab->set_tooltip_markup (M ("PREFERENCES_DATEFORMATHINT")); hbro0->pack_start (*dflab, Gtk::PACK_SHRINK, 4); hbro0->pack_start (*dateformat, Gtk::PACK_SHRINK, 0); @@ -1285,9 +1291,9 @@ Gtk::Widget* Preferences::getFileBrowserPanel () vbro->pack_start (*sameThumbSize, Gtk::PACK_SHRINK, 0); vbro->pack_start (*ckbInternalThumbIfUntouched, Gtk::PACK_SHRINK, 0); - Gtk::HBox* hbrecent = Gtk::manage( new Gtk::HBox () ); - Gtk::Label* labrecent = Gtk::manage( new Gtk::Label (M("PREFERENCES_MAXRECENTFOLDERS") + ":") ); - maxRecentFolders = Gtk::manage( new Gtk::SpinButton () ); + Gtk::HBox* hbrecent = Gtk::manage ( new Gtk::HBox () ); + Gtk::Label* labrecent = Gtk::manage ( new Gtk::Label (M ("PREFERENCES_MAXRECENTFOLDERS") + ":") ); + maxRecentFolders = Gtk::manage ( new Gtk::SpinButton () ); hbrecent->pack_start (*labrecent, Gtk::PACK_SHRINK, 4); hbrecent->pack_start (*maxRecentFolders, Gtk::PACK_SHRINK, 4); maxRecentFolders->set_digits (0); @@ -1298,13 +1304,13 @@ Gtk::Widget* Preferences::getFileBrowserPanel () fro->add (*vbro); - Gtk::Frame* frmnu = Gtk::manage( new Gtk::Frame (M("PREFERENCES_MENUOPTIONS")) ); - ckbmenuGroupRank = Gtk::manage( new Gtk::CheckButton (M("PREFERENCES_MENUGROUPRANK")) ); - ckbmenuGroupLabel = Gtk::manage( new Gtk::CheckButton (M("PREFERENCES_MENUGROUPLABEL")) ); - ckbmenuGroupFileOperations = Gtk::manage( new Gtk::CheckButton (M("PREFERENCES_MENUGROUPFILEOPERATIONS")) ); - ckbmenuGroupProfileOperations = Gtk::manage( new Gtk::CheckButton (M("PREFERENCES_MENUGROUPPROFILEOPERATIONS")) ); - ckbmenuGroupExtProg = Gtk::manage( new Gtk::CheckButton (M("PREFERENCES_MENUGROUPEXTPROGS")) ); - Gtk::VBox* vbmnu = Gtk::manage( new Gtk::VBox () ); + Gtk::Frame* frmnu = Gtk::manage ( new Gtk::Frame (M ("PREFERENCES_MENUOPTIONS")) ); + ckbmenuGroupRank = Gtk::manage ( new Gtk::CheckButton (M ("PREFERENCES_MENUGROUPRANK")) ); + ckbmenuGroupLabel = Gtk::manage ( new Gtk::CheckButton (M ("PREFERENCES_MENUGROUPLABEL")) ); + ckbmenuGroupFileOperations = Gtk::manage ( new Gtk::CheckButton (M ("PREFERENCES_MENUGROUPFILEOPERATIONS")) ); + ckbmenuGroupProfileOperations = Gtk::manage ( new Gtk::CheckButton (M ("PREFERENCES_MENUGROUPPROFILEOPERATIONS")) ); + ckbmenuGroupExtProg = Gtk::manage ( new Gtk::CheckButton (M ("PREFERENCES_MENUGROUPEXTPROGS")) ); + Gtk::VBox* vbmnu = Gtk::manage ( new Gtk::VBox () ); vbmnu->pack_start (*ckbmenuGroupRank, Gtk::PACK_SHRINK, 0); vbmnu->pack_start (*ckbmenuGroupLabel, Gtk::PACK_SHRINK, 0); @@ -1315,27 +1321,27 @@ Gtk::Widget* Preferences::getFileBrowserPanel () frmnu->add (*vbmnu); - Gtk::Frame* fre = Gtk::manage( new Gtk::Frame (M("PREFERENCES_PARSEDEXT")) ); - Gtk::VBox* vbre = Gtk::manage( new Gtk::VBox () ); - Gtk::HBox* hb0 = Gtk::manage( new Gtk::HBox () ); - Gtk::Label* elab = Gtk::manage( new Gtk::Label (M("PREFERENCES_PARSEDEXTADD") + ":") ); + Gtk::Frame* fre = Gtk::manage ( new Gtk::Frame (M ("PREFERENCES_PARSEDEXT")) ); + Gtk::VBox* vbre = Gtk::manage ( new Gtk::VBox () ); + Gtk::HBox* hb0 = Gtk::manage ( new Gtk::HBox () ); + Gtk::Label* elab = Gtk::manage ( new Gtk::Label (M ("PREFERENCES_PARSEDEXTADD") + ":") ); hb0->pack_start (*elab, Gtk::PACK_SHRINK, 4); - extension = Gtk::manage( new Gtk::Entry () ); - extension->set_width_chars(5); - extension->set_max_width_chars(5); + extension = Gtk::manage ( new Gtk::Entry () ); + extension->set_width_chars (5); + extension->set_max_width_chars (5); hb0->pack_start (*extension); - addExt = Gtk::manage( new Gtk::Button () ); - delExt = Gtk::manage( new Gtk::Button () ); - moveExtUp = Gtk::manage( new Gtk::Button () ); - moveExtDown = Gtk::manage( new Gtk::Button () ); - addExt->set_tooltip_text (M("PREFERENCES_PARSEDEXTADDHINT")); - delExt->set_tooltip_text (M("PREFERENCES_PARSEDEXTDELHINT")); - moveExtUp->set_tooltip_text (M("PREFERENCES_PARSEDEXTUPHINT")); - moveExtDown->set_tooltip_text (M("PREFERENCES_PARSEDEXTDOWNHINT")); - Gtk::Image* addExtImg = Gtk::manage( new RTImage ("list-add-small.png") ); - Gtk::Image* delExtImg = Gtk::manage( new RTImage ("list-remove-red-small.png") ); - Gtk::Image* moveExtUpImg = Gtk::manage( new RTImage ("arrow-up-small.png") ); - Gtk::Image* moveExtDownImg = Gtk::manage( new RTImage ("arrow-down-small.png") ); + addExt = Gtk::manage ( new Gtk::Button () ); + delExt = Gtk::manage ( new Gtk::Button () ); + moveExtUp = Gtk::manage ( new Gtk::Button () ); + moveExtDown = Gtk::manage ( new Gtk::Button () ); + addExt->set_tooltip_text (M ("PREFERENCES_PARSEDEXTADDHINT")); + delExt->set_tooltip_text (M ("PREFERENCES_PARSEDEXTDELHINT")); + moveExtUp->set_tooltip_text (M ("PREFERENCES_PARSEDEXTUPHINT")); + moveExtDown->set_tooltip_text (M ("PREFERENCES_PARSEDEXTDOWNHINT")); + Gtk::Image* addExtImg = Gtk::manage ( new RTImage ("list-add-small.png") ); + Gtk::Image* delExtImg = Gtk::manage ( new RTImage ("list-remove-red-small.png") ); + Gtk::Image* moveExtUpImg = Gtk::manage ( new RTImage ("arrow-up-small.png") ); + Gtk::Image* moveExtDownImg = Gtk::manage ( new RTImage ("arrow-down-small.png") ); addExt->add (*addExtImg); delExt->add (*delExtImg); moveExtUp->set_image (*moveExtUpImg); @@ -1344,27 +1350,27 @@ Gtk::Widget* Preferences::getFileBrowserPanel () hb0->pack_end (*moveExtUp, Gtk::PACK_SHRINK, 4); hb0->pack_end (*delExt, Gtk::PACK_SHRINK, 4); hb0->pack_end (*addExt, Gtk::PACK_SHRINK, 4); - extensions = Gtk::manage( new Gtk::TreeView () ); - Gtk::ScrolledWindow* hscrollw = Gtk::manage( new Gtk::ScrolledWindow () ); + extensions = Gtk::manage ( new Gtk::TreeView () ); + Gtk::ScrolledWindow* hscrollw = Gtk::manage ( new Gtk::ScrolledWindow () ); hscrollw->set_policy (Gtk::POLICY_AUTOMATIC, Gtk::POLICY_ALWAYS); hscrollw->add (*extensions); extensionModel = Gtk::ListStore::create (extensionColumns); extensions->set_model (extensionModel); - extensions->append_column_editable("Enabled", extensionColumns.enabled); - extensions->append_column("Extension", extensionColumns.ext); + extensions->append_column_editable ("Enabled", extensionColumns.enabled); + extensions->append_column ("Extension", extensionColumns.ext); extensions->set_headers_visible (false); vbre->pack_start (*hscrollw); vbre->pack_start (*hb0, Gtk::PACK_SHRINK, 4); fre->add (*vbre); - Gtk::Frame* frc = Gtk::manage( new Gtk::Frame (M("PREFERENCES_CACHEOPTS")) ); - Gtk::VBox* vbc = Gtk::manage( new Gtk::VBox () ); + Gtk::Frame* frc = Gtk::manage ( new Gtk::Frame (M ("PREFERENCES_CACHEOPTS")) ); + Gtk::VBox* vbc = Gtk::manage ( new Gtk::VBox () ); frc->add (*vbc); - Gtk::HBox* hb3 = Gtk::manage( new Gtk::HBox () ); - Gtk::Label* chlab = Gtk::manage( new Gtk::Label (M("PREFERENCES_CACHETHUMBHEIGHT") + ":") ); - maxThumbSize = Gtk::manage( new Gtk::SpinButton () ); + Gtk::HBox* hb3 = Gtk::manage ( new Gtk::HBox () ); + Gtk::Label* chlab = Gtk::manage ( new Gtk::Label (M ("PREFERENCES_CACHETHUMBHEIGHT") + ":") ); + maxThumbSize = Gtk::manage ( new Gtk::SpinButton () ); hb3->pack_start (*chlab, Gtk::PACK_SHRINK, 4); hb3->pack_start (*maxThumbSize, Gtk::PACK_SHRINK, 4); @@ -1373,9 +1379,9 @@ Gtk::Widget* Preferences::getFileBrowserPanel () maxThumbSize->set_range (40, 800); vbc->pack_start (*hb3, Gtk::PACK_SHRINK, 4); - Gtk::HBox* hb4 = Gtk::manage( new Gtk::HBox () ); - Gtk::Label* celab = Gtk::manage( new Gtk::Label (M("PREFERENCES_CACHEMAXENTRIES") + ":") ); - maxCacheEntries = Gtk::manage( new Gtk::SpinButton () ); + Gtk::HBox* hb4 = Gtk::manage ( new Gtk::HBox () ); + Gtk::Label* celab = Gtk::manage ( new Gtk::Label (M ("PREFERENCES_CACHEMAXENTRIES") + ":") ); + maxCacheEntries = Gtk::manage ( new Gtk::SpinButton () ); hb4->pack_start (*celab, Gtk::PACK_SHRINK, 4); hb4->pack_start (*maxCacheEntries, Gtk::PACK_SHRINK, 4); @@ -1384,24 +1390,24 @@ Gtk::Widget* Preferences::getFileBrowserPanel () maxCacheEntries->set_range (10, 100000); vbc->pack_start (*hb4, Gtk::PACK_SHRINK, 4); - Gtk::HBox* hb5 = Gtk::manage( new Gtk::HBox () ); - clearThumbnails = Gtk::manage( new Gtk::Button (M("PREFERENCES_CACHECLEARTHUMBS")) ); - clearProfiles = Gtk::manage( new Gtk::Button (M("PREFERENCES_CACHECLEARPROFILES")) ); - clearAll = Gtk::manage( new Gtk::Button (M("PREFERENCES_CACHECLEARALL")) ); + Gtk::HBox* hb5 = Gtk::manage ( new Gtk::HBox () ); + clearThumbnails = Gtk::manage ( new Gtk::Button (M ("PREFERENCES_CACHECLEARTHUMBS")) ); + clearProfiles = Gtk::manage ( new Gtk::Button (M ("PREFERENCES_CACHECLEARPROFILES")) ); + clearAll = Gtk::manage ( new Gtk::Button (M ("PREFERENCES_CACHECLEARALL")) ); hb5->pack_start (*clearThumbnails, Gtk::PACK_SHRINK, 4); hb5->pack_start (*clearProfiles, Gtk::PACK_SHRINK, 4); hb5->pack_start (*clearAll, Gtk::PACK_SHRINK, 4); vbc->pack_start (*hb5, Gtk::PACK_SHRINK, 4); - Gtk::HBox* hb6 = Gtk::manage( new Gtk::HBox () ); - Gtk::VBox* vb6 = Gtk::manage( new Gtk::VBox () ); + Gtk::HBox* hb6 = Gtk::manage ( new Gtk::HBox () ); + Gtk::VBox* vb6 = Gtk::manage ( new Gtk::VBox () ); vb6->pack_start (*fro); vb6->pack_start (*frmnu); vb6->pack_end (*frc); hb6->pack_start (*vb6); hb6->pack_start (*fre); - hb6->set_spacing(4); + hb6->set_spacing (4); mvbfb->pack_start (*hb6, Gtk::PACK_SHRINK, 4); @@ -1409,14 +1415,14 @@ Gtk::Widget* Preferences::getFileBrowserPanel () // mvbfb->pack_start (*fre); // mvbfb->pack_start (*frc, Gtk::PACK_SHRINK, 4); - addExt->signal_clicked().connect( sigc::mem_fun(*this, &Preferences::addExtPressed) ); - delExt->signal_clicked().connect( sigc::mem_fun(*this, &Preferences::delExtPressed) ); - moveExtUp->signal_clicked().connect( sigc::mem_fun(*this, &Preferences::moveExtUpPressed) ); - moveExtDown->signal_clicked().connect( sigc::mem_fun(*this, &Preferences::moveExtDownPressed) ); - extension->signal_activate().connect( sigc::mem_fun(*this, &Preferences::addExtPressed) ); - clearThumbnails->signal_clicked().connect( sigc::mem_fun(*this, &Preferences::clearThumbImagesPressed) ); - clearProfiles->signal_clicked().connect( sigc::mem_fun(*this, &Preferences::clearProfilesPressed) ); - clearAll->signal_clicked().connect( sigc::mem_fun(*this, &Preferences::clearAllPressed) ); + addExt->signal_clicked().connect ( sigc::mem_fun (*this, &Preferences::addExtPressed) ); + delExt->signal_clicked().connect ( sigc::mem_fun (*this, &Preferences::delExtPressed) ); + moveExtUp->signal_clicked().connect ( sigc::mem_fun (*this, &Preferences::moveExtUpPressed) ); + moveExtDown->signal_clicked().connect ( sigc::mem_fun (*this, &Preferences::moveExtDownPressed) ); + extension->signal_activate().connect ( sigc::mem_fun (*this, &Preferences::addExtPressed) ); + clearThumbnails->signal_clicked().connect ( sigc::mem_fun (*this, &Preferences::clearThumbImagesPressed) ); + clearProfiles->signal_clicked().connect ( sigc::mem_fun (*this, &Preferences::clearProfilesPressed) ); + clearAll->signal_clicked().connect ( sigc::mem_fun (*this, &Preferences::clearAllPressed) ); return mvbfb; } @@ -1425,20 +1431,20 @@ Gtk::Widget* Preferences::getSoundPanel () { Gtk::VBox* pSnd = new Gtk::VBox (); - ckbSndEnable = Gtk::manage( new Gtk::CheckButton (M("GENERAL_ENABLE"))); - sndEnableConn = ckbSndEnable->signal_toggled().connect (sigc::mem_fun(*this, &Preferences::sndEnableToggled)); + ckbSndEnable = Gtk::manage ( new Gtk::CheckButton (M ("GENERAL_ENABLE"))); + sndEnableConn = ckbSndEnable->signal_toggled().connect (sigc::mem_fun (*this, &Preferences::sndEnableToggled)); pSnd->pack_start (*ckbSndEnable, Gtk::PACK_SHRINK, 4); Gtk::HBox* hblSndHelp = Gtk::manage (new Gtk::HBox ()); - Gtk::Label* lSndHelp = Gtk::manage (new Gtk::Label (M("PREFERENCES_SND_HELP"))); + Gtk::Label* lSndHelp = Gtk::manage (new Gtk::Label (M ("PREFERENCES_SND_HELP"))); hblSndHelp->pack_start (*lSndHelp, Gtk::PACK_SHRINK, 4); pSnd->pack_start (*hblSndHelp, Gtk::PACK_SHRINK, 4); // BatchQueueDone - Gtk::HBox* pBatchQueueDone = Gtk::manage( new Gtk::HBox() ); + Gtk::HBox* pBatchQueueDone = Gtk::manage ( new Gtk::HBox() ); - Gtk::Label* lSndBatchQueueDone = Gtk::manage (new Gtk::Label (M("PREFERENCES_SND_BATCHQUEUEDONE") + Glib::ustring(":"))); + Gtk::Label* lSndBatchQueueDone = Gtk::manage (new Gtk::Label (M ("PREFERENCES_SND_BATCHQUEUEDONE") + Glib::ustring (":"))); pBatchQueueDone->pack_start (*lSndBatchQueueDone, Gtk::PACK_SHRINK, 4); txtSndBatchQueueDone = Gtk::manage (new Gtk::Entry()); @@ -1447,18 +1453,18 @@ Gtk::Widget* Preferences::getSoundPanel () pSnd->pack_start (*pBatchQueueDone, Gtk::PACK_SHRINK, 4); // LngEditProcDone - Gtk::HBox* pSndLngEditProcDone = Gtk::manage( new Gtk::HBox() ); + Gtk::HBox* pSndLngEditProcDone = Gtk::manage ( new Gtk::HBox() ); - Gtk::Label* lSndLngEditProcDone = Gtk::manage (new Gtk::Label (M("PREFERENCES_SND_LNGEDITPROCDONE") + Glib::ustring(":"))); + Gtk::Label* lSndLngEditProcDone = Gtk::manage (new Gtk::Label (M ("PREFERENCES_SND_LNGEDITPROCDONE") + Glib::ustring (":"))); pSndLngEditProcDone->pack_start (*lSndLngEditProcDone, Gtk::PACK_SHRINK, 4); txtSndLngEditProcDone = Gtk::manage (new Gtk::Entry()); pSndLngEditProcDone->pack_start (*txtSndLngEditProcDone, Gtk::PACK_EXPAND_WIDGET, 4); - Gtk::Label* lSndLngEditProcDoneSecs = Gtk::manage (new Gtk::Label (M("PREFERENCES_SND_TRESHOLDSECS") + Glib::ustring(":"))); + Gtk::Label* lSndLngEditProcDoneSecs = Gtk::manage (new Gtk::Label (M ("PREFERENCES_SND_TRESHOLDSECS") + Glib::ustring (":"))); pSndLngEditProcDone->pack_start (*lSndLngEditProcDoneSecs, Gtk::PACK_SHRINK, 12); - spbSndLngEditProcDoneSecs = Gtk::manage( new Gtk::SpinButton () ); + spbSndLngEditProcDoneSecs = Gtk::manage ( new Gtk::SpinButton () ); spbSndLngEditProcDoneSecs->set_digits (1); spbSndLngEditProcDoneSecs->set_increments (0.5, 1); spbSndLngEditProcDoneSecs->set_range (0, 10); @@ -1488,16 +1494,16 @@ void Preferences::parseDir (Glib::ustring dirname, std::vector& i } for (Glib::DirIterator i = dir->begin(); i != dir->end(); ++i) { - Glib::ustring fname = Glib::build_filename(dirname, *i); + Glib::ustring fname = Glib::build_filename (dirname, *i); Glib::ustring sname = *i; // ignore directories if (!Glib::file_test (fname, Glib::FILE_TEST_IS_DIR) && sname.size() >= ext.size() && sname.substr (sname.size() - ext.size(), ext.size()).casefold() == ext) { - items.push_back (sname.substr(0, sname.size() - ext.size())); + items.push_back (sname.substr (0, sname.size() - ext.size())); } } - std::sort(items.begin(), items.end()); + std::sort (items.begin(), items.end()); delete dir; } @@ -1518,37 +1524,41 @@ void Preferences::parseThemeDir (Glib::ustring dirname) } for (Glib::DirIterator i = dir->begin(); i != dir->end(); ++i) { - Glib::ustring fname = Glib::build_filename(dirname, *i); + Glib::ustring fname = Glib::build_filename (dirname, *i); Glib::ustring sname = *i; // ignore directories and filter out unsupported theme - if (regex->match(sname, matchInfo) && !Glib::file_test (fname, Glib::FILE_TEST_IS_DIR) && sname.size() >= 4) { + if (regex->match (sname, matchInfo) && !Glib::file_test (fname, Glib::FILE_TEST_IS_DIR) && sname.size() >= 4) { bool keepIt = false; - Glib::ustring fname2 = matchInfo.fetch(1); - Glib::ustring minMinor = matchInfo.fetch(2); - Glib::ustring maxMinor = matchInfo.fetch(3); + Glib::ustring fname2 = matchInfo.fetch (1); + Glib::ustring minMinor = matchInfo.fetch (2); + Glib::ustring maxMinor = matchInfo.fetch (3); if (!minMinor.empty()) { - guint64 minMinorVal = g_ascii_strtoll(minMinor.c_str(), 0, 0); + guint64 minMinorVal = g_ascii_strtoll (minMinor.c_str(), 0, 0); + if ((guint64)GTK_MINOR_VERSION >= minMinorVal) { keepIt = true; } } + if (!maxMinor.empty()) { - guint64 maxMinorVal = g_ascii_strtoll(maxMinor.c_str(), 0, 0); + guint64 maxMinorVal = g_ascii_strtoll (maxMinor.c_str(), 0, 0); + if ((guint64)GTK_MINOR_VERSION <= maxMinorVal) { keepIt = true; } } + if (keepIt) { - themeFNames.push_back(ThemeFilename(matchInfo.fetch(1), sname.substr(0, sname.size() - 4))); + themeFNames.push_back (ThemeFilename (matchInfo.fetch (1), sname.substr (0, sname.size() - 4))); } } } - std::sort(themeFNames.begin(), themeFNames.end(), [] (const ThemeFilename& firstDir, const ThemeFilename& secondDir) - { - return firstDir.longFName < secondDir.longFName; - }); + + std::sort (themeFNames.begin(), themeFNames.end(), [] (const ThemeFilename & firstDir, const ThemeFilename & secondDir) { + return firstDir.longFName < secondDir.longFName; + }); delete dir; } @@ -1585,7 +1595,7 @@ void Preferences::storePreferences () moptions.shadowThreshold = (int)shThresh->get_value (); moptions.language = languages->get_active_text (); moptions.languageAutoDetect = ckbLangAutoDetect->get_active (); - moptions.theme = themeFNames.at(theme->get_active_row_number ()).longFName; + moptions.theme = themeFNames.at (theme->get_active_row_number ()).longFName; Gdk::RGBA cropCol = butCropCol->get_rgba(); moptions.cutOverlayBrush[0] = cropCol.get_red(); @@ -1599,13 +1609,15 @@ void Preferences::storePreferences () moptions.navGuideBrush[2] = NavGuideCol.get_blue(); moptions.navGuideBrush[3] = butNavGuideCol->get_alpha() / 65535.0; - Pango::FontDescription fd(fontButton->get_font_name()); + Pango::FontDescription fd (fontButton->get_font_name()); + if (newFont) { moptions.fontFamily = fd.get_family(); moptions.fontSize = fd.get_size() / Pango::SCALE; } - Pango::FontDescription cpfd(colorPickerFontButton->get_font_name()); + Pango::FontDescription cpfd (colorPickerFontButton->get_font_name()); + if (newCPFont) { moptions.CPFontFamily = cpfd.get_family(); moptions.CPFontSize = cpfd.get_size() / Pango::SCALE; @@ -1639,45 +1651,54 @@ void Preferences::storePreferences () } moptions.CPBPath = txtCustProfBuilderPath->get_text(); - moptions.CPBKeys = CPBKeyType(custProfBuilderLabelType->get_active_row_number()); + moptions.CPBKeys = CPBKeyType (custProfBuilderLabelType->get_active_row_number()); if (!prtProfile->get_active_row_number()) { moptions.rtSettings.printerProfile = ""; } else { moptions.rtSettings.printerProfile = prtProfile->get_active_text (); } + switch (prtIntent->get_active_row_number ()) { - default: - case 0: - moptions.rtSettings.printerIntent = rtengine::RI_PERCEPTUAL; - break; - case 1: - moptions.rtSettings.printerIntent = rtengine::RI_RELATIVE; - break; - case 2: - moptions.rtSettings.printerIntent = rtengine::RI_ABSOLUTE; - break; + default: + case 0: + moptions.rtSettings.printerIntent = rtengine::RI_PERCEPTUAL; + break; + + case 1: + moptions.rtSettings.printerIntent = rtengine::RI_RELATIVE; + break; + + case 2: + moptions.rtSettings.printerIntent = rtengine::RI_ABSOLUTE; + break; } + moptions.rtSettings.printerBPC = prtBPC->get_active (); #if !defined(__APPLE__) // monitor profile not supported on apple + if (!monProfile->get_active_row_number()) { moptions.rtSettings.monitorProfile = ""; } else { moptions.rtSettings.monitorProfile = monProfile->get_active_text (); } + switch (monIntent->get_active_row_number ()) { - default: - case 0: - moptions.rtSettings.monitorIntent = rtengine::RI_PERCEPTUAL; - break; - case 1: - moptions.rtSettings.monitorIntent = rtengine::RI_RELATIVE; - break; - case 2: - moptions.rtSettings.monitorIntent = rtengine::RI_ABSOLUTE; - break; + default: + case 0: + moptions.rtSettings.monitorIntent = rtengine::RI_PERCEPTUAL; + break; + + case 1: + moptions.rtSettings.monitorIntent = rtengine::RI_RELATIVE; + break; + + case 2: + moptions.rtSettings.monitorIntent = rtengine::RI_ABSOLUTE; + break; } + moptions.rtSettings.monitorBPC = monBPC->get_active (); //#if defined(WIN32) moptions.rtSettings.autoMonitorProfile = cbAutoMonProfile->get_active (); @@ -1785,9 +1806,9 @@ void Preferences::fillPreferences () sconn.block (true); dfconn.block (true); ffconn.block (true); - rpconn.block(true); - ipconn.block(true); - bpconn.block(true); + rpconn.block (true); + ipconn.block (true); + bpconn.block (true); rprofiles->setActiveRowFromFullPath (moptions.defProfRaw); forRAWComboChanged(); // update the tooltip @@ -1796,40 +1817,48 @@ void Preferences::fillPreferences () dateformat->set_text (moptions.dateFormat); panFactor->set_value (moptions.panAccelFactor); rememberZoomPanCheckbutton->set_active (moptions.rememberZoomAndPan); - ctiffserialize->set_active(moptions.serializeTiffRead); + ctiffserialize->set_active (moptions.serializeTiffRead); setActiveTextOrIndex (*prtProfile, moptions.rtSettings.printerProfile, 0); + switch (moptions.rtSettings.printerIntent) { - default: - case rtengine::RI_PERCEPTUAL: - prtIntent->set_active (0); - break; - case rtengine::RI_RELATIVE: - prtIntent->set_active (1); - break; - case rtengine::RI_ABSOLUTE: - prtIntent->set_active (2); - break; + default: + case rtengine::RI_PERCEPTUAL: + prtIntent->set_active (0); + break; + + case rtengine::RI_RELATIVE: + prtIntent->set_active (1); + break; + + case rtengine::RI_ABSOLUTE: + prtIntent->set_active (2); + break; } + prtBPC->set_active (moptions.rtSettings.printerBPC); #if !defined(__APPLE__) // monitor profile not supported on apple setActiveTextOrIndex (*monProfile, moptions.rtSettings.monitorProfile, 0); + switch (moptions.rtSettings.monitorIntent) { - default: - case rtengine::RI_PERCEPTUAL: - monIntent->set_active (0); - break; - case rtengine::RI_RELATIVE: - monIntent->set_active (1); - break; - case rtengine::RI_ABSOLUTE: - monIntent->set_active (2); - break; + default: + case rtengine::RI_PERCEPTUAL: + monIntent->set_active (0); + break; + + case rtengine::RI_RELATIVE: + monIntent->set_active (1); + break; + + case rtengine::RI_ABSOLUTE: + monIntent->set_active (2); + break; } + monBPC->set_active (moptions.rtSettings.monitorBPC); //#if defined(WIN32) - cbAutoMonProfile->set_active(moptions.rtSettings.autoMonitorProfile); + cbAutoMonProfile->set_active (moptions.rtSettings.autoMonitorProfile); //#endif #endif @@ -1854,39 +1883,39 @@ void Preferences::fillPreferences () ckbHistogramWorking->set_active (moptions.rtSettings.HistogramWorking); languages->set_active_text (moptions.language); ckbLangAutoDetect->set_active (moptions.languageAutoDetect); - int themeNbr = getThemeRowNumber(moptions.theme); - theme->set_active (themeNbr==-1 ? 0 : themeNbr); + int themeNbr = getThemeRowNumber (moptions.theme); + theme->set_active (themeNbr == -1 ? 0 : themeNbr); Gdk::RGBA cropCol; - cropCol.set_rgba(moptions.cutOverlayBrush[0], moptions.cutOverlayBrush[1], moptions.cutOverlayBrush[2]); - butCropCol->set_rgba(cropCol); - butCropCol->set_alpha ( (unsigned short)(moptions.cutOverlayBrush[3] * 65535.0)); + cropCol.set_rgba (moptions.cutOverlayBrush[0], moptions.cutOverlayBrush[1], moptions.cutOverlayBrush[2]); + butCropCol->set_rgba (cropCol); + butCropCol->set_alpha ( (unsigned short) (moptions.cutOverlayBrush[3] * 65535.0)); Gdk::RGBA NavGuideCol; - NavGuideCol.set_rgba(moptions.navGuideBrush[0], moptions.navGuideBrush[1], moptions.navGuideBrush[2]); - butNavGuideCol->set_rgba(NavGuideCol); - butNavGuideCol->set_alpha ( (unsigned short)(moptions.navGuideBrush[3] * 65535.0)); + NavGuideCol.set_rgba (moptions.navGuideBrush[0], moptions.navGuideBrush[1], moptions.navGuideBrush[2]); + butNavGuideCol->set_rgba (NavGuideCol); + butNavGuideCol->set_alpha ( (unsigned short) (moptions.navGuideBrush[3] * 65535.0)); if (options.fontFamily == "default") { - fontButton->set_font_name (Glib::ustring::compose("%1 %2", initialFontFamily, initialFontSize)); + fontButton->set_font_name (Glib::ustring::compose ("%1 %2", initialFontFamily, initialFontSize)); } else { - fontButton->set_font_name (Glib::ustring::compose("%1 %2", options.fontFamily, options.fontSize)); + fontButton->set_font_name (Glib::ustring::compose ("%1 %2", options.fontFamily, options.fontSize)); } if (options.CPFontFamily == "default") { - colorPickerFontButton->set_font_name (Glib::ustring::compose("%1 %2", initialFontFamily, initialFontSize)); + colorPickerFontButton->set_font_name (Glib::ustring::compose ("%1 %2", initialFontFamily, initialFontSize)); } else { - colorPickerFontButton->set_font_name (Glib::ustring::compose("%1 %2", options.CPFontFamily, options.CPFontSize)); + colorPickerFontButton->set_font_name (Glib::ustring::compose ("%1 %2", options.CPFontFamily, options.CPFontSize)); } showDateTime->set_active (moptions.fbShowDateTime); showBasicExif->set_active (moptions.fbShowBasicExif); showExpComp->set_active (moptions.fbShowExpComp); - ckbmenuGroupRank->set_active(moptions.menuGroupRank); - ckbmenuGroupLabel->set_active(moptions.menuGroupLabel); - ckbmenuGroupFileOperations->set_active(moptions.menuGroupFileOperations); - ckbmenuGroupProfileOperations->set_active(moptions.menuGroupProfileOperations); - ckbmenuGroupExtProg->set_active(moptions.menuGroupExtProg); + ckbmenuGroupRank->set_active (moptions.menuGroupRank); + ckbmenuGroupLabel->set_active (moptions.menuGroupLabel); + ckbmenuGroupFileOperations->set_active (moptions.menuGroupFileOperations); + ckbmenuGroupProfileOperations->set_active (moptions.menuGroupProfileOperations); + ckbmenuGroupExtProg->set_active (moptions.menuGroupExtProg); hlThresh->set_value (moptions.highlightThreshold); shThresh->set_value (moptions.shadowThreshold); @@ -1920,8 +1949,8 @@ void Preferences::fillPreferences () #endif editorToSendTo->set_text (moptions.customEditorProg); - txtCustProfBuilderPath->set_text(moptions.CPBPath); - custProfBuilderLabelType->set_active(moptions.CPBKeys); + txtCustProfBuilderPath->set_text (moptions.CPBPath); + custProfBuilderLabelType->set_active (moptions.CPBKeys); if (moptions.startupDir == STARTUPDIR_CURRENT) { @@ -1938,20 +1967,20 @@ void Preferences::fillPreferences () extensionModel->clear (); for (size_t i = 0; i < moptions.parseExtensions.size(); i++) { - Gtk::TreeRow row = *(extensionModel->append()); + Gtk::TreeRow row = * (extensionModel->append()); row[extensionColumns.enabled] = moptions.parseExtensionsEnabled[i]; row[extensionColumns.ext] = moptions.parseExtensions[i]; } maxThumbSize->set_value (moptions.maxThumbnailHeight); - maxRecentFolders->set_value(moptions.maxRecentFolders); + maxRecentFolders->set_value (moptions.maxRecentFolders); maxCacheEntries->set_value (moptions.maxCacheEntries); overlayedFileNames->set_active (moptions.overlayedFileNames); - filmStripOverlayedFileNames->set_active(moptions.filmStripOverlayedFileNames); - sameThumbSize->set_active(moptions.sameThumbSize); - ckbInternalThumbIfUntouched->set_active(moptions.internalThumbIfUntouched); + filmStripOverlayedFileNames->set_active (moptions.filmStripOverlayedFileNames); + sameThumbSize->set_active (moptions.sameThumbSize); + ckbInternalThumbIfUntouched->set_active (moptions.internalThumbIfUntouched); - saveParamsPreference->set_active(moptions.saveParamsFile ? (moptions.saveParamsCache ? 2 : 0) : 1); + saveParamsPreference->set_active (moptions.saveParamsFile ? (moptions.saveParamsCache ? 2 : 0) : 1); loadParamsPreference->set_active (moptions.paramsLoadLocation); useBundledProfiles->set_active (moptions.useBundledProfiles); @@ -1959,30 +1988,30 @@ void Preferences::fillPreferences () ckbTunnelMetaData->set_active (moptions.tunnelMetaData); if (!moptions.tabbedUI) { - editorLayout->set_active(moptions.mainNBVertical ? 1 : 0); + editorLayout->set_active (moptions.mainNBVertical ? 1 : 0); } else { - editorLayout->set_active(moptions.multiDisplayMode ? 3 : 2); + editorLayout->set_active (moptions.multiDisplayMode ? 3 : 2); } - curveBBoxPosC->set_active(moptions.curvebboxpos); - ckbHistogramPositionLeft->set_active(moptions.histogramPosition == 1); + curveBBoxPosC->set_active (moptions.curvebboxpos); + ckbHistogramPositionLeft->set_active (moptions.histogramPosition == 1); // ckbHistogramWorking->set_active(moptions.histogramWorking==1); - ckbFileBrowserToolbarSingleRow->set_active(moptions.FileBrowserToolbarSingleRow); - ckbShowFilmStripToolBar->set_active(moptions.showFilmStripToolBar); - ckbHideTPVScrollbar->set_active(moptions.hideTPVScrollbar); - ckbUseIconNoText->set_active(moptions.UseIconNoText); + ckbFileBrowserToolbarSingleRow->set_active (moptions.FileBrowserToolbarSingleRow); + ckbShowFilmStripToolBar->set_active (moptions.showFilmStripToolBar); + ckbHideTPVScrollbar->set_active (moptions.hideTPVScrollbar); + ckbUseIconNoText->set_active (moptions.UseIconNoText); - rgbDenoiseTreadLimitSB->set_value(moptions.rgbDenoiseThreadLimit); - clutCacheSizeSB->set_value(moptions.clutCacheSize); - maxInspectorBuffersSB->set_value(moptions.maxInspectorBuffers); + rgbDenoiseTreadLimitSB->set_value (moptions.rgbDenoiseThreadLimit); + clutCacheSizeSB->set_value (moptions.clutCacheSize); + maxInspectorBuffersSB->set_value (moptions.maxInspectorBuffers); - darkFrameDir->set_current_folder( moptions.rtSettings.darkFramesPath ); + darkFrameDir->set_current_folder ( moptions.rtSettings.darkFramesPath ); darkFrameChanged (); - flatFieldDir->set_current_folder( moptions.rtSettings.flatFieldsPath ); + flatFieldDir->set_current_folder ( moptions.rtSettings.flatFieldsPath ); flatFieldChanged (); - clutsDir->set_current_folder( moptions.clutsDir ); + clutsDir->set_current_folder ( moptions.clutsDir ); addc.block (true); setc.block (true); @@ -2006,9 +2035,9 @@ void Preferences::fillPreferences () sconn.block (false); dfconn.block (false); ffconn.block (false); - rpconn.block(true); - ipconn.block(true); - bpconn.block(false); + rpconn.block (true); + ipconn.block (true); + bpconn.block (false); chOverwriteOutputFile->set_active (moptions.overwriteOutputFile); @@ -2039,7 +2068,7 @@ void Preferences::savePressed () { //#if defined(WIN32) void Preferences::autoMonProfileToggled () { - monProfile->set_sensitive(!cbAutoMonProfile->get_active()); + monProfile->set_sensitive (!cbAutoMonProfile->get_active()); } //#endif /* @@ -2049,14 +2078,14 @@ void Preferences::autocielabToggled () { */ void Preferences::sndEnableToggled () { - txtSndBatchQueueDone->set_sensitive(ckbSndEnable->get_active()); - txtSndLngEditProcDone->set_sensitive(ckbSndEnable->get_active()); - spbSndLngEditProcDoneSecs->set_sensitive(ckbSndEnable->get_active()); + txtSndBatchQueueDone->set_sensitive (ckbSndEnable->get_active()); + txtSndLngEditProcDone->set_sensitive (ckbSndEnable->get_active()); + spbSndLngEditProcDoneSecs->set_sensitive (ckbSndEnable->get_active()); } void Preferences::langAutoDetectToggled () { - languages->set_sensitive(!ckbLangAutoDetect->get_active()); + languages->set_sensitive (!ckbLangAutoDetect->get_active()); } void Preferences::okPressed () @@ -2066,12 +2095,14 @@ void Preferences::okPressed () workflowUpdate(); options.copyFrom (&moptions); options.filterOutParsedExtensions(); + try { Options::save (); } catch (Options::Error &e) { - Gtk::MessageDialog msgd(getToplevelWindow(this), e.get_msg(), true, Gtk::MESSAGE_WARNING, Gtk::BUTTONS_CLOSE, true); + Gtk::MessageDialog msgd (getToplevelWindow (this), e.get_msg(), true, Gtk::MESSAGE_WARNING, Gtk::BUTTONS_CLOSE, true); msgd.run(); } + dynProfilePanel->save(); hide (); } @@ -2079,29 +2110,30 @@ void Preferences::okPressed () void Preferences::cancelPressed () { // set the initial theme back - if (themeFNames.at(theme->get_active_row_number ()).longFName != options.theme) { - rtengine::setPaths(options); + if (themeFNames.at (theme->get_active_row_number ()).longFName != options.theme) { + rtengine::setPaths (options); RTImage::updateImages(); - switchThemeTo(options.theme); + switchThemeTo (options.theme); } // set the initial font back - Pango::FontDescription fd(fontButton->get_font_name()); + Pango::FontDescription fd (fontButton->get_font_name()); + if (fd.get_family() != options.fontFamily && (fd.get_size() / Pango::SCALE) != options.fontSize) { if (options.fontFamily == "default") { - switchFontTo(initialFontFamily, initialFontSize); + switchFontTo (initialFontFamily, initialFontSize); } else { - switchFontTo(options.fontFamily, options.fontSize); + switchFontTo (options.fontFamily, options.fontSize); } } // update the profileStore if (useBundledProfiles->get_active () != options.useBundledProfiles) { // we have to rescan with the old value; - bpconn.block(true); + bpconn.block (true); useBundledProfiles->set_active (false); bundledProfilesChanged(); - bpconn.block(false); + bpconn.block (false); } hide (); @@ -2110,12 +2142,12 @@ void Preferences::cancelPressed () void Preferences::selectStartupDir () { - Gtk::FileChooserDialog dialog (getToplevelWindow (this), M("PREFERENCES_DIRSELECTDLG"), Gtk::FILE_CHOOSER_ACTION_SELECT_FOLDER); + Gtk::FileChooserDialog dialog (getToplevelWindow (this), M ("PREFERENCES_DIRSELECTDLG"), Gtk::FILE_CHOOSER_ACTION_SELECT_FOLDER); // dialog.set_transient_for(*this); //Add response buttons the the dialog: - dialog.add_button(M("GENERAL_CANCEL"), Gtk::RESPONSE_CANCEL); - dialog.add_button(M("GENERAL_OPEN"), Gtk::RESPONSE_OK); + dialog.add_button (M ("GENERAL_CANCEL"), Gtk::RESPONSE_CANCEL); + dialog.add_button (M ("GENERAL_OPEN"), Gtk::RESPONSE_OK); int result = dialog.run(); @@ -2129,17 +2161,17 @@ void Preferences::aboutPressed () splash = new Splash (*this); splash->set_transient_for (*this); - splash->signal_delete_event().connect( sigc::mem_fun(*this, &Preferences::splashClosed) ); + splash->signal_delete_event().connect ( sigc::mem_fun (*this, &Preferences::splashClosed) ); splash->show (); } void Preferences::themeChanged () { - moptions.theme = themeFNames.at(theme->get_active_row_number ()).longFName; - rtengine::setPaths(moptions); + moptions.theme = themeFNames.at (theme->get_active_row_number ()).longFName; + rtengine::setPaths (moptions); RTImage::updateImages(); - switchThemeTo(moptions.theme); + switchThemeTo (moptions.theme); } void Preferences::forRAWComboChanged () @@ -2155,14 +2187,14 @@ void Preferences::forRAWComboChanged () } if (selectedEntry->type == PSET_FOLDER) { - rpconn.block(true); - rprofiles->set_active(currRawRow); - rpconn.block(false); + rpconn.block (true); + rprofiles->set_active (currRawRow); + rpconn.block (false); } else { currRawRow = rprofiles->get_active(); } - rprofiles->set_tooltip_text(selectedEntry->label); + rprofiles->set_tooltip_text (selectedEntry->label); } void Preferences::forImageComboChanged () @@ -2178,19 +2210,19 @@ void Preferences::forImageComboChanged () } if (selectedEntry->type == PSET_FOLDER) { - ipconn.block(true); - iprofiles->set_active(currImgRow); - ipconn.block(false); + ipconn.block (true); + iprofiles->set_active (currImgRow); + ipconn.block (false); } else { currImgRow = rprofiles->get_active(); } - iprofiles->set_tooltip_text(iprofiles->getSelectedEntry()->label); + iprofiles->set_tooltip_text (iprofiles->getSelectedEntry()->label); } void Preferences::layoutComboChanged () { - editorLayout->set_tooltip_text(editorLayout->get_active_text()); + editorLayout->set_tooltip_text (editorLayout->get_active_text()); } void Preferences::bundledProfilesChanged () @@ -2219,12 +2251,13 @@ void Preferences::iccDirChanged () monProfile->remove_all(); - monProfile->append (M("PREFERENCES_PROFILE_NONE")); + monProfile->append (M ("PREFERENCES_PROFILE_NONE")); - for (const auto& profile : profiles) + for (const auto& profile : profiles) { monProfile->append (profile); + } - setActiveTextOrIndex(*monProfile, currentSelection, 0); + setActiveTextOrIndex (*monProfile, currentSelection, 0); } void Preferences::storeCurrentValue() @@ -2239,26 +2272,26 @@ void Preferences::updateProfileList() rprofiles->updateProfileList(); iprofiles->updateProfileList(); const ProfileStoreEntry* dynpse = ProfileStore::getInstance()->getInternalDynamicPSE(); - rprofiles->addRow(dynpse); - iprofiles->addRow(dynpse); + rprofiles->addRow (dynpse); + iprofiles->addRow (dynpse); } void Preferences::restoreValue() { - if (!rprofiles->setActiveRowFromFullPath(storedValueRaw)) { + if (!rprofiles->setActiveRowFromFullPath (storedValueRaw)) { moptions.defProfRaw = DEFPROFILE_INTERNAL; - rpconn.block(true); + rpconn.block (true); rprofiles->setInternalEntry(); - rpconn.block(false); + rpconn.block (false); } currRawRow = rprofiles->get_active(); - if (!iprofiles->setActiveRowFromFullPath(storedValueImg)) { + if (!iprofiles->setActiveRowFromFullPath (storedValueImg)) { moptions.defProfImg = DEFPROFILE_INTERNAL; - ipconn.block(true); + ipconn.block (true); iprofiles->setInternalEntry(); - ipconn.block(false); + ipconn.block (false); } currImgRow = iprofiles->get_active(); @@ -2267,23 +2300,23 @@ void Preferences::restoreValue() storedValueImg = ""; } -void Preferences::switchThemeTo(Glib::ustring newTheme) +void Preferences::switchThemeTo (Glib::ustring newTheme) { - Glib::ustring filename(Glib::build_filename(argv0, "themes", newTheme + ".css")); + Glib::ustring filename (Glib::build_filename (argv0, "themes", newTheme + ".css")); if (!themecss) { themecss = Gtk::CssProvider::create(); Glib::RefPtr screen = Gdk::Screen::get_default(); - Gtk::StyleContext::add_provider_for_screen(screen, themecss, GTK_STYLE_PROVIDER_PRIORITY_USER); + Gtk::StyleContext::add_provider_for_screen (screen, themecss, GTK_STYLE_PROVIDER_PRIORITY_USER); } try { themecss->load_from_path (filename); } catch (Glib::Error &err) { - printf("Error: Can't load css file \"%s\"\nMessage: %s\n", filename.c_str(), err.what().c_str()); + printf ("Error: Can't load css file \"%s\"\nMessage: %s\n", filename.c_str(), err.what().c_str()); } catch (...) { - printf("Error: Can't load css file \"%s\"\n", filename.c_str()); + printf ("Error: Can't load css file \"%s\"\n", filename.c_str()); } } @@ -2291,8 +2324,8 @@ void Preferences::fontChanged () { newFont = true; - Pango::FontDescription fd(fontButton->get_font_name()); - switchFontTo(fd.get_family(), fd.get_size() / Pango::SCALE); + Pango::FontDescription fd (fontButton->get_font_name()); + switchFontTo (fd.get_family(), fd.get_size() / Pango::SCALE); } void Preferences::cpFontChanged () @@ -2301,35 +2334,34 @@ void Preferences::cpFontChanged () newCPFont = true; } -void Preferences::switchFontTo(const Glib::ustring &newFontFamily, const int newFontSize) +void Preferences::switchFontTo (const Glib::ustring &newFontFamily, const int newFontSize) { if (newFontFamily != "default") { if (!fontcss) { fontcss = Gtk::CssProvider::create(); Glib::RefPtr screen = Gdk::Screen::get_default(); - Gtk::StyleContext::add_provider_for_screen(screen, fontcss, GTK_STYLE_PROVIDER_PRIORITY_USER); + Gtk::StyleContext::add_provider_for_screen (screen, fontcss, GTK_STYLE_PROVIDER_PRIORITY_USER); } try { //GTK318 - #if GTK_MAJOR_VERSION == 3 && GTK_MINOR_VERSION < 20 - fontcss->load_from_data (Glib::ustring::compose("* { font-family: %1; font-size: %2px }", newFontFamily, newFontSize)); - #else - fontcss->load_from_data (Glib::ustring::compose("* { font-family: %1; font-size: %2pt }", newFontFamily, newFontSize)); - #endif +#if GTK_MAJOR_VERSION == 3 && GTK_MINOR_VERSION < 20 + fontcss->load_from_data (Glib::ustring::compose ("* { font-family: %1; font-size: %2px }", newFontFamily, newFontSize)); +#else + fontcss->load_from_data (Glib::ustring::compose ("* { font-family: %1; font-size: %2pt }", newFontFamily, newFontSize)); +#endif //GTK318 } catch (Glib::Error &err) { - printf("Error: \"%s\"\n", err.what().c_str()); + printf ("Error: \"%s\"\n", err.what().c_str()); } catch (...) { - printf("Error: Can't find the font named \"%s\"\n", newFontFamily.c_str()); + printf ("Error: Can't find the font named \"%s\"\n", newFontFamily.c_str()); } - } - else { + } else { if (fontcss) { fontcss = Gtk::CssProvider::create(); Glib::RefPtr screen = Gdk::Screen::get_default(); - Gtk::StyleContext::remove_provider_for_screen(screen, fontcss); + Gtk::StyleContext::remove_provider_for_screen (screen, fontcss); } } } @@ -2337,41 +2369,40 @@ void Preferences::switchFontTo(const Glib::ustring &newFontFamily, const int new void Preferences::workflowUpdate () { - if(moptions.tabbedUI != options.tabbedUI) { - parent->setEditorMode(moptions.tabbedUI); + if (moptions.tabbedUI != options.tabbedUI) { + parent->setEditorMode (moptions.tabbedUI); } - if(moptions.hideTPVScrollbar != options.hideTPVScrollbar) { + if (moptions.hideTPVScrollbar != options.hideTPVScrollbar) { // Update the tool panels parent->updateTPVScrollbar (moptions.hideTPVScrollbar); } - if(moptions.UseIconNoText != options.UseIconNoText) { + if (moptions.UseIconNoText != options.UseIconNoText) { // Update the tool's tab titles - parent->updateTabsUsesIcons(moptions.UseIconNoText); + parent->updateTabsUsesIcons (moptions.UseIconNoText); } - if(moptions.FileBrowserToolbarSingleRow != options.FileBrowserToolbarSingleRow) { + if (moptions.FileBrowserToolbarSingleRow != options.FileBrowserToolbarSingleRow) { // Update the position of the Query toolbar - parent->updateFBQueryTB(moptions.FileBrowserToolbarSingleRow); + parent->updateFBQueryTB (moptions.FileBrowserToolbarSingleRow); } - if(moptions.showFilmStripToolBar != options.showFilmStripToolBar) { + if (moptions.showFilmStripToolBar != options.showFilmStripToolBar) { // Update the visibility of FB toolbar - parent->updateFBToolBarVisibility(moptions.showFilmStripToolBar); + parent->updateFBToolBarVisibility (moptions.showFilmStripToolBar); } - if(moptions.histogramPosition != options.histogramPosition) { + if (moptions.histogramPosition != options.histogramPosition) { // Update the position of the Histogram - parent->updateHistogramPosition(options.histogramPosition, moptions.histogramPosition); + parent->updateHistogramPosition (options.histogramPosition, moptions.histogramPosition); } - if( moptions.rtSettings.printerProfile != options.rtSettings.printerProfile - ||moptions.rtSettings.printerBPC != options.rtSettings.printerBPC - ||moptions.rtSettings.printerIntent != options.rtSettings.printerIntent) - { + if ( moptions.rtSettings.printerProfile != options.rtSettings.printerProfile + || moptions.rtSettings.printerBPC != options.rtSettings.printerBPC + || moptions.rtSettings.printerIntent != options.rtSettings.printerIntent) { // Update the position of the Histogram - parent->updateProfiles(moptions.rtSettings.printerProfile, moptions.rtSettings.printerIntent, moptions.rtSettings.printerBPC); + parent->updateProfiles (moptions.rtSettings.printerProfile, moptions.rtSettings.printerIntent, moptions.rtSettings.printerBPC); } } @@ -2386,7 +2417,7 @@ void Preferences::addExtPressed () return; } - Gtk::TreeRow row = *(extensionModel->append()); + Gtk::TreeRow row = * (extensionModel->append()); row[extensionColumns.enabled] = true; row[extensionColumns.ext] = extension->get_text (); @@ -2401,12 +2432,16 @@ void Preferences::delExtPressed () void Preferences::moveExtUpPressed () { const Glib::RefPtr selection = extensions->get_selection (); - if (!selection) + + if (!selection) { return; + } const Gtk::TreeModel::iterator selected = selection->get_selected (); - if (!selected || selected == extensionModel->children ().begin ()) + + if (!selected || selected == extensionModel->children ().begin ()) { return; + } Gtk::TreeModel::iterator previous = selected; --previous; @@ -2416,16 +2451,22 @@ void Preferences::moveExtUpPressed () void Preferences::moveExtDownPressed () { const Glib::RefPtr selection = extensions->get_selection (); - if (!selection) + + if (!selection) { return; + } const Gtk::TreeModel::iterator selected = selection->get_selected (); - if (!selected) + + if (!selected) { return; + } Gtk::TreeModel::iterator next = selected; - if (++next) + + if (++next) { extensionModel->iter_swap (selected, next); + } } void Preferences::clearProfilesPressed () @@ -2449,9 +2490,9 @@ void Preferences::clearAllPressed () void Preferences::darkFrameChanged () { //Glib::ustring s(darkFrameDir->get_filename()); - Glib::ustring s(darkFrameDir->get_current_folder()); + Glib::ustring s (darkFrameDir->get_current_folder()); //if( s.compare( rtengine::dfm.getPathname()) !=0 ){ - rtengine::dfm.init( s ); + rtengine::dfm.init ( s ); updateDFinfos(); //} } @@ -2459,9 +2500,9 @@ void Preferences::darkFrameChanged () void Preferences::flatFieldChanged () { //Glib::ustring s(flatFieldDir->get_filename()); - Glib::ustring s(flatFieldDir->get_current_folder()); + Glib::ustring s (flatFieldDir->get_current_folder()); //if( s.compare( rtengine::ffm.getPathname()) !=0 ){ - rtengine::ffm.init( s ); + rtengine::ffm.init ( s ); updateFFinfos(); //} } @@ -2469,20 +2510,20 @@ void Preferences::flatFieldChanged () void Preferences::updateDFinfos() { int t1, t2; - rtengine::dfm.getStat(t1, t2); - Glib::ustring s = Glib::ustring::compose("%1: %2 %3, %4 %5", M("PREFERENCES_DARKFRAMEFOUND"), t1, M("PREFERENCES_DARKFRAMESHOTS"), t2, M("PREFERENCES_DARKFRAMETEMPLATES")); - dfLabel->set_text(s); + rtengine::dfm.getStat (t1, t2); + Glib::ustring s = Glib::ustring::compose ("%1: %2 %3, %4 %5", M ("PREFERENCES_DARKFRAMEFOUND"), t1, M ("PREFERENCES_DARKFRAMESHOTS"), t2, M ("PREFERENCES_DARKFRAMETEMPLATES")); + dfLabel->set_text (s); } void Preferences::updateFFinfos() { int t1, t2; - rtengine::ffm.getStat(t1, t2); - Glib::ustring s = Glib::ustring::compose("%1: %2 %3, %4 %5", M("PREFERENCES_FLATFIELDFOUND"), t1, M("PREFERENCES_FLATFIELDSHOTS"), t2, M("PREFERENCES_FLATFIELDTEMPLATES")); - ffLabel->set_text(s); + rtengine::ffm.getStat (t1, t2); + Glib::ustring s = Glib::ustring::compose ("%1: %2 %3, %4 %5", M ("PREFERENCES_FLATFIELDFOUND"), t1, M ("PREFERENCES_FLATFIELDSHOTS"), t2, M ("PREFERENCES_FLATFIELDTEMPLATES")); + ffLabel->set_text (s); } -bool Preferences::splashClosed(GdkEventAny* event) +bool Preferences::splashClosed (GdkEventAny* event) { delete splash; splash = nullptr; diff --git a/rtgui/rtwindow.cc b/rtgui/rtwindow.cc index c08781331..6f6388dd1 100644 --- a/rtgui/rtwindow.cc +++ b/rtgui/rtwindow.cc @@ -32,27 +32,27 @@ static gboolean osx_should_quit_cb (GtkosxApplication *app, gpointer data) { RTWindow *rtWin = (RTWindow *)data; - return rtWin->on_delete_event(0); + return rtWin->on_delete_event (0); } static void osx_will_quit_cb (GtkosxApplication *app, gpointer data) { RTWindow *rtWin = (RTWindow *)data; - rtWin->on_delete_event(0); + rtWin->on_delete_event (0); gtk_main_quit (); } -bool RTWindow::osxFileOpenEvent(Glib::ustring path) +bool RTWindow::osxFileOpenEvent (Glib::ustring path) { CacheManager* cm = CacheManager::getInstance(); - Thumbnail* thm = cm->getEntry( path ); + Thumbnail* thm = cm->getEntry ( path ); - if(thm && fpanel) { + if (thm && fpanel) { std::vector entries; - entries.push_back(thm); - fpanel->fileCatalog->openRequested(entries); + entries.push_back (thm); + fpanel->fileCatalog->openRequested (entries); return true; } @@ -69,25 +69,25 @@ osx_open_file_cb (GtkosxApplication *app, gchar *path_, gpointer data) return false; } - Glib::ustring path = Glib::ustring(path_); - Glib::ustring suffix = path.length() > 4 ? path.substr(path.length() - 3) : ""; + Glib::ustring path = Glib::ustring (path_); + Glib::ustring suffix = path.length() > 4 ? path.substr (path.length() - 3) : ""; suffix = suffix.lowercase(); if (suffix == "pp3") { - path = path.substr(0, path.length() - 4); + path = path.substr (0, path.length() - 4); } - return rtWin->osxFileOpenEvent(path); + return rtWin->osxFileOpenEvent (path); } #endif // __APPLE__ RTWindow::RTWindow () - : mainNB(nullptr) - , bpanel(nullptr) - , splash(nullptr) - , btn_fullscreen(nullptr) - , epanel(nullptr) - , fpanel(nullptr) + : mainNB (nullptr) + , bpanel (nullptr) + , splash (nullptr) + , btn_fullscreen (nullptr) + , epanel (nullptr) + , fpanel (nullptr) { cacheMgr->init (); @@ -95,11 +95,11 @@ RTWindow::RTWindow () ProfilePanel::init (this); Glib::ustring fName = "rt-logo-small.png"; - Glib::ustring fullPath = rtengine::findIconAbsolutePath(fName); + Glib::ustring fullPath = rtengine::findIconAbsolutePath (fName); try { set_default_icon_from_file (fullPath); - } catch(Glib::Exception& ex) { + } catch (Glib::Exception& ex) { printf ("%s\n", ex.what().c_str()); } @@ -122,55 +122,57 @@ RTWindow::RTWindow () #endif versionStr = "RawTherapee " + versionString; - set_title_decorated(""); - set_resizable(true); - set_decorated(true); - set_default_size(options.windowWidth, options.windowHeight); - set_modal(false); + set_title_decorated (""); + set_resizable (true); + set_decorated (true); + set_default_size (options.windowWidth, options.windowHeight); + set_modal (false); Gdk::Rectangle lMonitorRect; - get_screen()->get_monitor_geometry(std::min(options.windowMonitor, Gdk::Screen::get_default()->get_n_monitors() - 1), lMonitorRect); + get_screen()->get_monitor_geometry (std::min (options.windowMonitor, Gdk::Screen::get_default()->get_n_monitors() - 1), lMonitorRect); + if (options.windowMaximized) { - move(lMonitorRect.get_x(), lMonitorRect.get_y()); + move (lMonitorRect.get_x(), lMonitorRect.get_y()); maximize(); } else { unmaximize(); - resize(options.windowWidth, options.windowHeight); - if(options.windowX <= lMonitorRect.get_x() + lMonitorRect.get_width() && options.windowY <= lMonitorRect.get_y() + lMonitorRect.get_height()) { - move(options.windowX, options.windowY); + resize (options.windowWidth, options.windowHeight); + + if (options.windowX <= lMonitorRect.get_x() + lMonitorRect.get_width() && options.windowY <= lMonitorRect.get_y() + lMonitorRect.get_height()) { + move (options.windowX, options.windowY); } else { - move(lMonitorRect.get_x(), lMonitorRect.get_y()); + move (lMonitorRect.get_x(), lMonitorRect.get_y()); } } on_delete_has_run = false; is_fullscreen = false; - property_destroy_with_parent().set_value(false); - signal_window_state_event().connect( sigc::mem_fun(*this, &RTWindow::on_window_state_event) ); - signal_key_press_event().connect( sigc::mem_fun(*this, &RTWindow::keyPressed) ); + property_destroy_with_parent().set_value (false); + signal_window_state_event().connect ( sigc::mem_fun (*this, &RTWindow::on_window_state_event) ); + signal_key_press_event().connect ( sigc::mem_fun (*this, &RTWindow::keyPressed) ); - if(simpleEditor) { - epanel = Gtk::manage( new EditorPanel (nullptr) ); + if (simpleEditor) { + epanel = Gtk::manage ( new EditorPanel (nullptr) ); epanel->setParent (this); - epanel->setParentWindow(this); + epanel->setParentWindow (this); add (*epanel); show_all (); pldBridge = nullptr; // No progress listener CacheManager* cm = CacheManager::getInstance(); - Thumbnail* thm = cm->getEntry( argv1 ); + Thumbnail* thm = cm->getEntry ( argv1 ); - if(thm) { + if (thm) { int error; - rtengine::InitialImage *ii = rtengine::InitialImage::load(argv1, thm->getType() == FT_Raw, &error, nullptr); - epanel->open( thm, ii ); + rtengine::InitialImage *ii = rtengine::InitialImage::load (argv1, thm->getType() == FT_Raw, &error, nullptr); + epanel->open ( thm, ii ); } } else { mainNB = Gtk::manage (new Gtk::Notebook ()); mainNB->set_name ("MainNotebook"); mainNB->set_scrollable (true); - mainNB->signal_switch_page().connect_notify( sigc::mem_fun(*this, &RTWindow::on_mainNB_switch_page) ); + mainNB->signal_switch_page().connect_notify ( sigc::mem_fun (*this, &RTWindow::on_mainNB_switch_page) ); // Editor panel fpanel = new FilePanel () ; @@ -178,20 +180,20 @@ RTWindow::RTWindow () // decorate tab Gtk::Grid* fpanelLabelGrid = Gtk::manage (new Gtk::Grid ()); - setExpandAlignProperties(fpanelLabelGrid, false, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_CENTER); - Gtk::Label* fpl = Gtk::manage (new Gtk::Label( Glib::ustring(" ") + M("MAIN_FRAME_EDITOR") )); + setExpandAlignProperties (fpanelLabelGrid, false, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_CENTER); + Gtk::Label* fpl = Gtk::manage (new Gtk::Label ( Glib::ustring (" ") + M ("MAIN_FRAME_EDITOR") )); if (options.mainNBVertical) { mainNB->set_tab_pos (Gtk::POS_LEFT); fpl->set_angle (90); - fpanelLabelGrid->attach_next_to(*Gtk::manage (new RTImage ("gtk-directory.png")), Gtk::POS_TOP, 1, 1); - fpanelLabelGrid->attach_next_to(*fpl, Gtk::POS_TOP, 1, 1); + fpanelLabelGrid->attach_next_to (*Gtk::manage (new RTImage ("gtk-directory.png")), Gtk::POS_TOP, 1, 1); + fpanelLabelGrid->attach_next_to (*fpl, Gtk::POS_TOP, 1, 1); } else { - fpanelLabelGrid->attach_next_to(*Gtk::manage (new RTImage ("gtk-directory.png")), Gtk::POS_RIGHT, 1, 1); - fpanelLabelGrid->attach_next_to(*fpl, Gtk::POS_RIGHT, 1, 1); + fpanelLabelGrid->attach_next_to (*Gtk::manage (new RTImage ("gtk-directory.png")), Gtk::POS_RIGHT, 1, 1); + fpanelLabelGrid->attach_next_to (*fpl, Gtk::POS_RIGHT, 1, 1); } - fpanelLabelGrid->set_tooltip_markup (M("MAIN_FRAME_FILEBROWSER_TOOLTIP")); + fpanelLabelGrid->set_tooltip_markup (M ("MAIN_FRAME_FILEBROWSER_TOOLTIP")); fpanelLabelGrid->show_all (); mainNB->append_page (*fpanel, *fpanelLabelGrid); @@ -200,16 +202,16 @@ RTWindow::RTWindow () bpanel = Gtk::manage ( new BatchQueuePanel (fpanel->fileCatalog) ); // decorate tab, the label is unimportant since its updated in batchqueuepanel anyway - Gtk::Label* lbq = Gtk::manage ( new Gtk::Label (M("MAIN_FRAME_BATCHQUEUE")) ); + Gtk::Label* lbq = Gtk::manage ( new Gtk::Label (M ("MAIN_FRAME_BATCHQUEUE")) ); if (options.mainNBVertical) { - lbq->set_angle(90); + lbq->set_angle (90); } mainNB->append_page (*bpanel, *lbq); - if(isSingleTabMode()) { + if (isSingleTabMode()) { createSetmEditor(); } @@ -225,46 +227,46 @@ RTWindow::RTWindow () //Gtk::LinkButton* rtWeb = Gtk::manage (new Gtk::LinkButton ("http://rawtherapee.com")); // unused... but fail to be linked anyway !? //Gtk::Button* preferences = Gtk::manage (new Gtk::Button (M("MAIN_BUTTON_PREFERENCES")+"...")); Gtk::Button* preferences = Gtk::manage (new Gtk::Button ()); - setExpandAlignProperties(preferences, false, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_CENTER); - preferences->set_image (*Gtk::manage(new RTImage ("gtk-preferences.png"))); - preferences->set_tooltip_markup (M("MAIN_BUTTON_PREFERENCES")); - preferences->signal_clicked().connect( sigc::mem_fun(*this, &RTWindow::showPreferences) ); + setExpandAlignProperties (preferences, false, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_CENTER); + preferences->set_image (*Gtk::manage (new RTImage ("gtk-preferences.png"))); + preferences->set_tooltip_markup (M ("MAIN_BUTTON_PREFERENCES")); + preferences->signal_clicked().connect ( sigc::mem_fun (*this, &RTWindow::showPreferences) ); //btn_fullscreen = Gtk::manage( new Gtk::Button(M("MAIN_BUTTON_FULLSCREEN"))); - btn_fullscreen = Gtk::manage( new Gtk::Button()); - setExpandAlignProperties(btn_fullscreen, false, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_CENTER); - btn_fullscreen->set_tooltip_markup (M("MAIN_BUTTON_FULLSCREEN")); + btn_fullscreen = Gtk::manage ( new Gtk::Button()); + setExpandAlignProperties (btn_fullscreen, false, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_CENTER); + btn_fullscreen->set_tooltip_markup (M ("MAIN_BUTTON_FULLSCREEN")); btn_fullscreen->set_image (*iFullscreen); - btn_fullscreen->signal_clicked().connect( sigc::mem_fun(*this, &RTWindow::toggle_fullscreen) ); - setExpandAlignProperties(&prProgBar, false, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_CENTER); - prProgBar.set_show_text(true); + btn_fullscreen->signal_clicked().connect ( sigc::mem_fun (*this, &RTWindow::toggle_fullscreen) ); + setExpandAlignProperties (&prProgBar, false, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_CENTER); + prProgBar.set_show_text (true); Gtk::Grid* actionGrid = Gtk::manage (new Gtk::Grid ()); - actionGrid->set_row_spacing(2); - actionGrid->set_column_spacing(2); + actionGrid->set_row_spacing (2); + actionGrid->set_column_spacing (2); - setExpandAlignProperties(actionGrid, false, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_CENTER); + setExpandAlignProperties (actionGrid, false, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_CENTER); if (options.mainNBVertical) { - prProgBar.set_orientation(Gtk::ORIENTATION_VERTICAL); - prProgBar.set_inverted(true); - actionGrid->set_orientation(Gtk::ORIENTATION_VERTICAL); - actionGrid->attach_next_to(prProgBar, Gtk::POS_BOTTOM, 1, 1); - actionGrid->attach_next_to(*preferences, Gtk::POS_BOTTOM, 1, 1); - actionGrid->attach_next_to(*btn_fullscreen, Gtk::POS_BOTTOM, 1, 1); - mainNB->set_action_widget(actionGrid, Gtk::PACK_END); + prProgBar.set_orientation (Gtk::ORIENTATION_VERTICAL); + prProgBar.set_inverted (true); + actionGrid->set_orientation (Gtk::ORIENTATION_VERTICAL); + actionGrid->attach_next_to (prProgBar, Gtk::POS_BOTTOM, 1, 1); + actionGrid->attach_next_to (*preferences, Gtk::POS_BOTTOM, 1, 1); + actionGrid->attach_next_to (*btn_fullscreen, Gtk::POS_BOTTOM, 1, 1); + mainNB->set_action_widget (actionGrid, Gtk::PACK_END); } else { - prProgBar.set_orientation(Gtk::ORIENTATION_HORIZONTAL); - actionGrid->set_orientation(Gtk::ORIENTATION_HORIZONTAL); - actionGrid->attach_next_to(prProgBar, Gtk::POS_RIGHT, 1, 1); - actionGrid->attach_next_to(*preferences, Gtk::POS_RIGHT, 1, 1); - actionGrid->attach_next_to(*btn_fullscreen, Gtk::POS_RIGHT, 1, 1); - mainNB->set_action_widget(actionGrid, Gtk::PACK_END); + prProgBar.set_orientation (Gtk::ORIENTATION_HORIZONTAL); + actionGrid->set_orientation (Gtk::ORIENTATION_HORIZONTAL); + actionGrid->attach_next_to (prProgBar, Gtk::POS_RIGHT, 1, 1); + actionGrid->attach_next_to (*preferences, Gtk::POS_RIGHT, 1, 1); + actionGrid->attach_next_to (*btn_fullscreen, Gtk::POS_RIGHT, 1, 1); + mainNB->set_action_widget (actionGrid, Gtk::PACK_END); } actionGrid->show_all(); - pldBridge = new PLDBridge(static_cast(this)); + pldBridge = new PLDBridge (static_cast (this)); add (*mainNB); show_all (); @@ -272,9 +274,10 @@ RTWindow::RTWindow () bpanel->init (this); if (!argv1.empty() && !remote) { - Thumbnail* thm = cacheMgr->getEntry(argv1); + Thumbnail* thm = cacheMgr->getEntry (argv1); + if (thm) { - fpanel->fileCatalog->openRequested({thm}); + fpanel->fileCatalog->openRequested ({thm}); } } } @@ -282,7 +285,7 @@ RTWindow::RTWindow () RTWindow::~RTWindow() { - if(!simpleEditor) { + if (!simpleEditor) { delete pldBridge; } @@ -300,7 +303,7 @@ void RTWindow::on_realize () { Gtk::Window::on_realize (); - if( fpanel ) { + if ( fpanel ) { fpanel->setAspect(); } @@ -308,19 +311,20 @@ void RTWindow::on_realize () epanel->setAspect(); } - mainWindowCursorManager.init(get_window()); + mainWindowCursorManager.init (get_window()); // Display release notes only if new major version. // Pattern matches "5.1" from "5.1-23-g12345678" std::string vs[] = {versionString, options.version}; - std::regex pat("(^[0-9.]+).*"); + std::regex pat ("(^[0-9.]+).*"); std::smatch sm; std::vector vMajor; + for (const auto &v : vs) { - if (std::regex_match(v, sm, pat)) { + if (std::regex_match (v, sm, pat)) { if (sm.size() == 2) { std::ssub_match smsub = sm[1]; - vMajor.push_back(smsub.str()); + vMajor.push_back (smsub.str()); } } } @@ -333,7 +337,7 @@ void RTWindow::on_realize () splash = new Splash (*this); splash->set_transient_for (*this); - splash->signal_delete_event().connect( sigc::mem_fun(*this, &RTWindow::splashClosed) ); + splash->signal_delete_event().connect ( sigc::mem_fun (*this, &RTWindow::splashClosed) ); if (splash->hasReleaseNotes()) { splash->showReleaseNotes(); @@ -346,38 +350,39 @@ void RTWindow::on_realize () } } -bool RTWindow::on_configure_event(GdkEventConfigure* event) +bool RTWindow::on_configure_event (GdkEventConfigure* event) { if (!is_maximized() && is_visible()) { - get_size(options.windowWidth, options.windowHeight); + get_size (options.windowWidth, options.windowHeight); get_position (options.windowX, options.windowY); } - return Gtk::Widget::on_configure_event(event); + return Gtk::Widget::on_configure_event (event); } -bool RTWindow::on_window_state_event(GdkEventWindowState* event) +bool RTWindow::on_window_state_event (GdkEventWindowState* event) { if (event->changed_mask & GDK_WINDOW_STATE_MAXIMIZED) { options.windowMaximized = event->new_window_state & GDK_WINDOW_STATE_MAXIMIZED; } - return Gtk::Widget::on_window_state_event(event); + + return Gtk::Widget::on_window_state_event (event); } -void RTWindow::on_mainNB_switch_page(Gtk::Widget* widget, guint page_num) +void RTWindow::on_mainNB_switch_page (Gtk::Widget* widget, guint page_num) { - if(!on_delete_has_run) { - if(isEditorPanel(page_num)) { + if (!on_delete_has_run) { + if (isEditorPanel (page_num)) { if (isSingleTabMode() && epanel) { MoveFileBrowserToEditor(); } - EditorPanel *ep = static_cast(mainNB->get_nth_page(page_num)); + EditorPanel *ep = static_cast (mainNB->get_nth_page (page_num)); ep->setAspect(); if (!isSingleTabMode()) { if (filesEdited.size() > 0) { - set_title_decorated(ep->getFileName()); + set_title_decorated (ep->getFileName()); } } } else { @@ -387,7 +392,7 @@ void RTWindow::on_mainNB_switch_page(Gtk::Widget* widget, guint page_num) epanel->saveProfile(); // Moving the FileBrowser only if the user has switched to the FileBrowser tab - if (mainNB->get_nth_page(page_num) == fpanel) { + if (mainNB->get_nth_page (page_num) == fpanel) { MoveFileBrowserToMain(); } } @@ -398,32 +403,32 @@ void RTWindow::on_mainNB_switch_page(Gtk::Widget* widget, guint page_num) void RTWindow::addEditorPanel (EditorPanel* ep, const std::string &name) { if (options.multiDisplayMode > 0) { - EditWindow * wndEdit = EditWindow::getInstance(this); + EditWindow * wndEdit = EditWindow::getInstance (this); wndEdit->show(); - wndEdit->addEditorPanel(ep, name); + wndEdit->addEditorPanel (ep, name); wndEdit->toFront(); } else { ep->setParent (this); - ep->setParentWindow(this); + ep->setParentWindow (this); // construct closeable tab for the image Gtk::Grid* titleGrid = Gtk::manage (new Gtk::Grid ()); titleGrid->set_tooltip_markup (name); - RTImage *closebimg = Gtk::manage(new RTImage ("gtk-close.png")); + RTImage *closebimg = Gtk::manage (new RTImage ("gtk-close.png")); Gtk::Button* closeb = Gtk::manage (new Gtk::Button ()); closeb->set_name ("CloseButton"); closeb->add (*closebimg); closeb->set_relief (Gtk::RELIEF_NONE); closeb->set_focus_on_click (false); - closeb->signal_clicked().connect( sigc::bind (sigc::mem_fun(*this, &RTWindow::remEditorPanel) , ep)); + closeb->signal_clicked().connect ( sigc::bind (sigc::mem_fun (*this, &RTWindow::remEditorPanel), ep)); - titleGrid->attach_next_to(*Gtk::manage (new RTImage ("rtwindow.png")), Gtk::POS_RIGHT, 1, 1); - titleGrid->attach_next_to(*Gtk::manage (new Gtk::Label (Glib::path_get_basename (name))), Gtk::POS_RIGHT, 1, 1); - titleGrid->attach_next_to(*closeb, Gtk::POS_RIGHT, 1, 1); + titleGrid->attach_next_to (*Gtk::manage (new RTImage ("rtwindow.png")), Gtk::POS_RIGHT, 1, 1); + titleGrid->attach_next_to (*Gtk::manage (new Gtk::Label (Glib::path_get_basename (name))), Gtk::POS_RIGHT, 1, 1); + titleGrid->attach_next_to (*closeb, Gtk::POS_RIGHT, 1, 1); titleGrid->show_all (); //GTK318 #if GTK_MAJOR_VERSION == 3 && GTK_MINOR_VERSION < 20 - titleGrid->set_column_spacing(2); + titleGrid->set_column_spacing (2); #endif //GTK318 @@ -432,11 +437,11 @@ void RTWindow::addEditorPanel (EditorPanel* ep, const std::string &name) mainNB->set_current_page (mainNB->page_num (*ep)); mainNB->set_tab_reorderable (*ep, true); - set_title_decorated(name); + set_title_decorated (name); epanels[ name ] = ep; filesEdited.insert ( name ); fpanel->refreshEditedState (filesEdited); - ep->tbTopPanel_1_visible(false); //hide the toggle Top Panel button + ep->tbTopPanel_1_visible (false); //hide the toggle Top Panel button } } @@ -447,8 +452,8 @@ void RTWindow::remEditorPanel (EditorPanel* ep) } if (options.multiDisplayMode > 0) { - EditWindow * wndEdit = EditWindow::getInstance(this); - wndEdit->remEditorPanel(ep); + EditWindow * wndEdit = EditWindow::getInstance (this); + wndEdit->remEditorPanel (ep); } else { bool queueHadFocus = (mainNB->get_current_page() == mainNB->page_num (*bpanel)); epanels.erase (ep->getFileName()); @@ -457,37 +462,37 @@ void RTWindow::remEditorPanel (EditorPanel* ep) mainNB->remove_page (*ep); - if (!isEditorPanel(mainNB->get_current_page())) { - if(!queueHadFocus) { + if (!isEditorPanel (mainNB->get_current_page())) { + if (!queueHadFocus) { mainNB->set_current_page (mainNB->page_num (*fpanel)); } - set_title_decorated(""); + set_title_decorated (""); } else { - EditorPanel* ep = static_cast(mainNB->get_nth_page (mainNB->get_current_page())); - set_title_decorated(ep->getFileName()); + EditorPanel* ep = static_cast (mainNB->get_nth_page (mainNB->get_current_page())); + set_title_decorated (ep->getFileName()); } // TODO: ask what to do: close & apply, close & apply selection, close & revert, cancel } } -bool RTWindow::selectEditorPanel(const std::string &name) +bool RTWindow::selectEditorPanel (const std::string &name) { if (options.multiDisplayMode > 0) { - EditWindow * wndEdit = EditWindow::getInstance(this); + EditWindow * wndEdit = EditWindow::getInstance (this); - if (wndEdit->selectEditorPanel(name)) { - set_title_decorated(name); + if (wndEdit->selectEditorPanel (name)) { + set_title_decorated (name); wndEdit->toFront(); return true; } } else { - std::map::iterator iep = epanels.find(name); + std::map::iterator iep = epanels.find (name); if (iep != epanels.end()) { mainNB->set_current_page (mainNB->page_num (*iep->second)); - set_title_decorated(name); + set_title_decorated (name); return true; } else { //set_title_decorated(name); @@ -521,12 +526,12 @@ bool RTWindow::keyPressed (GdkEventKey* event) #endif if (try_quit) { - if (!on_delete_event(nullptr)) { + if (!on_delete_event (nullptr)) { gtk_main_quit(); } } - if(event->keyval == GDK_KEY_F11) { + if (event->keyval == GDK_KEY_F11) { toggle_fullscreen(); } @@ -537,40 +542,40 @@ bool RTWindow::keyPressed (GdkEventKey* event) }; if (ctrl) { - switch(event->keyval) { - case GDK_KEY_F2: // file browser panel - mainNB->set_current_page (mainNB->page_num (*fpanel)); - return true; - - case GDK_KEY_F3: // batch queue panel - mainNB->set_current_page (mainNB->page_num (*bpanel)); - return true; - - case GDK_KEY_F4: //single tab mode, editor panel - if (isSingleTabMode() && epanel) { - mainNB->set_current_page (mainNB->page_num (*epanel)); - } - - return true; - - case GDK_KEY_w: //multi-tab mode, close editor panel - if (!isSingleTabMode() && - mainNB->get_current_page() != mainNB->page_num(*fpanel) && - mainNB->get_current_page() != mainNB->page_num(*bpanel)) { - - EditorPanel* ep = static_cast(mainNB->get_nth_page (mainNB->get_current_page())); - remEditorPanel (ep); + switch (event->keyval) { + case GDK_KEY_F2: // file browser panel + mainNB->set_current_page (mainNB->page_num (*fpanel)); return true; - } + + case GDK_KEY_F3: // batch queue panel + mainNB->set_current_page (mainNB->page_num (*bpanel)); + return true; + + case GDK_KEY_F4: //single tab mode, editor panel + if (isSingleTabMode() && epanel) { + mainNB->set_current_page (mainNB->page_num (*epanel)); + } + + return true; + + case GDK_KEY_w: //multi-tab mode, close editor panel + if (!isSingleTabMode() && + mainNB->get_current_page() != mainNB->page_num (*fpanel) && + mainNB->get_current_page() != mainNB->page_num (*bpanel)) { + + EditorPanel* ep = static_cast (mainNB->get_nth_page (mainNB->get_current_page())); + remEditorPanel (ep); + return true; + } } } - if (mainNB->get_current_page() == mainNB->page_num(*fpanel)) { + if (mainNB->get_current_page() == mainNB->page_num (*fpanel)) { return fpanel->handleShortcutKey (event); - } else if (mainNB->get_current_page() == mainNB->page_num(*bpanel)) { + } else if (mainNB->get_current_page() == mainNB->page_num (*bpanel)) { return bpanel->handleShortcutKey (event); } else { - EditorPanel* ep = static_cast(mainNB->get_nth_page (mainNB->get_current_page())); + EditorPanel* ep = static_cast (mainNB->get_nth_page (mainNB->get_current_page())); return ep->handleShortcutKey (event); } @@ -581,7 +586,7 @@ void RTWindow::addBatchQueueJob (BatchQueueEntry* bqe, bool head) { std::vector entries; - entries.push_back(bqe); + entries.push_back (bqe); bpanel->addBatchQueueJobs (entries, head); fpanel->queue_draw (); } @@ -593,7 +598,7 @@ void RTWindow::addBatchQueueJobs (std::vector &entries) fpanel->queue_draw (); } -bool RTWindow::on_delete_event(GdkEventAny* event) +bool RTWindow::on_delete_event (GdkEventAny* event) { if (on_delete_has_run) { @@ -608,14 +613,14 @@ bool RTWindow::on_delete_event(GdkEventAny* event) if (isSingleTabMode() || simpleEditor) { isProcessing = epanel->getIsProcessing(); } else if (options.multiDisplayMode > 0) { - editWindow = EditWindow::getInstance(this, false); + editWindow = EditWindow::getInstance (this, false); isProcessing = editWindow->isProcessing(); } else { int pageCount = mainNB->get_n_pages(); for (int i = 0; i < pageCount && !isProcessing; i++) { - if(isEditorPanel(i)) { - isProcessing |= (static_cast(mainNB->get_nth_page(i)))->getIsProcessing(); + if (isEditorPanel (i)) { + isProcessing |= (static_cast (mainNB->get_nth_page (i)))->getIsProcessing(); } } } @@ -624,11 +629,11 @@ bool RTWindow::on_delete_event(GdkEventAny* event) return true; } - if( fpanel ) { + if ( fpanel ) { fpanel->saveOptions (); } - if( bpanel ) { + if ( bpanel ) { bpanel->saveOptions (); } @@ -644,7 +649,7 @@ bool RTWindow::on_delete_event(GdkEventAny* event) // Look at the active panel first, if any, otherwise look at the first one (sorted on the filename) int page = mainNB->get_current_page(); - Gtk::Widget *w = mainNB->get_nth_page(page); + Gtk::Widget *w = mainNB->get_nth_page (page); bool optionsWritten = false; for (std::map::iterator i = epanels.begin(); i != epanels.end(); ++i) { @@ -667,18 +672,19 @@ bool RTWindow::on_delete_event(GdkEventAny* event) ProfilePanel::cleanup(); if (!options.windowMaximized) { - get_size(options.windowWidth, options.windowHeight); + get_size (options.windowWidth, options.windowHeight); get_position (options.windowX, options.windowY); } - options.windowMonitor = get_screen()->get_monitor_at_window(get_window()); + options.windowMonitor = get_screen()->get_monitor_at_window (get_window()); try { Options::save (); } catch (Options::Error &e) { - Gtk::MessageDialog msgd(getToplevelWindow(this), e.get_msg(), true, Gtk::MESSAGE_WARNING, Gtk::BUTTONS_CLOSE, true); + Gtk::MessageDialog msgd (getToplevelWindow (this), e.get_msg(), true, Gtk::MESSAGE_WARNING, Gtk::BUTTONS_CLOSE, true); msgd.run(); } + hide(); on_delete_has_run = true; @@ -692,11 +698,13 @@ void RTWindow::showPreferences () delete pref; fpanel->optionsChanged (); + if (epanel) { - epanel->defaultMonitorProfileChanged(options.rtSettings.monitorProfile, options.rtSettings.autoMonitorProfile); + epanel->defaultMonitorProfileChanged (options.rtSettings.monitorProfile, options.rtSettings.autoMonitorProfile); } + for (const auto &p : epanels) { - p.second->defaultMonitorProfileChanged(options.rtSettings.monitorProfile, options.rtSettings.autoMonitorProfile); + p.second->defaultMonitorProfileChanged (options.rtSettings.monitorProfile, options.rtSettings.autoMonitorProfile); } } @@ -729,7 +737,7 @@ void RTWindow::toggle_fullscreen () if (btn_fullscreen) { //btn_fullscreen->set_label(M("MAIN_BUTTON_FULLSCREEN")); - btn_fullscreen->set_tooltip_markup(M("MAIN_BUTTON_FULLSCREEN")); + btn_fullscreen->set_tooltip_markup (M ("MAIN_BUTTON_FULLSCREEN")); btn_fullscreen->set_image (*iFullscreen); } } else { @@ -738,7 +746,7 @@ void RTWindow::toggle_fullscreen () if (btn_fullscreen) { //btn_fullscreen->set_label(M("MAIN_BUTTON_UNFULLSCREEN")); - btn_fullscreen->set_tooltip_markup(M("MAIN_BUTTON_UNFULLSCREEN")); + btn_fullscreen->set_tooltip_markup (M ("MAIN_BUTTON_UNFULLSCREEN")); btn_fullscreen->set_image (*iFullscreen_exit); } } @@ -761,50 +769,51 @@ void RTWindow::SetMainCurrent() void RTWindow::MoveFileBrowserToMain() { - if( fpanel->ribbonPane->get_children().empty()) { + if ( fpanel->ribbonPane->get_children().empty()) { FileCatalog *fCatalog = fpanel->fileCatalog; - epanel->catalogPane->remove(*fCatalog); - fpanel->ribbonPane->add(*fCatalog); - fCatalog->enableTabMode(false); - fCatalog->tbLeftPanel_1_visible(true); - fCatalog->tbRightPanel_1_visible(true); + epanel->catalogPane->remove (*fCatalog); + fpanel->ribbonPane->add (*fCatalog); + fCatalog->enableTabMode (false); + fCatalog->tbLeftPanel_1_visible (true); + fCatalog->tbRightPanel_1_visible (true); } } void RTWindow::MoveFileBrowserToEditor() { - if(epanel->catalogPane->get_children().empty() ) { + if (epanel->catalogPane->get_children().empty() ) { FileCatalog *fCatalog = fpanel->fileCatalog; - fpanel->ribbonPane->remove(*fCatalog); + fpanel->ribbonPane->remove (*fCatalog); fCatalog->disableInspector(); - epanel->catalogPane->add(*fCatalog); - epanel->showTopPanel(options.editorFilmStripOpened); - fCatalog->enableTabMode(true); + epanel->catalogPane->add (*fCatalog); + epanel->showTopPanel (options.editorFilmStripOpened); + fCatalog->enableTabMode (true); fCatalog->refreshHeight(); - fCatalog->tbLeftPanel_1_visible(false); - fCatalog->tbRightPanel_1_visible(false); + fCatalog->tbLeftPanel_1_visible (false); + fCatalog->tbRightPanel_1_visible (false); } } -void RTWindow::updateProfiles(const Glib::ustring &printerProfile, rtengine::RenderingIntent printerIntent, bool printerBPC) +void RTWindow::updateProfiles (const Glib::ustring &printerProfile, rtengine::RenderingIntent printerIntent, bool printerBPC) { - if(epanel) { - epanel->updateProfiles(printerProfile, printerIntent, printerBPC); + if (epanel) { + epanel->updateProfiles (printerProfile, printerIntent, printerBPC); } - for(auto panel : epanels) { - panel.second->updateProfiles(printerProfile, printerIntent, printerBPC); + for (auto panel : epanels) { + panel.second->updateProfiles (printerProfile, printerIntent, printerBPC); } } void RTWindow::updateTPVScrollbar (bool hide) { fpanel->updateTPVScrollbar (hide); - if(epanel) { + + if (epanel) { epanel->updateTPVScrollbar (hide); } - for(auto panel : epanels) { + for (auto panel : epanels) { panel.second->updateTPVScrollbar (hide); } } @@ -812,11 +821,12 @@ void RTWindow::updateTPVScrollbar (bool hide) void RTWindow::updateTabsUsesIcons (bool useIcons) { fpanel->updateTabsUsesIcons (useIcons); - if(epanel) { + + if (epanel) { epanel->updateTabsUsesIcons (useIcons); } - for(auto panel : epanels) { + for (auto panel : epanels) { panel.second->updateTabsUsesIcons (useIcons); } } @@ -833,22 +843,23 @@ void RTWindow::updateFBToolBarVisibility (bool showFilmStripToolBar) void RTWindow::updateHistogramPosition (int oldPosition, int newPosition) { - if(epanel) { + if (epanel) { epanel->updateHistogramPosition (oldPosition, newPosition); } - for(auto panel : epanels) { + + for (auto panel : epanels) { panel.second->updateHistogramPosition (oldPosition, newPosition); } } -bool RTWindow::splashClosed(GdkEventAny* event) +bool RTWindow::splashClosed (GdkEventAny* event) { delete splash; splash = nullptr; return true; } -void RTWindow::set_title_decorated(Glib::ustring fname) +void RTWindow::set_title_decorated (Glib::ustring fname) { Glib::ustring subtitle; @@ -856,7 +867,7 @@ void RTWindow::set_title_decorated(Glib::ustring fname) subtitle = " - " + fname; } - set_title(versionStr + subtitle); + set_title (versionStr + subtitle); } void RTWindow::closeOpenEditors() @@ -864,36 +875,36 @@ void RTWindow::closeOpenEditors() std::map::const_iterator itr; itr = epanels.begin(); - while(itr != epanels.end()) { - remEditorPanel((*itr).second); + while (itr != epanels.end()) { + remEditorPanel ((*itr).second); itr = epanels.begin(); } } -bool RTWindow::isEditorPanel(Widget* panel) +bool RTWindow::isEditorPanel (Widget* panel) { return (panel != bpanel) && (panel != fpanel); } -bool RTWindow::isEditorPanel(guint pageNum) +bool RTWindow::isEditorPanel (guint pageNum) { - return isEditorPanel(mainNB->get_nth_page(pageNum)); + return isEditorPanel (mainNB->get_nth_page (pageNum)); } -void RTWindow::setEditorMode(bool tabbedUI) +void RTWindow::setEditorMode (bool tabbedUI) { MoveFileBrowserToMain(); closeOpenEditors(); SetMainCurrent(); - if(tabbedUI) { - mainNB->remove_page(*epanel); + if (tabbedUI) { + mainNB->remove_page (*epanel); epanel = nullptr; - set_title_decorated(""); + set_title_decorated (""); } else { createSetmEditor(); epanel->show_all(); - set_title_decorated(""); + set_title_decorated (""); } } @@ -902,25 +913,25 @@ void RTWindow::createSetmEditor() // Editor panel, single-tab mode only epanel = Gtk::manage ( new EditorPanel (fpanel) ); epanel->setParent (this); - epanel->setParentWindow(this); + epanel->setParentWindow (this); // decorate tab Gtk::Grid* const editorLabelGrid = Gtk::manage (new Gtk::Grid ()); - setExpandAlignProperties(editorLabelGrid, false, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_CENTER); - Gtk::Label* const el = Gtk::manage (new Gtk::Label( Glib::ustring(" ") + M("MAIN_FRAME_EDITOR") )); + setExpandAlignProperties (editorLabelGrid, false, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_CENTER); + Gtk::Label* const el = Gtk::manage (new Gtk::Label ( Glib::ustring (" ") + M ("MAIN_FRAME_EDITOR") )); const auto pos = options.mainNBVertical ? Gtk::POS_TOP : Gtk::POS_RIGHT; if (options.mainNBVertical) { - el->set_angle(90); + el->set_angle (90); } - editorLabelGrid->attach_next_to(*Gtk::manage (new RTImage ("rt-logo-small.png")), pos, 1, 1); - editorLabelGrid->attach_next_to(*el, pos, 1, 1); + editorLabelGrid->attach_next_to (*Gtk::manage (new RTImage ("rt-logo-small.png")), pos, 1, 1); + editorLabelGrid->attach_next_to (*el, pos, 1, 1); - editorLabelGrid->set_tooltip_markup (M("MAIN_FRAME_EDITOR_TOOLTIP")); + editorLabelGrid->set_tooltip_markup (M ("MAIN_FRAME_EDITOR_TOOLTIP")); editorLabelGrid->show_all (); - epanel->tbTopPanel_1_visible(true); //show the toggle Top Panel button + epanel->tbTopPanel_1_visible (true); //show the toggle Top Panel button mainNB->append_page (*epanel, *editorLabelGrid); }