Merge with 'Beep6581/dev'

This commit is contained in:
Pandagrapher
2023-04-29 11:24:55 +02:00
53 changed files with 1487 additions and 407 deletions

View File

@@ -291,15 +291,18 @@ Gtk::Widget* Preferences::getBatchProcPanel()
mi->set_value(behavColumns.label, M("TP_COLORAPP_LABEL"));
appendBehavList (mi, M("TP_COLORAPP_LABEL_SCENE") + " - " + M("TP_COLORAPP_ABSOLUTELUMINANCE"), ADDSET_CAT_ADAPTSCENE, true);
appendBehavList (mi, M("TP_COLORAPP_LABEL_VIEWING") + " - " + M("TP_COLORAPP_ABSOLUTELUMINANCE"), ADDSET_CAT_ADAPTVIEWING, true);
appendBehavList(mi, M("TP_COLORAPP_CIECAT_DEGREE"), ADDSET_CAT_DEGREE, true);
appendBehavList(mi, M("TP_COLORAPP_LIGHT"), ADDSET_CAT_LIGHT, true);
appendBehavList(mi, M("TP_COLORAPP_BRIGHT"), ADDSET_CAT_BRIGHT, true);
appendBehavList(mi, M("TP_COLORAPP_CHROMA"), ADDSET_CAT_CHROMA, true);
appendBehavList (mi, M ("TP_COLORAPP_CHROMA_S"), ADDSET_CAT_CHROMA_S, true);
appendBehavList (mi, M ("TP_COLORAPP_CHROMA_M"), ADDSET_CAT_CHROMA_M, true);
appendBehavList(mi, M ("TP_COLORAPP_CHROMA_S"), ADDSET_CAT_CHROMA_S, true);
appendBehavList(mi, M ("TP_COLORAPP_CHROMA_M"), ADDSET_CAT_CHROMA_M, true);
appendBehavList(mi, M("TP_COLORAPP_RSTPRO"), ADDSET_CAT_RSTPRO, true);
appendBehavList(mi, M("TP_COLORAPP_CONTRAST"), ADDSET_CAT_CONTRAST, true);
appendBehavList(mi, M("TP_COLORAPP_CONTRAST_Q"), ADDSET_CAT_CONTRAST_Q, true);
appendBehavList(mi, M("TP_COLORAPP_HUE"), ADDSET_CAT_HUE, true);
appendBehavList(mi, M("TP_COLORAPP_CIECAT_DEGREEOUT"), ADDSET_CAT_DEGREEOUT, true);
appendBehavList(mi, M("TP_WBALANCE_TEMPERATURE"), ADDSET_CAT_TEMPOUT, true);
appendBehavList(mi, M("TP_COLORAPP_BADPIXSL"), ADDSET_CAT_BADPIX, true);
mi = behModel->append();
@@ -606,6 +609,7 @@ Gtk::Widget* Preferences::getImageProcessingPanel ()
Gtk::Grid* dirgrid = Gtk::manage(new Gtk::Grid());
setExpandAlignProperties(dirgrid, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER);
// Dark Frames Dir
Gtk::Label *dfLab = Gtk::manage(new Gtk::Label(M("PREFERENCES_DIRDARKFRAMES") + ":"));
setExpandAlignProperties(dfLab, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER);
darkFrameDir = Gtk::manage(new MyFileChooserButton(M("PREFERENCES_DIRDARKFRAMES"), Gtk::FILE_CHOOSER_ACTION_SELECT_FOLDER));
@@ -619,7 +623,7 @@ Gtk::Widget* Preferences::getImageProcessingPanel ()
dfconn = darkFrameDir->signal_selection_changed().connect ( sigc::mem_fun (*this, &Preferences::darkFrameChanged));
// FLATFIELD
// Flatfield Dir
Gtk::Label *ffLab = Gtk::manage(new Gtk::Label(M("PREFERENCES_FLATFIELDSDIR") + ":"));
setExpandAlignProperties(ffLab, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER);
flatFieldDir = Gtk::manage(new MyFileChooserButton(M("PREFERENCES_FLATFIELDSDIR"), Gtk::FILE_CHOOSER_ACTION_SELECT_FOLDER));
@@ -645,6 +649,25 @@ Gtk::Widget* Preferences::getImageProcessingPanel ()
dirgrid->attach_next_to(*clutsDir, *clutsDirLabel, Gtk::POS_RIGHT, 1, 1);
dirgrid->attach_next_to(*clutsRestartNeeded, *clutsDir, Gtk::POS_RIGHT, 1, 1);
//Camera Profiles Dir
Gtk::Label *cameraProfilesDirLabel = Gtk::manage(new Gtk::Label(M("PREFERENCES_CAMERAPROFILESDIR") + ":"));
setExpandAlignProperties(cameraProfilesDirLabel, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER);
cameraProfilesDir = Gtk::manage(new MyFileChooserButton(M("PREFERENCES_CAMERAPROFILESDIR"), Gtk::FILE_CHOOSER_ACTION_SELECT_FOLDER));
setExpandAlignProperties(cameraProfilesDir, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER);
dirgrid->attach_next_to(*cameraProfilesDirLabel, *clutsDirLabel, Gtk::POS_BOTTOM, 1, 1);
dirgrid->attach_next_to(*cameraProfilesDir, *cameraProfilesDirLabel, Gtk::POS_RIGHT, 1, 1);
//Lens Profiles Dir
Gtk::Label *lensProfilesDirLabel = Gtk::manage(new Gtk::Label(M("PREFERENCES_LENSPROFILESDIR") + ":"));
setExpandAlignProperties(lensProfilesDirLabel, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER);
lensProfilesDir = Gtk::manage(new MyFileChooserButton(M("PREFERENCES_LENSPROFILESDIR"), Gtk::FILE_CHOOSER_ACTION_SELECT_FOLDER));
setExpandAlignProperties(lensProfilesDir, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER);
dirgrid->attach_next_to(*lensProfilesDirLabel, *cameraProfilesDirLabel, Gtk::POS_BOTTOM, 1, 1);
dirgrid->attach_next_to(*lensProfilesDir, *lensProfilesDirLabel, Gtk::POS_RIGHT, 1, 1);
//Pack directories to Image Processing panel
cdf->add(*dirgrid);
vbImageProcessing->pack_start (*cdf, Gtk::PACK_SHRINK, 4 );
@@ -928,6 +951,10 @@ Gtk::Widget* Preferences::getColorManPanel ()
fcie->add(*gcie);
vbColorMan->pack_start (*fcie, Gtk::PACK_SHRINK);
//-------------
swColorMan->add(*vbColorMan);
return swColorMan;
}
@@ -1725,8 +1752,8 @@ void Preferences::storePreferences()
moptions.externalEditorIndex = -1;
for (unsigned i = 0; i < editors.size(); i++) {
moptions.externalEditors[i] = (ExternalEditor(
editors[i].name, editors[i].command, editors[i].icon_serialized));
if (editors[i].other_data) {
editors[i].name, editors[i].command, editors[i].native_command, editors[i].icon_serialized));
if (editors[i].other_data.selected) {
// The current editor was marked before the list was edited. We
// found the mark, so this is the editor that was active.
moptions.externalEditorIndex = i;
@@ -1840,8 +1867,9 @@ void Preferences::storePreferences()
moptions.rtSettings.darkFramesPath = darkFrameDir->get_filename();
moptions.rtSettings.flatFieldsPath = flatFieldDir->get_filename();
moptions.clutsDir = clutsDir->get_filename();
moptions.rtSettings.cameraProfilesPath = cameraProfilesDir->get_filename();
moptions.rtSettings.lensProfilesPath = lensProfilesDir->get_filename();
moptions.baBehav.resize(ADDSET_PARAM_NUM);
@@ -1954,6 +1982,7 @@ void Preferences::fillPreferences()
monBPC->set_active(moptions.rtSettings.monitorBPC);
mcie->set_active(moptions.rtSettings.autocielab);
cbAutoMonProfile->set_active(moptions.rtSettings.autoMonitorProfile);
#endif
@@ -2005,12 +2034,11 @@ void Preferences::fillPreferences()
std::vector<ExternalEditorPreferences::EditorInfo> editorInfos;
for (const auto &editor : moptions.externalEditors) {
editorInfos.push_back(ExternalEditorPreferences::EditorInfo(
editor.name, editor.command, editor.icon_serialized));
editorInfos.emplace_back(editor.name, editor.command, editor.icon_serialized, editor.native_command);
}
if (moptions.externalEditorIndex >= 0) {
// Mark the current editor so we can track it.
editorInfos[moptions.externalEditorIndex].other_data = (void *)1;
editorInfos[moptions.externalEditorIndex].other_data.selected = true;
}
externalEditors->setEditors(editorInfos);
@@ -2097,6 +2125,10 @@ void Preferences::fillPreferences()
flatFieldChanged();
clutsDir->set_current_folder(moptions.clutsDir);
cameraProfilesDir->set_current_folder(moptions.rtSettings.cameraProfilesPath);
lensProfilesDir->set_current_folder(moptions.rtSettings.lensProfilesPath);
addc.block(true);
setc.block(true);
@@ -2501,7 +2533,10 @@ void Preferences::workflowUpdate()
}
if (changed) {
// Update the send to external editor widget.
parent->updateExternalEditorWidget(moptions.externalEditorIndex, moptions.externalEditors);
int selected_index = moptions.externalEditorIndex >= 0
? moptions.externalEditorIndex
: static_cast<int>(moptions.externalEditors.size());
parent->updateExternalEditorWidget(selected_index, moptions.externalEditors);
}
if (moptions.cloneFavoriteTools != options.cloneFavoriteTools ||