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 739837 - Allow label overwrite in keyboard layout
Allow label overwrite in keyboard layout
Status: RESOLVED FIXED
Product: caribou
Classification: Applications
Component: default
git master
Other Linux
: Normal enhancement
: ---
Assigned To: caribou-maint
caribou-maint
Depends on:
Blocks:
 
 
Reported: 2014-11-09 08:24 UTC by Raphael Freudiger
Modified: 2014-11-12 08:57 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Allow label overwrite (2.09 KB, patch)
2014-11-09 08:24 UTC, Raphael Freudiger
none Details | Review
Allow label override (1.78 KB, patch)
2014-11-11 14:39 UTC, Raphael Freudiger
committed Details | Review

Description Raphael Freudiger 2014-11-09 08:24:10 UTC
Created attachment 290264 [details] [review]
Allow label overwrite

Currently some buttons do only have its name as label.
This is not always useful. I.e. for the dead-keys the label is often only "dead".
In some keyboard layout it is preferred to have a symbol as label.

This allows to overwrite the default label in the keyboard layout.
Comment 1 Daiki Ueno 2014-11-11 06:31:25 UTC
I'm not good at English, but perhaps "override" might be more appropriate than "overwrite"?

By the way, I'm a bit concerned about adding optional arguments to the KeyModel constructor this way, because the optional argument affects the C library ABI:

  CaribouKeyModel* caribou_key_model_new (const gchar* name, const gchar* text, const gchar *label_overwrite);

Perhaps KeyModel:label could be a writable property, so this code:

  KeyModel key = new KeyModel (name, text, label_overwrite);

can be written as:

  KeyModel key = new KeyModel (name, text);

  if (label_overwrite != null)
      key.label = label_overwrite;

Thoughts?
Comment 2 Raphael Freudiger 2014-11-11 14:39:26 UTC
Created attachment 290420 [details] [review]
Allow label override

You are right, it should be "override".

I like your idea. It makes the override more obvious.
The only disadvantage I see, is that the label needs to be publicly settable for this to work.
Comment 3 Daiki Ueno 2014-11-12 07:11:08 UTC
Review of attachment 290420 [details] [review]:

Thanks.  I think it's okay to make the setter public, rather it might be useful for applications that want to change labels at run time.