Commit graph

217 commits

Author SHA1 Message Date
Alice Mikhaylenko
52f4919c94 network: Stop using AdwPreferencesWindow for the saved networks dialog 2023-08-02 12:51:48 +00:00
Felipe Borges
fd1ac377ae network: Use AdwSwitchRow for wifi device enable row
In commit 2a33247f52 the
cc_list_row_get_active() method got removed despite still being
used in the network settings. This was breaking our build.
2023-06-30 11:52:42 +02:00
Fareed
1b70d766d6 wi-fi: Move controls out of headerbar
Enable switch and dropdown taken out of header bar.
Follow order of Network mockups for row order. Wifi hotspot
remains here until full network panel redesign completed.

Fixes: https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/2413
2023-06-12 19:40:04 -04: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
Gotam Gorabh
ad063dfa55 wi-fi:Updated Forget Connection dialog of saved networks with AdwMessageDialog
This changes update the Forget Connection dialog of saved networks
using AdwMessageDialog instead of GtkMessageDialog. And set Cancel
as a default responce instead of Forget to overcome accidental forget.
2023-04-11 11:56:05 +00:00
iampkumar02
27d5e7dd26 wifi: Center panel title when subtitle isn't visible
We used to have a custom title widget containing a label for the
title and another for the subtitle (status). When the subtitle label
wasn't visible, the title label wouldn't get centered vertically in
the headerbar.

By porting the custom title widget to AdwWindowTitle we get the title
centered for free.

Fixes #1891
2023-04-11 13:49:09 +02:00
Maksym Hazevych
5b988a6943 Replace all occurrences of 'gtk_widget_hide'
Replace all occurrences of 'gtk_widget_hide(smth)' with
'gtk_widget_set_visible(smth, FALSE)'.
2023-03-29 14:26:55 +13: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
sunflowerskater
8e43d2c53d wi-fi: Rename "Known Networks" to "Saved Networks"
This change follows the latest mockups, which use the term "Saved Networks":
https://gitlab.gnome.org/Teams/Design/settings-mockups/-/blob/master/network/wifi-settings.png
2023-01-06 12:26:37 +00:00
Felipe Borges
294156c0f9 Drop most uses of deprecated gtk_style_context_add/remove_class
GtkStyleContext will be deprecated in gtk 4.10.
https://docs.gtk.org/gtk4/class.StyleContext.html

This preserves code blocks where additional GtkStyleContext operations
were used, such as gtk_style_context_save/restore.
2023-01-05 18:55:51 +00:00
Hendrik Müller
48497080b3 wifi: Fix bug in Known Wi-Fi Networks dialog
The "Forget" button would only update it's sensitivity after the first
select and deselect, when selecting and deselecting rows in the
"Known Wi-Fi Networks" dialog.
When selecting the first row, it would go from disabled to enabled.
Then deselecting that row would cause the button to go from enabled to
disabled.
Selecting any rows after that would no longer update the sensitivity and
make the dialog essentially useless.

The issue was, that the signals "add" and "remove" where being
expected to be emitted when the connection list updates its rows.
However, neither CcWifiConnectionList nor GtkListBox emit these signals.
The fix was, to emit these two signals at the appropriate locations.
The signals have also been renamed to "add-row" and "remove-row" to
make their purpose more clear.

Closes https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/1824
2022-08-03 11:05:16 +00:00
Hendrik Müller
c44ee6fa80 wifi: Add padding to Known Wi-Fi Networks dialog
The "Known Wi-Fi Networks" dialog is missing some padding to really
make it look polished.

By switching from a normal dialog to an AdwPreferencesWindow, we can
take advantage of libadwaita's automatic padding.
This will make sure the dialog is more in line with the rest of the
GNOME ecosystem.

Closes https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/1956
2022-08-03 09:18:39 +00: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
Robert Ancell
4159a5ca68 network: Replace deprecated nm_client_wireless_set_enabled 2022-06-20 02:29:39 +00:00
Robert Ancell
6911110111 network: Replace deprecated nm_client_deactivate_connection 2022-06-20 02:29:39 +00:00
Maximiliano Sandoval R
7cb4dc4ff0 network-wifi: Use ListBox in popover
This gives us the correct style on the popover.
2022-06-01 02:17:13 +00:00
Mohammed Sadiq
5855b661fe wifi: Fix to use the updated details to create hotspot
Let the callback to "response" signal run after the default
so that we use the updated details to create hotspot.
Otherwise, the changes made won't be used.

This is required as the default handler updates the connection
details in cc-wifi-hotspot-dialog.
2022-02-01 17:29:54 +00: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
Robert Ancell
8ded3d956f network: Show spinner instead of delaying dialog
It's better to respond to the user immediately rather than delay the window opening.
2020-12-17 21:27:51 +00:00
Robert Ancell
a1e26cdac1 network: Set transient window from outside NetConnectionEditor constructor 2020-12-17 21:27:51 +00:00
Robert Ancell
25963ccf8c network: Fix small memory leak 2020-11-24 20:59:58 +00:00
Robert Ancell
e58a504174 network: Remove unused function prototypes 2020-11-24 20:59:58 +00:00
Robert Ancell
83925b3e41 network: Sort Wifi connections
Sort connected first, then configured, then by strength.

Fixes https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/736
2020-11-08 20:06:42 +00:00
Dmitry Sharshakov
b31520ae8b Disable the button for hidded Wi-Fi when Wi-Fi is turned off 2020-09-25 03:35:56 +00:00
Bastien Nocera
eb79846c53 network: Fix missing prototype error
gnome-control-center/panels/network/net-device-wifi.c:1179:1: warning: no previous prototype for ‘nm_client_on_permission_change’ [-Wmissing-prototypes]
 1179 | nm_client_on_permission_change (NetDeviceWifi *self) {
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2020-09-16 10:11:48 -03:00
Jamison Lofthouse
9efe9eefd3 Monitor NMClient permissions for change 2020-08-19 09:04:35 +12:00
Mohammed Sadiq
cc7662e24b wifi: Add HotSpot QR code support
When wifi hotspots are created generate a QR code
so that supported devices can connect to the hotspot
by simply scanning the QR code image
2020-08-05 14:25:51 +05:30
Adrien Plazas
9e2a2836d9 Use GtkDialog instead of HdyDialog
HdyDialog has been dropped in libhandy 1.
2020-07-20 08:04:28 +02:00
Robert Ancell
5b14e16e9c network: Connect signals with g_signal_connect_object in swapped form 2020-03-30 16:18:50 +13:00
Robert Ancell
39113f6a03 network: Move signals into GtkBuilder files 2019-11-06 10:40:23 +13:00
Robert Ancell
7b01c11840 network: Convert NetDeviceWifi to GtkTemplate 2019-11-06 10:40:23 +13:00
Robert Ancell
7e84af0d6d network: Remove net_object_emit_changed
Turns out nothing was actually listening to it.
2019-11-06 10:40:23 +13:00
Robert Ancell
a39ebd5bda network: Remove net_object_get/set_title 2019-11-06 10:40:23 +13:00
Robert Ancell
577762b60c network: Remove NetDevice class
We don't need the NetObject/NetDevice class separation anymore
2019-11-06 10:16:40 +13:00
Robert Ancell
1c92cf4844 network: Remove net_device_get_nm_device 2019-11-06 10:16:40 +13:00
Robert Ancell
0197654177 network: Move helper functions into panel-common.c 2019-11-06 10:16:40 +13:00
Robert Ancell
29734b599c network: Remove net_object_get_client
Better handled inside each object.
2019-11-06 10:16:39 +13:00
Robert Ancell
d7e17ca02f network: Replace method with a helper function.
This removes a case where an object was being temporarily created just to use
this mehtod.
2019-11-06 10:16:39 +13:00
Robert Ancell
966cb97d45 network: Remove net_object_get_cancellable
Only a few objects need it
2019-11-06 10:16:39 +13:00
Robert Ancell
c74d26bf3a network: Remove NetObject id property
This is better handled by comparing objects.
2019-11-06 10:16:39 +13:00
Robert Ancell
0b3ce1e15d network: Remove net_object_get_panel
It was only being used for WiFi devices
2019-11-06 10:16:39 +13:00
Robert Ancell
76de0ce408 network: Simplify net_object_add_to_stack function
Except in the WiFi case it was creating a stack with one child.
All the non-WiFi cases had the same logic.
2019-11-06 10:16:39 +13:00
Robert Ancell
0c92c7b461 network: Replace g_object_new with constructors 2019-11-06 10:16:20 +13:00
Robert Ancell
6ab75da5c6 network: Use g_clear_pointer 2019-11-06 10:16:20 +13:00
Robert Ancell
62af171d8b network: Remove net_object_edit virtual method
It didn't need to be virtual and was only used in two cases
2019-10-22 20:11:45 +00:00
Robert Ancell
9b1226aea5 network: Remove helper function with minimal value
This can be more easily optimised away in the modules that use it.
2019-10-22 20:11:45 +00:00
Robert Ancell
96585c1542 network: Remove unused hotspot connected label 2019-10-22 20:11:45 +00:00
Robert Ancell
708b1fdaf7 network: Use self variable name consistently 2019-10-22 20:11:45 +00:00
Robert Ancell
8b6e3fb736 network: Store widgets inside objects
This is a step towards replacing GtkBuilder with GtkTemplate
2019-10-22 20:11:45 +00:00
Robert Ancell
b331d75df5 network: Rename widget IDs to standard names 2019-10-22 20:11:45 +00:00