Opened 14 years ago
Closed 11 years ago
#206 closed defect/bug (fixed)
Key Shortcuts in Gtk Gui seem to be disfunctional
Reported by: | SlowRider <geeemmixx@…> | Owned by: | cp15 |
---|---|---|---|
Priority: | minor | Milestone: | version 0.2.1 |
Component: | gui/gtk | Version: | git master |
Severity: | Keywords: | ||
Cc: | sebastian.leske@…, https://wiki.navit-project.org/index.php/user:ziaou |
Description
The default key combo Ctrl-Q does not work, and adding further key combos (zooms, full screen) do not work either. SVN 20080818/Rev. 1256.
I'm less interested in Ctrl-Q, but even more in some F-key which are emitted by the hardware keys of the Nokia N810 :) .
Attachments (2)
Change History (9)
comment:1 Changed 14 years ago by KaZeR
- Milestone set to version 0.1.0
Changed 11 years ago by sleske
comment:2 Changed 11 years ago by sleske
The attached patch fixes this issue (i.e. Ctrl-Q now quits). Actually someone just forgot to activate the accelerator keys with GTK+...
The patch also adds more accelerator keys. I added them to most menu entries; if that is not desired, that part of the patch can be discarded.
comment:3 Changed 11 years ago by sleske
- Cc sebastian.leske@… added
Changed 11 years ago by sleske
Mnemonics for the GUI GTK menus; updated translation files (because of the new menu strings). Depends on the first patch. GZipped to keep it <256k.
comment:4 Changed 11 years ago by sleske
Some explanation for my attached patch:
The patch is so large because it updates all translations (the .po.in files).
This is necessary because the addition of mnemonics to the GTK menus changes the menu strings. To add a mnemonic to a GTK menu, an underline ("_") must be added to the menu string to indicate the mnemonic character (e.g. "Display"-> "_Display").
Since gettext uses the strings in the source code as the ID for looking up translations, this change invalidates all .po.in files. So I had to add underlines to the msgids for GTK menu entries in the .po.in files as well. Additionally, in some cases the text of a GTK menu entry was also used elsewhere in Navit (e.g. in the internal GUI); in that case the entry in the .po.in file had to be duplicated (once without, once with underline).
I have performed theses changes on all .po.in files to keep the translations working.
I regret that this has caused the patch to become rather large. If there is anything I can do to make the patch easier to review, I'm open to suggestions.
comment:5 Changed 11 years ago by tegzed
Hi Sleske,
I tested gui_gtk_accels.diff and worked correctly for me. I have also taken a look to the patch and it seems fine from my side, however I am not a gtk expert.
comment:6 Changed 11 years ago by ziaou
- Cc https://wiki.navit-project.org/index.php/user:ziaou added
comment:7 Changed 11 years ago by sleske
- Resolution set to fixed
- Status changed from new to closed
Patch applied in rev 4873 (and following revisions), http://navit.svn.sourceforge.net/viewvc/navit?view=revision&sortby=log&revision=4873 .
Activate accelerator keys for GTK GUI. Also adds more accelerator keys.