• Benjamin Berg's avatar
    power: Correctly lookup or insert new items into combobox · 8b8b49e9
    Benjamin Berg authored
    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.
    
    Fixes #261
    
    
    (cherry picked from commit b5711c59)
    8b8b49e9
Name
Last commit
Last update
.gitlab/issue_templates Loading commit data...
build-aux Loading commit data...
data/icons Loading commit data...
docs Loading commit data...
gettext/its Loading commit data...
man Loading commit data...
panels Loading commit data...
po Loading commit data...
search-provider Loading commit data...
shell Loading commit data...
subprojects Loading commit data...
tests Loading commit data...
.gitignore Loading commit data...
.gitlab-ci.yml Loading commit data...
.gitmodules Loading commit data...
COPYING Loading commit data...
NEWS Loading commit data...
README.md Loading commit data...
gnome-control-center.doap Loading commit data...
meson.build Loading commit data...
meson_options.txt Loading commit data...