Re: double-clicked signal in GtkCList
| From: | James Cameron | Date: | Fri, 05 Apr 2002 01:39:11 +0000 |
| Subject: | Re: double-clicked signal in GtkCList | ||
| References: | 1 | Groups: | php.gtk.general |
| Request: | Send a blank email to php-gtk-general+get-1738@lists.php.net to get a copy of this message | ||
On Thu, Apr 04, 2002 at 10:35:24AM -0800, Geoff A. Virgo wrote:
> Anyone happen to know what the double-clicked signal emitted by GtkCList
> is? I tried using the event watcher from the 0.5.0 release but didn't find
> what I was looking for. Does such a signal exist?
Connect a button press event to the GtkCList, and then check the type
field of the event structure for GDK_2BUTTON_PRESS. Off-hand, I don't
know how to do it in PHP, but here is how it is done in C ... to make
a double-click on a list item behave the same as selecting Edit - Entry
from the pulldown menus.
gboolean
on_list_button_press_event (GtkWidget *widget,
GdkEventButton *event,
gpointer user_data)
{
if (GTK_IS_CLIST (widget) &&
(event->type == GDK_2BUTTON_PRESS)) {
on_Edit__activate (NULL, NULL);
}
return FALSE;
}
--
James Cameron mailto:quozl@us.netrek.org http://quozl.netrek.org/