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 692219 - gnome-xkb-info: Handle duplicated layouts
gnome-xkb-info: Handle duplicated layouts
Status: RESOLVED FIXED
Product: gnome-desktop
Classification: Core
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: Desktop Maintainers
Desktop Maintainers
: 692751 693990 694149 (view as bug list)
Depends on: 693783
Blocks:
 
 
Reported: 2013-01-21 17:17 UTC by Rui Matos
Modified: 2013-02-27 18:25 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gnome-xkb-info: Handle duplicated layouts (2.55 KB, patch)
2013-01-21 17:17 UTC, Rui Matos
none Details | Review
gnome-xkb-info: Handle duplicated layouts (4.61 KB, patch)
2013-01-28 11:15 UTC, Rui Matos
rejected Details | Review
gnome-xkb-info: Handle duplicated layouts (2.52 KB, patch)
2013-02-14 09:29 UTC, Rui Matos
committed Details | Review

Description Rui Matos 2013-01-21 17:17:47 UTC
This should fix some weird errors and crashes that I've seen being
reported.
Comment 1 Rui Matos 2013-01-21 17:17:50 UTC
Created attachment 234031 [details] [review]
gnome-xkb-info: Handle duplicated layouts

When merging entries from another .xml file (i.e. when
show-all-sources is active) there might be layout entries which were
already added before. In that case we don't want to create new entries
and replace the old ones because layout variants which were already
added depend on the existence of the old main layout.
Comment 2 Matthias Clasen 2013-01-27 22:57:43 UTC
Still crashes for me with that patch, unfortunately.
As a hint, it crashes in the second sort_sequences call, ie only if show-all-sources is true
Comment 3 Rui Matos 2013-01-28 11:15:25 UTC
Created attachment 234604 [details] [review]
gnome-xkb-info: Handle duplicated layouts

When merging entries from another .xml file (i.e. when
show-all-sources is active) there might be layout entries which were
already added before. In that case we don't want to create new entries
and replace the old ones because layout variants which were already
added depend on the existence of the old main layout.

We must also keep the languages and countries sequences sorted while
inserting so that we can check if a layout is already there and skip
adding it then.
--

This should fix it.
Comment 4 Rui Matos 2013-01-28 17:38:40 UTC
Comment on attachment 234604 [details] [review]
gnome-xkb-info: Handle duplicated layouts

I've decided to stop using GSequence here so disregard this patch.
Comment 5 Rui Matos 2013-01-28 17:39:47 UTC
Comment on attachment 234031 [details] [review]
gnome-xkb-info: Handle duplicated layouts

We should use this instead for the issue at hand here.
Comment 6 Rui Matos 2013-01-29 12:12:31 UTC
*** Bug 692751 has been marked as a duplicate of this bug. ***
Comment 7 Rui Matos 2013-02-14 09:29:12 UTC
Created attachment 236011 [details] [review]
gnome-xkb-info: Handle duplicated layouts

--
rebased
Comment 8 Rui Matos 2013-02-19 11:22:48 UTC
Attachment 236011 [details] pushed as b3e4aef - gnome-xkb-info: Handle duplicated layouts
Comment 9 Rui Matos 2013-02-25 17:18:30 UTC
*** Bug 694149 has been marked as a duplicate of this bug. ***
Comment 10 Rui Matos 2013-02-27 18:25:38 UTC
*** Bug 693990 has been marked as a duplicate of this bug. ***