Hi!

17 марта 2012 г. 1:21 пользователь Carlos Lopez Gonzalez
<carloslopezgonza...@yahoo.es> написал:
> The problem is that there is not api to find one action based on the
> keyboard event registered in the Gtk::AccelMap.
> The only api we have is
> here: http://developer.gnome.org/gtkmm/stable/namespaceGtk_1_1AccelMap.html
> As you can see the only way to know the accel keys stored is saving it to
> file and parsing the save file with a custom api.
> None of the other functions allows to obtain the accel_path based on the key
> event.

Look, I'm talking about different thing. We don't need to know the key
attached to "select all" event of Layer Tree widget or any other key.
Just forbid that event, remove it.

Again, removing "select all" event of Layer Tree widget will result in
following:
1. User press Ctrl+A.
2. Key is passed to (focused) Layer Tree widget
3. But there's no event associated with this keybinding (we have removed it)
4. Synfig detects that widget will be unable to handle the keyboard event
and the event will be handled by the main window.

Just override "select all" signal for layer tree -
http://developer.gnome.org/gtk/stable/GtkTreeView.html#GtkTreeView-select-all
 (make it return "false, do nothing or something like that, I don't
know).
That's it.
K.

> It is perfectly doable since the accelrc structure is always the same. But
> first I would like to ask again on gtkmm mailing list so see any other
> solution.
>
> By the way, I've managed to detect what type of widget is the focused child
> widget, so the problem for widgets with preferences in handle the event is
> solved.
> Let's see how we handle the other cases.
> Cheers!
>
> ________________________________
> De: Zelgadis <ksee.zelga...@gmail.com>
> Para: synfig-devl@lists.sourceforge.net
> Enviado: Viernes 16 de marzo de 2012 16:48
>
> Asunto: Re: [Synfig-devl] New release is near
>
> Hi!
>
> 16 марта 2012 г. 15:09 пользователь David Rylander <rylle...@gmail.com>
> написал:
>> I agree that it should be fixed but I do not agree with you that it
>> should be done one by one by request.
> ...
>> If we set which keys should be handled one by one we go in the other
>> direction, heavily narrowing down the users flexibility.
>
> I'm sorry, I wasn't clear enough. I was talking about EVENTS, not the KEYS.
> I have used "Ctrl+A" for referencing "select all" event.
>
> My suggestion is not to think out universal solution, but just think
> about solution for this particular case and then try to extend the
> approach for other cases.
>
> 16 марта 2012 г. 17:24 пользователь Carlos Lopez Gonzalez
> <carloslopezgonza...@yahoo.es> написал:
>> In the code I look up for the focused child widget and at the moment, it
>> always asks to the widget to try to handle the keyboard event and if it is
>> handled, then it returns.  If it is not handled then the code asks the
>> main
>> window to handle it and returns the handling result (true if handled and
>> false if not handled)
> ...
>> In other cases the widget shouldn't handle the keyboard event. For
>> example,
>> currently the event CTRL-A triggers the "select all ducks" action. But if
>> the focused widget is the Layer Tree it selects all the layers (kb event
>> handled by the tree widget).
>
> Then in this case solution looks simple for me: Just forbid "select
> all" action for Layer Tree widget. If no such event will be supported
> by layer tree, then widget will be unable to handle the keyboard event
> and the event will be handled by the main window.
> All we need to do is remove "select all" event for Layer Tree widget.
> Is that possible?
> K.
>
>
>
>
>> 2012-03-16 08:54, Zelgadis skrev:
>>> 16 марта 2012 г. 3:02 пользователь Carlos Lopez Gonzalez
>>> <carloslopezgonza...@yahoo.es>  написал:
>>>> Hi!
>>>> I'm merging the latest modifications in the master branch of the git
>>>> repo.
>>>> If you have one patch that you think it should go with the next release
>>>> or
>>>> do you think that there are remaining bugs that are a must fix, please
>>>> let
>>>> us know here.
>>>> Cheers!
>>>> Carlos
>>> Hi!
>>> I would like to have shortcut keys fixed -
>>> http://synfig.org/forums/viewtopic.php?f=15&t=3407
>>> My proposal is not to create list of all events - this will take too
>>> much time. My proposal is to fix events one by one - per request. For
>>> example I would request to fix CTRL+A   - is should be handled
>>> globally I think and passed to the canvas (instead of layers dock).
>>> If this is not the target for new release - I'm not insist. ^___^
>>> K.
>>>
>>>
>>>
>>>
>>
>>
>>
>> ------------------------------------------------------------------------------
>> 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
>> Synfig-devl@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/synfig-devl
>
>
>
> --
> 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
> Synfig-devl@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/synfig-devl
>
>
>
> ------------------------------------------------------------------------------
> 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
> Synfig-devl@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/synfig-devl
>



-- 
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
Synfig-devl@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/synfig-devl

Reply via email to