Re: Emulate doubleclick in GtkCList?



jeahh, thx helped a lot... i now have a new step of my selfmade ftp-client
:-)

sorry for the html-mail. i forgot that. it's my really first time on a
maillist, so i hope this massage will there also be.

thx a lot

claus


----- Original Message -----
From: "Paul Davis" <pbd Op Net>
To: "Claus Trojahn" <ich claus-trojahn de>
Cc: <gtk-list gnome org>
Sent: Tuesday, October 02, 2001 3:08 PM
Subject: Re: Emulate doubleclick in GtkCList?


> >can someone tell me, if there is a possibility to get the doubleclick =
> >event from an row of the CList.
> >It's needed for an own file-browser
>
> of course.
>
>    gtk_signal_connect (GTK_OBJECT(the_clist), "button_press_event",
>                        (GtkSignalFunc) my_handler, NULL);
>
>    ....
>
>    gint my_handler (GtkWidget *w, GdkEventButton *ev, gpointer data)
>    {
>        gint row, col;
>
>        switch (ev->type) {
>        case GDK_2BUTTON_PRESS:
>     gtk_clist_get_selection_info (GTK_CLIST(w), ev->x, ev->y,
>   &row, &col);
>             break;
>        ...
>
> You may want to (conditionally) add:
>
>       gtk_signal_emit_stop_by_signal (w, "button_press_event");
>
> in the handler to prevent the button press(es) from having their usual
> effect. Or you may not.
>
> all clear?
>
> oh, and please stop sending HTML formatted email in addition to plain
> text email. its wasteful of internet bandwidth and utterly horrible
> for those of us who use text-based email software.
>
> --p





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