A `GType` is not an integer, but either `size_t` or `uintptr_t`. So
casting it to int might lose bits of info, resulting in an invalid
`GType`.
Fixes#3062
The `set_subpage()` function already has good error checking for valid
tags, so reuse that for the `navigation.push` action callback.
Note that this likely won't fix#3062, as there the tag must exist in
the hashtable, as `g_object_new()` won't crash if you pass `NULL` to it.
Require the use of <child type="subpage"> for when an AdwNavigationPage
is expected to be added to CcPanel.navigation.
This way we can avoid programming errors when a child widget is wrongly
packed in the navigation view.
See also https://gitlab.gnome.org/GNOME/gnome-control-center/-/wikis/shell/CcPanel#child-packing
Co-authored-by: Matthijs Velsink <mvelsink@gnome.org>
So that we have an API for adding subpages that are build-conditional.
For example, CcPrivacy.bolt_page and CcPrivacy.location_page.
Normal static subpages should be statically defined in the respective
CcPanel .ui file.
So that hub panels can dynamically query what's been shown, since they
lost control over the navigation directly.
This is useful in Privacy, for example, where we check for the current
visible subpage to decide which documentation page to show.
When CcPanel.subpage is set it also now will check for the existence of
the subpage and handle its presenting itself.
This way hub panels will no longer need to do any static subpage
handling. (e.g. connecting to the "subpage" property).
So that CcPanel implementations have a method to add their subpages to
the builtin CcPanel.navigation.
Hub panels like System and Privacy have their main landing page composed
in an AdwNavigationPage. Therefore we overwrite the CcPanel.child setter
to add these pages to CcPanel.navigation instead of overwriting
CcPanel.child like we do for all the other panels.
So that in the future panels with subpages don't need to have their own
navigation views.
As of now this is useless as implementations of CcPanel will reset the
CcPanel.child object.
By creating a .cc-placeholder-row style class that
sets a padding, it won't be necessary to set margins
to every GtkLabel that is being used as list box
placeholder widgets.
Since we started moving some settings from the Sharing panel to other
panels, we were left with only tree things in the Sharing panel for
gnome-46: hostname row, file sharing row, and media sharing row.
The hostname row is already in System ->About, so we should check
whether file-sharing or media-sharing are supported and show the panel
accordingly.
Fixes#2979
The System panel subpages used to be CcPanels. They still have
their own desktop file so that they can be findable in Search.
A future goal is to decouple our Search model from our panel list
model, so that we can better handle panel subpages and other more
grained search results.
Fixes#2930Fixes#2974
Now that we match against all words in the query, if any of them matches
with a row it is "found".
However, it is more useful if all of the words must match, as narrowing
down the results is much quicker that way.
Splitting the search query on spaces results in empty strings if there
are double spaces in the query. These would always match.
Therefore, do not do anything with empty search words.
Initiatives#51 proposes to update and unify links in metainfo for GNOME
apps. We were using the old wiki link for translation and did not use
the welcome.gnome.org page for contributors.
Fix and add these links.
Closes#2938
- Remove a11y labels from buttons that
have tooltips, since Orca also reads tooltips
- Remove the .image-button style class, since
it's automatically added if a GtkMenuButton has
an icon[1]
- In property names that have more than 1 word,
use a hyphen minus symbol to separate the words
instead of an underscore
[1] https://docs.gtk.org/gtk4/class.MenuButton.html
When the row is a subpage it has a parent_id, which should be activated
instead of panel_id. So we construct a parameters GVariant so that
panels can handle it.
Since !2212, the version for the about window is taken from the build
system. Since release notes in the appdata file can be outdated or
incomplete, showing them in the About window is not really needed.
So, don't set any release notes version, which also fixes a critical
warning when the version does not have release notes in the appdata
file.
Fixes#2779
Our AdwAboutWindow is initialized with values loaded from from the
appdata file. For development versions we often don't add appdata
info, causing AdwAboutWindow to fallback to the latest version
available in the appdata file.
This should not occur in a stable branch, but this occurs in
development branches.
Let's always call adw_about_window_set_version() so that we guarantee
that the right verion number is shown in the UI.
Fixes#2779
This also drops the Categories as a criteria for creating the sidebar
list separators. Now the "panel_order" array will include entries named
"separator" to indicate where a separator should go.
See https://hedgedoc.gnome.org/FLcx6argT6uycE3An7uaxw
- Add the `<developer><name>` tag
- Mark the `<developer_name>` tag as deprecated
- Add appstreamcli validation
- Fix release version warnings
- Remove one of the custom Purism tag to pass the validation test
This moves the UserAccounts panel to a page in the System panel.
This simplifies a lot of the existing code in the UserAccounts panel.
I did minimal changes to the sub dialogs so that those can be touched
in following changes, making it easier to review this one alone.
The main panel widget is now CcUsersPage, and is an AdwNavigationView
widget that has a default "current_user_page" page. Each page is a
CcUserPage (careful with the one-character difference between these
two classes).
Each CcUserPage has an associated ActUser object.