commit 02302c9b08 implemented vertical centering of
the panel being activated, but we should restrict
that to only happen when the activation is from the
Search view or from the set_active_panel_from_id()
CcShell iface, which covers the case of panel activated
from commandline parameter or from other panels, but
does not include activating panels manually by mouse
or keyboard which is the problematic case explained
in issue #2506Closes#2506
We currently load the last-panel every time gnome-control-center
is launched, we do it from the CcWindow contructor method.
But we shouldn't do it when we are explicitly opening a different
panel by eg. using commandline parameter (gnome-control-center keyboard)
or from a DBus method, because otherwise we slow things down by
unnecesarily start launching last-panel just to be cancelled
moments later when the code starts processing the other panel.
We fix it by moving the code that loads last-panel to an idle
handler, so by the time it gets executed the other panel has
already started loading, and we can check for that with the
cc_panel_list_get_current_panel() function we add in this patch.
With this patch, I can feel that panels opened from a
gnome-shell search are presented faster.
Fixes issue #2569
Improve keyboard navigation with Up/Down arrow keys between
Search entry and the search results list.
Pressing Arrow Down in search entry will now move focus
to search list, and when pressing Arrow Up on the first
list result will move back focus to Search entry.
Avoid activating a panel when doing an empty search
i.e. clicking ENTER without having entered
any text in the search entry.
We should do nothing in this case, we fixed it by
detecting for this case when an activation happens
when there's still no search results view in place.
Closes#2119
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.
We need to cancel internal operations before starting to create a new
panel, otherwise panels might be creating the same object for the cache
in parallel and this is not supported by the object cache.
The alternative to this would be to handle this inside the object
store to allow parallel creation of the same key.
Fixes: #1685
Rename the app-id to org.gnome.Settings since this is what
we've been calling it for many years now. Adjust all files
that derive from the app-id, such as the desktop file, D-Bus
service file names, search providers, GSettings schemas, to
match that.
Closes https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/344
Moving the headerbar to the panels accentuated a pre-existing
problem: transitioning between panels is flickery because we
immediately remove the old panel, while the new panel fades
in.
Improve this transition by delaying the removal of the old
panel to after the stack transition finishes.
The CcWindow tries to unset the focus when first mapping the window.
However this pretty wide check intercepts mapping events from other
windows than the toplevel (e.g. subsurfaces, for popovers). This
causes the focus to move away from the popover, overriding its
modality.
Check that the event received is addressed to the CcWindow's
GDK window before unsetting the focus, so we don't mess with popover
focus.
Fixes: https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/1327
As per the latest mockups, the Details section is a toplevel
section, and not an actual subsection.
Remove all the code that implemented Details as a subsection,
and simply treat these panels as toplevel ones.
The panel swarms details/devices/privacy show this icon. Since the applications
panel is not made from sub-panels, this doesn't show. For consistency this shows
the icon so the transition isn't as jarring for the user.
Add a flat into the panel .desktop file to enable this - other panels might
require this in the future