Commit graph

69 commits

Author SHA1 Message Date
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
Maksym Hazevych
d831e5cb48 Replace all occurrences of 'gtk_widget_show'
Replace all occurrences of 'gtk_widget_show(smth)' with
'gtk_widget_set_visible(smth, TRUE)'.
2023-03-29 14:26:55 +13:00
Robert Ancell
6911110111 network: Replace deprecated nm_client_deactivate_connection 2022-06-20 02:29:39 +00:00
Robert Ancell
c23c56a0a1 network: Replace deprecated nm_device_disconnect 2022-06-20 02:29:39 +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
treysis
5a9fa905bc network: display IPv6 gateway 2021-05-19 02:43:39 +00:00
treysis
5a18b369c6 Network: Show all IPv6 addresses for an interface
Fixes https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/1300
2021-05-12 14:17:52 +12:00
treysis
ab443a02c1 network: Show DNS6 parameters in details and connection editor
Fixes https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/1231
2021-02-01 20:18:55 +00: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
4c6208dc66 network: Fix memory leaks using g_find_program_in_path
Added in d61d13d
2019-12-18 00:31:54 +00:00
Robert Ancell
f335ed420f network: Move widget code into GtkBuilder 2019-11-06 10:40:23 +13:00
Robert Ancell
39113f6a03 network: Move signals into GtkBuilder files 2019-11-06 10:40:23 +13:00
Robert Ancell
36449d60c7 network: Convert NetDeviceEthernet, NetDeviceBluetooth and NetDeviceMobile to GtkTemplate
This means NetObject is now obsolete and can be removed.

There was a GtkSizeGroup that the mobile settings used, but it isn't clear if
this is still relevant. It should be added back later if found to be (this code
is likely to be removed to make way for a dedicated mobile panel).
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
06e38dac90 network: Tidy up use of modem object in NetDeviceMobile 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
8f722a31de network: Fix missing GtkWidget cast 2019-11-06 10:16:18 +13:00
Robert Ancell
d61d13d4e3 network: Hide edit connection buttons if nm-connection-editor not installed 2019-10-31 01:46:19 +00: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
7f410ee1c6 network: Remove helper functions
They're not complex enough or used in enough places to warrant keeping.
They can be better refactored in the classes that use them.
2019-10-22 20:11:45 +00:00
Robert Ancell
75b4e5e061 network: Simplify helper function 2019-10-22 20:11:45 +00:00
Robert Ancell
f03ae7ff93 network: Move common code UI into each widget using it
It was only used twice and better managed in the actual widgets.
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
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
4955371660 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-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
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
Robert Ancell
e70610fe74 network: Use g_autoptr for unref code 2019-09-13 14:20:50 +12:00
Robert Ancell
de84f7e344 network: Use g_autofree for strings 2019-09-13 14:20:50 +12:00
Robert Ancell
01190db349 network: Use g_autoptr for GError handling 2019-09-13 14:20:50 +12:00
Georges Basile Stavracas Neto
f1347132d9
net-device-mobile: Remove private field from public structure
We can use pointer arithmetics to retrieve the private field.
2018-11-05 08:33:21 -02:00
Georges Basile Stavracas Neto
724c77a1a4
net-device-mobile: Turn into a final class
Exact same case of NetVpn and NetDeviceWifi.
2018-11-05 08:33:21 -02:00
Georges Basile Stavracas Neto
d4a08c48f1
net-device-mobile: Remove macro to get private field
We can just use the standard, non-deprecated G_DEFINE_TYPE_WITH_PRIVATE
and avoid g_type_class_add_private(), which is deprecated now.
2018-11-05 08:33:21 -02:00
Georges Basile Stavracas Neto
890dac86e9
net-device-mobile: Initialize variable 2018-11-05 08:31:48 -02:00
Georges Basile Stavracas Neto
158591a346 network: Replace the notebook with a stack
The Network panel uses a GtkNotebook internally to manage
the different setup pages of the network devices. While it
does the job, we now have a modern widget for that: GtkStack.

With GtkStack, managing the pages becomes a lot easier and
we gain almost for free the nice transition between pages,
besides of course being a widget that consumes slightly less
resources.

Besides all these gains, using a GtkStack will allow us to
implement the new Wi-Fi panel in a more cohesive manner,
sharing large portions of code and avoiding copy pasta.

This commit then turns the GtkNotebook into a GtkStack, and
renames and adapts the code to reflect that. Fortunately,
the code got actually simpler with the move.

https://bugzilla.gnome.org/show_bug.cgi?id=784818
2017-07-17 23:40:58 -03:00
Jonathan Kang
bb8ca23701 network: Fix mobile broadband switch state
The switch was only reflecting the value of the WWAN killswitch instead
of both the WWAN killswitch and the state of the connection itself.

https://bugzilla.gnome.org/show_bug.cgi?id=690361
2017-04-13 15:51:51 +02:00
Bastien Nocera
9183d34947 network: Port to libnm 1.2
We also remove support for WiMAX (now unsupported by NetworkManager),
and InfiniBand (Enterprise feature), and the use of
the deprecated NM_SETTING_WIRELESS_SEC property.

With help from network-manager-applet patches by Jiří Klimeš and
Dan Winship.

https://bugzilla.gnome.org/show_bug.cgi?id=765910
2016-05-27 18:23:33 +02:00