[829] in The GTK GIMP ToolKit mailing list archive

home help back first fref pref prev next nref lref last post

[gtk-list] Re: Popup-menus?

daemon@ATHENA.MIT.EDU (Jay Painter)
Mon Aug 25 01:20:20 1997

Date: Sun, 24 Aug 1997 22:19:43 -0700 (PDT)
From: Jay Painter <jpaint@serv.net>
To: gtk-list@redhat.com
In-Reply-To: <34011041.2EBA75D7@geocities.com>
Resent-From: gtk-list@redhat.com
Reply-To: gtk-list@redhat.com

> I assume that gtk_menu_popup(...) shows the popup, and it does when I
> test it. Ok. But how am I supposed to show it whenever, say, the right
> mousebutton is pressed. I suppose I have to connect some signal to
> something to make that work. Please could someone show me an example on
> how this is made.

You attach the widget's "event" signal to some function, and then you
decifer the event.  If it's a right mouse button press, then you pop-up
the window.  If you want an example, the e-mail client I'm working on has
a pop-up menu for moving mail messages that is activated by pressing the
right mouse button on the message you want to copy.  You can get it from
http://www.serv.net/~jpaint/balsa.  The file you want to look at is
index_interface.c

-Jay

--
To unsubscribe: mail -s unsubscribe gtk-list-request@redhat.com < /dev/null


home help back first fref pref prev next nref lref last post