GNOME Bugzilla – Bug 778686
Network connections are not sorted after a connection is renamed
Last modified: 2017-02-15 21:50:23 UTC
The list of networks (in particular VPNs) is sorted by doing an insertion sort when the network is added initially. However in some cases network can be renamed (e.g. when they are being added programatically by a script) and then the user ends up with an unordered list until they restart the shell. I am attaching a patchset to solve this issue by updating the sorting position whenever a connection is modified.
Created attachment 345840 [details] [review] ui: Allow moving menu items to a certain position This function is a helper to simplify keeping menu items ordered when their order is updated on the fly (e.g. network connections being renamed). https://bugzilla.redhat.com/show_bug.cgi?id=1404663
Created attachment 345841 [details] [review] network: Ensure the connection list is sorted after rename Items were inserted correctly but the synchronisation was lost if the name of a connection was changed. Simply making sure the position is correct after a connection is updated fixes the issue. Reported-by: Oliver Haessler <ohaessle@redhat.com> https://bugzilla.redhat.com/show_bug.cgi?id=1404663
Review of attachment 345840 [details] [review]: OK
Review of attachment 345841 [details] [review]: LGTM
Thanks for the review, pushed.