Merge of andreyskv-classicui with default
This commit is contained in:
@@ -26,7 +26,7 @@
|
||||
extern Options options;
|
||||
extern Glib::ustring argv0;
|
||||
|
||||
Preferences::Preferences (int initialPage) {
|
||||
Preferences::Preferences (RTWindow *rtwindow):parent(rtwindow) {
|
||||
|
||||
set_title (M("MAIN_BUTTON_PREFERENCES"));
|
||||
|
||||
@@ -77,7 +77,7 @@ Preferences::Preferences (int initialPage) {
|
||||
nb->append_page (*getFileBrowserPanel(), M("PREFERENCES_TAB_BROWSER"));
|
||||
nb->append_page (*getColorManagementPanel(),M("PREFERENCES_TAB_COLORMGR"));
|
||||
nb->append_page (*getBatchProcPanel(), M("PREFERENCES_BATCH_PROCESSING"));
|
||||
nb->set_current_page (initialPage);
|
||||
nb->set_current_page (0);
|
||||
|
||||
fillPreferences ();
|
||||
|
||||
@@ -255,6 +255,7 @@ Gtk::Widget* Preferences::getProcParamsPanel () {
|
||||
Gtk::VBox* fdb = Gtk::manage (new Gtk::VBox ());
|
||||
fdb->set_border_width (4);
|
||||
fdem->add (*fdb);
|
||||
|
||||
Gtk::Label* dmlab = Gtk::manage (new Gtk::Label (M("PREFERENCES_DMETHOD")+":"));
|
||||
dmethod = Gtk::manage (new Gtk::ComboBoxText ());
|
||||
Gtk::HBox* hb11 = Gtk::manage (new Gtk::HBox ());
|
||||
@@ -268,6 +269,21 @@ Gtk::Widget* Preferences::getProcParamsPanel () {
|
||||
dmethod->append_text ("DCB");
|
||||
dmethod->append_text ("Fast Demosaic");//("AHD");
|
||||
dmethod->append_text ("Bilinear");
|
||||
|
||||
Gtk::Label* dmlab2 = Gtk::manage (new Gtk::Label (M("PREFERENCES_DMETHODBATCH")+": "));
|
||||
dmethodBatch = Gtk::manage (new Gtk::ComboBoxText ());
|
||||
Gtk::HBox* hb111 = Gtk::manage (new Gtk::HBox ());
|
||||
hb111->pack_start (*dmlab2, Gtk::PACK_SHRINK, 4);
|
||||
hb111->pack_start (*dmethodBatch);
|
||||
dmethodBatch->append_text ("EAHD");
|
||||
dmethodBatch->append_text ("HPHD");
|
||||
dmethodBatch->append_text ("VNG-4");
|
||||
//dmethod->append_text ("PPG");
|
||||
dmethodBatch->append_text ("AMaZE");//Emil's code for AMaZE
|
||||
dmethodBatch->append_text ("DCB");
|
||||
dmethodBatch->append_text ("Fast Demosaic");//("AHD");
|
||||
dmethodBatch->append_text ("Bilinear");
|
||||
|
||||
Gtk::Label* cclab = Gtk::manage (new Gtk::Label (M("PREFERENCES_FALSECOLOR")+":"));
|
||||
ccSteps = Gtk::manage (new Gtk::SpinButton ());
|
||||
ccSteps->set_digits (0);
|
||||
@@ -316,6 +332,7 @@ Gtk::Widget* Preferences::getProcParamsPanel () {
|
||||
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
fdb->pack_start (*hb11, Gtk::PACK_SHRINK, 4);
|
||||
fdb->pack_start (*hb111, Gtk::PACK_SHRINK, 4);
|
||||
fdb->pack_start (*hb12, Gtk::PACK_SHRINK, 4);
|
||||
fdb->pack_start (*hb13, Gtk::PACK_SHRINK, 4);
|
||||
fdb->pack_start (*dcbEnhance, Gtk::PACK_SHRINK, 4);
|
||||
@@ -338,6 +355,7 @@ Gtk::Widget* Preferences::getProcParamsPanel () {
|
||||
}
|
||||
|
||||
dmconn = dmethod->signal_changed().connect( sigc::mem_fun(*this, &Preferences::dmethodChanged) );
|
||||
dmconnBatch = dmethod->signal_changed().connect( sigc::mem_fun(*this, &Preferences::dmethodBatchChanged) );
|
||||
|
||||
return mvbpp;
|
||||
}
|
||||
@@ -377,6 +395,21 @@ Gtk::Widget* Preferences::getGeneralPanel () {
|
||||
|
||||
Gtk::VBox* mvbsd = new Gtk::VBox ();
|
||||
|
||||
Gtk::Frame* fworklflow = new Gtk::Frame (M("PREFERENCES_WORKFLOW"));
|
||||
Gtk::HBox* hbworkflow = new Gtk::HBox ();
|
||||
hbworkflow->set_border_width (4);
|
||||
Gtk::Label* flayoutlab = new Gtk::Label (M("PREFERENCES_EDITORLAYOUT")+":");
|
||||
editorLayout = new Gtk::ComboBoxText ();
|
||||
|
||||
editorLayout->append_text (M("PREFERENCES_SINGLETAB"));
|
||||
editorLayout->append_text (M("PREFERENCES_MULTITAB"));
|
||||
editorLayout->set_active (1);
|
||||
|
||||
hbworkflow->pack_start (*flayoutlab, Gtk::PACK_SHRINK, 4);
|
||||
hbworkflow->pack_start (*editorLayout);
|
||||
fworklflow->add (*hbworkflow);
|
||||
mvbsd->pack_start (*fworklflow, Gtk::PACK_SHRINK, 4);
|
||||
|
||||
Gtk::Frame* flang = new Gtk::Frame (M("PREFERENCES_DEFAULTLANG"));
|
||||
Gtk::HBox* hblang = new Gtk::HBox ();
|
||||
hblang->set_border_width (4);
|
||||
@@ -384,7 +417,6 @@ Gtk::Widget* Preferences::getGeneralPanel () {
|
||||
languages = new Gtk::ComboBoxText ();
|
||||
|
||||
std::vector<Glib::ustring> langs;
|
||||
parseDir (argv0 + "/languages", langs, "");
|
||||
for (int i=0; i<langs.size(); i++) {
|
||||
if ("default" != langs[i] && "README" != langs[i] && "LICENSE" != langs[i]) {
|
||||
languages->append_text (langs[i]);
|
||||
@@ -532,7 +564,7 @@ Gtk::Widget* Preferences::getGeneralPanel () {
|
||||
tconn = theme->signal_changed().connect( sigc::mem_fun(*this, &Preferences::themeChanged) );
|
||||
fconn = fontbutton->signal_font_set().connect( sigc::mem_fun(*this, &Preferences::fontChanged) );
|
||||
|
||||
|
||||
|
||||
return mvbsd;
|
||||
}
|
||||
|
||||
@@ -764,6 +796,21 @@ void Preferences::storePreferences () {
|
||||
moptions.rtSettings.demosaicMethod = "ahd";
|
||||
else if (dmethod->get_active_row_number()==6)
|
||||
moptions.rtSettings.demosaicMethod = "bilinear";
|
||||
|
||||
if (dmethodBatch->get_active_row_number()==0)
|
||||
moptions.rtSettings.demosaicMethodBatch = "eahd";
|
||||
else if (dmethodBatch->get_active_row_number()==1)
|
||||
moptions.rtSettings.demosaicMethodBatch = "hphd";
|
||||
else if (dmethodBatch->get_active_row_number()==2)
|
||||
moptions.rtSettings.demosaicMethodBatch = "vng4";
|
||||
else if (dmethodBatch->get_active_row_number()==3)
|
||||
moptions.rtSettings.demosaicMethodBatch = "amaze";
|
||||
else if (dmethodBatch->get_active_row_number()==4)
|
||||
moptions.rtSettings.demosaicMethodBatch = "dcb";
|
||||
else if (dmethodBatch->get_active_row_number()==5)
|
||||
moptions.rtSettings.demosaicMethodBatch = "ahd";
|
||||
else if (dmethodBatch->get_active_row_number()==6)
|
||||
moptions.rtSettings.demosaicMethodBatch = "bilinear";
|
||||
moptions.rtSettings.dcb_iterations=(int)dcbIterations->get_value();
|
||||
moptions.rtSettings.dcb_enhance=dcbEnhance->get_active();
|
||||
moptions.rtSettings.ca_autocorrect=caAutoCorrect->get_active();//Emil's CA correction
|
||||
@@ -811,11 +858,14 @@ void Preferences::storePreferences () {
|
||||
for (Gtk::TreeIter sections=behModel->children().begin(); sections!=behModel->children().end(); sections++)
|
||||
for (Gtk::TreeIter adjs=sections->children().begin(); adjs!=sections->children().end(); adjs++)
|
||||
moptions.baBehav[adjs->get_value (behavColumns.addsetid)] = adjs->get_value (behavColumns.badd);
|
||||
|
||||
moptions.tabbedUI = (bool)editorLayout->get_active_row_number();
|
||||
}
|
||||
|
||||
void Preferences::fillPreferences () {
|
||||
|
||||
dmconn.block (true);
|
||||
dmconnBatch.block(true);
|
||||
tconn.block (true);
|
||||
fconn.block (true);
|
||||
|
||||
@@ -836,7 +886,7 @@ void Preferences::fillPreferences () {
|
||||
blinkClipped->set_active (moptions.blinkClipped);
|
||||
hlThresh->set_value (moptions.highlightThreshold);
|
||||
shThresh->set_value (moptions.shadowThreshold);
|
||||
|
||||
|
||||
edGimp->set_active (moptions.editorToSendTo==1);
|
||||
edOther->set_active (moptions.editorToSendTo==3);
|
||||
#ifdef _WIN32
|
||||
@@ -868,6 +918,22 @@ void Preferences::fillPreferences () {
|
||||
dmethod->set_active (5);
|
||||
else if (moptions.rtSettings.demosaicMethod=="bilinear")
|
||||
dmethod->set_active (6);
|
||||
|
||||
if (moptions.rtSettings.demosaicMethodBatch=="eahd")
|
||||
dmethodBatch->set_active (0);
|
||||
else if (moptions.rtSettings.demosaicMethodBatch=="hphd")
|
||||
dmethodBatch->set_active (1);
|
||||
else if (moptions.rtSettings.demosaicMethodBatch=="vng4")
|
||||
dmethodBatch->set_active (2);
|
||||
else if (moptions.rtSettings.demosaicMethodBatch=="amaze")//Emil's code for AMaZE
|
||||
dmethodBatch->set_active (3);
|
||||
else if (moptions.rtSettings.demosaicMethodBatch=="dcb")
|
||||
dmethodBatch->set_active (4);
|
||||
else if (moptions.rtSettings.demosaicMethodBatch=="ahd")
|
||||
dmethodBatch->set_active (5);
|
||||
else if (moptions.rtSettings.demosaicMethodBatch=="bilinear")
|
||||
dmethodBatch->set_active (6);
|
||||
|
||||
dcbEnhance->set_active(moptions.rtSettings.dcb_enhance);
|
||||
dcbIterations->set_value(moptions.rtSettings.dcb_iterations);
|
||||
dcbEnhance->set_sensitive(moptions.rtSettings.demosaicMethod=="dcb");
|
||||
@@ -913,6 +979,7 @@ void Preferences::fillPreferences () {
|
||||
saveParamsCache->set_active (moptions.saveParamsCache);
|
||||
loadParamsPreference->set_active (moptions.paramsLoadLocation);
|
||||
|
||||
editorLayout->set_active(moptions.tabbedUI);
|
||||
addc.block (true);
|
||||
setc.block (true);
|
||||
if (moptions.baBehav.size() == ADDSET_PARAM_NUM) {
|
||||
@@ -929,6 +996,7 @@ void Preferences::fillPreferences () {
|
||||
setc.block (false);
|
||||
|
||||
dmconn.block (false);
|
||||
dmconnBatch.block(false);
|
||||
tconn.block (false);
|
||||
fconn.block (false);
|
||||
}
|
||||
@@ -950,6 +1018,7 @@ void Preferences::okPressed () {
|
||||
|
||||
storePreferences ();
|
||||
options.copyFrom (&moptions);
|
||||
workflowUpdate();
|
||||
hide ();
|
||||
}
|
||||
|
||||
@@ -1000,6 +1069,26 @@ void Preferences::dmethodChanged () {
|
||||
}
|
||||
}
|
||||
|
||||
void Preferences::dmethodBatchChanged () {
|
||||
|
||||
if (dmethod->get_active_row_number()==0)
|
||||
ccSteps->set_value (2);
|
||||
else if (dmethod->get_active_row_number()==1)
|
||||
ccSteps->set_value (1);
|
||||
else if (dmethod->get_active_row_number()==2)
|
||||
ccSteps->set_value (2);
|
||||
|
||||
if (dmethod->get_active_row_number()==4) {
|
||||
dcbEnhance->set_sensitive(true);
|
||||
dcbIterations->set_sensitive(true);
|
||||
dcbIterationsLabel->set_sensitive(true);
|
||||
} else {
|
||||
dcbEnhance->set_sensitive(false);
|
||||
dcbIterations->set_sensitive(false);
|
||||
dcbIterationsLabel->set_sensitive(false);
|
||||
}
|
||||
}
|
||||
|
||||
void Preferences::aboutPressed () {
|
||||
|
||||
Splash* splash = new Splash (-1);
|
||||
@@ -1028,6 +1117,14 @@ void Preferences::switchThemeTo(Glib::ustring newTheme) {
|
||||
gdk_event_send_clientmessage_toall ((GdkEvent*)&event);
|
||||
}
|
||||
|
||||
void Preferences::workflowUpdate (){
|
||||
|
||||
if(moptions.tabbedUI)
|
||||
parent->epanel->hide_all();
|
||||
else
|
||||
parent->epanel->show_all();
|
||||
}
|
||||
|
||||
void Preferences::switchFontTo(Glib::ustring newFont) {
|
||||
|
||||
Gtk::RC::parse_string (Glib::ustring::compose(
|
||||
@@ -1037,6 +1134,7 @@ void Preferences::switchFontTo(Glib::ustring newFont) {
|
||||
gdk_event_send_clientmessage_toall ((GdkEvent*)&event);
|
||||
}
|
||||
|
||||
|
||||
void Preferences::addExtPressed () {
|
||||
|
||||
Gtk::TreeNodeChildren c = extensionModel->children ();
|
||||
|
Reference in New Issue
Block a user