#33 Stop using hard-coded hotkeys

open
rickyrockrat
Change (5)
5
2012-05-03
2011-09-17
sphax3d
No

I’m a french translator of Parcellite. I think it could be great to stop hardcode hotkeys in the code and in the languages files like "(Ctrl-Alt-P for menu)" or "Use Alt-E to edit, Alt-C to clear" (does we really need this alternative line?) and display the three main hotkeys, chosen by the user, dynamically, and use the power of GTK for hotkeys like "Alt-E" (_edit) and "Alt-C" (_clear) to be flexible in the languages files. Am I wrong?

Thank you for you're work.

Discussion

  • rickyrockrat
    rickyrockrat
    2012-05-03

    sphax3d, I don't understand what you mean, sorry. The hotkeys are user-configurable, not hard coded. Do you just mean Alt-E or Alt-C?

     
  • rickyrockrat
    rickyrockrat
    2012-05-03

    • assigned_to: xyhthyx --> rickyrockrat
     
  • sphax3d
    sphax3d
    2012-05-04

    Sorry, I’ll try to explain that in a better way.
    I know there are user-configurable hotkeys. I’m talking about the translation files and the strings in the code related to them.
    There is the string "(Ctrl-Alt-P for menu)" in the file utils.c line 126 (for command line help), but as you said, this hotkey can be changed. Is there a way to print here the hotkey chosen by the user ? Example : (Super-Z for menu).
    For the string "Use Alt-E to edit, Alt-C to clear" in the file main.c line 1299, it’s not the same problem. Firstly, I don’t understand why this string is used for the "Search as you type" mode. It seams to be related to the text input, but I think that having the two buttons "Edit Clipboard" and "Clear" should be more understandable. Secondly, Alt-E and Alt-C make sense for english words Edit and Clear, but not for the French words "Modifier" and "Effacer". That why I talked about GTK hotkeys : "_edit" is better than "Alt-E to edit" because I can translate it to "_modifier" in French for example. I know that it’s not exactly the solution for this case because the string is not a real button and a tip is needed here, but I think you understand what I mean.

     
  • rickyrockrat
    rickyrockrat
    2013-01-15

    I see what you mean. It has to do with the way the edit keys are handled differently based on search as you type. I need to think about this to see how to make it work with _edit instead. As to the other references, it will take some thought. I should be able to clean up some of this...maybe all of it.