Commit graph

35 commits

Author SHA1 Message Date
Adrien Plazas
91af270cce connection-editor: Use GtkTemplate 2019-01-27 21:03:13 +00:00
Georges Basile Stavracas Neto
0dd7a9785f
net-vpn: Remove private field
Like NetDeviceWifi, NetVpn is now a final class, and thus does not
need a private field. Remove this field and use the NetVpn struct
itself to store the previously private variables.
2018-11-05 08:31:50 -02:00
Georges Basile Stavracas Neto
e3d125860b
net-vpn: Turn into a final class
Remove the old style GObject boilerplate and replace it by
G_DECLARE_FINAL_TYPE(). Move the NetVpn structure definition
to the .c file too.
2018-11-05 08:31:50 -02:00
Georges Basile Stavracas Neto
8509270562
net-vpn: 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:31:50 -02:00
Benjamin Berg
77a1225917 network: Fix disconnecting the VPN connection_removed_cb handler
The disconnect was for the wrong object (connection rather than client).
Fix this by simply moving to use g_signal_connect_object which obsoletes
the explicit disconnect calls.
2018-05-29 15:16:50 +02:00
Benjamin Berg
52034ba0be network: Update VPN title when the connection is changed
When the connection is modified then the title might be changed. Call
the UI update function to ensure that widgets are updated.
2018-05-29 15:16:43 +02:00
Benjamin Berg
729db87249 network: Remove dead code trying to use NMConnection as NMActiveConnection
These code paths could never be hit as an NMConnection cannot be an
NMVpnConnection which is a descendant of NMActiveConnection.

https://bugzilla.gnome.org/show_bug.cgi?id=794171
2018-03-12 17:29:53 +01:00
Georges Basile Stavracas Neto
aabc1621b8 network: Update VPN section
The last remaining network device to be updated is
the VPN device, and this patch is the result of this
effort.

The changes were mostly towards cleaning up and
removing unecessary code. By removing the info labels,
many getters were removed as well.

In order to achieve a listbox-like UI, a couple of
UI refactorings.

https://bugzilla.gnome.org/show_bug.cgi?id=785581
2017-08-09 19:32:43 +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
Bastien Nocera
f5bcb2ed83 network: Fix crash in VPN when removing Wi-Fi connection
Wrong number of arguments to the callback.
2016-06-07 18:50:38 +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
Rui Matos
2e7b23aa00 network: Fix a crash when clicking to forget a VPN on the editor
We need to keep a reference to the NetVpn instance or it might already
be finalized when the editor window closes.
2016-01-26 18:40:47 +01:00
Bastien Nocera
ba6da7636e network: Fix warning on panel exit
Now that the VPN object is getting finalized, make sure not to warn if
the NMClient is already gone.

https://bugzilla.gnome.org/show_bug.cgi?id=746411
2015-03-19 16:32:45 +01:00
Rui Matos
2d18798d79 network: Don't leak a builder instance
https://bugzilla.gnome.org/show_bug.cgi?id=708286
2013-10-01 10:05:03 +02:00
Rui Matos
c5b70a7876 network: Remove unused toplevel windows from .ui files
https://bugzilla.gnome.org/show_bug.cgi?id=708286
2013-10-01 10:05:02 +02:00
Kalev Lember
f8f420256b network: Fix a possible crash with no active connections
As a precaution, check the return value of get_active_connections to
avoid dereferencing a NULL pointer.

https://bugzilla.redhat.com/show_bug.cgi?id=990196
https://bugzilla.gnome.org/show_bug.cgi?id=707906
2013-09-11 16:22:01 +02:00
Lionel Landwerlin
f9000c6f5e network: vpn: disconnect signals from NM's objects
https://bugzilla.gnome.org/show_bug.cgi?id=700379
2013-05-15 14:33:56 +01:00
Lionel Landwerlin
94ce9bb9bc network: update on/off switch button when vpn becomes active/inactive
https://bugzilla.gnome.org/show_bug.cgi?id=699275
2013-05-15 14:33:49 +01:00
Matthias Clasen
58a09ae1a7 network: Set the connection editor title for VPN
https://bugzilla.gnome.org/show_bug.cgi?id=693780
2013-04-15 08:27:45 -04:00
Dan Winship
8cfe8d10ba network: add VPN support to the connection editor
Unfortunately, the VPN plugins provide their own .ui files for their
editor pages, so we can't make them look competely GNOME-3-ish. But
the code does try to fix them up a little bit by realigning the
labels.

vpn-helpers.[ch] is nearly identical to network-manager-applet's,
but eventually this code will move into libnm-gtk.

https://bugzilla.gnome.org/show_bug.cgi?id=691285
2013-01-30 13:05:34 -05:00
Cosimo Cecchi
57de0ab019 network: use a GResource for GtkBuilder UI definition
https://bugzilla.gnome.org/show_bug.cgi?id=691132
2013-01-07 10:57:06 +01:00
Richard Hughes
62b8a4c8bb network: Add a NetObject->edit vfunc for the different devices to use 2012-07-20 09:31:12 +01:00
Richard Hughes
f4c13e835b network: Move setting the device header pairs to common panel code
This is yet another step to splitting out the other devices types.
2012-07-17 16:56:59 +01:00
Richard Hughes
6de161617a network: Fix the VPN information my setting the connection at object construction time 2012-07-17 14:17:11 +01:00
Richard Hughes
3c2a09294c network: Set the device properties at construct time
We need this for more complicated devices that need to contact other daemons,
for instance ModemManager.
2012-07-17 10:21:26 +01:00
Richard Hughes
0a98c5a921 network: Provide a vfunc for refreshing a NetObject 2012-07-12 17:29:47 +01:00
Richard Hughes
8384a0b741 network: Split the VPN parts from the .c and .ui file 2012-07-12 16:58:11 +01:00
Bastien Nocera
760522d02c network: Clarify the VPN service type setting
https://bugzilla.gnome.org/show_bug.cgi?id=657303#c8
2011-08-26 13:32:22 +01:00
Jiří Klimeš
382509986a network: Show VPN type and info in panel
For all the VPN types

https://bugzilla.gnome.org/show_bug.cgi?id=657303
2011-08-26 13:32:22 +01:00
Jiří Klimeš
e04d0bb787 network: Fix updating VPN info when edited
- Updating VPN info
- Removing 'setting' private member from NetVpn object, because settings are
  replaced when connection is updated (libnm-glib/nm-remote-connection.c).

https://bugzilla.gnome.org/show_bug.cgi?id=657303
https://bugzilla.redhat.com/show_bug.cgi?id=723489
2011-08-26 13:24:39 +01:00
Richard Hughes
01c6b793ed network: keep the device/connections model up to date with reality
Remove the ID parameter from the model, and move it to the NetDevice object.
Remove the devices GPtrArray and use the mode for everything.
Connect up the changed and deleted signals from NetObject and DTRT in the UI.
2011-03-16 17:31:09 +00:00
Matthias Clasen
ea5f76247d Network: fix a refcounting bug with vpn settings
nm_connection_get_setting_by_name() does not return a reference,
so we have to get one ourselves.
2011-03-15 21:11:04 -04:00
Matthias Clasen
4081d83ca7 network: add a way to get the vpn connection object back
This will be needed to activate/deactivate vpn.
2011-03-15 17:20:54 -04:00
Richard Hughes
7914025e1f network: show the VPN connection state in the panel header 2011-03-11 12:56:14 +00:00
Richard Hughes
bb70c1bd1a network: use an abstract device so we can get the VPN connection data 2011-03-11 12:29:40 +00:00