[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: TreeView menu popup



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]