Adjusts the widgetry of the input chooser to clamp
the list and add a separator between the search bar
and the list.
The list's shadow is no longer clipped, and keyboard
navigation now scrolls.
Ignored in Meson < 0.60.0, deprecated since 0.60.1 and fatal since 0.61.0.
panels/applications/meson.build:10:5: ERROR: Function does not take positional arguments.
panels/background/meson.build:10:5: ERROR: Function does not take positional arguments.
panels/camera/meson.build:10:5: ERROR: Function does not take positional arguments.
[...]
==31571== 120 bytes in 8 blocks are definitely lost in loss record 17,034 of 19,290
==31571== at 0x484086F: malloc (vg_replace_malloc.c:380)
==31571== by 0x4AF77A8: g_malloc (gmem.c:106)
==31571== by 0x4D9816A: gtk_accelerator_name (gtkaccelgroup.c:1577)
==31571== by 0x4A82D1: setup_custom_shortcut (cc-keyboard-shortcut-editor.c:364)
==31571== by 0x4A92DF: cc_keyboard_shortcut_editor_key_press_event (cc-keyboard-shortcut-editor.c:745)
==31571== 288 bytes in 24 blocks are definitely lost in loss record 18,138 of 19,290
==31571== at 0x484086F: malloc (vg_replace_malloc.c:380)
==31571== by 0x4AF77A8: g_malloc (gmem.c:106)
==31571== by 0x4A4119: variant_get_key_combos (cc-keyboard-item.c:475)
==31571== by 0x4A41FD: settings_get_key_combos (cc-keyboard-item.c:498)
==31571== by 0x4A46BE: cc_keyboard_item_load_from_gsettings (cc-keyboard-item.c:574)
==31571== by 0x4A5BBB: append_section (cc-keyboard-manager.c:315)
==31571== by 0x4A605D: append_sections_from_file (cc-keyboard-manager.c:431)
==31571== by 0x4A6766: reload_sections (cc-keyboard-manager.c:568)
==31571== by 0x4A6D68: cc_keyboard_manager_load_shortcuts (cc-keyboard-manager.c:707)
==31571== by 0x4A2FA4: cc_keyboard_shortcut_dialog_init (cc-keyboard-shortcut-dialog.c:841)
==31571== by 0x4A7A288: g_type_create_instance (gtype.c:1929)
==31571== by 0x4A61CAC: g_object_new_internal (gobject.c:1945)
==25729== 1,058 (40 direct, 1,018 indirect) bytes in 1 blocks are definitely lost in loss record 20,104 of 20,657
==25729== at 0x484086F: malloc (vg_replace_malloc.c:380)
==25729== by 0x4AF77A8: g_malloc (gmem.c:106)
==25729== by 0x4B0F1E4: g_slice_alloc (gslice.c:1072)
==25729== by 0x4B09060: UnknownInlinedFun (gsequence.c:1609)
==25729== by 0x4B09060: g_sequence_insert_before (gsequence.c:527)
==25729== by 0x4ED2FE7: gtk_list_store_insert (gtkliststore.c:1271)
==25729== by 0x4A5DCE: append_section (cc-keyboard-manager.c:363)
==25729== by 0x4A605D: append_sections_from_file (cc-keyboard-manager.c:431)
==25729== by 0x4A6766: reload_sections (cc-keyboard-manager.c:568)
==25729== by 0x4A6D33: cc_keyboard_manager_load_shortcuts (cc-keyboard-manager.c:706)
==25729== by 0x4A2FA4: cc_keyboard_shortcut_dialog_init (cc-keyboard-shortcut-dialog.c:841)
==25729== by 0x4A7A288: g_type_create_instance (gtype.c:1929)
==25729== by 0x4A61CAC: g_object_new_internal (gobject.c:1945)
This should avoid issues where this setting is changed just by opening
Gnome Control Center, as reported in
https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/918
This should also mean someone can tweak the settings as desired outside
Gnome Control Center, and not have them clobbered unless they open the
dialog in g-c-c.
The empty search state looks out-of place due to it being nested inside
a listbox. This is because we can only detect empty states through
gtk_list_filter_func().
Refine it by making the empty search placeholder a child of the main stack.
Introduce an additional helper function to detect when all the listbox
rows would be hidden by the filter.
As a part of https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/1222
Previously, there were multiple redundant lists of possible values for
this setting. This uses one struct to define not only all the possible
values, but also anything specific to the alternate characters key, so
this can be used for other modifiers.
This also changes the style of the dialog to use a GtkListBox.
In the shortcut editor, the "Replace" button is shown instead of "Set"
or "Add" when there is a collision. But this executes the same code as
"Set", so when adding a shortcut, it doesn't actually work.
This adds a widget called `CcKeyboardShortcutRow`, sub-classing
`GtkListBoxRow`, to handle a shortcut row. This makes the implementation
a bit tidier, rather than handling it all in `CcKeyboardPanel`, and
allows the widgets that compose the row to be laid out in xml.
This is a prerequisite for moving the shortcuts to a new dialog.
This commit includes all the changes that seem to be necessary for
CcKeyboardItem to be used for dealing with multiple keybindings, without
(yet) changing the user interface to expose this.
The `primary_combo` and `binding` fields of `CcKeyboardItem` are
removed, in favor of the existing `key_combos`. No combination is
"primary", since all of them can now be seen and changed equally.
We treat `CcKeyboardItem.key_combos` as a set, that a combo can be added
to or removed from. Though it continues to be represented as a `GList`,
instead of a `GHashTable`, to preserve ordering.
A lot of the keyboard panel code relied on the assumption that only one
combo can be set for each setting, so this required a variety of
miscellaneous changes.