RE: gtkctree
- From: Lars Hamann <lars gtk org>
- To: Jonathan Blandford <jrb redhat com>
- Cc: gtk-list gtk org, stefan gtk org
- Subject: RE: gtkctree
- Date: Thu, 20 Aug 1998 10:01:57 +0200 (CEST)
On 19-Aug-98 Jonathan Blandford wrote:
> I am writing an application that uses a ctree. I would prefer it if
> nodes did not collapse/expand when double-clicked, and see no way to
> implement this without changing the ctree code. Do people use this
> feature?
Yes, I use it. It's easier than aiming at a little hot-spot.
Stuart Parmenter ask for a ctree mode without any hot-spots. This mode can't
work without the double-click functionality. But it should be easy for you
to stop this event if you don't want it. Simply do something like :
...
ctree = gtk_ctree_new_with_titles (2, 0, title);
gtk_signal_connect (GTK_OBJECT (ctree), "button_press_event",
GTK_SIGNAL_FUNC (button_press), NULL);
...
gint button_press (GtkCTree *ctree, GdkEventButton *event, gpointer data)
{
...
if (event->button == 1 && event->type == GDK_2BUTTON_PRESS)
gtk_signal_emit_stop_by_name (GTK_OBJECT (ctree), "button_press_event");
...
}
> Would it be possible to make this an option, or remove it
> altogether (it's easy enough for applications to trap the double-click
> and collapse/expand on their own.)
I don't want to make it configurable, because in this case we have to make
all button events configurable. That would only make sense if we had something
like key-bindings for mouse buttons too.
bye,
Lars
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]