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 glory moment has come. The new Wi-Fi panel is finally
introduced using a different code style from the rest of
the Network panel, since Control Center itself is written
using the GTK+ C code style.
The Wi-Fi panel uses modern GTK+ features like template
classes and new widgets. The files are stored together
with the Network panel so that we can reuse the abstraction
layer that the Network panel has to manage devices.
https://bugzilla.gnome.org/show_bug.cgi?id=784818
When there are multiple Wi-Fi devices, we must show a stack
switcher in the header of the Wi-Fi panel with the name of
the device.
The problem is that, currently, NetDeviceWifi does not add
its widgets to the main stack setting a stack title, and so
the stack switcher is empty.
Fix that by always adding the widgets to the stack using the
device product name as title.
https://bugzilla.gnome.org/show_bug.cgi?id=784818
The UI definitions of the Wi-Fi devices currently contain many
widgets in the stack, such as the tower icon, the enable/disable
switch and the status.
In the new Wi-Fi panel, all those widgets will clutter the
interface and break the entire UI.
Fix that by splitting those widgets in two different containers:
1. The header_box container, with the menu button and the
enable/disable switch.
2. The center_box widget, with the title and status labels,
which will be consumed by the Wi-Fi panel to be the center
widget of the headerbar.
This commit also introduces two getters that expose those two
containers. With that, another load of code could be simplified.
https://bugzilla.gnome.org/show_bug.cgi?id=784818
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
Firewalld is a Fedora-only daemon, and it doesn't integrate all that
well with Fedora Workstation, the version of Fedora that uses GNOME, so
remove the support.
In Fedora Workstation, firewalld only ever supports one zone, as the
other ones are badly defined, and not translatable or translated.
This ensures that:
- the AP list shown on startup when the Hotspot is disabled on
startup, or when disabling it at run-time
- the hotspot page is shown on startup when the Hotspot is enabled,
or when it gets enabled at runtime
https://bugzilla.gnome.org/show_bug.cgi?id=705546
The pointer has already been dereferenced. Might have made more sense
to check if it's the empty string and treat that as error, but
nm_utils_ipaddr_valid also returns error on empty string so lets just
rely on the utility function doing the right thing here.
https://bugzilla.gnome.org/show_bug.cgi?id=708500
Null-checking the text_gateway makes no sense as it has already been
dereferenced earlier. Instead check if it's the empty string and
treat that as not-an-error. Also prevent the empty string from
being set in default_gateway.
https://bugzilla.gnome.org/show_bug.cgi?id=708500
From https://bugzilla.gnome.org/show_bug.cgi?id=765969 as explained by
Dan Winship:
"
libnm-util/libnm-glib had a buggy data model, which nm-connection-editor
(and then gnome-control-center) copied, in which each manually-configured
IP address has an associated gateway address. In reality, NM always just
took the first non-empty gateway value from the address array, and
completely ignored any other gateway values.
libnm represents this more accurately, by having a single gateway
value which is separate from the address array. Ideally, the editors should
show it this way as well (eg, like nmtui does). Failing that, it would
be nice to at least make it so that only the first row in the address
table can have a non-empty gateway value.
"
We went for the second option, only showing a gateway entry for the
first address in the list.
This isn't related to route-specific gateway addresses.
https://bugzilla.gnome.org/show_bug.cgi?id=765969