Favourites => Favorites, #5016

This commit is contained in:
heckflosse 2018-11-23 16:48:05 +01:00
parent 0ae602bcf0
commit 43b77679d4
5 changed files with 82 additions and 80 deletions

View File

@ -900,8 +900,8 @@ MAIN_TAB_ADVANCED;Advanced
MAIN_TAB_ADVANCED_TOOLTIP;Shortcut: <b>Alt-w</b>
MAIN_TAB_COLOR;Color
MAIN_TAB_COLOR_TOOLTIP;Shortcut: <b>Alt-c</b>
MAIN_TAB_FAVOURITES;Favourites
MAIN_TAB_FAVOURITES_TOOLTIP;Shortcut: <b>Alt-u</b>
MAIN_TAB_FAVORITES;Favorites
MAIN_TAB_FAVORITES_TOOLTIP;Shortcut: <b>Alt-u</b>
MAIN_TAB_DETAIL;Detail
MAIN_TAB_DETAIL_TOOLTIP;Shortcut: <b>Alt-d</b>
MAIN_TAB_DEVELOP; Batch Edit

View File

@ -399,7 +399,7 @@ void Options::setDefaults()
autoSaveTpOpen = true;
//crvOpen.clear ();
parseExtensions.clear();
favourites.clear();
favorites.clear();
parseExtensionsEnabled.clear();
parsedExtensions.clear();
renameUseTemplates = false;
@ -1070,8 +1070,8 @@ void Options::readFromFile(Glib::ustring fname)
}
if (keyFile.has_group("GUI")) {
if (keyFile.has_key("GUI", "Favourites")) {
favourites = keyFile.get_string_list("GUI", "Favourites");
if (keyFile.has_key("GUI", "Favorites")) {
favorites = keyFile.get_string_list("GUI", "Favorites");
}
if (keyFile.has_key("GUI", "WindowWidth")) {
@ -1972,8 +1972,8 @@ void Options::saveToFile(Glib::ustring fname)
keyFile.set_string("Profiles", "CustomProfileBuilderPath", CPBPath);
keyFile.set_integer("Profiles", "CustomProfileBuilderKeys", CPBKeys);
Glib::ArrayHandle<Glib::ustring> ahfavourites = favourites;
keyFile.set_string_list("GUI", "Favourites", ahfavourites);
Glib::ArrayHandle<Glib::ustring> ahfavorites = favorites;
keyFile.set_string_list("GUI", "Favorites", ahfavorites);
keyFile.set_integer("GUI", "WindowWidth", windowWidth);
keyFile.set_integer("GUI", "WindowHeight", windowHeight);
keyFile.set_integer("GUI", "WindowX", windowX);

View File

@ -375,7 +375,7 @@ public:
int fastexport_resize_height;
bool fastexport_use_fast_pipeline;
std::vector<Glib::ustring> favourites;
std::vector<Glib::ustring> favorites;
// Dialog settings
Glib::ustring lastIccDir;
Glib::ustring lastDarkframeDir;

View File

@ -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);

View File

@ -158,8 +158,8 @@ protected:
rtengine::StagedImageProcessor* ipc;
std::vector<ToolPanel*> toolPanels;
std::vector<FoldableToolPanel*> favourites;
ToolVBox* favouritePanel;
std::vector<FoldableToolPanel*> favorites;
ToolVBox* favoritePanel;
ToolVBox* exposurePanel;
ToolVBox* detailsPanel;
ToolVBox* colorPanel;
@ -180,7 +180,7 @@ protected:
Gtk::Image* imgPanelEnd[7];
Gtk::VBox* vbPanelEnd[7];
Gtk::ScrolledWindow* favouritePanelSW;
Gtk::ScrolledWindow* favoritePanelSW;
Gtk::ScrolledWindow* exposurePanelSW;
Gtk::ScrolledWindow* detailsPanelSW;
Gtk::ScrolledWindow* colorPanelSW;
@ -195,7 +195,7 @@ protected:
void addPanel (Gtk::Box* where, FoldableToolPanel* panel, int level = 1);
void foldThemAll (GdkEventButton* event);
void updateVScrollbars (bool hide);
void addfavouritePanel (Gtk::Box* where, FoldableToolPanel* panel, int level = 1);
void addfavoritePanel (Gtk::Box* where, FoldableToolPanel* panel, int level = 1);
private:
EditDataProvider *editDataProvider;