Commit graph

209 commits

Author SHA1 Message Date
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
Robert Ancell
54f8fce47f network: Connect signals in swapped form 2019-10-22 20:11:44 +00:00
Robert Ancell
e7cec00235 network: Remove unused wifi dialog
This seems to have been copied from the connection editor code, but is not
actually used.
2019-10-22 20:11:44 +00:00
Robert Ancell
57d7a79034 network: Pass widget references rather than relying on names
The existing code relied on using GtkBuilder, which will no longer work when we
switch to GtkTemplate.
2019-10-01 14:47:23 +13:00
Robert Ancell
1d43f4c0f5 network: Simplify function 2019-10-01 14:46:14 +13:00
Robert Ancell
3c32ee72ea network: Remove two common functions that are more simply done inside the few cases that use them
The existing code relied on using GtkBuilder, which will no longer work when we
switch to GtkTemplate.
2019-10-01 12:52:42 +13:00
Mohammed Sadiq
642be83798 network: Add new hotspot creation dialog 2019-09-17 12:15:11 +00:00
Robert Ancell
e70610fe74 network: Use g_autoptr for unref code 2019-09-13 14:20:50 +12:00
Robert Ancell
a0c758c46b network: Fix D-Bus GVariant leak 2019-09-13 14:20:50 +12:00