Favourites => Favorites, #5016
This commit is contained in:
@@ -31,7 +31,7 @@ using namespace rtengine::procparams;
|
||||
ToolPanelCoordinator::ToolPanelCoordinator (bool batch) : ipc (nullptr), hasChanged (false), editDataProvider (nullptr)
|
||||
{
|
||||
|
||||
favouritePanel = Gtk::manage (new ToolVBox ());
|
||||
favoritePanel = Gtk::manage (new ToolVBox ());
|
||||
exposurePanel = Gtk::manage (new ToolVBox ());
|
||||
detailsPanel = Gtk::manage (new ToolVBox ());
|
||||
colorPanel = Gtk::manage (new ToolVBox ());
|
||||
@@ -101,62 +101,64 @@ ToolPanelCoordinator::ToolPanelCoordinator (bool batch) : ipc (nullptr), hasChan
|
||||
// Valeurs par dfaut:
|
||||
// Best -> low ISO
|
||||
// Medium -> High ISO
|
||||
favourites.resize(options.favourites.size());
|
||||
favorites.resize(options.favorites.size(), nullptr);
|
||||
|
||||
addfavouritePanel (colorPanel, whitebalance);
|
||||
addfavouritePanel (exposurePanel, toneCurve);
|
||||
addfavouritePanel (colorPanel, vibrance);
|
||||
addfavouritePanel (colorPanel, chmixer);
|
||||
addfavouritePanel (colorPanel, blackwhite);
|
||||
addfavouritePanel (exposurePanel, shadowshighlights);
|
||||
addfavouritePanel (detailsPanel, sharpening);
|
||||
addfavouritePanel (detailsPanel, localContrast);
|
||||
addfavouritePanel (detailsPanel, sharpenEdge);
|
||||
addfavouritePanel (detailsPanel, sharpenMicro);
|
||||
addfavouritePanel (colorPanel, hsvequalizer);
|
||||
addfavouritePanel (colorPanel, filmSimulation);
|
||||
addfavouritePanel (colorPanel, softlight);
|
||||
addfavouritePanel (colorPanel, rgbcurves);
|
||||
addfavouritePanel (colorPanel, colortoning);
|
||||
addfavouritePanel (exposurePanel, epd);
|
||||
addfavouritePanel (exposurePanel, fattal);
|
||||
addfavouritePanel (advancedPanel, retinex);
|
||||
addfavouritePanel (exposurePanel, pcvignette);
|
||||
addfavouritePanel (exposurePanel, gradient);
|
||||
addfavouritePanel (exposurePanel, lcurve);
|
||||
addfavouritePanel (advancedPanel, colorappearance);
|
||||
addfavouritePanel (detailsPanel, impulsedenoise);
|
||||
addfavouritePanel (detailsPanel, dirpyrdenoise);
|
||||
addfavouritePanel (detailsPanel, defringe);
|
||||
addfavouritePanel (detailsPanel, dirpyrequalizer);
|
||||
addfavouritePanel (detailsPanel, dehaze);
|
||||
addfavouritePanel (advancedPanel, wavelet);
|
||||
addfavouritePanel (transformPanel, crop);
|
||||
addfavouritePanel (transformPanel, resize);
|
||||
addfavouritePanel (resize->getPackBox(), prsharpening, 2);
|
||||
addfavouritePanel (transformPanel, lensgeom);
|
||||
addfavouritePanel (lensgeom->getPackBox(), rotate, 2);
|
||||
addfavouritePanel (lensgeom->getPackBox(), perspective, 2);
|
||||
addfavouritePanel (lensgeom->getPackBox(), lensProf, 2);
|
||||
addfavouritePanel (lensgeom->getPackBox(), distortion, 2);
|
||||
addfavouritePanel (lensgeom->getPackBox(), cacorrection, 2);
|
||||
addfavouritePanel (lensgeom->getPackBox(), vignetting, 2);
|
||||
addfavouritePanel (colorPanel, icm);
|
||||
addfavouritePanel (rawPanel, sensorbayer);
|
||||
addfavouritePanel (sensorbayer->getPackBox(), bayerprocess, 2);
|
||||
addfavouritePanel (sensorbayer->getPackBox(), bayerrawexposure, 2);
|
||||
addfavouritePanel (sensorbayer->getPackBox(), bayerpreprocess, 2);
|
||||
addfavouritePanel (sensorbayer->getPackBox(), rawcacorrection, 2);
|
||||
addfavouritePanel (rawPanel, sensorxtrans);
|
||||
addfavouritePanel (sensorxtrans->getPackBox(), xtransprocess, 2);
|
||||
addfavouritePanel (sensorxtrans->getPackBox(), xtransrawexposure, 2);
|
||||
addfavouritePanel (rawPanel, rawexposure);
|
||||
addfavouritePanel (rawPanel, preprocess);
|
||||
addfavouritePanel (rawPanel, darkframe);
|
||||
addfavouritePanel (rawPanel, flatfield);
|
||||
addfavoritePanel (colorPanel, whitebalance);
|
||||
addfavoritePanel (exposurePanel, toneCurve);
|
||||
addfavoritePanel (colorPanel, vibrance);
|
||||
addfavoritePanel (colorPanel, chmixer);
|
||||
addfavoritePanel (colorPanel, blackwhite);
|
||||
addfavoritePanel (exposurePanel, shadowshighlights);
|
||||
addfavoritePanel (detailsPanel, sharpening);
|
||||
addfavoritePanel (detailsPanel, localContrast);
|
||||
addfavoritePanel (detailsPanel, sharpenEdge);
|
||||
addfavoritePanel (detailsPanel, sharpenMicro);
|
||||
addfavoritePanel (colorPanel, hsvequalizer);
|
||||
addfavoritePanel (colorPanel, filmSimulation);
|
||||
addfavoritePanel (colorPanel, softlight);
|
||||
addfavoritePanel (colorPanel, rgbcurves);
|
||||
addfavoritePanel (colorPanel, colortoning);
|
||||
addfavoritePanel (exposurePanel, epd);
|
||||
addfavoritePanel (exposurePanel, fattal);
|
||||
addfavoritePanel (advancedPanel, retinex);
|
||||
addfavoritePanel (exposurePanel, pcvignette);
|
||||
addfavoritePanel (exposurePanel, gradient);
|
||||
addfavoritePanel (exposurePanel, lcurve);
|
||||
addfavoritePanel (advancedPanel, colorappearance);
|
||||
addfavoritePanel (detailsPanel, impulsedenoise);
|
||||
addfavoritePanel (detailsPanel, dirpyrdenoise);
|
||||
addfavoritePanel (detailsPanel, defringe);
|
||||
addfavoritePanel (detailsPanel, dirpyrequalizer);
|
||||
addfavoritePanel (detailsPanel, dehaze);
|
||||
addfavoritePanel (advancedPanel, wavelet);
|
||||
addfavoritePanel (transformPanel, crop);
|
||||
addfavoritePanel (transformPanel, resize);
|
||||
addfavoritePanel (resize->getPackBox(), prsharpening, 2);
|
||||
addfavoritePanel (transformPanel, lensgeom);
|
||||
addfavoritePanel (lensgeom->getPackBox(), rotate, 2);
|
||||
addfavoritePanel (lensgeom->getPackBox(), perspective, 2);
|
||||
addfavoritePanel (lensgeom->getPackBox(), lensProf, 2);
|
||||
addfavoritePanel (lensgeom->getPackBox(), distortion, 2);
|
||||
addfavoritePanel (lensgeom->getPackBox(), cacorrection, 2);
|
||||
addfavoritePanel (lensgeom->getPackBox(), vignetting, 2);
|
||||
addfavoritePanel (colorPanel, icm);
|
||||
addfavoritePanel (rawPanel, sensorbayer);
|
||||
addfavoritePanel (sensorbayer->getPackBox(), bayerprocess, 2);
|
||||
addfavoritePanel (sensorbayer->getPackBox(), bayerrawexposure, 2);
|
||||
addfavoritePanel (sensorbayer->getPackBox(), bayerpreprocess, 2);
|
||||
addfavoritePanel (sensorbayer->getPackBox(), rawcacorrection, 2);
|
||||
addfavoritePanel (rawPanel, sensorxtrans);
|
||||
addfavoritePanel (sensorxtrans->getPackBox(), xtransprocess, 2);
|
||||
addfavoritePanel (sensorxtrans->getPackBox(), xtransrawexposure, 2);
|
||||
addfavoritePanel (rawPanel, rawexposure);
|
||||
addfavoritePanel (rawPanel, preprocess);
|
||||
addfavoritePanel (rawPanel, darkframe);
|
||||
addfavoritePanel (rawPanel, flatfield);
|
||||
|
||||
for(auto it = favourites.begin(); it != favourites.end(); ++it) {
|
||||
addPanel(favouritePanel, *it);
|
||||
for(auto it = favorites.begin(); it != favorites.end(); ++it) {
|
||||
if (*it) {
|
||||
addPanel(favoritePanel, *it);
|
||||
}
|
||||
}
|
||||
toolPanels.push_back (coarse);
|
||||
toolPanels.push_back(metadata);
|
||||
@@ -164,7 +166,7 @@ ToolPanelCoordinator::ToolPanelCoordinator (bool batch) : ipc (nullptr), hasChan
|
||||
toolPanelNotebook = new Gtk::Notebook ();
|
||||
toolPanelNotebook->set_name ("ToolPanelNotebook");
|
||||
|
||||
favouritePanelSW = Gtk::manage (new MyScrolledWindow ());
|
||||
favoritePanelSW = Gtk::manage (new MyScrolledWindow ());
|
||||
exposurePanelSW = Gtk::manage (new MyScrolledWindow ());
|
||||
detailsPanelSW = Gtk::manage (new MyScrolledWindow ());
|
||||
colorPanelSW = Gtk::manage (new MyScrolledWindow ());
|
||||
@@ -182,9 +184,9 @@ ToolPanelCoordinator::ToolPanelCoordinator (bool batch) : ipc (nullptr), hasChan
|
||||
vbPanelEnd[i]->show_all();
|
||||
}
|
||||
|
||||
favouritePanelSW->add (*favouritePanel);
|
||||
favouritePanel->pack_start (*Gtk::manage (new Gtk::HSeparator), Gtk::PACK_SHRINK, 0);
|
||||
favouritePanel->pack_start (*vbPanelEnd[0], Gtk::PACK_SHRINK, 4);
|
||||
favoritePanelSW->add (*favoritePanel);
|
||||
favoritePanel->pack_start (*Gtk::manage (new Gtk::HSeparator), Gtk::PACK_SHRINK, 0);
|
||||
favoritePanel->pack_start (*vbPanelEnd[0], Gtk::PACK_SHRINK, 4);
|
||||
|
||||
exposurePanelSW->add (*exposurePanel);
|
||||
exposurePanel->pack_start (*Gtk::manage (new Gtk::HSeparator), Gtk::PACK_SHRINK, 0);
|
||||
@@ -210,7 +212,7 @@ ToolPanelCoordinator::ToolPanelCoordinator (bool batch) : ipc (nullptr), hasChan
|
||||
rawPanel->pack_start (*Gtk::manage (new Gtk::HSeparator), Gtk::PACK_SHRINK, 0);
|
||||
rawPanel->pack_start (*vbPanelEnd[5], Gtk::PACK_SHRINK, 0);
|
||||
|
||||
toiF = Gtk::manage (new TextOrIcon ("wb-sun.png", M ("MAIN_TAB_FAVOURITES"), M ("MAIN_TAB_FAVOURITES_TOOLTIP")));
|
||||
toiF = Gtk::manage (new TextOrIcon ("wb-sun.png", M ("MAIN_TAB_FAVORITES"), M ("MAIN_TAB_FAVORITES_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")));
|
||||
toiC = Gtk::manage (new TextOrIcon ("color-circles.png", M ("MAIN_TAB_COLOR"), M ("MAIN_TAB_COLOR_TOOLTIP")));
|
||||
@@ -219,7 +221,7 @@ ToolPanelCoordinator::ToolPanelCoordinator (bool batch) : ipc (nullptr), hasChan
|
||||
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")));
|
||||
|
||||
toolPanelNotebook->append_page (*favouritePanelSW, *toiF);
|
||||
toolPanelNotebook->append_page (*favoritePanelSW, *toiF);
|
||||
toolPanelNotebook->append_page (*exposurePanelSW, *toiE);
|
||||
toolPanelNotebook->append_page (*detailsPanelSW, *toiD);
|
||||
toolPanelNotebook->append_page (*colorPanelSW, *toiC);
|
||||
@@ -262,13 +264,13 @@ void ToolPanelCoordinator::addPanel (Gtk::Box* where, FoldableToolPanel* panel,
|
||||
toolPanels.push_back (panel);
|
||||
}
|
||||
|
||||
void ToolPanelCoordinator::addfavouritePanel (Gtk::Box* where, FoldableToolPanel* panel, int level)
|
||||
void ToolPanelCoordinator::addfavoritePanel (Gtk::Box* where, FoldableToolPanel* panel, int level)
|
||||
{
|
||||
auto name = panel->getToolName();
|
||||
auto it = std::find(options.favourites.begin(), options.favourites.end(), name);
|
||||
if (it != options.favourites.end()) {
|
||||
int index = std::distance(options.favourites.begin(), it);
|
||||
favourites[index] = panel;
|
||||
auto it = std::find(options.favorites.begin(), options.favorites.end(), name);
|
||||
if (it != options.favorites.end()) {
|
||||
int index = std::distance(options.favorites.begin(), it);
|
||||
favorites[index] = panel;
|
||||
} else {
|
||||
addPanel(where, panel, level);
|
||||
}
|
||||
@@ -880,7 +882,7 @@ bool ToolPanelCoordinator::handleShortcutKey (GdkEventKey* event)
|
||||
if (alt) {
|
||||
switch (event->keyval) {
|
||||
case GDK_KEY_u:
|
||||
toolPanelNotebook->set_current_page (toolPanelNotebook->page_num (*favouritePanelSW));
|
||||
toolPanelNotebook->set_current_page (toolPanelNotebook->page_num (*favoritePanelSW));
|
||||
return true;
|
||||
|
||||
case GDK_KEY_e:
|
||||
@@ -920,7 +922,7 @@ void ToolPanelCoordinator::updateVScrollbars (bool hide)
|
||||
{
|
||||
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;
|
||||
favouritePanelSW->set_policy (Gtk::POLICY_AUTOMATIC, policy);
|
||||
favoritePanelSW->set_policy (Gtk::POLICY_AUTOMATIC, policy);
|
||||
exposurePanelSW->set_policy (Gtk::POLICY_AUTOMATIC, policy);
|
||||
detailsPanelSW->set_policy (Gtk::POLICY_AUTOMATIC, policy);
|
||||
colorPanelSW->set_policy (Gtk::POLICY_AUTOMATIC, policy);
|
||||
|
Reference in New Issue
Block a user