GTK find dialog should activate on enter.

The place to discuss creating, porting and modifying Celestia's source code.
Topic author
bernard
Posts: 2
Joined: 26.10.2009
With us: 15 years

GTK find dialog should activate on enter.

Post #1by bernard » 26.10.2009, 12:14

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.

Avatar
John Van Vliet
Posts: 2944
Joined: 28.08.2002
With us: 22 years 2 months

Re: GTK find dialog should activate on enter.

Post #2by John Van Vliet » 30.10.2009, 06:38

--- edit ---
Last edited by John Van Vliet on 20.10.2013, 08:44, edited 1 time in total.

Topic author
bernard
Posts: 2
Joined: 26.10.2009
With us: 15 years

Re: GTK find dialog should activate on enter.

Post #3by bernard » 30.10.2009, 11:35

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.


Return to “Development”