Re: gnome_dialog_set_defaut



Jens Finke wrote:

> > I've got a GnomeDialog which contains 3 entries and a GtkCList. When I
> > enter data in the 3 entries and press enter, nothing happens.
> >
> > So, my question (or my complaint) is: what is the purpose of
> > gnome_dialog_set_default? I was really surprised to see that it didn't
> > work as I expected, which is to bind the ENTER key to the default
> > button. Right now, it does nothing, it just highlights the default
> > button, but nothing else.
> >
> > So, is this something to be changed in future versions or am I
> > misunderstanding something?
>
> A citation from Havoc's book should explain it (page 128):
>
> "Editable widgets emit the "activate" signal when Enter is pressed.
> Typically users expect Enter to activate the default dialog button, but if
> you have an editable widget such as GtkEntry in your dialog, it will
> capture any Enter presses, and keep the dialog's buttons from responding
> to them. gnome_dialog_editable_enters() activates the dialog's default
> button when the GtkEditable is activated, solving the problem."
>
> So, the usage of gnome_dialog_editable_enters() should solve the problem.
>

So, I had misunderstood something. Thanks very much.



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