Opened 11 years ago

Closed 8 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)

gui_gtk_accels.diff (4.3 KB) - added by sleske 8 years ago.
Activate accelerator keys for GTK GUI. Also adds more accelerator keys.
gui_gtk_mnemonics_translations.diff.gz (48.9 KB) - added by sleske 8 years ago.
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.

Download all attachments as: .zip

Change History (9)

comment:1 Changed 11 years ago by KaZeR

  • Milestone set to version 0.1.0

Changed 8 years ago by sleske

Activate accelerator keys for GTK GUI. Also adds more accelerator keys.

comment:2 Changed 8 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 8 years ago by sleske

  • Cc sebastian.leske@… added

Changed 8 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 8 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 8 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 8 years ago by ziaou

  • Cc https://wiki.navit-project.org/index.php/user:ziaou added

comment:7 Changed 8 years ago by sleske

  • Resolution set to fixed
  • Status changed from new to closed
Last edited 8 years ago by sleske (previous) (diff)
Note: See TracTickets for help on using tickets.