|
|
@@ -31,7 +31,7 @@ using namespace rtengine::procparams;
|
|
|
|
ToolPanelCoordinator::ToolPanelCoordinator (bool batch) : ipc (nullptr), hasChanged (false), editDataProvider (nullptr)
|
|
|
|
ToolPanelCoordinator::ToolPanelCoordinator (bool batch) : ipc (nullptr), hasChanged (false), editDataProvider (nullptr)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
userPanel = Gtk::manage (new ToolVBox ());
|
|
|
|
favouritePanel = Gtk::manage (new ToolVBox ());
|
|
|
|
exposurePanel = Gtk::manage (new ToolVBox ());
|
|
|
|
exposurePanel = Gtk::manage (new ToolVBox ());
|
|
|
|
detailsPanel = Gtk::manage (new ToolVBox ());
|
|
|
|
detailsPanel = Gtk::manage (new ToolVBox ());
|
|
|
|
colorPanel = Gtk::manage (new ToolVBox ());
|
|
|
|
colorPanel = Gtk::manage (new ToolVBox ());
|
|
|
@@ -101,62 +101,62 @@ ToolPanelCoordinator::ToolPanelCoordinator (bool batch) : ipc (nullptr), hasChan
|
|
|
|
// Valeurs par dfaut:
|
|
|
|
// Valeurs par dfaut:
|
|
|
|
// Best -> low ISO
|
|
|
|
// Best -> low ISO
|
|
|
|
// Medium -> High ISO
|
|
|
|
// Medium -> High ISO
|
|
|
|
userTools.resize(options.userTools.size());
|
|
|
|
favourites.resize(options.favourites.size());
|
|
|
|
|
|
|
|
|
|
|
|
addUserPanel (colorPanel, whitebalance);
|
|
|
|
addfavouritePanel (colorPanel, whitebalance);
|
|
|
|
addUserPanel (exposurePanel, toneCurve);
|
|
|
|
addfavouritePanel (exposurePanel, toneCurve);
|
|
|
|
addUserPanel (colorPanel, vibrance);
|
|
|
|
addfavouritePanel (colorPanel, vibrance);
|
|
|
|
addUserPanel (colorPanel, chmixer);
|
|
|
|
addfavouritePanel (colorPanel, chmixer);
|
|
|
|
addUserPanel (colorPanel, blackwhite);
|
|
|
|
addfavouritePanel (colorPanel, blackwhite);
|
|
|
|
addUserPanel (exposurePanel, shadowshighlights);
|
|
|
|
addfavouritePanel (exposurePanel, shadowshighlights);
|
|
|
|
addUserPanel (detailsPanel, sharpening);
|
|
|
|
addfavouritePanel (detailsPanel, sharpening);
|
|
|
|
addUserPanel (detailsPanel, localContrast);
|
|
|
|
addfavouritePanel (detailsPanel, localContrast);
|
|
|
|
addUserPanel (detailsPanel, sharpenEdge);
|
|
|
|
addfavouritePanel (detailsPanel, sharpenEdge);
|
|
|
|
addUserPanel (detailsPanel, sharpenMicro);
|
|
|
|
addfavouritePanel (detailsPanel, sharpenMicro);
|
|
|
|
addUserPanel (colorPanel, hsvequalizer);
|
|
|
|
addfavouritePanel (colorPanel, hsvequalizer);
|
|
|
|
addUserPanel (colorPanel, filmSimulation);
|
|
|
|
addfavouritePanel (colorPanel, filmSimulation);
|
|
|
|
addUserPanel (colorPanel, softlight);
|
|
|
|
addfavouritePanel (colorPanel, softlight);
|
|
|
|
addUserPanel (colorPanel, rgbcurves);
|
|
|
|
addfavouritePanel (colorPanel, rgbcurves);
|
|
|
|
addUserPanel (colorPanel, colortoning);
|
|
|
|
addfavouritePanel (colorPanel, colortoning);
|
|
|
|
addUserPanel (exposurePanel, epd);
|
|
|
|
addfavouritePanel (exposurePanel, epd);
|
|
|
|
addUserPanel (exposurePanel, fattal);
|
|
|
|
addfavouritePanel (exposurePanel, fattal);
|
|
|
|
addUserPanel (advancedPanel, retinex);
|
|
|
|
addfavouritePanel (advancedPanel, retinex);
|
|
|
|
addUserPanel (exposurePanel, pcvignette);
|
|
|
|
addfavouritePanel (exposurePanel, pcvignette);
|
|
|
|
addUserPanel (exposurePanel, gradient);
|
|
|
|
addfavouritePanel (exposurePanel, gradient);
|
|
|
|
addUserPanel (exposurePanel, lcurve);
|
|
|
|
addfavouritePanel (exposurePanel, lcurve);
|
|
|
|
addUserPanel (advancedPanel, colorappearance);
|
|
|
|
addfavouritePanel (advancedPanel, colorappearance);
|
|
|
|
addUserPanel (detailsPanel, impulsedenoise);
|
|
|
|
addfavouritePanel (detailsPanel, impulsedenoise);
|
|
|
|
addUserPanel (detailsPanel, dirpyrdenoise);
|
|
|
|
addfavouritePanel (detailsPanel, dirpyrdenoise);
|
|
|
|
addUserPanel (detailsPanel, defringe);
|
|
|
|
addfavouritePanel (detailsPanel, defringe);
|
|
|
|
addUserPanel (detailsPanel, dirpyrequalizer);
|
|
|
|
addfavouritePanel (detailsPanel, dirpyrequalizer);
|
|
|
|
addUserPanel (detailsPanel, dehaze);
|
|
|
|
addfavouritePanel (detailsPanel, dehaze);
|
|
|
|
addUserPanel (advancedPanel, wavelet);
|
|
|
|
addfavouritePanel (advancedPanel, wavelet);
|
|
|
|
addUserPanel (transformPanel, crop);
|
|
|
|
addfavouritePanel (transformPanel, crop);
|
|
|
|
addUserPanel (transformPanel, resize);
|
|
|
|
addfavouritePanel (transformPanel, resize);
|
|
|
|
addPanel (resize->getPackBox(), prsharpening, 2);
|
|
|
|
addfavouritePanel (resize->getPackBox(), prsharpening, 2);
|
|
|
|
addUserPanel (transformPanel, lensgeom);
|
|
|
|
addfavouritePanel (transformPanel, lensgeom);
|
|
|
|
addPanel (lensgeom->getPackBox(), rotate, 2);
|
|
|
|
addfavouritePanel (lensgeom->getPackBox(), rotate, 2);
|
|
|
|
addPanel (lensgeom->getPackBox(), perspective, 2);
|
|
|
|
addfavouritePanel (lensgeom->getPackBox(), perspective, 2);
|
|
|
|
addPanel (lensgeom->getPackBox(), lensProf, 2);
|
|
|
|
addfavouritePanel (lensgeom->getPackBox(), lensProf, 2);
|
|
|
|
addPanel (lensgeom->getPackBox(), distortion, 2);
|
|
|
|
addfavouritePanel (lensgeom->getPackBox(), distortion, 2);
|
|
|
|
addPanel (lensgeom->getPackBox(), cacorrection, 2);
|
|
|
|
addfavouritePanel (lensgeom->getPackBox(), cacorrection, 2);
|
|
|
|
addPanel (lensgeom->getPackBox(), vignetting, 2);
|
|
|
|
addfavouritePanel (lensgeom->getPackBox(), vignetting, 2);
|
|
|
|
addUserPanel (colorPanel, icm);
|
|
|
|
addfavouritePanel (colorPanel, icm);
|
|
|
|
addUserPanel (rawPanel, sensorbayer);
|
|
|
|
addfavouritePanel (rawPanel, sensorbayer);
|
|
|
|
addPanel (sensorbayer->getPackBox(), bayerprocess, 2);
|
|
|
|
addfavouritePanel (sensorbayer->getPackBox(), bayerprocess, 2);
|
|
|
|
addPanel (sensorbayer->getPackBox(), bayerrawexposure, 2);
|
|
|
|
addfavouritePanel (sensorbayer->getPackBox(), bayerrawexposure, 2);
|
|
|
|
addPanel (sensorbayer->getPackBox(), bayerpreprocess, 2);
|
|
|
|
addfavouritePanel (sensorbayer->getPackBox(), bayerpreprocess, 2);
|
|
|
|
addPanel (sensorbayer->getPackBox(), rawcacorrection, 2);
|
|
|
|
addfavouritePanel (sensorbayer->getPackBox(), rawcacorrection, 2);
|
|
|
|
addUserPanel (rawPanel, sensorxtrans);
|
|
|
|
addfavouritePanel (rawPanel, sensorxtrans);
|
|
|
|
addPanel (sensorxtrans->getPackBox(), xtransprocess, 2);
|
|
|
|
addfavouritePanel (sensorxtrans->getPackBox(), xtransprocess, 2);
|
|
|
|
addPanel (sensorxtrans->getPackBox(), xtransrawexposure, 2);
|
|
|
|
addfavouritePanel (sensorxtrans->getPackBox(), xtransrawexposure, 2);
|
|
|
|
addUserPanel (rawPanel, rawexposure);
|
|
|
|
addfavouritePanel (rawPanel, rawexposure);
|
|
|
|
addUserPanel (rawPanel, preprocess);
|
|
|
|
addfavouritePanel (rawPanel, preprocess);
|
|
|
|
addUserPanel (rawPanel, darkframe);
|
|
|
|
addfavouritePanel (rawPanel, darkframe);
|
|
|
|
addUserPanel (rawPanel, flatfield);
|
|
|
|
addfavouritePanel (rawPanel, flatfield);
|
|
|
|
|
|
|
|
|
|
|
|
for(auto it = userTools.begin(); it != userTools.end(); ++it) {
|
|
|
|
for(auto it = favourites.begin(); it != favourites.end(); ++it) {
|
|
|
|
addPanel(userPanel, *it);
|
|
|
|
addPanel(favouritePanel, *it);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
toolPanels.push_back (coarse);
|
|
|
|
toolPanels.push_back (coarse);
|
|
|
|
toolPanels.push_back(metadata);
|
|
|
|
toolPanels.push_back(metadata);
|
|
|
@@ -164,7 +164,7 @@ ToolPanelCoordinator::ToolPanelCoordinator (bool batch) : ipc (nullptr), hasChan
|
|
|
|
toolPanelNotebook = new Gtk::Notebook ();
|
|
|
|
toolPanelNotebook = new Gtk::Notebook ();
|
|
|
|
toolPanelNotebook->set_name ("ToolPanelNotebook");
|
|
|
|
toolPanelNotebook->set_name ("ToolPanelNotebook");
|
|
|
|
|
|
|
|
|
|
|
|
userPanelSW = Gtk::manage (new MyScrolledWindow ());
|
|
|
|
favouritePanelSW = Gtk::manage (new MyScrolledWindow ());
|
|
|
|
exposurePanelSW = Gtk::manage (new MyScrolledWindow ());
|
|
|
|
exposurePanelSW = Gtk::manage (new MyScrolledWindow ());
|
|
|
|
detailsPanelSW = Gtk::manage (new MyScrolledWindow ());
|
|
|
|
detailsPanelSW = Gtk::manage (new MyScrolledWindow ());
|
|
|
|
colorPanelSW = Gtk::manage (new MyScrolledWindow ());
|
|
|
|
colorPanelSW = Gtk::manage (new MyScrolledWindow ());
|
|
|
@@ -182,9 +182,9 @@ ToolPanelCoordinator::ToolPanelCoordinator (bool batch) : ipc (nullptr), hasChan
|
|
|
|
vbPanelEnd[i]->show_all();
|
|
|
|
vbPanelEnd[i]->show_all();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
userPanelSW->add (*userPanel);
|
|
|
|
favouritePanelSW->add (*favouritePanel);
|
|
|
|
userPanel->pack_start (*Gtk::manage (new Gtk::HSeparator), Gtk::PACK_SHRINK, 0);
|
|
|
|
favouritePanel->pack_start (*Gtk::manage (new Gtk::HSeparator), Gtk::PACK_SHRINK, 0);
|
|
|
|
userPanel->pack_start (*vbPanelEnd[0], Gtk::PACK_SHRINK, 4);
|
|
|
|
favouritePanel->pack_start (*vbPanelEnd[0], Gtk::PACK_SHRINK, 4);
|
|
|
|
|
|
|
|
|
|
|
|
exposurePanelSW->add (*exposurePanel);
|
|
|
|
exposurePanelSW->add (*exposurePanel);
|
|
|
|
exposurePanel->pack_start (*Gtk::manage (new Gtk::HSeparator), Gtk::PACK_SHRINK, 0);
|
|
|
|
exposurePanel->pack_start (*Gtk::manage (new Gtk::HSeparator), Gtk::PACK_SHRINK, 0);
|
|
|
@@ -210,7 +210,7 @@ ToolPanelCoordinator::ToolPanelCoordinator (bool batch) : ipc (nullptr), hasChan
|
|
|
|
rawPanel->pack_start (*Gtk::manage (new Gtk::HSeparator), Gtk::PACK_SHRINK, 0);
|
|
|
|
rawPanel->pack_start (*Gtk::manage (new Gtk::HSeparator), Gtk::PACK_SHRINK, 0);
|
|
|
|
rawPanel->pack_start (*vbPanelEnd[5], Gtk::PACK_SHRINK, 0);
|
|
|
|
rawPanel->pack_start (*vbPanelEnd[5], Gtk::PACK_SHRINK, 0);
|
|
|
|
|
|
|
|
|
|
|
|
toiU = Gtk::manage (new TextOrIcon ("wb-sun.png", M ("MAIN_TAB_CUSTOM"), M ("MAIN_TAB_CUSTOM_TOOLTIP")));
|
|
|
|
toiF = Gtk::manage (new TextOrIcon ("wb-sun.png", M ("MAIN_TAB_FAVOURITES"), M ("MAIN_TAB_FAVOURITES_TOOLTIP")));
|
|
|
|
toiE = Gtk::manage (new TextOrIcon ("exposure.png", M ("MAIN_TAB_EXPOSURE"), M ("MAIN_TAB_EXPOSURE_TOOLTIP")));
|
|
|
|
toiE = Gtk::manage (new TextOrIcon ("exposure.png", M ("MAIN_TAB_EXPOSURE"), M ("MAIN_TAB_EXPOSURE_TOOLTIP")));
|
|
|
|
toiD = Gtk::manage (new TextOrIcon ("detail.png", M ("MAIN_TAB_DETAIL"), M ("MAIN_TAB_DETAIL_TOOLTIP")));
|
|
|
|
toiD = Gtk::manage (new TextOrIcon ("detail.png", M ("MAIN_TAB_DETAIL"), M ("MAIN_TAB_DETAIL_TOOLTIP")));
|
|
|
|
toiC = Gtk::manage (new TextOrIcon ("color-circles.png", M ("MAIN_TAB_COLOR"), M ("MAIN_TAB_COLOR_TOOLTIP")));
|
|
|
|
toiC = Gtk::manage (new TextOrIcon ("color-circles.png", M ("MAIN_TAB_COLOR"), M ("MAIN_TAB_COLOR_TOOLTIP")));
|
|
|
@@ -219,7 +219,7 @@ ToolPanelCoordinator::ToolPanelCoordinator (bool batch) : ipc (nullptr), hasChan
|
|
|
|
toiR = Gtk::manage (new TextOrIcon ("bayer.png", M ("MAIN_TAB_RAW"), M ("MAIN_TAB_RAW_TOOLTIP")));
|
|
|
|
toiR = Gtk::manage (new TextOrIcon ("bayer.png", M ("MAIN_TAB_RAW"), M ("MAIN_TAB_RAW_TOOLTIP")));
|
|
|
|
toiM = Gtk::manage (new TextOrIcon ("metadata.png", M ("MAIN_TAB_METADATA"), M ("MAIN_TAB_METADATA_TOOLTIP")));
|
|
|
|
toiM = Gtk::manage (new TextOrIcon ("metadata.png", M ("MAIN_TAB_METADATA"), M ("MAIN_TAB_METADATA_TOOLTIP")));
|
|
|
|
|
|
|
|
|
|
|
|
toolPanelNotebook->append_page (*userPanelSW, *toiU);
|
|
|
|
toolPanelNotebook->append_page (*favouritePanelSW, *toiF);
|
|
|
|
toolPanelNotebook->append_page (*exposurePanelSW, *toiE);
|
|
|
|
toolPanelNotebook->append_page (*exposurePanelSW, *toiE);
|
|
|
|
toolPanelNotebook->append_page (*detailsPanelSW, *toiD);
|
|
|
|
toolPanelNotebook->append_page (*detailsPanelSW, *toiD);
|
|
|
|
toolPanelNotebook->append_page (*colorPanelSW, *toiC);
|
|
|
|
toolPanelNotebook->append_page (*colorPanelSW, *toiC);
|
|
|
@@ -262,15 +262,15 @@ void ToolPanelCoordinator::addPanel (Gtk::Box* where, FoldableToolPanel* panel,
|
|
|
|
toolPanels.push_back (panel);
|
|
|
|
toolPanels.push_back (panel);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void ToolPanelCoordinator::addUserPanel (Gtk::Box* where, FoldableToolPanel* panel)
|
|
|
|
void ToolPanelCoordinator::addfavouritePanel (Gtk::Box* where, FoldableToolPanel* panel, int level)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
auto name = panel->getToolName();
|
|
|
|
auto name = panel->getToolName();
|
|
|
|
auto it = std::find(options.userTools.begin(), options.userTools.end(), name);
|
|
|
|
auto it = std::find(options.favourites.begin(), options.favourites.end(), name);
|
|
|
|
if (it != options.userTools.end()) {
|
|
|
|
if (it != options.favourites.end()) {
|
|
|
|
int index = std::distance(options.userTools.begin(), it);
|
|
|
|
int index = std::distance(options.favourites.begin(), it);
|
|
|
|
userTools[index] = panel;
|
|
|
|
favourites[index] = panel;
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
addPanel(where, panel);
|
|
|
|
addPanel(where, panel, level);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@@ -879,6 +879,10 @@ bool ToolPanelCoordinator::handleShortcutKey (GdkEventKey* event)
|
|
|
|
|
|
|
|
|
|
|
|
if (alt) {
|
|
|
|
if (alt) {
|
|
|
|
switch (event->keyval) {
|
|
|
|
switch (event->keyval) {
|
|
|
|
|
|
|
|
case GDK_KEY_u:
|
|
|
|
|
|
|
|
toolPanelNotebook->set_current_page (toolPanelNotebook->page_num (*favouritePanelSW));
|
|
|
|
|
|
|
|
return true;
|
|
|
|
|
|
|
|
|
|
|
|
case GDK_KEY_e:
|
|
|
|
case GDK_KEY_e:
|
|
|
|
toolPanelNotebook->set_current_page (toolPanelNotebook->page_num (*exposurePanelSW));
|
|
|
|
toolPanelNotebook->set_current_page (toolPanelNotebook->page_num (*exposurePanelSW));
|
|
|
|
return true;
|
|
|
|
return true;
|
|
|
@@ -916,7 +920,7 @@ void ToolPanelCoordinator::updateVScrollbars (bool hide)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
GThreadLock lock; // All GUI access from idle_add callbacks or separate thread HAVE to be protected
|
|
|
|
GThreadLock lock; // All GUI access from idle_add callbacks or separate thread HAVE to be protected
|
|
|
|
Gtk::PolicyType policy = hide ? Gtk::POLICY_NEVER : Gtk::POLICY_AUTOMATIC;
|
|
|
|
Gtk::PolicyType policy = hide ? Gtk::POLICY_NEVER : Gtk::POLICY_AUTOMATIC;
|
|
|
|
userPanelSW->set_policy (Gtk::POLICY_AUTOMATIC, policy);
|
|
|
|
favouritePanelSW->set_policy (Gtk::POLICY_AUTOMATIC, policy);
|
|
|
|
exposurePanelSW->set_policy (Gtk::POLICY_AUTOMATIC, policy);
|
|
|
|
exposurePanelSW->set_policy (Gtk::POLICY_AUTOMATIC, policy);
|
|
|
|
detailsPanelSW->set_policy (Gtk::POLICY_AUTOMATIC, policy);
|
|
|
|
detailsPanelSW->set_policy (Gtk::POLICY_AUTOMATIC, policy);
|
|
|
|
colorPanelSW->set_policy (Gtk::POLICY_AUTOMATIC, policy);
|
|
|
|
colorPanelSW->set_policy (Gtk::POLICY_AUTOMATIC, policy);
|
|
|
|