Re: How to grey out menu items



On 20.09.2015 01:05 Stefan Salewski <mail ssalewski de> wrote:
[...] May it be better, and is it possible to do that on the fly,
when the pulldown menu pops on? Maybe a signal which is emitted before
the item becomes visible? Can not find something like that
unfortunately.

You can connect to the "map-event" signal of the popup widget:
https://developer.gnome.org/gtk3/stable/GtkWidget.html#GtkWidget-map-event
or to the "select" signal of the menu item which owns the popup:
https://developer.gnome.org/gtk3/stable/GtkMenuItem.html#GtkMenuItem-select
The "activate" and "activate-item" signals are probably not good
because in Ubuntu Unity I've seen them emitted even when the popups
are not opened. Also I am not sure if they are emitted when a user
hovers the mouse over the item which opens the popup.

Regards,

Rafał Lużyński


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]