Commit graph

1305 commits

Author SHA1 Message Date
Automeris naranja
e31dd03fdc network-vpn: Add tooltip to the VPN options button
Also, remove the a11y label because Orca also reads tooltips.
2024-03-12 12:40:45 +00:00
Automeris naranja
cb8819657b general: Rename "computer" strings to "device"
"Computer" isn't a suitable term for other device
form factors. Also, there are several strings in
Settings that already use "device", and cc-color-panel.ui
uses a mix of "computer" and "device" strings, which is
weird.
2024-03-11 15:19:55 +00:00
Automeris naranja
e261d51617 network: Use "secondary-label" property in the Proxy row
The Proxy row shows its value as subtitle, which is
inconsistent with other rows where the subtitle describes
the row title/what the row is.

Show the proxy value as a CcListRow secondary-label to fix
such issue.

Reference:
cfb7cae4a9
2024-02-29 13:53:34 +00:00
Automeris naranja
31927efeac wifi-connection-row: Minor tweaks
- Make all buttons as suffix widgets,
which makes unnecessary to wrap them in
a GtkBox that is set as a suffix widget

- Don't set a margin end to the Wi-Fi
icon[1]

- Remove halign from the buttons, because
it isn't necessary

- Remove halign from the buttons, as it
isn't necessary because halign works only
if hexpand is set to TRUE

- Add margin end to the spinner so it
doesn't appear misaligned with the other
widgets at the end of the row

[1] In latest mockups, the margin between
the Wi-Fi icon and network name is also
shorter: cfb7cae4a9
2024-02-26 16:02:23 +00:00
Automeris naranja
af55df0194 network-wifi: Remove "activatable" property from some CcListRows
The CcListRow template already sets the row
as activatable[1].

[1] https://gitlab.gnome.org/GNOME/gnome-control-center/-/blob/gnome-45/panels/common/cc-list-row.ui?ref_type=heads#L4
2024-02-20 19:04:26 -03:00
Felipe Borges
f54558d58e wifi: Add translator comment to "Saved Networks" dialog 2024-02-16 09:50:20 +00:00
shruti2522
e289a8b3b6 wifi: pluralize string using ngettext 2024-02-16 09:50:20 +00:00
Sam Hewitt
a5f6efaddb Update and clean up symbolic icon assets
- refresh the symbolic icons to sync some style changes and update the source sheet
- rename assets for the privacy subpanel's symbolic icons
- delete deprecated/unused symbolic icons
- add new icon for system panel
- add new icon for remote desktop so it isn't using displays icons
2024-02-10 16:17:35 +00:00
velsinki
9309b65f3d wifi: Change existing toast at each forget network
Merge request !2093 fixed 3 crashes in the Saved Networks Dialog, but
unfortunately added another one. Upon undoing an AdwToast after deleting
a network, Settings crashes.

Furthermore, the title of the toast is quite verbose, meaning it often
gets ellipsized. Also, deleting many networks is somewhat annoying
because many toasts get generated. Since only the latest toast is saved
in the NetDeviceWifi, mixed dismissing and undoing of multiple toasts
doesn't work properly either.

We fix all these issues by having only one toast, that either says
"Network deleted" or "%d networks deleted". The networks are kept in a
GPtrArray, for which the free function is set to either really forget
the networks or to undo forgetting them.
2024-02-06 12:35:46 +00:00
velsinki
cbd2b7b988 wifi: Start using saved_networks_list more
Commit 99b42130 introduced the `saved_networks_list` struct member, so
we do not need to set and get a "list" variable on the rows anymore
since they already contain the NetDeviceWifi.
2024-02-06 12:35:46 +00:00
Ondřej Pohořelský
e6978a4801 wifi: show password when sharing QR code
Added plain text Wi-Fi password when sharing Wi-Fi connection
Resolves: #2757
2024-02-06 10:02:50 +00:00
Matthijs Velsink
3a253bc4b1 general: Use g_clear_handle_id to remove GSources
Using `g_clear_handle_id()` in combination with `g_source_remove()` can
save a lot of boiler plate code.

This removes about 110 lines of code for free.
2024-02-06 09:22:07 +00:00
velsinki
9716575162 network: Fix missing VPN entries
This required some archeology: 52d28579 introduced virtual device
support. This was done by getting the virtual device name and testing if
that was `NULL`. Then came 8861d440, which removed virtual devices, but
did not revert fully to the behavior before 52d28579. Combined with
9183d349, this meant that any VPN that has an interface name set, will
never be displayed.

Fix this by reverting to the behavior before 52d28579, while keeping
wireguard support. The added check from ddc35609 is left in, although it
is not clear to me if that is still needed.

Fixes #2822
2024-01-30 17:02:00 +00:00
Felipe Borges
69a6abd0fa network: Make NetDeviceWifi use CcHostname to obtain the display name 2024-01-30 13:34:10 +00:00
Automeris naranja
b1d1302053 general: Remove a11y labels from buttons that have tooltips
Orca also reads tooltips, so having both a11y labels
and tooltips is redundant.

See https://gitlab.gnome.org/GNOME/gnome-control-center/-/merge_requests/2023#note_1915854
2024-01-30 13:28:48 +00:00
Automeris naranja
58b0d7392a net-proxy-page: Add mnemonic to the "Configuration URL" entry 2024-01-23 11:09:19 +00:00
Automeris naranja
547b4542be network-ethernet: Tweak network options button tooltip
- Change "Options" to "Network Options" to
provide more context

- Remove the a11y label, which is redundant,
because this button already have a tooltip (the
screen reader also reads tooltips)
2024-01-23 10:55:23 +00:00
Automeris naranja
7fd77c339d wifi-connection-row: Tweak tooltips
- Rename "Show QR Code" to "Share Network",
since the latter is is the proper name of
this action

- Change "Options" to "Network Options" to
provide more context

- Add tooltip to the forget network button

- Removes a11y labels from buttons that already
have tooltips, since the former is redundant
due to the fact that the screen reader reads
tooltips
2024-01-23 10:55:23 +00:00
Automeris naranja
d12a7713d5 qr-code-dialog: Port to AdwWindow/AdwToolbarView
See https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/2624
2024-01-18 11:58:34 +00:00
velsinki
b76d6d0d00 ethernet: Add thousands separator to speed
Increases readability for speeds >= 1000 Mb/s.

Fixes #2804
2024-01-08 12:52:59 +00:00
velsinki
0b3c670ed4 wifi: Avoid critical warning for hotspot dialog
The CcWifiHotspotDialog is derived from GtkDialog, which is floating.
The floating reference is destroyed on closing the main window, before
the NetDeviceWifi is disposed. This causes a critical warning when the
NetDeviceWifi dispose does run, since it tries to destroy a now
non-existent window.

Fix this by sinking the floating reference, and unreffing it in the
NetDeviceWifi dispose function.

Fixes #2823
2024-01-08 09:38:55 +00:00
Bart Gravendeel
cacc2b5bef Remove use-underline property from all CCListRows 2024-01-04 10:11:35 +00:00
velsinki
99b42130b0 wifi: Fix crash when switching to other panel after forget network
Similar to the previous crashes, if you switch panels after forgetting a
network while the toast is still alive, Settings crashes. This is
because the AdwToastOverlay is not properly disposed because the Saved
Networks dialog is also not destroyed.

However, destroying the saved networks dialog still leaves a crash,
because the overlay disposal first unreferences its child, but we still
need that for the dismissal of the waiting toasts. Therefore, we keep an
extra reference to the saved networks list.

To prevent further crashing, we cannot set "list" to NULL, because there
may be multiple async calls. Also, we have to keep a reference to self
in the async call, otherwise it does not work when you remove many
networks and then switch panels.

As an added bonus, we can now use the saved networks list inside the UI
refresh function.
2023-12-19 09:33:26 +00:00
velsinki
794d8f5135 wifi: Move Saved Network mostly to .ui and clean up
It is cleaner to define the dialog in a .ui file. Moreover, since we are
initializing the main Visible Networks list in the code, we can
initialize the Saved Networks list in the same location, in the same
style.
2023-12-19 09:33:26 +00:00
velsinki
74279db43f wifi: Clean up net-device-wifi
There is a lot of unused code for the saved networks dialog. We can
remove all of that.

We furthermore format the code a litte better.
2023-12-19 09:33:26 +00:00
velsinki
91771c4c31 wifi: Avoid casting of Adw and GTK types
This reduces some of the casting noise in the code.
2023-12-19 09:33:26 +00:00
velsinki
218adbd306 wifi: Fix crash on reopen of Saved Networks after forget
When a network is forgotten from the Saved Networks dialog and the
dialog is closed, the toast remains active. However, when you then
quickly reopen the dialog, a new CcWifiConnectionList gets made, which
causes a crash when the toast expires or is dismissed, as the row for
the toast has now become invalid.

Fix this by only setting up the CcWifiConnectionList for saved networks
once.
2023-12-19 09:33:26 +00:00
velsinki
7a4869017e wifi: Fix "forget multiple networks" crash
When forgetting more than one network from the Saved Networks dialog,
there are multiple overlapping toasts. When the first toast expires or
is dismissed, the underlying CcWifiConnectionList is already thawed,
meaning previous rows get cleaned up and new ones generated. When the
next toast then expires or is dismissed, this results in a crash, as the
row belonging to that toast is now invalid.

Fix this by freezing the connection list earlier.

Fixes #2793
2023-12-19 09:33:26 +00:00
velsinki
1e8ce56887 ce-vpn-page: Fix layout of Identity page
b291e98c introduced a scrolled window, but forgot to update the C code
to use the new box instead. Now we use it correctly again.

Fixes #2795
2023-12-15 10:49:22 +00:00
velsinki
0427e160bd network: Hexpand connection editor routes labels
Commit ef644deb made the routes labels for the IPv4 and IPv6 center
properly. However, when stretching the dialog, this centering is lost
because the labels do not horizontally expand.

So let's make all of them horizontally expand.
2023-11-30 09:41:49 +00:00
Maximiliano Sandoval R.
200cac0970 connection-editor: Remove default size
In the previous commits we added scrolled windows on all pages, these
scrolled windows propagate their natural size and hence the dialog will
try to present itself with that size.

By having all pages inside of a scrolled window we can now use the
connection editor on mobile devices.

Fixes: https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/2764
2023-11-29 17:35:16 +00:00
Maximiliano Sandoval R.
b291e98c00 ce-vpn-page: Add a scrolled window
We wrap the contents of the page in a scrolled window.
2023-11-29 17:35:16 +00:00
Maximiliano Sandoval R.
f37e284ae4 ce-ip6-page: Remove comments 2023-11-29 17:35:16 +00:00
Maximiliano Sandoval R.
e85f094184 ce-ip6-page: Propagate natural size of content
We remove hscrollbar-policy=never. This can only work if the view is
adaptive. This has to be restored once the page is adaptive.
2023-11-29 17:35:16 +00:00
Maximiliano Sandoval R.
4fade06a02 ce-ip4-page: Propagate natural size of content
We remove hscrollbar-policy=never. This can only work if the view is
adaptive. This has to be restored once the page is adaptive.
2023-11-29 17:35:16 +00:00
Maximiliano Sandoval R.
3b3ca34a57 ce-wireguard: Propagate natural size of content
We remove hscrollbar-policy=never. This can only work if the view is
adaptive. This has to be restored once the page is adaptive.
2023-11-29 17:35:16 +00:00
Maximiliano Sandoval R
15844ddefe ce-page-details: Port to AdwBin
We add a scrolled window.
2023-11-29 17:35:16 +00:00
Maximiliano Sandoval R.
f374c62b81 ce-page-ethernet: Port to AdwBin
We add a scrolled window.
2023-11-29 17:35:16 +00:00
Maximiliano Sandoval R.
665288a47c ce-page-wifi: Port to AdwBin
We add a scrolled window.
2023-11-29 17:35:16 +00:00
Maximiliano Sandoval R.
4f8789c466 ce-page-security: Port to AdwBin
We add a scrolled window.
2023-11-29 17:35:16 +00:00
Maximiliano Sandoval R.
15694399dd ce-8021x-security-page: Port to AdwBin
We add a scrolled window.
2023-11-29 17:35:16 +00:00
Maximiliano Sandoval R.
9f86405bdd connection-editor: Add suggested action to button 2023-11-29 17:35:16 +00:00
Jonathan Kang
f0d04a180f network-connection-editor: Close the editor when nm-connection-editor exits
Previously, when editing a connection that doesn't have native editor
support, nm-connection-editor is spawned to do the work. But after
closing nm-connection-editor, an empty editor dialog still exists.

Fix that in this commit.
2023-11-29 10:28:18 +00:00
Automeris naranja
d975dd335c network: Add tooltip to some buttons 2023-11-29 10:12:30 +00:00
Ismael
9ed28e9c27 network: Share WPA3 (SAE) networks with QR Code 2023-11-27 12:15:20 +01:00
Automeris naranja
52a5afcc28 ce-page-details: Add ellipsis to labels of forget_button
"Use an ellipsis (…) at the end of a label if
further input or confirmation is required from
the user before the action can be carried out".

https://developer.gnome.org/hig/guidelines/writing-style.html
2023-11-27 10:36:00 +00:00
Automeris naranja
1093f2993f connection-editor: Set .pill style to forget_button 2023-11-27 10:36:00 +00:00
Marcos Miller
5e27373700 network: Show top buttons on unsupported network daemon page
When entering the network panel without the network daemon,
the window decoration buttons do not appear because the whole panel
content was overwritten by an AdwStatusPage.

Now only the content of the AdwToolbarView is changed, preserving
the AdwHeaderBar and buttons.

Fixes https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/2695
2023-11-24 10:49:08 +01:00
Ondřej Pohořelský
8f3eee7ee1 wifi: hide QR code icon when connection not successful
Don't show QR code icon when there is no info about connection being
valid and successful. Also hide it when we are connecting and when WiFi
has no password.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-control-center/-/merge_requests/2030>
2023-11-23 05:10:07 +00:00
Florian Müllner
38cac20497 network: Handle BT device connections ourselves
Bluetooth connections are among those that we still delegate to
nm-connection-editor. Luckily they are fairly simple connections
without any options on their own, so the built-in connection editor
can handle them just fine.

https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/1157

Part-of: <https://gitlab.gnome.org/GNOME/gnome-control-center/-/merge_requests/2044>
2023-11-21 13:38:32 +00:00