diff --git a/rtgui/popupcommon.cc b/rtgui/popupcommon.cc index 881994589..2a1387d3f 100644 --- a/rtgui/popupcommon.cc +++ b/rtgui/popupcommon.cc @@ -19,6 +19,7 @@ * Class created by Jean-Christophe FRISCH, aka 'Hombre' */ +#include #include "multilangmgr.h" #include "popupcommon.h" #include "../rtengine/safegtk.h" @@ -135,6 +136,14 @@ void PopUpCommon::entrySelected (int i) } } +void PopUpCommon::setItemSensitivity (int i, bool isSensitive) { + Gtk::Menu_Helpers::MenuList items = menu->items(); + if (i < items.size()) { + items[i].set_sensitive(isSensitive); + } +} + + /* * Set the button image with the selected item */ diff --git a/rtgui/popupcommon.h b/rtgui/popupcommon.h index 872beb434..7b05a08e9 100644 --- a/rtgui/popupcommon.h +++ b/rtgui/popupcommon.h @@ -68,6 +68,7 @@ private: void showMenu(GdkEventButton* event); void entrySelected (int i); + void setItemSensitivity (int i, bool isSensitive); };