GUI Guidelines

From GnuCash
Revision as of 22:59, 4 January 2018 by Fell (talk | contribs) (1. Draft)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

This page collects rules for the GUI. You should mind them while coding or translating.

Mnemonics and Accelerators

  • Accelerators are keyboard "hot-keys" like ctrl-c for copy
  • Mnemonics are part of the menu label, the underscore, so they would be included in the msgid.

Possible Problems

from IRC:

  • First off, mnemonics work differently for different widgets. e.g. on buttons they work like accelerators: <alt>F operates the button with that mnemonic--as long as there isn't an accelerator set to <alt>F because accelerators are handled first by gtkevent. Menuitem mnemonics work without a modifier key if one has the containing menu open.
  • Mnemonics can be attached to any widget via gtk_label_new_with_mnemonic() and gtk_label_set_mnemonic_widget(), so it would be easy to go crazy and have them everywhere.
  • But we also need to be careful to ensure that they're turned off when focus is inside an edit because <alt> is used to extend the keyboard on Macs. For example to type ö I use <alt>u followed by o. We've had several bugs on Gramps where some mnemonic grabbed the <alt>u and prevented users from typing umlauts.