diff --git a/rtdata/images/colour-24.png b/rtdata/images/colour-24.png new file mode 100644 index 000000000..2681422ae Binary files /dev/null and b/rtdata/images/colour-24.png differ diff --git a/rtdata/images/detail-24.png b/rtdata/images/detail-24.png new file mode 100644 index 000000000..116e21a86 Binary files /dev/null and b/rtdata/images/detail-24.png differ diff --git a/rtdata/images/exif-24.png b/rtdata/images/exif-24.png new file mode 100644 index 000000000..f8bc2a1e7 Binary files /dev/null and b/rtdata/images/exif-24.png differ diff --git a/rtdata/images/exposure-24.png b/rtdata/images/exposure-24.png new file mode 100644 index 000000000..5efefb92b Binary files /dev/null and b/rtdata/images/exposure-24.png differ diff --git a/rtdata/images/raw-24.png b/rtdata/images/raw-24.png new file mode 100644 index 000000000..77e98711d Binary files /dev/null and b/rtdata/images/raw-24.png differ diff --git a/rtdata/images/transform-24.png b/rtdata/images/transform-24.png new file mode 100644 index 000000000..afff31530 Binary files /dev/null and b/rtdata/images/transform-24.png differ diff --git a/rtdata/languages/Francais b/rtdata/languages/Francais index 48b79113d..8d5b6b572 100644 --- a/rtdata/languages/Francais +++ b/rtdata/languages/Francais @@ -681,7 +681,9 @@ PREFERENCES_TAB_IMPROC;Traitement de l'image PREFERENCES_TAB_OUTPUT;Options de sortie PREFERENCES_TAB_SOUND;Sons PREFERENCES_THUMBSIZE;Tailles des vignettes -PREFERENCES_TP_VSCROLLBAR;Cacher la barre de défilement verticale du panneau des outils +PREFERENCES_TP_LABEL;Panneau des outils: +PREFERENCES_TP_USEICONORTEXT;Utiliser des icônes au lieu de textes +PREFERENCES_TP_VSCROLLBAR;Cacher la barre de défilement verticale PREFERENCES_TUNNELMETADATA;Copier les données IPTC/XMP sans les\nchanger dans fichier de sortie PREFERENCES_USESYSTEMTHEME;Utiliser le thème système PREFERENCES_WORKFLOW;Habitudes de travail diff --git a/rtdata/languages/default b/rtdata/languages/default index 16cd380a3..c52e8be89 100644 --- a/rtdata/languages/default +++ b/rtdata/languages/default @@ -676,7 +676,9 @@ PREFERENCES_TAB_IMPROC;Image Processing PREFERENCES_TAB_OUTPUT;Output Options PREFERENCES_TAB_SOUND;Sounds PREFERENCES_THUMBSIZE;Thumbnail Size -PREFERENCES_TP_VSCROLLBAR;Hide tool panel's vertical scrollbar +PREFERENCES_TP_LABEL;Tool panel: +PREFERENCES_TP_USEICONORTEXT;Use tab icons instead of text +PREFERENCES_TP_VSCROLLBAR;Hide vertical scrollbar PREFERENCES_TUNNELMETADATA;Copy IPTC/XMP unchanged to output file (when tagging with other program) PREFERENCES_USESYSTEMTHEME; Use System Theme PREFERENCES_WORKFLOW;Layout diff --git a/rtgui/batchtoolpanelcoord.cc b/rtgui/batchtoolpanelcoord.cc index 79b6ab052..3aacb213c 100644 --- a/rtgui/batchtoolpanelcoord.cc +++ b/rtgui/batchtoolpanelcoord.cc @@ -35,6 +35,8 @@ BatchToolPanelCoordinator::BatchToolPanelCoordinator (FilePanel* parent) : ToolP if (ipi!=toolPanels.end()) toolPanels.erase (ipi); toolPanelNotebook->remove_page (*metadataPanel); + metadataPanel = 0; + toiM = 0; for (int i=0; isetBatchMode (true); diff --git a/rtgui/editorpanel.cc b/rtgui/editorpanel.cc index 77f810e3d..792ecf1e5 100644 --- a/rtgui/editorpanel.cc +++ b/rtgui/editorpanel.cc @@ -50,13 +50,10 @@ EditorPanel::EditorPanel (FilePanel* filePanel) leftbox->set_border_width (2); leftbox->set_size_request(100,250); - if (options.histogramPosition>0) { - histogramPanel = Gtk::manage (new HistogramPanel ()); - if (options.histogramPosition==1) leftbox->pack_start (*histogramPanel, Gtk::PACK_SHRINK, 4); - } else histogramPanel = NULL; + histogramPanel = NULL; profilep = Gtk::manage (new ProfilePanel ()); - Gtk::Frame* ppframe = Gtk::manage (new Gtk::Frame ()); + ppframe = new Gtk::Frame (); ppframe->add (*profilep); ppframe->set_label (M("PROFILEPANEL_LABEL")); //leftbox->pack_start (*ppframe, Gtk::PACK_SHRINK, 4); @@ -160,7 +157,6 @@ EditorPanel::EditorPanel (FilePanel* filePanel) vboxright->set_border_width (2); - if (options.histogramPosition==2) vboxright->pack_start (*histogramPanel, Gtk::PACK_SHRINK, 2); if (options.showProfileSelector) vboxright->pack_start (*ppframe, Gtk::PACK_SHRINK, 2); // main notebook vboxright->pack_start (*tpc->toolPanelNotebook); @@ -251,6 +247,9 @@ EditorPanel::EditorPanel (FilePanel* filePanel) hpanedr->signal_button_release_event().connect_notify( sigc::mem_fun(*this, &EditorPanel::rightPaneButtonReleased) ); pack_start (*hpanedr); + + updateHistogramPosition (0, options.histogramPosition); + show_all (); // save as dialog @@ -270,7 +269,6 @@ EditorPanel::EditorPanel (FilePanel* filePanel) tpc->addPParamsChangeListener (this); iarea->imageArea->setCropGUIListener (tpc->getCropGUIListener()); iarea->imageArea->setPointerMotionListener (navigator); - iarea->imageArea->setPointerMotionHListener (histogramPanel); iarea->imageArea->setImageAreaToolListener (tpc); // initialize components @@ -321,6 +319,7 @@ EditorPanel::~EditorPanel () { delete tpc; + delete ppframe; delete leftbox; delete vboxright; delete saveAsDialog; @@ -1286,7 +1285,7 @@ void EditorPanel::histogramChanged (LUTu & histRed, LUTu & histGreen, LUTu & his tpc->updateCurveBackgroundHistogram (histToneCurve, histLCurve); } -bool EditorPanel::CheckSidePanelsVisibility(){ +bool EditorPanel::CheckSidePanelsVisibility() { if(tbTopPanel_1->get_active()==false && tbRightPanel_1->get_active()==false && hidehp->get_active()==false) return false; else @@ -1304,7 +1303,7 @@ void EditorPanel::toggleSidePanels(){ hidehp->set_active (!bAllSidePanelsVisible); } -void EditorPanel::toggleSidePanelsZoomFit(){ +void EditorPanel::toggleSidePanelsZoomFit() { toggleSidePanels(); // fit image preview @@ -1312,7 +1311,7 @@ void EditorPanel::toggleSidePanelsZoomFit(){ // iarea->imageArea->zoomPanel->zoomFitClicked(); } -void EditorPanel::tbShowHideSidePanels_managestate(){ +void EditorPanel::tbShowHideSidePanels_managestate() { bool bAllSidePanelsVisible; bAllSidePanelsVisible = CheckSidePanelsVisibility(); ShowHideSidePanelsconn.block (true); @@ -1325,3 +1324,76 @@ void EditorPanel::tbShowHideSidePanels_managestate(){ void EditorPanel::updateTPVScrollbar (bool hide) { tpc->updateTPVScrollbar (hide); } + +void EditorPanel::updateTabsUsesIcons (bool useIcons) { + tpc->updateTabsUsesIcons (useIcons); +} + +void EditorPanel::updateProfileSelector (bool showMe) { + if (showMe) { + // add the profile panel + vboxright->pack_start (*ppframe, Gtk::PACK_SHRINK, 2); + vboxright->reorder_child(*ppframe, 0 + (options.histogramPosition==2?1:0)); + ppframe->show_all(); + } + else { + // remove (but don't delete) the profile panel + removeIfThere(vboxright, ppframe, false); + } +} + +void EditorPanel::updateHistogramPosition (int oldPosition, int newPosition) { + + switch (newPosition) { + case 0: + // No histogram + if (!oldPosition) { + // An histogram actually exist, we delete it + if (oldPosition == 1) + removeIfThere(leftbox, histogramPanel, false); + else if (oldPosition == 2) + removeIfThere(vboxright, histogramPanel, false); + delete histogramPanel; + histogramPanel = NULL; + } + // else no need to create it + break; + case 1: + // Histogram on the left pane + if (oldPosition == 0) { + // There was no Histogram before, so we create it + histogramPanel = Gtk::manage (new HistogramPanel ()); + leftbox->pack_start (*histogramPanel, Gtk::PACK_SHRINK, 2); + } + else if (oldPosition == 2) { + // The histogram was on the right side, so we move it to the left + histogramPanel->reference(); + removeIfThere(vboxright, histogramPanel, false); + leftbox->pack_start (*histogramPanel, Gtk::PACK_SHRINK, 2); + histogramPanel->unreference(); + } + histogramPanel->reorder(Gtk::ALIGN_LEFT); + leftbox->reorder_child(*histogramPanel, 0); + break; + case 2: + default: + // Histogram on the right pane + if (oldPosition == 0) { + // There was no Histogram before, so we create it + histogramPanel = Gtk::manage (new HistogramPanel ()); + vboxright->pack_start (*histogramPanel, Gtk::PACK_SHRINK, 2); + } + else if (oldPosition == 1) { + // The histogram was on the left side, so we move it to the right + histogramPanel->reference(); + removeIfThere(leftbox, histogramPanel, false); + vboxright->pack_start (*histogramPanel, Gtk::PACK_SHRINK, 2); + histogramPanel->unreference(); + } + histogramPanel->reorder(Gtk::ALIGN_RIGHT); + vboxright->reorder_child(*histogramPanel, 0); + break; + } + + iarea->imageArea->setPointerMotionHListener (histogramPanel); +} diff --git a/rtgui/editorpanel.h b/rtgui/editorpanel.h index 9d2d8b348..6e8ee6fcf 100644 --- a/rtgui/editorpanel.h +++ b/rtgui/editorpanel.h @@ -68,7 +68,8 @@ class EditorPanel : public Gtk::VBox, Gtk::Image *iTopPanel_1_Show, *iTopPanel_1_Hide; Gtk::Image *iRightPanel_1_Show, *iRightPanel_1_Hide; Gtk::Image *iShowHideSidePanels; - Gtk::VBox* leftbox, *vboxright; + Gtk::VBox *leftbox; + Gtk::VBox *vboxright; Gtk::Button* queueimg; Gtk::Button* saveimgas; @@ -85,6 +86,7 @@ class EditorPanel : public Gtk::VBox, Gtk::Label* afterLabel; Gtk::HBox* beforeAfterBox; + Gtk::Frame* ppframe; ProfilePanel* profilep; History* history; HistogramPanel* histogramPanel; @@ -177,7 +179,10 @@ class EditorPanel : public Gtk::VBox, bool handleShortcutKey (GdkEventKey* event); bool getIsProcessing() const { return isProcessing; } + void updateProfileSelector(bool showMe); void updateTPVScrollbar (bool hide); + void updateTabsUsesIcons (bool useIcons); + void updateHistogramPosition (int oldPosition, int newPosition); Gtk::Paned *catalogPane; }; diff --git a/rtgui/filecatalog.cc b/rtgui/filecatalog.cc index b35afe9f4..6cad42963 100644 --- a/rtgui/filecatalog.cc +++ b/rtgui/filecatalog.cc @@ -1443,6 +1443,24 @@ void FileCatalog::executeQuery(){ FileCatalog::filterChanged (); } +void FileCatalog::updateFBQueryTB (bool singleRow) { + hbToolBar1->reference(); + if (singleRow) { + bool removed = removeIfThere(this, hbToolBar1, false); + if (removed) { + buttonBar->pack_start(*hbToolBar1, Gtk::PACK_EXPAND_WIDGET, 0); + } + } + else { + bool removed = removeIfThere(buttonBar, hbToolBar1, false); + if (removed) { + pack_start(*hbToolBar1, Gtk::PACK_SHRINK, 0); + reorder_child(*hbToolBar1, 0); + } + } + hbToolBar1->unreference(); +} + void FileCatalog::buttonBrowsePathPressed () { Glib::ustring BrowsePathValue = BrowsePath->get_text(); Glib::ustring DecodedPathPrefix=""; diff --git a/rtgui/filecatalog.h b/rtgui/filecatalog.h index a3c5ab341..c2519495f 100644 --- a/rtgui/filecatalog.h +++ b/rtgui/filecatalog.h @@ -218,6 +218,7 @@ class FileCatalog : public Gtk::VBox, void buttonBrowsePathPressed (); void buttonQueryClearPressed (); void executeQuery (); + void updateFBQueryTB (bool singleRow); void tbLeftPanel_1_toggled (); void tbLeftPanel_1_visible (bool visible); diff --git a/rtgui/filepanel.cc b/rtgui/filepanel.cc index 6204d31fc..c34a36261 100644 --- a/rtgui/filepanel.cc +++ b/rtgui/filepanel.cc @@ -256,3 +256,7 @@ void FilePanel::loadingThumbs(Glib::ustring str, double rate) void FilePanel::updateTPVScrollbar (bool hide) { tpc->updateTPVScrollbar (hide); } + +void FilePanel::updateTabsUsesIcons (bool useIcons) { + tpc->updateTabsUsesIcons (useIcons); +} diff --git a/rtgui/filepanel.h b/rtgui/filepanel.h index bc6adbd02..bc57cbf8c 100644 --- a/rtgui/filepanel.h +++ b/rtgui/filepanel.h @@ -83,6 +83,7 @@ class FilePanel : public Gtk::HPaned, bool handleShortcutKey (GdkEventKey* event); void updateTPVScrollbar (bool hide); + void updateTabsUsesIcons (bool useIcons); }; #endif diff --git a/rtgui/guiutils.cc b/rtgui/guiutils.cc index ef0e06dd7..5229eda69 100644 --- a/rtgui/guiutils.cc +++ b/rtgui/guiutils.cc @@ -351,3 +351,48 @@ bool MyFileChooserButton::on_scroll_event (GdkEventScroll* event) { // ... otherwise the scroll event is sent back to an upper level return false; } + +TextOrIcon::TextOrIcon (Glib::ustring fname, Glib::ustring labelTx, Glib::ustring tooltipTx, TOITypes type) { + + imgIcon = 0; + label = 0; + filename = fname; + labelText = labelTx; + tooltipText = tooltipTx; + + switchTo(type); +} + +TextOrIcon::~TextOrIcon () { + if (imgIcon) delete imgIcon; + if (label) delete label; +} + +void TextOrIcon::switchTo(TOITypes type) { + switch (type) { + case (TOI_ICON): + if (!imgIcon) { + removeIfThere(this, label, false); + delete label; + label = 0; + imgIcon = new Gtk::Image (filename); + pack_start(*imgIcon, Gtk::PACK_SHRINK, 0); + set_tooltip_markup ("" + labelText + "\n" + tooltipText); + } + // do nothing if imgIcon exist, which mean that it is currently being displayed + break; + case(TOI_TEXT): + default: + if (!label) { + removeIfThere(this, imgIcon, false); + delete imgIcon; + imgIcon = 0; + label = new Gtk::Label (labelText, Gtk::ALIGN_CENTER); + pack_start(*label, Gtk::PACK_EXPAND_WIDGET, 0); + set_tooltip_markup (tooltipText); + } + // do nothing if label exist, which mean that it is currently being displayed + break; + } + show_all(); +} diff --git a/rtgui/guiutils.h b/rtgui/guiutils.h index a21b55d55..e150ca127 100644 --- a/rtgui/guiutils.h +++ b/rtgui/guiutils.h @@ -71,6 +71,9 @@ public: } }; +/** + * @brief subclass of Gtk::ScrolledWindow in order to handle the scrollwheel + */ class MyScrolledWindow : public Gtk::ScrolledWindow { bool on_scroll_event (GdkEventScroll* event); @@ -79,6 +82,9 @@ public: MyScrolledWindow(); }; +/** + * @brief subclass of Gtk::ComboBox in order to handle the scrollwheel + */ class MyComboBox : public Gtk::ComboBox { bool on_scroll_event (GdkEventScroll* event); @@ -87,6 +93,9 @@ public: MyComboBox (); }; +/** + * @brief subclass of Gtk::ComboBoxText in order to handle the scrollwheel + */ class MyComboBoxText : public Gtk::ComboBoxText { bool on_scroll_event (GdkEventScroll* event); @@ -95,6 +104,9 @@ public: MyComboBoxText (); }; +/** + * @brief subclass of Gtk::SpinButton in order to handle the scrollwheel + */ class MySpinButton : public Gtk::SpinButton { bool on_scroll_event (GdkEventScroll* event); @@ -103,11 +115,17 @@ public: MySpinButton (); }; +/** + * @brief subclass of Gtk::HScale in order to handle the scrollwheel + */ class MyHScale : public Gtk::HScale { bool on_scroll_event (GdkEventScroll* event); }; +/** + * @brief subclass of Gtk::FileChooserButton in order to handle the scrollwheel + */ class MyFileChooserButton : public Gtk::FileChooserButton { protected: @@ -117,4 +135,28 @@ public: MyFileChooserButton (const Glib::ustring& title, Gtk::FileChooserAction action=Gtk::FILE_CHOOSER_ACTION_OPEN); }; +enum TOITypes { + TOI_TEXT, + TOI_ICON +}; + +/** + * @brief Handle the switch between text and image to be displayed in the HBox (to be used in a button/toolpanel) + */ +class TextOrIcon : public Gtk::HBox { + +protected: + Gtk::Image* imgIcon; + Gtk::Label* label; + Glib::ustring filename; + Glib::ustring labelText; + Glib::ustring tooltipText; + +public: + TextOrIcon (Glib::ustring filename, Glib::ustring labelTx, Glib::ustring tooltipTx, TOITypes type); + ~TextOrIcon (); + + void switchTo(TOITypes type); +}; + #endif diff --git a/rtgui/histogrampanel.cc b/rtgui/histogrampanel.cc index b67617b22..a0e3b99c6 100644 --- a/rtgui/histogrampanel.cc +++ b/rtgui/histogrampanel.cc @@ -84,7 +84,7 @@ HistogramPanel::HistogramPanel () { showRAW->set_tooltip_text (M("HISTOGRAM_TOOLTIP_RAW")); showBAR->set_tooltip_text (M("HISTOGRAM_TOOLTIP_BAR")); - Gtk::VBox* buttonVBox = Gtk::manage (new Gtk::VBox (false, 2)); + buttonVBox = Gtk::manage (new Gtk::VBox (false, 2)); showRed->set_active (true); showGreen->set_active (true); showBlue->set_active (true); @@ -194,6 +194,17 @@ void HistogramPanel::pointerMoved (bool validPos, Glib::ustring profile, int x, } } +/* + * Move the vertical button bar to the right side + * only allowed values for align are Gtk::ALIGN_LEFT and Gtk::ALIGN_RIGHT + */ +void HistogramPanel::reorder (Gtk::AlignmentEnum align) { + if (align == Gtk::ALIGN_LEFT) + reorder_child(*buttonVBox, 0); + else + reorder_child(*buttonVBox, 1); +} + // // // @@ -686,7 +697,6 @@ bool HistogramArea::on_expose_event(GdkEventExpose* event) { return true; } - bool HistogramArea::on_button_press_event (GdkEventButton* event) { if (event->type==GDK_2BUTTON_PRESS && event->button==1) { diff --git a/rtgui/histogrampanel.h b/rtgui/histogrampanel.h index 3e76d6756..e6dfee4b2 100644 --- a/rtgui/histogrampanel.h +++ b/rtgui/histogrampanel.h @@ -148,6 +148,7 @@ class HistogramPanel : public Gtk::HBox, public PointerMotionListener { protected: Gtk::VBox* gfxVBox; + Gtk::VBox* buttonVBox; HistogramArea* histogramArea; HistogramRGBArea* histogramRGBArea; Gtk::ToggleButton* showRed; @@ -174,6 +175,7 @@ class HistogramPanel : public Gtk::HBox, public PointerMotionListener { // TODO should be protected void setHistRGBInvalid (); + void reorder (Gtk::AlignmentEnum align); void rgbv_toggled (); void resized (Gtk::Allocation& req); }; diff --git a/rtgui/options.cc b/rtgui/options.cc index e794879fa..906c356d1 100644 --- a/rtgui/options.cc +++ b/rtgui/options.cc @@ -154,6 +154,7 @@ void Options::setDefaults () { showProfileSelector = true; FileBrowserToolbarSingleRow = true; hideTPVScrollbar = false; + UseIconNoText = true; squareDetailWindow = false; menuGroupRank = true; menuGroupLabel = true; @@ -405,6 +406,7 @@ if (keyFile.has_group ("GUI")) { if (keyFile.has_key ("GUI", "SquareDetailWindow")) squareDetailWindow = keyFile.get_boolean ("GUI", "SquareDetailWindow"); if (keyFile.has_key ("GUI", "FileBrowserToolbarSingleRow")) FileBrowserToolbarSingleRow = keyFile.get_boolean ("GUI", "FileBrowserToolbarSingleRow"); if (keyFile.has_key ("GUI", "HideTPVScrollbar")) hideTPVScrollbar = keyFile.get_boolean ("GUI", "HideTPVScrollbar"); + if (keyFile.has_key ("GUI", "UseIconNoText")) UseIconNoText = keyFile.get_boolean ("GUI", "UseIconNoText"); } @@ -577,6 +579,7 @@ int Options::saveToFile (Glib::ustring fname) { keyFile.set_boolean ("GUI", "SquareDetailWindow", squareDetailWindow); keyFile.set_boolean ("GUI", "FileBrowserToolbarSingleRow", FileBrowserToolbarSingleRow); keyFile.set_boolean ("GUI", "HideTPVScrollbar", hideTPVScrollbar); + keyFile.set_boolean ("GUI", "UseIconNoText", UseIconNoText); //Glib::ArrayHandle crvopen = crvOpen; //keyFile.set_integer_list ("GUI", "CurvePanelsExpanded", crvopen); diff --git a/rtgui/options.h b/rtgui/options.h index 86d3d9ac2..f6978759a 100644 --- a/rtgui/options.h +++ b/rtgui/options.h @@ -155,6 +155,7 @@ class Options { bool squareDetailWindow; bool FileBrowserToolbarSingleRow; bool hideTPVScrollbar; + bool UseIconNoText; bool menuGroupRank; bool menuGroupLabel; diff --git a/rtgui/preferences.cc b/rtgui/preferences.cc index 313283cd4..8977a6708 100644 --- a/rtgui/preferences.cc +++ b/rtgui/preferences.cc @@ -436,11 +436,21 @@ Gtk::Widget* Preferences::getGeneralPanel () { Gtk::HBox* hbworkflow3 = Gtk::manage( new Gtk::HBox () ); ckbFileBrowserToolbarSingleRow = Gtk::manage( new Gtk::CheckButton (M("PREFERENCES_FILEBROWSERTOOLBARSINGLEROW")) ); + hbworkflow3->pack_start (*ckbFileBrowserToolbarSingleRow, Gtk::PACK_SHRINK, 4); vbworkflow->pack_start (*hbworkflow3, Gtk::PACK_SHRINK, 0); + Gtk::HBox* hbworkflow4 = Gtk::manage( new Gtk::HBox () ); + + Gtk::Label* hb4label = Gtk::manage( new Gtk::Label (M("PREFERENCES_TP_LABEL")) ); + hbworkflow4->pack_start (*hb4label, Gtk::PACK_SHRINK, 4); ckbHideTPVScrollbar = Gtk::manage( new Gtk::CheckButton (M("PREFERENCES_TP_VSCROLLBAR")) ); - vbworkflow->pack_start (*ckbHideTPVScrollbar, Gtk::PACK_SHRINK, 4); + hbworkflow4->pack_start (*ckbHideTPVScrollbar, Gtk::PACK_SHRINK, 4); + + ckbUseIconNoText = Gtk::manage( new Gtk::CheckButton (M("PREFERENCES_TP_USEICONORTEXT")) ); + hbworkflow4->pack_start (*ckbUseIconNoText, Gtk::PACK_SHRINK, 4); + + vbworkflow->pack_start (*hbworkflow4, Gtk::PACK_SHRINK, 4); fworklflow->add (*vbworkflow); mvbsd->pack_start (*fworklflow, Gtk::PACK_SHRINK, 4); @@ -1042,6 +1052,7 @@ void Preferences::storePreferences () { moptions.FileBrowserToolbarSingleRow = ckbFileBrowserToolbarSingleRow->get_active(); moptions.hideTPVScrollbar = ckbHideTPVScrollbar->get_active(); moptions.overwriteOutputFile = chOverwriteOutputFile->get_active (); + moptions.UseIconNoText = ckbUseIconNoText->get_active(); // Sounds moptions.sndEnable = ckbSndEnable->get_active (); @@ -1155,6 +1166,7 @@ void Preferences::fillPreferences () { ckbSquareDetailWindow->set_active(moptions.squareDetailWindow); ckbFileBrowserToolbarSingleRow->set_active(moptions.FileBrowserToolbarSingleRow); ckbHideTPVScrollbar->set_active(moptions.hideTPVScrollbar); + ckbUseIconNoText->set_active(moptions.UseIconNoText); //darkFrameDir->set_filename( moptions.rtSettings.darkFramesPath ); //updateDFinfos(); @@ -1328,10 +1340,27 @@ void Preferences::workflowUpdate (){ else parent->epanel->show_all(); } - if (moptions.hideTPVScrollbar != options.hideTPVScrollbar) { + if(moptions.hideTPVScrollbar != options.hideTPVScrollbar) { // Update the tool panels parent->updateTPVScrollbar (moptions.hideTPVScrollbar); } + if(moptions.UseIconNoText != options.UseIconNoText) { + // Update the tool's tab titles + parent->updateTabsUsesIcons(moptions.UseIconNoText); + } + if(moptions.FileBrowserToolbarSingleRow != options.FileBrowserToolbarSingleRow) { + // Update the position of the Query toolbar + parent->updateFBQueryTB(moptions.FileBrowserToolbarSingleRow); + } + if(moptions.histogramPosition != options.histogramPosition) { + // Update the position of the Histogram + parent->updateHistogramPosition(options.histogramPosition, moptions.histogramPosition); + } + if(moptions.showProfileSelector != options.showProfileSelector) { + // Update the position of the Profile selector + parent->updateTPProfileSelector(moptions.showProfileSelector); + } + } void Preferences::switchFontTo(Glib::ustring newFont) { diff --git a/rtgui/preferences.h b/rtgui/preferences.h index e9ea7d3d0..f02da17bd 100644 --- a/rtgui/preferences.h +++ b/rtgui/preferences.h @@ -134,6 +134,7 @@ class Preferences : public Gtk::Dialog { Gtk::CheckButton* ckbFileBrowserToolbarSingleRow; Gtk::CheckButton* ckbHideTPVScrollbar; Gtk::CheckButton* ckbSquareDetailWindow; + Gtk::CheckButton* ckbUseIconNoText; Options moptions; diff --git a/rtgui/rtwindow.cc b/rtgui/rtwindow.cc index 0e3d8f46d..9b7de0cc2 100644 --- a/rtgui/rtwindow.cc +++ b/rtgui/rtwindow.cc @@ -466,6 +466,15 @@ void RTWindow::MoveFileBrowserToEditor() } } +void RTWindow::updateTPProfileSelector (bool showMe) { + epanel->updateProfileSelector (showMe); + + std::map::const_iterator itr; + for(itr = epanels.begin(); itr != epanels.end(); ++itr){ + ((*itr).second)->updateProfileSelector (showMe); + } +} + void RTWindow::updateTPVScrollbar (bool hide) { fpanel->updateTPVScrollbar (hide); epanel->updateTPVScrollbar (hide); @@ -475,3 +484,26 @@ void RTWindow::updateTPVScrollbar (bool hide) { ((*itr).second)->updateTPVScrollbar (hide); } } + +void RTWindow::updateTabsUsesIcons (bool useIcons) { + fpanel->updateTabsUsesIcons (useIcons); + epanel->updateTabsUsesIcons (useIcons); + + std::map::const_iterator itr; + for(itr = epanels.begin(); itr != epanels.end(); ++itr){ + ((*itr).second)->updateTabsUsesIcons (useIcons); + } +} + +void RTWindow::updateFBQueryTB (bool singleRow) { + fpanel->fileCatalog->updateFBQueryTB (singleRow); +} + +void RTWindow::updateHistogramPosition (int oldPosition, int newPosition) { + epanel->updateHistogramPosition (oldPosition, newPosition); + + std::map::const_iterator itr; + for(itr = epanels.begin(); itr != epanels.end(); ++itr){ + ((*itr).second)->updateHistogramPosition (oldPosition, newPosition); + } +} diff --git a/rtgui/rtwindow.h b/rtgui/rtwindow.h index 3fad8ee0f..39bb137f4 100644 --- a/rtgui/rtwindow.h +++ b/rtgui/rtwindow.h @@ -78,6 +78,10 @@ class RTWindow : public Gtk::Window, public rtengine::ProgressListener{ void MoveFileBrowserToMain(); void updateTPVScrollbar (bool hide); + void updateTPProfileSelector (bool showMe); + void updateHistogramPosition (int oldPosition, int newPosition); + void updateTabsUsesIcons (bool useIcons); + void updateFBQueryTB (bool singleRow); bool getIsFullscreen() { return is_fullscreen; } }; diff --git a/rtgui/toolpanelcoord.cc b/rtgui/toolpanelcoord.cc index af8850952..7959493d3 100644 --- a/rtgui/toolpanelcoord.cc +++ b/rtgui/toolpanelcoord.cc @@ -148,48 +148,22 @@ ToolPanelCoordinator::ToolPanelCoordinator () : ipc(NULL) { rawPanel->pack_start (*Gtk::manage(new Gtk::HSeparator), Gtk::PACK_SHRINK,4); rawPanel->pack_start (*vbPanelEnd[4],Gtk::PACK_SHRINK,4); + TOITypes type = options.UseIconNoText ? TOI_ICON : TOI_TEXT; - Gtk::HBox* hbe = Gtk::manage (new Gtk::HBox ()); - hbe->pack_start (*Gtk::manage (new Gtk::Label (M("MAIN_TAB_EXPOSURE")))); - hbe->set_spacing (2); - hbe->set_tooltip_markup (M("MAIN_TAB_EXPOSURE_TOOLTIP")); - hbe->show_all (); - toolPanelNotebook->append_page (*exposurePanelSW, *hbe); + toiE = Gtk::manage (new TextOrIcon (argv0+"/images/exposure-24.png" , M("MAIN_TAB_EXPOSURE") , M("MAIN_TAB_EXPOSURE_TOOLTIP") , type)); + toiD = Gtk::manage (new TextOrIcon (argv0+"/images/detail-24.png" , M("MAIN_TAB_DETAIL") , M("MAIN_TAB_DETAIL_TOOLTIP") , type)); + toiC = Gtk::manage (new TextOrIcon (argv0+"/images/colour-24.png" , M("MAIN_TAB_COLOR") , M("MAIN_TAB_COLOR_TOOLTIP") , type)); + toiT = Gtk::manage (new TextOrIcon (argv0+"/images/transform-24.png", M("MAIN_TAB_TRANSFORM"), M("MAIN_TAB_TRANSFORM_TOOLTIP"), type)); + toiR = Gtk::manage (new TextOrIcon (argv0+"/images/raw-24.png" , M("MAIN_TAB_RAW") , M("MAIN_TAB_RAW_TOOLTIP") , type)); + toiM = Gtk::manage (new TextOrIcon (argv0+"/images/exif-24.png" , M("MAIN_TAB_METADATA") , M("MAIN_TAB_METADATA_TOOLTIP") , type)); - Gtk::HBox* hbd = Gtk::manage (new Gtk::HBox ()); - hbd->pack_start (*Gtk::manage (new Gtk::Label (M("MAIN_TAB_DETAIL")))); - hbd->set_spacing (2); - hbd->set_tooltip_markup (M("MAIN_TAB_DETAIL_TOOLTIP")); - hbd->show_all (); - toolPanelNotebook->append_page (*detailsPanelSW, *hbd); + toolPanelNotebook->append_page (*exposurePanelSW, *toiE); + toolPanelNotebook->append_page (*detailsPanelSW, *toiD); + toolPanelNotebook->append_page (*colorPanelSW, *toiC); + toolPanelNotebook->append_page (*transformPanelSW, *toiT); + toolPanelNotebook->append_page (*rawPanelSW, *toiR); + toolPanelNotebook->append_page (*metadataPanel, *toiM); - Gtk::HBox* hbc = Gtk::manage (new Gtk::HBox ()); - hbc->pack_start (*Gtk::manage (new Gtk::Label (M("MAIN_TAB_COLOR")))); - hbc->set_spacing (2); - hbc->set_tooltip_markup (M("MAIN_TAB_COLOR_TOOLTIP")); - hbc->show_all (); - toolPanelNotebook->append_page (*colorPanelSW, *hbc); - - Gtk::HBox* hbt = Gtk::manage (new Gtk::HBox ()); - hbt->pack_start (*Gtk::manage (new Gtk::Label (M("MAIN_TAB_TRANSFORM")))); - hbt->set_spacing (2); - hbt->set_tooltip_markup (M("MAIN_TAB_TRANSFORM_TOOLTIP")); - hbt->show_all (); - toolPanelNotebook->append_page (*transformPanelSW, *hbt); - - Gtk::HBox* hbr = Gtk::manage (new Gtk::HBox ()); - hbr->pack_start (*Gtk::manage (new Gtk::Label (M("MAIN_TAB_RAW")))); - hbr->set_spacing (2); - hbr->set_tooltip_markup (M("MAIN_TAB_RAW_TOOLTIP")); - hbr->show_all (); - toolPanelNotebook->append_page (*rawPanelSW, *hbr); - - Gtk::HBox* hbm = Gtk::manage (new Gtk::HBox ()); - hbm->pack_start (*Gtk::manage (new Gtk::Label (M("MAIN_TAB_METADATA")))); - hbm->set_spacing (2); - hbm->set_tooltip_markup (M("MAIN_TAB_METADATA_TOOLTIP")); - hbm->show_all (); - toolPanelNotebook->append_page (*metadataPanel, *hbm); toolPanelNotebook->set_current_page (0); toolPanelNotebook->set_scrollable (); @@ -549,9 +523,7 @@ bool ToolPanelCoordinator::handleShortcutKey (GdkEventKey* event) { toolPanelNotebook->set_current_page (toolPanelNotebook->page_num(*rawPanelSW)); return true; case GDK_m: - // !!! this should be improved by detecting if metadataPanel is present, - // as this page is removed in BatchToolPanelCoordinator::BatchToolPanelCoordinator - if (toolPanelNotebook->get_n_pages()==6){ + if (metadataPanel){ toolPanelNotebook->set_current_page (toolPanelNotebook->page_num(*metadataPanel)); return true; } @@ -569,6 +541,22 @@ void ToolPanelCoordinator::updateVScrollbars (bool hide) { rawPanelSW->set_policy (Gtk::POLICY_AUTOMATIC, policy); } +void ToolPanelCoordinator::updateTabsHeader (bool useIcons) { + TOITypes type = useIcons ? TOI_ICON : TOI_TEXT; + + toiE->switchTo(type); + toiD->switchTo(type); + toiC->switchTo(type); + toiT->switchTo(type); + toiR->switchTo(type); + if (toiM) + toiM->switchTo(type); +} + void ToolPanelCoordinator::updateTPVScrollbar (bool hide) { updateVScrollbars (hide); } + +void ToolPanelCoordinator::updateTabsUsesIcons (bool useIcons) { + updateTabsHeader (useIcons); +} diff --git a/rtgui/toolpanelcoord.h b/rtgui/toolpanelcoord.h index f8344a93a..b7392c6a5 100644 --- a/rtgui/toolpanelcoord.h +++ b/rtgui/toolpanelcoord.h @@ -120,6 +120,26 @@ class ToolPanelCoordinator : public ToolPanelListener, IPTCPanel* iptcpanel; ToolBar* toolBar; + TextOrIcon* toiE; + TextOrIcon* toiD; + TextOrIcon* toiC; + TextOrIcon* toiT; + TextOrIcon* toiR; + TextOrIcon* toiM; + + Gtk::Label* labelE; + Gtk::Label* labelD; + Gtk::Label* labelC; + Gtk::Label* labelT; + Gtk::Label* labelR; + Gtk::Label* labelM; + + Gtk::Image* imgIconE; + Gtk::Image* imgIconD; + Gtk::Image* imgIconC; + Gtk::Image* imgIconT; + Gtk::Image* imgIconR; + Gtk::Image* imgIconM; Gtk::Image* imgPanelEnd[5]; Gtk::VBox* vbPanelEnd[5]; @@ -136,6 +156,7 @@ class ToolPanelCoordinator : public ToolPanelListener, void addPanel (Gtk::Box* where, FoldableToolPanel* panel, Glib::ustring label); void foldThemAll (GdkEventButton* event); void updateVScrollbars (bool hide); + void updateTabsHeader (bool useIcons); public: @@ -203,6 +224,7 @@ class ToolPanelCoordinator : public ToolPanelListener, CropGUIListener* startCropEditing (Thumbnail* thm=NULL) { return crop; } void updateTPVScrollbar (bool hide); + void updateTabsUsesIcons (bool useIcons); bool handleShortcutKey (GdkEventKey* event); };