Unneeded/unclear flags
What is the flag CC_KEYBOARD_ITEM_TYPE_NONE
for? I've not seen it actually instantiated anywhere.
except in property declarations: https://gitlab.gnome.org/GNOME/gnome-control-center/-/blob/main/panels/keyboard/cc-keyboard-item.c?ref_type=heads#L294
and a random check: https://gitlab.gnome.org/GNOME/gnome-control-center/-/blob/main/panels/keyboard/cc-keyboard-item.c?ref_type=heads#L857
Is it something that could be removed?
On the most detailed level, I'm asking because of this comparison:
if (cc_keyboard_item_get_item_type (item) == CC_KEYBOARD_ITEM_TYPE_GSETTINGS &&
g_strcmp0 (name, cc_keyboard_item_get_key (item)) == 0)
{
return TRUE;
}
This is comparing some items by name, but also ignores both CC_KEYBOARD_ITEM_TYPE_GSETTINGS_PATH and CC_KEYBOARD_ITEM_TYPE_NONE. I think CC_KEYBOARD_ITEM_TYPE_GSETTINGS_PATH is ignored intentionally (no idea why), but CC_KEYBOARD_ITEM_TYPE_NONE doesn't fit here at all.
On a higher level, I want to add another type and I don't want to turn this comparison into a convoluted mess.