Re: calling gtk_menu_popup from a button's "clicked" signal
- From: Tristan Van Berkom <tvb gnome org>
- To: Hubert SokoÂowski <h sokolowski wsisiz edu pl>
- Cc: "gtk-app-devel-list gnome org" <gtk-app-devel-list gnome org>
- Subject: Re: calling gtk_menu_popup from a button's "clicked" signal
- Date: Mon, 25 Jul 2005 12:53:32 -0400
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 :)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]