Add method to explicitly handle menu item sensitivy for the pop-up button.
This commit is contained in:
@@ -19,6 +19,7 @@
|
|||||||
* Class created by Jean-Christophe FRISCH, aka 'Hombre'
|
* Class created by Jean-Christophe FRISCH, aka 'Hombre'
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <gtkmm.h>
|
||||||
#include "multilangmgr.h"
|
#include "multilangmgr.h"
|
||||||
#include "popupcommon.h"
|
#include "popupcommon.h"
|
||||||
#include "../rtengine/safegtk.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
|
* Set the button image with the selected item
|
||||||
*/
|
*/
|
||||||
|
@@ -68,6 +68,7 @@ private:
|
|||||||
|
|
||||||
void showMenu(GdkEventButton* event);
|
void showMenu(GdkEventButton* event);
|
||||||
void entrySelected (int i);
|
void entrySelected (int i);
|
||||||
|
void setItemSensitivity (int i, bool isSensitive);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user