GtkOptionMenu



Hello,

I was wondering if it were possible to "cancel" an operation that
started by clicking onto a GtkOptionMenu.

I'm using a GtkOptionMenu widget and trapping the "changed"
signal. This works fine when the user actually selects one item in the
menu that pops up (which is he/she selects an item of the popped up
menu and release the mouse button while over it).

But what if the user starts with clicking onto the GtkOptionMenu
widget and then renounces the operation? He/She would leave the menu
that had popped up upon clicking in the GtkOptionMenu in the first
place, the focus would disappear from any of the menu items and the
user would think "ok, I can release the mouse button, because I'm sure
no action is taken: no menu item is selected".

It seems that this is not true: even if a user releases the mouse
button away from the GtkOptionMenu->menu widget (no item is selected
in the popped up menu), the "change" signal is emitted... How can I
make sure that no signal is emitted when the user sort of cancels the
GtkOptionMenu operation by leaving the widget alone and releasing the
mouse button away from it? Or is there any method to mimick this?

Thanks for any suggestion !

Bye,

Filippo

www.polyxmass.org



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