Commit graph

21 commits

Author SHA1 Message Date
Georges Basile Stavracas Neto
881248ef9a
net-object: Turn into a derivable class
This commit removes the old GObject boilerplate, uses
G_DECLARE_DERIVABLE_TYPE() to define NetObject, and
uses "pragma once" at the header.
2018-11-05 08:31:47 -02:00
Robert Ancell
a64ef75ad7 Simplify use of GCancellable
g_cancellable_cancell can be called without checking for a NULL value.
Use g_clear_object instead of g_object_unref
2018-06-01 21:03:19 +00: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
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
Bastien Nocera
234ed23138 network: Add sanity checks NetDevice and NetObject
https://bugzilla.gnome.org/show_bug.cgi?id=746411
2015-03-19 16:32:44 +01:00
Bastien Nocera
60f6ba1d72 network: Fix the network panel being kept alive
NetObjects and CcNetworkPanel aren't widgets, and hold references to
each other. Simplify things by having NetObject hold a pointer to
CcNetworkPanel (and the singletons NMRemoteSettings and NMClient)
instead, and clear their pointers when the original object is unref'ed.

https://bugzilla.gnome.org/show_bug.cgi?id=746411
2015-03-19 16:32:44 +01:00
Thomas Bechtold
b5335bf2e7 network: Plug memory leaks
https://bugzilla.gnome.org/show_bug.cgi?id=693879
2013-02-15 13:45:28 +01:00
Dan Winship
63756458b2 network: disambiguate devices of the same type
If there are multiple devices that would end up with the same name in
the device list, disambiguate their names via new libnm-gtk API.

https://bugzilla.gnome.org/show_bug.cgi?id=677143
2012-10-11 09:22:35 +02:00
Richard Hughes
de8993eddb network: Allow NetObjects to get the main panel object so they can show modal dialogs 2012-07-20 09:31:12 +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
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
f9e2828f77 network: Add a NMRemoteSettings property to NetObject for future use 2012-07-17 10:21:26 +01:00
Richard Hughes
b48fc1b65c network: Add a GCancellable property to NetObject for future use 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
ddabc6049f network: Add a vfunc so a NetObject can be deleted
We will only support this for VPN 'devices' but it seemed a cleaner abstraction this way.
2012-07-12 16:55:20 +01:00
Richard Hughes
eeecc61d05 network: Share a NMClient instance between NetObjects
Creating a NMClient is expensive and slow. This will be used in future code.
2012-07-12 16:35:06 +01:00
Richard Hughes
c26e14518e network: Split the proxy parts from the .c and .ui file
A source file with 4k lines of code is not understandable, and the glade file
was becoming quite a challenge for glade.
To add more features we need to split things up just to keep them maintainable.

This is the first patch that just splits out the proxy bits. Other device types
will follow in the next few days.
2012-07-12 14:09:24 +01:00
Richard Hughes
298489ee16 network: Add a boolean 'removable' property to NetObject for future use
Also add GObject getters and setters for the other two properties.
2012-07-12 14:00:40 +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
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