Clicking on the 'Custom Shortcuts' row when there are no custom
shortcuts causes the 'Add Custom Shortcuts' dialog to be shown for
all subsequent sessions. This is because the first stack defined was
'Add Custom Shortcuts', it would always be visible, as it was no
longer defined which stack was going to be shown.
Fixes (https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/2479)
Meson extracts them by itself and add them as dependencies for the target.
It means one less location to keep track of files, and a lot less boilerplate
around the meson files
Error building template class 'CcSearchPanel' for an instance of type 'CcSearchPanel': .:0:0 Invalid object type 'CcListRow'
Error building template class 'CcDisplayPanel' for an instance of type 'CcDisplayPanel': .:0:0 Invalid object type 'CcListRow'
Error building template class 'CcMousePanel' for an instance of type 'CcMousePanel': .:0:0 Invalid object type 'CcIllustratedRow'
Error building template class 'CcKeyboardPanel' for an instance of type 'CcKeyboardPanel': .:0:0 Invalid object type 'CcListRow'
Error building template class 'CcRegionPanel' for an instance of type 'CcRegionPanel': .:0:0 Invalid object type 'CcListRow'
Error building template class 'CcUaPanel' for an instance of type 'CcUaPanel': .:0:0 Invalid object type 'CcListRow'
Error building template class 'CcUserPanel' for an instance of type 'CcUserPanel': .:0:0 Invalid object type 'CcAvatarChooser'
Error building template class 'CcUserPanel' for an instance of type 'CcUserPanel': .:0:0 Invalid object type 'CcListRow'
Error building template class 'CcDateTimePanel' for an instance of type 'CcDateTimePanel': .:0:0 Invalid object type 'CcTzDialog'
cc_tz_dialog_get_selected_location: assertion 'CC_IS_TZ_DIALOG (self)' failed
dumped core
Error building template class 'CcDateTimePanel' for an instance of type 'CcDateTimePanel': .:0:0 Invalid object type 'CcListRow'
Error building template class 'CcInfoOverviewPanel' for an instance of type 'CcInfoOverviewPanel': .:0:0 Invalid object type 'CcHostnameEntry'
It isn't possible to open the Keyboards panel by searching for "Compose".
Compose key is an important feature, so this change adds a "Compose" keyword to improve the discoverability of this setting.
Since the main view is not visible, there is no point in updating
search results when we are in a sub-view. This will happen as we
always listen to keyboard events for the whole window - regardless
of whether the search entry has focus or not.
Now we never show search entry in subpages, so don't hide search entry
when switching to subviews. Otherwise, the search entry will be hidden
when the user switches back to the main view.
We were updating the state when the back button is pressed, not when
the pages were changed, and so the dialog state was broken if the
user went back by swipe (or means other than clicking the back button).
Fix it by handling updating state when the visible view changes.
When adding new input sources, the first dialog shows a list of
languages, when single clicking one item you go to a subdialog
that has a 'go back' item, that item only works if double-clicking
it, but that is unintuitive because if you entered the dialog by
single click you also expect the 'go back' button to work by
single click too.
The subdialog is a GtkListBox configured to be double click,
because it has an 'Accept' header bar button and we don't
really want to activate the subdialog items by single click,
but the 'go back' row is special and as explained before it is
expected to work by single click too.
So this commit adds the required single click handler for the
'go back' rows created in CCInputChooser.
Fixes#1954
The current layout intersection algorithm compares pointers to strings.
It assumes that `gnome_xkb_info_get_layouts_for_country()` and
`gnome_xkb_info_get_layouts_for_language()` will return two GList
containing pointers to the same strings. Looking at libgnome-desktop[1]
it seems like this is the case: given the same layout, the same pointer
to the layout id will be stored in both lists. However, this is an
implementation detail and we should not rely on that.
Rewrite the intersection algorithm in order to compare the strings. While
at it, use a more efficient algorithm: add all the items of the first list
to a set, then iterate over the second list and check if the item is in
the set. If this happens, remove the item from the set and add it to the
intersection list.
Probably the layout lists are not big enough to notice the difference, but
the complexity goes from O(N*M) to O(N+M).
[1] 3c8834af09/libgnome-desktop/gnome-xkb-info.c (L281)
country_layouts are being appended to the layouts_with_locale which results in less relevant
layout groupings. for example, we if choose Hindi language which is an Indian language,
all Indian language layouts are shown within it - including Tamil, Bangla etc.
furthermore, language_layouts are also getting appended for countries where they may not
belong, for example, English (Ireland) is shown when we search India.
The layouts_with_locale table is filled as union however it yields better
search results if we change that to intersection.
Relates #2114
GtkStyleContext will be deprecated in gtk 4.10.
https://docs.gtk.org/gtk4/class.StyleContext.html
This preserves code blocks where additional GtkStyleContext operations
were used, such as gtk_style_context_save/restore.
- Use GListModel for creation, filter and sorting of shortcut sections
- Use AdwStatusPage instead of handling empty states manually
Fixes#1212#1735#2105#2159#2160#2169
The `X-GNOME-Bugzilla-*` entries were for use by bug-buddy, a GNOME 2
technology that's been gone for over a decade. These entries are
obsolete and can be removed from all desktop files.
The `X-GNOME-Settings-Panel` entry is also obsolete as far as I can
tell and only these panels had it in their desktop file: notifications,
sharing, sound and user-accounts. These entries can also be removed.
After removing the `X-GNOME-Bugzilla-*` entries, the desktop files have
no more variables in them. The meson `configure_file` step is therefor
pointless—there are no variables to configure. As such the
`*.desktop.in.in` files are renamed to `*.desktop.in` to reflect this
and `meson.build` files are modified to remove `configure_file` step.
The way shortcuts in mutter/gnome-shell work is that it looks up the
keycode that generates the shortcut keyval at the lowest shift level and
then checks if all the modifiers match. This does not work for shortcuts
that for example include "dollar" to represent "<Shift>4", because on
some keyboards/layout there is a separate dollar key key with its own
keycode. This would be at a lower shift level than "<Shift>4".
By always translating such shortcuts to "<Shift>number", we make sure
the resulting shortcut will work in the shell and is closer to what the
user likely intended the shortcut to be, because numbers are usually
assigned to things that can be enumerated, such as workspaces or
favorite applications.
This also special cases the num-row key on layouts such as AZERTY, where
the number is the shifted keyval, to always prefer the number. Due to
the way the shell interprets these shortcuts, they still work and by
always using numbers they work across different layouts.
This change also fixes that pressing "<Shift><Super>4" was turned into
"<Shift><Super>dollar", which effectively included the "<Shift>" twice.
Fixes: https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/1528