Hi! I understand that override the select-all signal for our layer tree would allow to tell
to the tree view to not handle the select-all signal and to do nothing when the signal arrives. That's ok when the built in keyboard event for tree view (that is the CTRL-A) is used by synfigstudio: when the user press CTRL-A and the tree view is focused, then the signal is not handled by the tree view (we override the signal handler and returned false) and then the main window is asked to handle it. It is fine But what happen of we don't have CTRL-A associated to the select all ducks action? The user loose the ability of use the CTRL-A (select all) feature on all the tree views and I think it is not good. On the other hand the solution that I propose it this: When a key event occurs then the event is wrapped by the main window first, then look up if the current focused widget has priority over the main window (we define that) if it has priority the widget handles the event first and if it is handled then the main window handler is not called. If the focused widget doesn't handle the event then it is asked to the main window to handle it Also, if the child widget hasn't priority over the main window then the main window is called to handle the event. If the main window doesn't handle the event, then it falls back to call the focused widget handler. I think that this way we cover all the possible modifications of the key binding made by the user. The fact that the CTRL-A is associated to the select-all action on tree views, doesn't imply that it needs to interfere with our key bindings. It may or may not interfere. I'm working on genete_key_events branch to offer a solution to the problem. Please test it out and tell me if it fits your needs. Cheers ----- Mensaje original ----- De: Zelgadis <[email protected]> Para: Carlos Lopez Gonzalez <[email protected]> CC: Enviado: Viernes 23 de marzo de 2012 5:11 Asunto: Re: [Synfig-devl] New release is near Hi! Let me say it again. ^___^ 23 марта 2012 г. 1:39 пользователь Carlos Lopez Gonzalez <[email protected]> написал: > I think that you are falling again in the same mistake. > The problem is that the user can change the keyboard shortcut bindings. > > Say that CTRL-A doesn't means anything in the custom acellerator keys. > With your approaching (disable the response of the tree view widget for the > CTRL-A event) I am not suggesting anything about "Ctrl+A" keybinding. My suggestion is to disable "selest-all" signal for layer tree. Just override "select all" signal for layer tree - http://developer.gnome.org/gtk/stable/GtkTreeView.html#GtkTreeView-select-all (sorry, in previous letters I have use wrong terminology - I was referring "event" instead of "signal". ^__^") I think overriding a signal should be three-line code. Maybe I will be able to come up with something... Cheers!!! K. -- http://morevnaproject.org/ ------------------------------------------------------------------------------ This SF email is sponsosred by: Try Windows Azure free for 90 days Click Here http://p.sf.net/sfu/sfd2d-msazure _______________________________________________ Synfig-devl mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/synfig-devl
