[Geany-devel] Resetting menu accels - Re: Super modifier in keybindings - Re: Strange Geany behavior

Lex Trotman elextr at xxxxx
Wed Aug 12 22:32:48 UTC 2009


2009/8/13 Nick Treleaven <nick.treleaven at btinternet.com>:
> On Wed, 12 Aug 2009 21:48:08 +1000
> Lex Trotman <elextr at gmail.com> wrote:
>
>> >> But this might make the whole keybinding code much simpler :-)
>> >
>> > Not sure, there are keybindings that don't have a menu item associated
>> > with it.
>>
>> It just needs to be some widget that the signal can be delivered to.
>>
>> I hope that you havn't violated the "good GUI guidelines" by having
>> functionality that is only available via keybindings and not by menu
>> ;-)
>
> We have. Probably we could/should add some matching menu items, and IIUC
> use the relevant widget for the focus commands. There are some special
> cases though where some keybindings take precedence, so I don't think we
> can simplify the code that much.

Adding menu items is worth while from a user point of view even if it
doesn't improve the code.

I for one am unlikely to find functionality that is *only* available
from keybindings since that would require reading and remembering the
manual (unlikely ;-) or reading the keybindings (which is also
unlikely).  Whereas searching the menus has a long and honourable?
tradition.

>
>> >> Or change the whole thing to use gtk_accel_map that does its own
>> >> loading and saving and all.  Or leave it as is, but it is doing extra
>> >> work and using nested loops as well.  Decisions, decisions ...
>> >
>> > I haven't looked at gtk_accel_map, perhaps it's easier to keep the
>> > existing code. Anyway at some point we can fix this.
>>
>> I'm not suggesting rushing into this, IMHO gtk_accel_map is quite
>> poorly documented & I am not sure I totally understand about
>> accelerator paths but it seems the future direction.
>
> Are there any advantages in doing this?
>
>> Leaving it as is only has the downside of some overhead although the
>
> Not sure the overhead is all that significant.

Agree, if no one has complained...

>
>> menu accelerator labels are not being updated until Geany is restarted
>> which could be confusing.
>
> At the least, we could use gtk_widget_remove_accelerator ;-)

Yeah, getting the user visible things fixed is more important, but
after the binding is changed you probably need to run
gtk_widget_add_accelerator as well ;-)  (it isn't at the moment)

Note remove/add accel works on stock menu items too (just tried it) so
my previous comment that they should not be available for change is
revoked.
It may not be advisable to change them but I don't support preventing
things that are inadvisable so long as they don't damage anything.

> Regards,
> Nick
> _______________________________________________
> Geany-devel mailing list
> Geany-devel at uvena.de
> http://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel
>



More information about the Devel mailing list