Re: [gtk-list] accelerator or signal_connect question



>Hello,
>
> [snip]
>
>Do I have to connect each single entry with
>
>gtk_signal_connect (GTK_OBJECT (entry), "key_press_event",
>        GTK_SIGNAL_FUNC (paste_procedure),
>        NULL);

>
>but how can I make the paste_procedure remember into which entry the
>clipboard shall be pasted?


    The first arg of your paste procedure is a pointer to widget,
    and this widget is the widget which sent the signal. So your entry
    is (assuming your declaration if int paste_proc(GtkWidget *widget, ...))
    GtkEntry *entry = (GTK_ENTRY)(widget);

>
>Regards
>Daniel Hops
>
>--
>To unsubscribe: mail -s unsubscribe gtk-list-request@redhat.com < /dev/null
>
>



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