[843] in The GTK GIMP ToolKit mailing list archive

home help back first fref pref prev next nref lref last post

[gtk-list] Re: gtk_entry and signals

daemon@ATHENA.MIT.EDU (Arun Sharma)
Mon Aug 25 20:29:15 1997

Date: Mon, 25 Aug 1997 20:29:07 -0400
To: gtk-list@redhat.com
In-reply-to: <m2203l97di.fsf@worldnet.att.net> (message from Daniel R Risacher
	on 22 Aug 1997 17:32:09 -0500)
From: Arun Sharma <arun@home.com>
Resent-From: gtk-list@redhat.com
Reply-To: gtk-list@redhat.com

On 22 Aug 1997 17:32:09 -0500, Daniel R Risacher wrote:

	d> Yes, this is a very good idea.  I was looking at this issue
	d> when I got distracted by the fact that, in gtkwindow.c,
	d> only the default widget gets GDK_Return and GDK_KP_Enter.
	d> If there is no default wigdet, I think the focus widget
	d> needs to get these events.

I had a different patch to this, which I posted on the list later.

	case GDK_KP_Enter:
          if (window->default_widget) {
            gtk_widget_activate (window->default_widget);
	    return_val = TRUE;
	  }
	  break;

This way, the widget gets the return key as a key_press event, which
it can handle in any way it pleases. Further, for a correct
implementation of the text widget, the return key has to be propagated
to it as a key press event.

	d> These two changes go together well.  I encourage you to
	d> implement your suggestion.

I've sent the patches to Peter. Let me know, if you're interested in
grabbing a copy.

	-Arun

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


home help back first fref pref prev next nref lref last post