[837] 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 (Daniel R Risacher)
Mon Aug 25 17:21:47 1997

To: gtk-list@redhat.com
From: Daniel R Risacher <risacher@worldnet.att.net>
Date: 22 Aug 1997 17:32:09 -0500
In-Reply-To: Arun Sharma's message of Fri, 22 Aug 97 21:03:39 +0000
Resent-From: gtk-list@redhat.com
Reply-To: gtk-list@redhat.com

>>>>> "Arun" == Arun Sharma <arun@home.com> writes:

    Arun> gtk_entry seems to be missing the "activate" signal. As a
    Arun> user of the widget, if I need to catch the "hit enter"
    Arun> event, it's either not possible or inefficient.

    Arun> I see that gzilla gets around this problem, by defining a
    Arun> "activator" widget. But I think the code really belongs in
    Arun> gtk_entry.

    Arun> If there is agreement on this issue, I can send a patch
    Arun> out. Can someone tell me who I should be sending patches to
    Arun> ?

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

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

Dan Risacher


--- gtkwindow.c.old Tue Jun  3 19:34:34 1997
+++ gtkwindow.c    Fri Aug 15 20:14:54 1997
@@ -639,6 +639,8 @@
        case GDK_KP_Enter:
          if (window->default_widget)
            gtk_widget_activate (window->default_widget);
+         else if (window->focus_widget)
+           gtk_widget_activate (window->focus_widget);
          return_val = TRUE;
          break;
        case GDK_Up:

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


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