Page 1 of 1

GTK find dialog should activate on enter.

Posted: 26.10.2009, 12:14
by bernard
You'll have to forgive that I'm not working under subversion, I didn't intend to write a patch for Celestia, just to run it, but this is really annoying, so I delved in. Simple change:

Code: Select all

bash-4.0 [gtk]$ diff -u actions.original.cpp actions.cpp
--- actions.original.cpp   2009-10-27 01:17:38.000000000 +1300
+++ actions.cpp   2009-10-27 01:17:45.000000000 +1300
@@ -323,6 +323,7 @@
    gtk_box_pack_start(GTK_BOX(box), label, TRUE, TRUE, 0);
 
    GtkWidget* entry = gtk_entry_new();
+   gtk_entry_set_activates_default(GTK_ENTRY(entry), TRUE);
    gtk_box_pack_start(GTK_BOX(box), entry, TRUE, TRUE, 0);
 
    gtk_dialog_set_default_response(GTK_DIALOG(dialog), GTK_RESPONSE_OK);


Now you can hit ctrl-f, hit enter, and it works! Perhaps this is fixed in svn, apologies if so.


-Bernard.

Re: GTK find dialog should activate on enter.

Posted: 30.10.2009, 06:38
by John Van Vliet
--- edit ---

Re: GTK find dialog should activate on enter.

Posted: 30.10.2009, 11:35
by bernard
the celestia 1.6 tar builds with a working <enter> search window on fedora 11 ,Arch and cent 5.4
when compiling for --with-gtk,--with-gnome

That's strange; it certainly doesn't over here -- the diff in my post is from 1.6 tar.