Commit graph

28 commits

Author SHA1 Message Date
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
Hari Rana
1c62c25907 wifi-connection-row: Add tooltip texts
Co-authored-by: Automeris naranja <104251-automerisnaranja@users.noreply.gitlab.gnome.org>
2023-10-23 13:31:32 +00:00
Hendrik Müller
8f6ef3a6ef wifi: Hide QR Code button for unsupported security
QR codes for Wi-Fi networks can only be generated for Wi-Fi networks
that have one of these security settings:
- no security
- WEP security
- WPA security

This is why the button to show these QR codes should only be visible
if the Wi-Fi network in question has one of these security settings.
2023-08-29 14:30:06 +02:00
Mohammed Sadiq
39f21e4229 network: Fix some memory leaks 2023-07-03 01:56:24 +00:00
Fareed
eccc4d304e wi-fi: Add delete icon in saved connections list
Each connection now has a delete icon to forget a saved connection.
List can still be generated to include the checkbox to forget multiple.
Follows mockups for wi-fi panel. Add translation comments.
2023-06-07 22:58:37 +00:00
Lukáš Tyrychtr
ded85c5423 panels/wifi: Make the security status and signal strength read by screen readers
Before this MR, the signal level was not available at all, and the security
status only as an a11y description of an image. Now, these pieces of information
are part of the description of the item itself.
2023-03-28 08:18:27 +00:00
Hendrik Müller
add2f0d2f7 wifi: Add QR code to share Wi-Fi networks
Many devices are able to scan a specifically formatted QR code to
connect to a wifi network.
To make sharing of wifi connections easier, it would be helpful to
display such a QR code in the wifi settings.

A button is added to the wifi connection row. This row is shown in
the general wifi settings panel, as well as in the "Known Wi-Fi Network"
dialog. Clicking the button opens an additional dialog, which shows the
QR code.
2023-02-14 19:11:07 -03:00
Hendrik Müller
f0890ca1b6 wifi: Allow accessing settings of known wifi networks
Currently it is only possible to access the settings for the currently
connected wifi network.
Being able to configure a wifi network, even though it is not connected,
would be useful for example to share the password for a network that is
not in range.

To achieve this, a new property was added to CcWifiConnectionRow.
The new property "known_connection" signals whether this connection is
known and thus whether the options button for configuring it should be
displayed.

The property "known_connections" will be set to TRUE in two cases:
- when the list of connections is shown in the "Known Networks" dialog
- when the connection is known, but not the active connection

Closes https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/1906
2022-07-06 19:34:56 +00:00
David Bauer
533b698f60 network: implement handling for OWE TM
Implement handling for OWE-TM networks.

 * Correctly display encryption type when connected to a OWE-TM network
   with an open profile (Previously showed as WPA2
 * Mask out hidden transition SSID when connected to the OWE-TM network
 * Don't display OWE-TM network with lock icon

Signed-off-by: David Bauer <mail@david-bauer.net>
2022-06-19 23:53:24 +00:00
Bastien Nocera
47c586a82e network: Fix Wi-Fi network with "&" in name not appearing
My neighbours' Wi-Fi makes the Wi-Fi panel throw an error:
(gnome-control-center:346639): Gtk-WARNING **: 15:16:21.993: Failed to set text 'Bbox Hugo & Laura' from markup due to error parsing markup: Error on line 1: Entity did not end with a semicolon; most likely you used an ampersand character without intending to start an entity — escape ampersand as &amp;

Escape the SSID before using it to set the label.
2022-06-09 20:54:57 +00:00
Felipe Borges
37ee555c44 network: Show configuration button only for active/connecting connections
In commit c7bd442839 we started to
show the configuration button for all rows, which fixes the original
issue of not being able to tweak a connection during association but
also introduces a regression of not having connection data to show
for other connections in the list. This way, the configuration
button will fail to create a net_connection_editor interface for
rows that aren't associated with an active connection.

Let's only show the configuration button when the NMActiveConnectionState
is either NM_ACTIVE_CONNECTION_STATE_ACTIVATING or
NM_ACTIVE_CONNECTION_STATE_ACTIVATED.

Fixes #1494
2022-02-10 15:05:08 +00:00
Christopher Davis
079bf51086 network: Fix wifi icon loading
GTK4 changes how icons are loaded - only icons that are
set up to follow icon theme paths are recolored. The way
the network panel loaded icons wasn't compatible with this,
causing icons to stay dark in dark mode.

This commit adjusts the gresource so that icons are
in `$RESOURCE_BASE_PATH/icons/scalable/actions`. Since
GTK knows how to handle that automatically, we can
simply use `icon-name` instead of loading a full
icon path.
2022-01-06 12:42:34 -08:00
Georges Basile Stavracas Neto
efbad6eb50 network: Port to GTK4
Boy this was hard.

To ease the pain of porting wireless-security to GTK4, add
a new WsFileChooserButton class that mimics the behavior of
a button that triggers a filechooser, as per the migration
guide suggests.

There were lots of GtkGrids, so the diff is particularly
horrendous. Sorry.

This needs serious testing before landing.
2021-12-14 22:34:21 -03:00
Felipe Borges
c7bd442839 network: Show configuration button during wifi association
While connecting to a Wifi network g-c-c would hide the button that
launches the connection preferences dialog. This is inconvenient
when network manager keeps on attempting to reconnect to a
misconfigured network.

These changes rework the logic of the buttons by always presenting
the configuration button and toggling the visibility of the spinner
accordingly.

Fixes #493
2021-08-30 13:13:40 +00:00
Robert Ancell
64a2e54ec6 network: Update design of the WiFi list.
https://gitlab.gnome.org/Teams/Design/settings-mockups/raw/master/wifi/wifi-list.png

Fixes https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/1185
2020-11-16 17:01:16 +13:00
Robert Ancell
3beaa9d158 network: Move signals handlers into .ui files 2020-11-11 20:13:46 +00:00
David Bauer
1d0b664f7c Add support for Enhanced Open WiFi security 2020-07-17 03:41:44 +00:00
Robert Ancell
5b14e16e9c network: Connect signals with g_signal_connect_object in swapped form 2020-03-30 16:18:50 +13:00
David Bauer
da0c45f2ab ce-connection-row: add SAE support 2020-01-27 23:11:30 +00:00
Robert Ancell
708b1fdaf7 network: Use self variable name consistently 2019-10-22 20:11:45 +00:00
Robert Ancell
54f8fce47f network: Connect signals in swapped form 2019-10-22 20:11:44 +00:00
Veerasamy Sevagen
9316a77af4 network: Add tooltip text to encrypted connection.
The issue was that sometimes the icon would show an error but we would not know what it is.

Fixes #468
2019-09-11 03:20:55 +00:00
Benjamin Berg
e5b017f45e wifi: Fix connection names with markup not showing up
In some cases, the network connection UI uses pango markup to denote the
SSID name inside a connection name. However, if the SSID matched the
connection name, then we would end up setting the SSID as pango markup
without it being escaped.

Fix this by escaping the SSID before setting it as markup.

Fixes: #435
2019-03-29 11:15:52 +01:00
Benjamin Berg
0209694978 wifi: Show WEP with a broken security icon
WEP is rather insecure, and using it is a bad idea in general. So show
it as insecure rather than falsely advertising it as being secure.
2019-01-07 15:30:06 +01:00
Benjamin Berg
eec7841027 wifi: Add set_checked function to connection row 2019-01-07 15:29:23 +01:00
Benjamin Berg
5c81b12647 wifi: Handle multiple APs in a connection row
Note that this also changes the way to detect that the connection is
currently active. This change is not required but but does simplify the
code a little bit.
2019-01-07 15:29:23 +01:00
Benjamin Berg
3962aa3028 wifi: Show the connection name when it is different to SSID
In almost all cases, the SSID will be identical with the connection name
(in fact, we do not even allow modifying the connection name). However,
as it is now, we can end up with multiple connections with the same name
in the list.

Change the list to indicate the SSID separately in a way that will not
result in any changes in the usual case.
2019-01-07 15:29:23 +01:00
Benjamin Berg
0fb86c82d2 wifi: Add new CcWifiConnectionRow widget for the AP list
This is in preparation to optimize list to not be rebuild completely for
every change.
2019-01-07 15:29:20 +01:00