Commit graph

19 commits

Author SHA1 Message Date
Christopher Davis
4f2aa07ff5 thunderbolt: Use AdwStatusPage for empty state
Make use of libadwaita's provided widget for status pages
instead of rolling our own.
2022-02-10 14:01:18 -08:00
Felipe Borges
12b940d411 thunderbolt: Wrap "Direct access" UI into a AdwActionRow
This allows for simplifying the logic of the states of this row
too.
2022-02-01 16:16:39 +00:00
Georges Basile Stavracas Neto
4300a4a290 panels: Use new CcPanel helpers for title widgets
This should significantly simplify these panels, by not forcing
them to override GObject.constructed all the time. Most panels
were quite straightfoward.
2022-01-20 02:23:42 +00:00
Georges Basile Stavracas Neto
b81a180c4f thunderbolt: Port to GTK4
The C code of this panel is just so. damn. good. Porting it was
a breeze.
2021-12-14 22:34:21 -03:00
Robert Ancell
93b14a4339 panel: Move shared GCancellable code into panel class
Make the panel class provide a cancellable that will be cancelled when the panel
is destroyed. Panel implementations can use this and not have to mangage the
cancellable themselves. Consolidate cases where panels had multiple cancellables
that were all being used for this behaviour.
2020-02-03 09:36:24 +13:00
Robert Ancell
42c8e63b1e thunderbolt: Fix GCancellable leak 2020-02-03 09:35:15 +13:00
Robert Ancell
9a2e821fe5 Initialize autoptr values to NULL.
These cases were safe, but if the code changed this risked freeing uninitialized
memory.
2019-10-03 10:58:38 +13:00
Georges Basile Stavracas Neto
75f150d5a2 shell: Add position to cc_shell_embed_widget_in_header()
So we can control where the widget should be added to. The
main window only supports left and right positions.

https://gitlab.gnome.org/GNOME/gnome-control-center/issues/528
2019-05-21 12:59:36 -03:00
Christian Kellner
2932243db1 thunderbolt: show parent devices in device dialog
Collect all the parent of a given device and pass that to the device
dialog, so we can show and potentially authorize/enroll all the
parent devices too.
2019-02-04 14:30:42 +01:00
Christian Kellner
077f169129 thunderbolt: device dialog can handle parents
Add an expander that contains a list of all the parent devices of
the dialog's target device. If any of the devices is not yet
authorized, show a warning symbol next to it.
Additionally the enroll/authorize function calls are replaced
by a single bolt_client_connect_all call, so parents that need
authorization can be authorized/enrolled too.
2019-02-04 14:30:42 +01:00
Christian Kellner
d2ae2d464f thunderbolt: device entry can show device warnings
The CcBoltDeviceEntry can now optionally show a warning indicator
if the device is in the pending state.
Since we *don't* want to show this in the main list, remove calls
to gtk_widget_show_all and replace them with gtk_widget_show.
2019-02-04 14:30:42 +01:00
Christian Kellner
05f2c5ef7c thunderbolt: react to security level changes
Listen for security level changes, which in theory should not really
happen at all with the exception that on hardware where force power
is not support and boltd has not yet seen the thunderbolt controller
because it was powered down. Then we should get an initial change
from 'unknown' to the real level. Handle it in the same way that
as if boltd was restarted, i.e. the dbus name owner changed
2019-01-30 13:54:14 +00:00
Christian Kellner
b9136fd468 thunderbolt: specific message for unknown security
If bolt cannot determine the security level, which in theory should
never happen[1] the standard no-thunderbolt message seems not
entirely appropriate. Instead show a different message that is more
tailored to this unusual case.

[1] The following (unlikely) reasons would invoke such a scenario:
   - new security level not supported by boltd
   - old hardware with not force-power support and the thunderbolt
     controller has not yet been powered up
2019-01-30 13:54:14 +00:00
Christian Kellner
31a77ad060 thunderbolt: plug leak when name owner changes
Should not happen very often in the real world, but ever time the
name owner changed (i.e. boltd was restarted) the name_owner
variable was leaked.
2019-01-30 13:54:14 +00:00
Robert Ancell
65cb7e98d1 thunderbolt: Fix compile warning 2018-11-06 11:39:48 +13:00
Benjamin Berg
c2f601a9d4 Move common panel code from shell/ to panel/common
This creates a new static library called libwidget which the shell links
against.
2018-04-17 15:26:59 +02:00
Georges Basile Stavracas Neto
958bb8fe6b thunderbolt: Fix coding style
Not everything was fixed, but why bother.
2018-04-14 19:26:12 -03:00
Piotr Drąg
8d2fb2199e thunderbolt: fix grammar in a translatable string 2018-04-13 18:54:57 +02:00
Christian Kellner
47f241b10c thunderbolt: new panel for device management
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.
2018-04-13 15:08:16 +02:00