Use alphanumeric sorting for animation icon packs
Otherwise it will missort numbers like "11" and "1"
This commit is contained in:
parent
231b188320
commit
a4c9d30e22
|
@ -2,6 +2,12 @@
|
|||
# It is not intended for manual editing.
|
||||
version = 3
|
||||
|
||||
[[package]]
|
||||
name = "alphanumeric-sort"
|
||||
version = "1.4.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "77e9c9abb82613923ec78d7a461595d52491ba7240f3c64c0bbe0e6d98e0fce0"
|
||||
|
||||
[[package]]
|
||||
name = "anyhow"
|
||||
version = "1.0.66"
|
||||
|
@ -535,6 +541,7 @@ dependencies = [
|
|||
name = "parrotd"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"alphanumeric-sort",
|
||||
"glib",
|
||||
"gtk",
|
||||
"libappindicator",
|
||||
|
|
|
@ -10,3 +10,4 @@ libappindicator = "0.7"
|
|||
gtk = "0.15"
|
||||
glib = "0.15"
|
||||
sysinfo = "0.26"
|
||||
alphanumeric-sort = "1.4"
|
||||
|
|
|
@ -69,7 +69,7 @@ impl IconPack {
|
|||
icons.push(name.split_at(name.len() - ".png".len()).0.to_string());
|
||||
}
|
||||
|
||||
icons.sort(); // Alphanumerical ordering
|
||||
alphanumeric_sort::sort_str_slice(&mut icons); // Alphanumerical ordering
|
||||
|
||||
let num_icons = icons.len();
|
||||
|
||||
|
|
Loading…
Reference in New Issue