Hi, > Gesendet: Freitag, 03. Februar 2017 um 18:57 Uhr > Von: "Enrico Weigelt, metux IT consult" <[email protected]> > An: [email protected] > Cc: [email protected] > Betreff: Re: [Freecol-developers] [PATCH] client: gui: panel: harmonize close > behavior of panels - enable ESC for all > > Looks like it something broke the mail path or copying it out. > Perhaps just cherry-pick from here: > > https://github.com/oss-qm/freecol/tree/SUBMIT_panel_esc
I fetching the branch from your github worked. > > From what I see it would couple the esc key in all panels > > with the ok button, but some might also have a cancel button, > > which is the more natural fit for the esc key and having the > > key activate ok in that case may confuse users. > > IMHO, these dialogs already set this key binding on their own, > thus overwriting the default my patch introduces. > > > Though > > I'm not sure atm if its only dialogs that have a cancel button > > in FreeCol or if theres also some panels. Did you check for this? > > Should only affect those panels that have an ok button. At least, > other panels dont just close on pressing esc. > > OTOH, of course, we could introduce a flag for that. > Maybe even more generalized by some standard buttons attribute, > eg. whether we have just ok, or and abort, etc. > > > --mtx > > Sorry, but I can not apply this patch. When I was looking at it with more context than in the diff I saw that you basically moved a local hack from one panel to subvert the method which already tries to do what you want to add, but with the option of overriding the button used for the esc key. By default FreeColPanel.setCancelComponent already gets already called with the ok button as argument in the FreeColPanel constructor and then some other Panels call it again to set another button instead. I think, the right method to fix the problem would be to actually find out why calling the unmodified FreeColPanel.setCancelComponent is not enough to actually allow the esc key to work, which is a bug you btw. could have reported to the bugtracker. May I suggest you find the underlying problem and provide a real bugfix? Greetings, wintertime ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot _______________________________________________ Freecol-developers mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/freecol-developers
