[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: TreeView menu popup
- From: Tristan Van Berkom <vantr touchtunes com>
- To: Vladimir Djokic <vladeck sezampro yu>
- Cc: gtk-app-devel-list <gtk-app-devel-list gnome org>
- Subject: Re: TreeView menu popup
- Date: Wed, 08 Jan 2003 16:59:25 -0500
this looks right.
> /* if I handle this event I should return TRUE? (I'm NOT shure :( ) */
This one I've been trying to figure out myself
for a while ... poked a little at the doc people ...
Matthias Clasen wrote:
http://developer.gnome.org/doc/API/2.0/gobject/gobject-Signals.html
and is still unclear on the subject.
If an object declares a signal it can
handle the signal _after_ the user-defined
handlers are called.
if a user defined handler returnes TRUE
do the G_SIGNAL_RUN_CLEANUP handlers get called ?
I dont know. This depends on the standard
gtk GClosure implementation (I think ?).
anyhow ... play around with it ...
try it once or twice and you'll know.
Cheers,
-Tristan
Vladimir Djokic wrote:
>
> Thanks, Tristan :)
>
> what I'm doing now is:
>
> * after creating GtkTreeView,
>
> g_signal_connect (G_OBJECT (dlg_student_find->list),
> "button_press_event",
> G_CALLBACK (dlg_student_find_mouse_cb),
> dlg_student_find);
>
> * callback
>
> void
> dlg_student_find_mouse_cb (GtkWidget *widget,
> GdkEventButton *event,
> gpointer data)
> {
> if (event->button == 3) {
> /* code to popup menu: */
> /* get x, y */
> /* select line beneath mouse pointer */
> /* popup menu at x,y ? */
> }
> /* if I handle this event I should return TRUE? (I'm NOT shure :( ) */
> return TRUE;
> }
>
> Is this OK? This is NEW to me (Events). I looked at X-Chat 1.9.7
> source, and docs Tristan recommended, and this feels right.
>
> Thanks,
> Vladimir.
>
> --
> "This is it... This is where I belong..."
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]