diff --git a/rtdata/languages/default b/rtdata/languages/default index 6fc0a27c4..2561283aa 100644 --- a/rtdata/languages/default +++ b/rtdata/languages/default @@ -1370,6 +1370,7 @@ PREFERENCES_SHOWBASICEXIF;Show basic Exif info PREFERENCES_SHOWDATETIME;Show date and time PREFERENCES_SHOWFILMSTRIPTOOLBAR;Show Filmstrip toolbar PREFERENCES_SHOWEXPOSURECOMPENSATION;Append exposure compensation +PREFERENCES_SHOWTOOLTIP;Show Locallab Tooltips PREFERENCES_SHTHRESHOLD;Threshold for clipped shadows PREFERENCES_SINGLETAB;Single Editor Tab Mode PREFERENCES_SINGLETABVERTAB;Single Editor Tab Mode, Vertical Tabs diff --git a/rtgui/filecatalog.cc b/rtgui/filecatalog.cc index 2995a0de0..1d886a869 100644 --- a/rtgui/filecatalog.cc +++ b/rtgui/filecatalog.cc @@ -1977,6 +1977,19 @@ void FileCatalog::updateFBQueryTB (bool singleRow) hbToolBar1->unreference(); } +void FileCatalog::updateShowtooltipVisibility (bool showtooltip) +{ + if (showtooltip) { + showToolBar(); + } else { + hideToolBar(); + } + + refreshHeight(); +} + + + void FileCatalog::updateFBToolBarVisibility (bool showFilmStripToolBar) { if (showFilmStripToolBar) { diff --git a/rtgui/filecatalog.h b/rtgui/filecatalog.h index 8b5b14ed2..908c916e7 100644 --- a/rtgui/filecatalog.h +++ b/rtgui/filecatalog.h @@ -251,6 +251,7 @@ public: bool Query_key_pressed(GdkEventKey *event); void updateFBQueryTB (bool singleRow); void updateFBToolBarVisibility (bool showFilmStripToolBar); + void updateShowtooltipVisibility (bool showtooltip); void tbLeftPanel_1_toggled (); void tbLeftPanel_1_visible (bool visible); diff --git a/rtgui/options.cc b/rtgui/options.cc index de7337ad4..01cfe0e10 100644 --- a/rtgui/options.cc +++ b/rtgui/options.cc @@ -470,6 +470,7 @@ void Options::setDefaults() menuGroupFileOperations = true; menuGroupProfileOperations = true; menuGroupExtProg = true; + showtooltip = true; ICCPC_primariesPreset = "sRGB", ICCPC_redPrimaryX = 0.6400; @@ -649,7 +650,6 @@ void Options::setDefaults() rtSettings.lensfunDbDirectory = ""; // set also in main.cc and main-cli.cc cropGuides = CROP_GUIDE_FULL; cropAutoFit = false; - showtooltip = true; rtSettings.thumbnail_inspector_mode = rtengine::Settings::ThumbnailInspectorMode::JPEG; } @@ -1409,6 +1409,10 @@ void Options::readFromFile(Glib::ustring fname) showFilmStripToolBar = keyFile.get_boolean("GUI", "ShowFilmStripToolBar"); } + if (keyFile.has_key("GUI", "Showtooltip")) {//show tooltip in locallab + showtooltip = keyFile.get_boolean("GUI", "Showtooltip"); + } + if (keyFile.has_key("GUI", "FileBrowserToolbarSingleRow")) { FileBrowserToolbarSingleRow = keyFile.get_boolean("GUI", "FileBrowserToolbarSingleRow"); } @@ -1625,9 +1629,6 @@ void Options::readFromFile(Glib::ustring fname) rtSettings.cbdlsensi = keyFile.get_double("Color Management", "Cbdlsensi"); } - if (keyFile.has_key("Color Management", "Showtooltip")) {//show tooltip in locallab - showtooltip = keyFile.get_boolean("Color Management", "Showtooltip"); - } } @@ -2164,6 +2165,7 @@ void Options::saveToFile(Glib::ustring fname) keyFile.set_boolean("GUI", "HideTPVScrollbar", hideTPVScrollbar); keyFile.set_boolean("GUI", "HistogramWorking", rtSettings.HistogramWorking); keyFile.set_integer("GUI", "CurveBBoxPosition", curvebboxpos); + keyFile.set_boolean("GUI", "Showtooltip", showtooltip); //Glib::ArrayHandle crvopen = crvOpen; //keyFile.set_integer_list ("GUI", "CurvePanelsExpanded", crvopen); @@ -2213,7 +2215,6 @@ void Options::saveToFile(Glib::ustring fname) keyFile.set_string("Color Management", "ClutsDirectory", clutsDir); keyFile.set_integer("Color Management", "Previewselection", rtSettings.previewselection); keyFile.set_double("Color Management", "Cbdlsensi", rtSettings.cbdlsensi); - keyFile.set_boolean("Color Management", "Showtooltip", showtooltip); keyFile.set_string("ICC Profile Creator", "PimariesPreset", ICCPC_primariesPreset); keyFile.set_double("ICC Profile Creator", "RedPrimaryX", ICCPC_redPrimaryX); diff --git a/rtgui/preferences.cc b/rtgui/preferences.cc index f05153ddb..2c08ed408 100644 --- a/rtgui/preferences.cc +++ b/rtgui/preferences.cc @@ -958,6 +958,10 @@ Gtk::Widget* Preferences::getGeneralPanel() }; btnSaveTpOpenNow->signal_clicked().connect(save_tp_open_now); + ckbshowtooltiplocallab = Gtk::manage(new Gtk::CheckButton(M("PREFERENCES_SHOWTOOLTIP"))); + setExpandAlignProperties(ckbshowtooltiplocallab, false, false, Gtk::ALIGN_START, Gtk::ALIGN_START); + workflowGrid->attach(*ckbshowtooltiplocallab,0, 3); + fworklflow->add(*workflowGrid); vbGeneral->attach_next_to (*fworklflow, Gtk::POS_TOP, 2, 1); @@ -1052,6 +1056,7 @@ Gtk::Widget* Preferences::getGeneralPanel() navGuideColorCB->set_use_alpha(true); Gtk::VSeparator *vSep = Gtk::manage(new Gtk::VSeparator()); + appearanceGrid->attach(*themeLbl, 0, 0, 1, 1); appearanceGrid->attach(*themeCBT, 1, 0, 1, 1); @@ -1786,6 +1791,7 @@ void Preferences::storePreferences() moptions.showFilmStripToolBar = ckbShowFilmStripToolBar->get_active(); moptions.hideTPVScrollbar = ckbHideTPVScrollbar->get_active(); moptions.overwriteOutputFile = chOverwriteOutputFile->get_active(); + moptions.showtooltip = ckbshowtooltiplocallab->get_active(); moptions.autoSaveTpOpen = ckbAutoSaveTpOpen->get_active(); @@ -1995,7 +2001,7 @@ void Preferences::fillPreferences() ckbFileBrowserToolbarSingleRow->set_active(moptions.FileBrowserToolbarSingleRow); ckbShowFilmStripToolBar->set_active(moptions.showFilmStripToolBar); ckbHideTPVScrollbar->set_active(moptions.hideTPVScrollbar); - + ckbshowtooltiplocallab->set_active(moptions.showtooltip); ckbAutoSaveTpOpen->set_active(moptions.autoSaveTpOpen); threadsSpinBtn->set_value (moptions.rgbDenoiseThreadLimit); @@ -2391,6 +2397,13 @@ void Preferences::workflowUpdate() parent->updateFBToolBarVisibility(moptions.showFilmStripToolBar); } + if (moptions.showtooltip != options.showtooltip) { + // Update the visibility of tooltip + parent->updateShowtooltipVisibility(moptions.showtooltip); + } + + moptions.showtooltip = ckbshowtooltiplocallab->get_active(); + if (moptions.histogramPosition != options.histogramPosition) { // Update the position of the Histogram parent->updateHistogramPosition(options.histogramPosition, moptions.histogramPosition); diff --git a/rtgui/preferences.h b/rtgui/preferences.h index 6f434c477..fde3c4d06 100644 --- a/rtgui/preferences.h +++ b/rtgui/preferences.h @@ -200,6 +200,7 @@ class Preferences : public Gtk::Dialog, public ProfileStoreListener Gtk::CheckButton* ckbFileBrowserToolbarSingleRow; Gtk::CheckButton* ckbShowFilmStripToolBar; Gtk::CheckButton* ckbHideTPVScrollbar; + Gtk::CheckButton* ckbshowtooltiplocallab; Gtk::CheckButton* ckbAutoSaveTpOpen; Gtk::Button* btnSaveTpOpenNow; diff --git a/rtgui/rtwindow.cc b/rtgui/rtwindow.cc index 0d9017fbd..f5e57cce9 100644 --- a/rtgui/rtwindow.cc +++ b/rtgui/rtwindow.cc @@ -1078,6 +1078,11 @@ void RTWindow::updateFBToolBarVisibility (bool showFilmStripToolBar) fpanel->fileCatalog->updateFBToolBarVisibility (showFilmStripToolBar); } +void RTWindow::updateShowtooltipVisibility (bool showtooltip) +{ + fpanel->fileCatalog->updateShowtooltipVisibility (showtooltip); +} + void RTWindow::updateHistogramPosition (int oldPosition, int newPosition) { if (epanel) { diff --git a/rtgui/rtwindow.h b/rtgui/rtwindow.h index 5b58ab0eb..e4ff285c1 100644 --- a/rtgui/rtwindow.h +++ b/rtgui/rtwindow.h @@ -114,6 +114,7 @@ public: void updateHistogramPosition (int oldPosition, int newPosition); void updateFBQueryTB (bool singleRow); void updateFBToolBarVisibility (bool showFilmStripToolBar); + void updateShowtooltipVisibility (bool showtooltip); bool getIsFullscreen() { return is_fullscreen;