Re: [gtk-list] gtk_entry and signals



>>>>> "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:



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