This commit renames {network|wifi}.ui to cc-{network|wifi}-pane.ui,
in order to match the corresponding C files. This introduces no
functional changes.
The test to check whether the Bluetooth (simple section) contains
elements was testing for NetObjectSimple. However, ethernet connections
are a subclass and check would count these. This causes issue when the
code is run after net object removal.
The fix is to check for the exact object type rather than also allowing
subclasses.
The "removed" callback from NMObject is never called when the object is
simply finalised because the UI drops the reference. Explicitly call the
handler so that UI elements are removed.
When we add the NetDevice pointer to the GPtrArray, we have
a single reference owned by the panel. When iterating over
this GPtrArray, no reference is taken.
The problem is that the code to handle command-line arguments
was unreferencing the NetDevices when iterating over it,
creating a disparity in the ref/unref pairs.
Fix that by simply not unreferencing the NetDevice instance
when iterating over it.
https://bugzilla.gnome.org/show_bug.cgi?id=786514
As a temporary solution until we don't have the Mobile Broadband
panel, the Network panel should take care of simple devices such
as Bluetooth and metered connections, and should do so in such a
way that is consistent with how the rest of devices is managed.
Currently, however, NetDeviceSimple objects still present the old,
grid-based layout, breaking the expectations and completely destroying
the consistency of the panel
This patch moves simple devices to a section of its own. The next
patch will update the visuals to match the other devices.
https://bugzilla.gnome.org/show_bug.cgi?id=786662
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
Since each VPN will be a row in a listbox, we
can't rely on NetVPN:add_to_stack() to handle
the header.
This header must, then, be handled by the panel
itself. For now, we just open the already available
dialog to add connections, when the ideal approach
(to be implemented yet) is to move the contents
of this dialog in a built-in popover.
https://bugzilla.gnome.org/show_bug.cgi?id=785581
The current Network panel is composed of a single stack and
a treeview to select the currently visible stack page. Each
stack page represents a connection or device.
The new Network panel, however, has none of the concept of
selectable pages. In the new layout, all connections and
devices appear all at once in a more compact and simpler
fashion.
This commit, then, starts moving towards a unified, pageless
panel by adding all the connections and devices to different
stacks. These different stacks are transient to the network
object, and are added at appropriate boxes, giving the panel
a unified layout.
This has some serious implications in the design of the
current code. Most of the code removals were related to the
treeview and different pages handling. No more tree model
madness is present, and the devices are now stored in a
plain simple GPtrArray.
After this patch, NetObject:add_to_stack isn't a good code
design choice anymore. This will be addressed in a future
patch.
https://bugzilla.gnome.org/show_bug.cgi?id=785581
The current Network panel class relies on GtkBuilder
when it could use a more modern feature that is the
template class.
By making it a template class, not only the Network
panel is slightly more performant, but it's also
simpler and easier to read.
This commit, then, turns the Network panel into a
template class, and cleans up the code to make it
work.
https://bugzilla.gnome.org/show_bug.cgi?id=785581
The Network panel UI file uses deprecated widgets and
has many lines of needless code. This commit just cleans
it up, as a preparation for turning the Network panel
into a template class.
https://bugzilla.gnome.org/show_bug.cgi?id=785581
The Network panel is not really a deriverable type, and
since after 61d7abe795 we can use the
utility macros.
Thus, this commit removes all the boilerplate code and
turns CcNetworkPanel into a final class.
https://bugzilla.gnome.org/show_bug.cgi?id=785581
The Network panel does not deal with Wi-Fi devices anymore,
and does not make sense to have the Airplane Mode switch in
there, since it is now available at the Wi-Fi panel.
This commit then removes the Airplane Mode switch from the
Network panel.
https://bugzilla.gnome.org/show_bug.cgi?id=785581
The Wi-Fi devices are going to be managed with the
to-be-introduced Wi-Fi panel, and don't need to
be available in the Network panel anymore.
This patch then blacklists Wi-Fi devices and doesn't
let the Network panel manage them.
https://bugzilla.gnome.org/show_bug.cgi?id=784818
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
Create 2 veth interfaces without any names with, as root:
ip link add veth0 type veth peer name veth1
ip link set dev veth0 up
ip link set dev veth1 up
And run:
(gnome-control-center:28176): GLib-CRITICAL **: g_utf8_collate: assertion 'str1 != NULL' failed
(gnome-control-center:28176): GLib-CRITICAL **: g_utf8_collate: assertion 'str2 != NULL' failed
https://bugzilla.gnome.org/show_bug.cgi?id=783996
The list of networks is sorted by connection type. If a user has e.g. a
lot of VPN connections, then the unsorted list is hard to browse.
To fix this, include the title of the connection in the sort order and
ensure the list is kept sorted when a title is changed.
Reported-by: Oliver Haessler <oliver@redhat.com>
https://bugzilla.gnome.org/show_bug.cgi?id=778685
The title of network connections may change if the user edits it or if
it was changed programatically by another program. This worked fine, but
the UI was not updated. This patch ensures the network list in the UI is
updated.
Reported-by: Oliver Haessler <oliver@redhat.com>
https://bugzilla.gnome.org/show_bug.cgi?id=778685
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
This reverts commit 31a8a99440.
This was meant for bgo#695885 which has stalled for a while, so this
feature has no in-tree user. This commit removes it for now, this can be
readded when users for it materialize.
https://bugzilla.gnome.org/show_bug.cgi?id=751597
When changing the airplane mode, either from the Bluetooth panel, or
through gnome-shell's status menu, we would receive signals from the
Rfkill gnome-settings-daemon service, even after the network panel was
closed, as we didn't unref' it. Except that the panel was mostly gone.
So splat.
https://bugzilla.gnome.org/show_bug.cgi?id=751482
Every time we got the list of devices from the devices GtkListStore, we
were leaking the only element that wasn't a NetDevice, the proxy page.
Make sure to unref' it by hand if we're not going to add it to the list
(the elements of which will be unref'ed properly).
https://bugzilla.gnome.org/show_bug.cgi?id=746411
Remove the NetworkManager version checking altogether. The code was made
to check for now very old versions of NetworkManager, and anything newer
than ancient should degrade gracefully if we support newer features.
https://bugzilla.gnome.org/show_bug.cgi?id=741661
There's no need for anyone to poke at the libvirt bridge that's not an
admin. It should probably be locked down more as well, but that would be
NetworkManager's business.