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.
When moving from and to different views, the first row
might be activated due to focus going to the listbox. This
wasn't a problem before because we couldn't hit that code
path, but now we can.
Fix that by always selecting the first visible row.
There are a couple of small problems with the search
behavior here. First, if we select a panel from search
and leave it, it will continue to stay there forever.
Second, if panels change their visibility status during
runtime, the panel list wouldn't respond accordingly.
When changing panels, CcWindow can only remove the previous
panel's header widgets after making sure the new panel was
successfully set.
However, this is not the case, and when the current panel
fails to be set, the previous panel's header widget is
removed.
Fix that by waiting to remove the header widgets until the
panel is successfully set.
Static init functions are functions that initialize resources
or monitor daemons without needing any contextual information,
such as a CcPanel instance or access to a CcShell implementation.
These functions are meant to be used for monitoring a panel's
visibility, when it makes sense. Usually, panels that represent
hardware that potentially is not available or is not supported
should hide itself.
Following this commit, the Wi-Fi panel panel will be adapted as
the first user of this new API. Other panels that require this
functionality will be adapted later.
This field can be used to communicate the visibility of the
panel from a static context (i.e. without any instances of
a CcPanel nor any access to CcShell).
In order be able to modify panel information statically,
we need to have access to the CcShellModel from static
functions. CcApplication, thus, is a better place for the
model to live, since we can access it outside any scope
using g_application_get_default().
It also makes sense from the modeling point of view, since
the model is not tied to the shell anymore.
This never really worked on the new Setting layout
because it was historically implemented as "Back to
Overview", and we don't have an overview anymore.
This is fixed by morphing the implementation to be
"Back to previous panel", which forces us to actually
store the previous panel.
There is no overview anymore -- Settings is always
visualizing a panel at any given time.
I just noticed that the Alt+Left shortcut was always
broken too. This will be fixed in a following commit.
With this commit, a message dialog pops up whenever a
development build runs. This is meant to actually annoy,
so that we're always reminded that things may not work
as expected.
Since the dialog can be dismissed with a single button
press, it is not the end of the world. But people still
should be aware that Settings is ~not~ meant to run with
Flatpak, and that this is a development tool only.
When selecting the panel on startup based on the "last-panel" settings,
we need to make sure that the panel exists.
Note that this is a special case which does not use the internal
set_active_panel_from_id API. Using it is currently not possible because
the API does not report back the error and we would end up not selecting
any panel.
The 'Devices' page is a fitting place for the thunderbolt, being
an IO technology. It is expected that people that need to go to
that page will be sent there via a gnome-shell notification, so
there is no need for it to be on the main page.
Ok'ed by the design team (jimmac).
Thunderbolt devices need to be approved before they can be used.
This is done via the boltd system daemon and gnome-shell. The new
panel enables the user to manage thunderbolt devices, i.e.:
- forget devices that have previously been authorized
- authorize currently unauthorize devices
Additionally authorization of devices an be temporarily disabled
to ensure no evil device will gain access to the computers
resources.
File starting with "bolt-" are copied from bolt's source tree
and currently correspond to the bolt upstream commit with the id
f22b1cd6104bdc2b33a95d9896b50f29a141b8d8
They can be updated from bolt via the update-from-bolt.sh script.
The helper function to get the icon name from a GIcon directly
returns the symbolic icon now. This makes it in turn possible
to also directly check if the theme has the icon with the symbolic
name instead of checking of for the full colored one and then
deriving the symbolic name from that. The latter (old) practice
will fail if there is a symbolic icon in the theme that has no
full color icon (like e.g. thunderbolt).