This is an initial implementation of most of the
intended functionality for this panel. Flatpak
integration itself is implemented by spawning
"flatpak info -m $appid", which gives us the
metadata in key file format, and allows flatpak
to be a runtime dependency.
Even after removing the .desktop suffix, there can
still be a difference between the app ID generated
in this way and the flatpak ID, since flatpaks are
allowed to export files whose prefix is the flatpak
ID. Fix this by pulling the X-Flatpak key out of
the desktop file. This would cause trouble for
org.libreoffice.LibreOffice-math.
Add initialize_dependencies() to factorize the dependecies
initialization functions for better readability as another dependency
to initialize will be added in a following commit.
With the new sidebar view in place, a new problem arose: we
need the current panel to be configured to update the title,
but cc_panel_list_add_sidebar_widget() changes the view while
activating the panel. That makes Settings crash.
Fix that by explicitly updating the headerbar widget, instead
of using notify::view of the panel list.
Instead of directly selecting the view that the panel
list will have, let it decide which is the previous
view instead.
This does not change anything functionality wise, but
in the future where we have sidebar widget (and thus
the main window does not control which view the sidebar
is display) this will be important.
This vfunc is the entry point for panels that have
a sidebar widget. It must never return NULL.
At this point, nothing uses it and this vfunc does
not impact execution of the program.
These overrides were added eight years ago, as a port from
GTK3's size_request() deprecation, in commit f5f5aac5c0.
These overrides are not necessary these days, since they
just reproduce the default behavior now.
Remove these overrides then.
It will be used by the next commits to look for the panel
name. That is because the panel name is what will be used
as the first headerbar title of panels with a sidebar widget.
This commit does a few different bit interwined things to the
build steps:
* Make libtestshell and gnome-control-center share more of the
variables and resouces;
* Use 'dependencies' instead of 'link_with' for libshell;
* Add some visual marks as comments;
Add documentation comments to the public functions, which
has the additional benefit of adding visual marks for
public functions and making it easier to navigate through
this file.
In order to introduce test panels, which are a nice to have
feature before actually moving to working on the custom
widget on sidebar feature, add a way to override the panels
vtable and load whatever panels we might want.
We will allow test panels to be added, so the vtable must
be overridable. The first step into making it overridable
is exposing the actual vtable struct.
Same dog, different collar. The UI has been ported 1:1 to GTK+, using
GtkBuilder, CSS and event controllers fairly reduced the amount of code
needed for this.
It also allows us to stop initializing clutter-gtk across the several
executables.
Only the date time panel used it, all other panels add their own shell using
cc_shell_embed_widget_in_header which was added after the date time panel was
written. Update the date time panel to use this method.
It is not useful to assert that task_data != NULL after
using it to build the D-Bus key.
Move the assertion to before it is first used and get
rid of this inconsistency.
As per doumentation: "It is a programming error to create an identical proxy
while asynchronously creating one. Not cancelling this operation will result in
an assertion failure when calling cc_object_storage_create_dbus_proxy_finish()."
In order to fullfill the second part we need to check for errors (including
cancellation ones) before we generate an assertion failure.
Fixes: https://gitlab.gnome.org/GNOME/gnome-control-center/issues/158
Panel icons should be consistent between the app and corresponding
search results in GNOME Shell, but currently the former uses the
symbolic variant while the latter uses the colored version.
Address this by converting icons to their symbolic variants when
building the model rather than later when consuming them.
https://gitlab.gnome.org/GNOME/gnome-control-center/merge_requests/151
Use GsdDeviceManager to monitor libwacom-supported tablets coming and
going. Hide the Wacom panel from the list when there's no supported
tablets plugged in.
Whenever a panel is activated, there is a GtkBox that
is added between the window and the panel itself.
Investigating the history of this field, it originally
appeared at ec7f8c9b when the window started using
widgets rather than page numbers. Apparently, it was a
GtkBox to help dealing with the GtkNotebook (which was
later changed to the current GtkStack).
The field was renamed from 'current_panel' to 'current_panel_box'
at ab435aa9. But since the transition to GtkStack, there
is no real need to use the GtkBox anymore.
This patch removes this GtkBox, and as a consequence, the
code is slightly simplified.
The correct time to remove custom widgets is precisely
after we checked if the panel can be activated, and before
creating the panel. We were not following that, and it was
causing the panels with header widgets to never actually
show their custom widgets.
Fix that by calling remove_all_custom_widgets() at the
correct point in panel creation.