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 642907 - add input layout lets me add the same layout twice
add input layout lets me add the same layout twice
Status: RESOLVED FIXED
Product: gnome-control-center
Classification: Core
Component: Other Preferences
git master
Other Linux
: Normal normal
: ---
Assigned To: Control-Center Maintainers
Control-Center Maintainers
Depends on:
Blocks:
 
 
Reported: 2011-02-21 20:17 UTC by William Jon McCann
Modified: 2011-02-26 02:06 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description William Jon McCann 2011-02-21 20:17:10 UTC
The add input layout lets me add the same layout twice (by mistake).  It shouldn't.

Probably good to say in the "add layout" list something like "Already added" and make the item insensitive.
Comment 1 Sergey V. Udaltsov 2011-02-21 23:26:22 UTC
Is is really impossible use case? Is this combination absolutely useless:
us
ru
us
de
Comment 2 Bastien Nocera 2011-02-21 23:51:42 UTC
Not useless, but given that this would waste one of the "slots" in XKB, it's of the very dubious kind.
Comment 3 Sergey V. Udaltsov 2011-02-22 00:57:11 UTC
Well, in general you are right. But for particular person that limitation may be not a concern - as long as he can do that thing... I don't know really. It is not a problem to add that check, technically...
Comment 4 William Jon McCann 2011-02-22 01:01:54 UTC
The potential for annoyance is much greater in my estimation than any potential utility.
Comment 5 Sergey V. Udaltsov 2011-02-22 01:23:09 UTC
I would not argue, as I said..

I just would appreciate if you elaborate - what kind of annoyance that could cause?
Comment 6 William Jon McCann 2011-02-22 01:26:03 UTC
This bug for example.  I accidentally added the same layout twice.  And was annoyed by the software that let that happen.
Comment 7 Sergey V. Udaltsov 2011-02-22 08:05:07 UTC
What exactly annoyed you, functionally?
Comment 8 Sergey V. Udaltsov 2011-02-22 08:08:51 UTC
I mean - you did not get broken or useless kbd config, right?
Comment 9 Sergey V. Udaltsov 2011-02-23 22:18:13 UTC
What do you think about the following rule: two consecutive identical layouts are forbidden, but if they are not consecutive, it is ok?
So "us,ru,us,de" would be ok, but "us,de,de" would be impossible.
Comment 10 Bastien Nocera 2011-02-25 18:47:35 UTC
It still doesn't make any sense to allow this in the UI itself. The most likely reason why users would end up in this situation is when they make a wrong move.

We shouldn't allow adding 2 of the same layout in the UI, people can always hit GSettings directly for that.
Comment 11 Sergey V. Udaltsov 2011-02-26 02:06:29 UTC
Ok, if it can be done through GSettings - so be it.

I committed the code that disables the "Add" button if the layout/variant selected in the list cannot be added (because it is already there).