RE: [gtk-list] GtkEditable::activate bug or feature?
- From: "Olivier Nenert" <onenert condumex com mx>
- To: <gtk-list redhat com>, "gtk-devel-list" <gtk-devel-list redhat com>
- Subject: RE: [gtk-list] GtkEditable::activate bug or feature?
- Date: Wed, 16 Feb 2000 10:46:26 -0600
Well... I'm not sure if it is correct,
but I feel the same...though it is not a GtkEditable problem,
but rather a GtkEntry problem...
----------------------------
case GDK_Return:
return_val = TRUE;
gtk_widget_activate (widget);
break;
-----------------------------
the gtk_widget_activate is done so that your problem would
be fixed by just modifying the original code this way :
--------------------------------
case GDK_Return:
return_val = gtk_widget_activate (widget);
break;
----------------------------------
(gtk_widget_activate checks if a handler is set to return TRUE or FALSE)
I personally feel it is a bug, as I have no idea why this key should be
always "stopped",
but GtkText behaves the same and return TRUE wether or not you have a signal
handler
connected to your object, but, as it is a lot of coincidence (specially if
you consider that it is not a
"by the power of copy-paste" bug, i suppose it is not a bug. (but i have no
idea why they do it...)
in GtkText, we have
---------------------------
return_val=TRUE;
...
...
case GDK_Return:
if (event->state & GDK_CONTROL_MASK)
gtk_signal_emit_by_name (GTK_OBJECT (text), "activate");
else
return_val = FALSE;
break;
----------------------------
Anyway, I guess you can subclass it easily to make your own key_press event
handler
and fix this bug-or-feature...
(I'd like someone who knows to tell us if it actually is a bug or not
anyway)
cheers
Olivier.
-----Mensaje original-----
De: Matt Goodall <mgg@isotek.co.uk>
Para: gtk-list <gtk-list@redhat.com>; gtk-devel-list
<gtk-devel-list@redhat.com>
Fecha: Miércoles, 16 de Febrero de 2000 09:33 a.m.
Asunto: [gtk-list] GtkEditable::activate bug or feature?
>Hi,
>
>Does anyone else consider it a bug that a GtkEditable swallows the enter
>key event even if it has no handlers connected to its activate signal? I
>would have expected it to let the event fall through to its parent so
>that it could trigger a default button.
>
>I'm currently downloading the GTK+ source to have a look but I presume
>other keys get "let through", i.e. tab and other focus change keys.
>
>Also, is there an official place to report bugs to or have I just done
>it?
>
>Cheers, Matt.
>
>--
>Matt Goodall | Isotek Electronics Ltd
>email: mgg@isotek.co.uk | Claro House, Servia Road
>Tel: +44 113 2343202 | Leeds, LS7 1NL
>Fax: +44 113 2342918 | England
>
>--
>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]