run through astyle
This commit is contained in:
parent
511f6c2a7b
commit
b39f072baf
@ -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());
|
||||
}
|
||||
|
||||
/*
|
||||
|
File diff suppressed because it is too large
Load Diff
339
rtgui/main.cc
339
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 << " <Chevrons> 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]) << " <folder> Start File Browser inside folder." << std::endl;
|
||||
std::cout << " " << Glib::path_get_basename(argv[0]) << " <file> 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 << " <Chevrons> 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]) << " <folder> Start File Browser inside folder." << std::endl;
|
||||
std::cout << " " << Glib::path_get_basename (argv[0]) << " <file> 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<Gtk::IconTheme> 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<Gdk::Screen> 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<Glib::Regex> 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<Glib::Regex> 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 *>(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 *> (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<char *>(argv0.c_str()) };
|
||||
char *app_argv[2] = { const_cast<char *> (argv0.c_str()) };
|
||||
int app_argc = 1;
|
||||
|
||||
if (!argv1.empty()) {
|
||||
app_argc = 2;
|
||||
app_argv[1] = const_cast<char *>(argv1.c_str());
|
||||
app_argv[1] = const_cast<char *> (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> rtWindow(create_rt_window());
|
||||
m.run(*rtWindow);
|
||||
const std::unique_ptr<RTWindow> 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();
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
}
|
||||
|
1803
rtgui/preferences.cc
1803
rtgui/preferences.cc
File diff suppressed because it is too large
Load Diff
@ -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<Thumbnail*> 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<rtengine::ProgressListener*>(this));
|
||||
pldBridge = new PLDBridge (static_cast<rtengine::ProgressListener*> (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<std::string> 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<EditorPanel*>(mainNB->get_nth_page(page_num));
|
||||
EditorPanel *ep = static_cast<EditorPanel*> (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<EditorPanel*>(mainNB->get_nth_page (mainNB->get_current_page()));
|
||||
set_title_decorated(ep->getFileName());
|
||||
EditorPanel* ep = static_cast<EditorPanel*> (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<Glib::ustring, EditorPanel*>::iterator iep = epanels.find(name);
|
||||
std::map<Glib::ustring, EditorPanel*>::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<EditorPanel*>(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<EditorPanel*> (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<EditorPanel*>(mainNB->get_nth_page (mainNB->get_current_page()));
|
||||
EditorPanel* ep = static_cast<EditorPanel*> (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<BatchQueueEntry*> 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<BatchQueueEntry*> &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<EditorPanel*>(mainNB->get_nth_page(i)))->getIsProcessing();
|
||||
if (isEditorPanel (i)) {
|
||||
isProcessing |= (static_cast<EditorPanel*> (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<Glib::ustring, EditorPanel*>::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<Glib::ustring, EditorPanel*>::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);
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user