After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 455353 - keyboard layout add dialogue UI and code problems
keyboard layout add dialogue UI and code problems
Status: RESOLVED FIXED
Product: gnome-control-center
Classification: Core
Component: Keyboard
git master
Other Linux
: Normal normal
: ---
Assigned To: Control-Center Maintainers
Control-Center Maintainers
Depends on:
Blocks:
 
 
Reported: 2007-07-09 23:32 UTC by Christian Persch
Modified: 2007-07-14 12:02 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
proposed patch (35.29 KB, patch)
2007-07-09 23:33 UTC, Christian Persch
none Details | Review

Description Christian Persch 2007-07-09 23:32:40 UTC
The gnome-keyboard-properties, Layout tab, Add dialogue has some problems:
- the action performed is "add this layout", so the affirmative button should be "Add" not "OK"
- the "_Layout" and "_Variant" mnemonics don't activate the combo box
- the layout and variant combo box entries are not ediable; therefore they should be plain combo boxes instead. and for space reasons, they probably should be arranged vertically, not horizontally; and the labels should be on the same line as the combo and activate it mnemonically
- the preview area has no frame which looks strange; the HIG recommends that treeviews and textviews have a shadow-in frame; IMHO this applies for the preview area too

The code also has a problem with the sorting in the variant combo: it assumes that "_" sorts before all other strings, which does not hold true e.g. for LANG=C. (This leads to this strange bug http://www.gnome.org/~chpe/images/keyboard-layout-add-bug.png where the separator row hides an actual variant and the *** separator row is shown instead at the end.)

Attached patch fixes these problems; screenshot of the new dialogue @ http://www.gnome.org/~chpe/images/keyboard-layout-add-new.png .

While I was at it, I also made the Add/Remove/Up/Down area on the Layout tab use a gtkvbuttonbox instead of just a vbox.
Comment 1 Christian Persch 2007-07-09 23:33:13 UTC
Created attachment 91522 [details] [review]
proposed patch
Comment 2 Sergey V. Udaltsov 2007-07-11 10:44:55 UTC
Thanks Christian, committed (with some minor polishes).

Regarding the vertical vs horizontal layout - I am not really sure there is substantial difference. Moreover, IMHO the horizontal layout of combo boxes is slightly better - on a wide screen, the vertical layout leaves a lot of unused space in the right top corner (and users would want to make this window as wide as possible - in order to see the layout better). So, may be we still should use the horizontal layout?

Yes, the hack with the "default" value was rather bad.
Comment 3 Christian Persch 2007-07-11 11:56:38 UTC
For some layouts/languages the variant names are very long (e.g., if you choose for german); if the layout and variant combo were on the same line, the dialogue wouldn't fix in 800x600 screens. We could ellipsise the text in the combo, but then the user would have no way to see the whole text.
Comment 4 Sergey V. Udaltsov 2007-07-14 12:02:31 UTC
Ok, let's leave it as it is till some usability guru gets angry:)