Re: TreeView menu popup
- From: Vladimir Djokic <vladeck sezampro yu>
- To: Tristan Van Berkom <vantr touchtunes com>
- Cc: gtk-app-devel-list <gtk-app-devel-list gnome org>
- Subject: Re: TreeView menu popup
- Date: 08 Jan 2003 22:21:22 +0100
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]