From b5711c59eccb90a547921af6e0f11e5e3dd249f5 Mon Sep 17 00:00:00 2001
From: Benjamin Berg <bberg@redhat.com>
Date: Mon, 5 Nov 2018 13:27:12 +0100
Subject: [PATCH] power: Correctly lookup or insert new items into combobox
The code to lookup or insert items into the combobox had a few issues.
It would assume that the items are sorted, causing existing items to not
be found and be inserted instead. It also would simply forget to insert
an item if it was larger than all existing items.
This code is now changed to iterate over all items, finding the best
insertion point in the process (next item has a larger value, or the
values are not increasing anymore). The item will only be inserted if it
has not been found.
https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/261
Signed-off-by: Chen Wei <chenwei@xfusion.com>
The Wi-Fi and mobile broadband row's visibility depends on related
device status. But calling gtk_widget_show_all on the whole list box
makes them visible even related device is not avialbe. Fix that by
setting no-show-all of these two widgets as TRUE.
https://gitlab.gnome.org/GNOME/gnome-control-center/issues/189
Signed-off-by: Chen Wei <chenwei@xfusion.com>