gEDA-dev: Escape key in compselect window

Carlos Nieves Ónega cnieves at iespana.es
Sat Jul 7 10:31:51 EDT 2007


El sáb, 07-07-2007 a las 14:47 +0200, Ivan Stankovic escribió:
> On Sat, Jul 07, 2007 at 01:17:10AM +0200, Carlos Nieves Ónega wrote:
> > Hi,
> > some time ago I was able to close the compselect window just hitting Esc
> > key. Now I can't do it that way anymore.
> > 
> > I think this was due to Ivan's patch removing code handling escape key
> > in dialogs (since this is already done by GtkDialog):
> > http://git.gpleda.org/?p=gaf.git;a=blobdiff;f=gschem/src/x_compselect.c;h=bfce626366f8be467803412c30198c883a0aa75b;hp=ccf9e4b5bf6d8dada25db4e67fa92f55b812a63f;hb=7067e71ef1558ceb94772a703cde1463233460fe;hpb=2a2fa60eee536f48cc27c16f2577106e78250ed6
> > 
> > It seems this is not working for compselect window, so I'm thinking
> > about reverting this change (only in x_compselect.c , of course). 
> > 
> > Ivan, any thoughts?
> 
> This has nothing to do with escape handling code, it seems. The
> problem appears to be the call to gtk_widget_grab_focus()
> when initializing component selector dialog. GTK is confused
> when we try to set the focus to the filter widget, but the
> currently displayed tab is the "In Use" tab. 

You are fully right.

> Commenting out the offending line fixes the problem for me (see the 
> patch below). We should probably remember which tab was last
> displayed in the dialog and then set the focus accordingly.

[snip]

I think it's better something like the attached patch. What do you
think?

Regards,

Carlos


-------------- next part --------------
A non-text attachment was scrubbed...
Name: focus_patch.diff
Type: text/x-patch
Size: 716 bytes
Desc: not available
Url : http://www.seul.org/pipermail/geda-dev/attachments/20070707/6c939931/attachment.bin 


More information about the geda-dev mailing list