Hubert SokoĊowski wrote:
Hi!
I have a GtkMenu which I want to popup when a user clicks a button.
my function that is called when user clicks the button looks like this
void
on_zamowienia_button_print_clicked (GtkButton *button,
gpointer user_data)
{
...
}
How do I get the GdkEventButton here so I can pass the time and button
values to gtk_menu_popup ?
You cant,
usualy you would use "button-press-event" for that.
I suppose generating the arguments for gtk_menu_popup() is no big deal
but why would you want to use a GtkButton to create a context menu ?
Cheers,
-Tristan
Note that "You can't" is an overstatement, you probably /could/ get
ahold of the "button-release-event" emmission which is being handled
by GtkButtonClass (hence the emmission of "clicked") but that would
just be an API abuse :)
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list