diff --git a/rtdata/languages/English b/rtdata/languages/English
index 23596a21d..692132baa 100644
--- a/rtdata/languages/English
+++ b/rtdata/languages/English
@@ -732,3 +732,4 @@
!ZOOMPANEL_ZOOMFITSCREEN;Fit to screen F
!ZOOMPANEL_ZOOMIN;Zoom In +
!ZOOMPANEL_ZOOMOUT;Zoom Out -
+!POPUPBUTTON_SELECTOPTIONHINT;RMB to change option
diff --git a/rtdata/languages/English (UK) b/rtdata/languages/English (UK)
index 65de9e6eb..97d7817ff 100644
--- a/rtdata/languages/English (UK)
+++ b/rtdata/languages/English (UK)
@@ -728,3 +728,4 @@ TP_HLREC_COLOR;Colour Propagation
!ZOOMPANEL_ZOOMFITSCREEN;Fit to screen F
!ZOOMPANEL_ZOOMIN;Zoom In +
!ZOOMPANEL_ZOOMOUT;Zoom Out -
+!POPUPBUTTON_SELECTOPTIONHINT;RMB to change option
diff --git a/rtdata/languages/English (US) b/rtdata/languages/English (US)
index 7e0de689f..aee6d57a1 100644
--- a/rtdata/languages/English (US)
+++ b/rtdata/languages/English (US)
@@ -732,3 +732,4 @@
!ZOOMPANEL_ZOOMFITSCREEN;Fit to screen F
!ZOOMPANEL_ZOOMIN;Zoom In +
!ZOOMPANEL_ZOOMOUT;Zoom Out -
+!POPUPBUTTON_SELECTOPTIONHINT;RMB to change option
diff --git a/rtdata/languages/Francais b/rtdata/languages/Francais
index 8f5ff5fd9..521b28b5a 100644
--- a/rtdata/languages/Francais
+++ b/rtdata/languages/Francais
@@ -713,7 +713,7 @@ ZOOMPANEL_ZOOM100;Zoom à 100% 1
ZOOMPANEL_ZOOMFITSCREEN;Ajuster à la fenêtre F
ZOOMPANEL_ZOOMIN;Zoom +
ZOOMPANEL_ZOOMOUT;Zoom -
-
+POPUPBUTTON_SELECTOPTIONHINT;'Menu contextuel' pour changer d'option
!!!!!!!!!!!!!!!!!!!!!!!!!
! Untranslated keys follow; remove the ! prefix after an entry is translated.
diff --git a/rtdata/languages/default b/rtdata/languages/default
index 3a65d7e42..60827fa0a 100644
--- a/rtdata/languages/default
+++ b/rtdata/languages/default
@@ -725,3 +725,4 @@ ZOOMPANEL_ZOOM100;Zoom to 100% 1
ZOOMPANEL_ZOOMFITSCREEN;Fit to screen F
ZOOMPANEL_ZOOMIN;Zoom In +
ZOOMPANEL_ZOOMOUT;Zoom Out -
+POPUPBUTTON_SELECTOPTIONHINT;RMB to change option
diff --git a/rtgui/popupcommon.cc b/rtgui/popupcommon.cc
index 31e8ce674..ac8d40d7b 100644
--- a/rtgui/popupcommon.cc
+++ b/rtgui/popupcommon.cc
@@ -19,11 +19,13 @@
* Class created by Jean-Christophe FRISCH, aka 'Hombre'
*/
+#include
#include
#include
PopUpCommon::PopUpCommon (Gtk::Button* thisButton, const Glib::ustring& label, bool imgRight) {
button = thisButton;
+ hasMenu = false;
if (label.size()) {
hasText = true;
button->set_label(label + " ");
@@ -91,6 +93,7 @@ bool PopUpCommon::addEntry (Glib::ustring imagePath, Glib::ustring label) {
// When there is at least 2 choice, we add the RMB connector
if (images.size() == 2) {
button->signal_button_release_event().connect_notify( sigc::mem_fun(*this, &PopUpCommon::showMenu) );
+ hasMenu = true;
}
// The item has been created
added = true;
@@ -129,7 +132,9 @@ void PopUpCommon::show() {
}
void PopUpCommon::setButtonHint() {
- button->set_tooltip_text(buttonHint.size() ? buttonHint + " : " + sItems.at(selected) : sItems.at(selected));
+ Glib::ustring hint = buttonHint.size() ? buttonHint + " : " + sItems.at(selected) : sItems.at(selected);
+ if (hasMenu) hint += "\n(" + M("POPUPBUTTON_SELECTOPTIONHINT") + ")";
+ button->set_tooltip_text(hint);
}
void PopUpCommon::showMenu(GdkEventButton* event) {
diff --git a/rtgui/popupcommon.h b/rtgui/popupcommon.h
index 22def0799..2a23c6d24 100644
--- a/rtgui/popupcommon.h
+++ b/rtgui/popupcommon.h
@@ -59,6 +59,7 @@ private:
int selected;
bool hasText;
bool imageRight;
+ bool hasMenu;
void showMenu(GdkEventButton* event);
void entrySelected (int i);