Currently, we acquire the Rfkill D-Bus proxy and synchronize
the state right after that. However, we don't monitor for
subsequent changes by connecting to the 'g-properties-changed'
GDBusProxy signal, which causes the Airplane Mode not to stay
synchronized when modified from others places, such as GNOME
Shell's aggregate menu.
This commit adds the necessary signal monitoring code to react
to external applications changing the Rfkill properties.
According to the most recent mockups [1], when Airplane
Mode is switched on, the Wi-Fi connection will be turned
off and the Wi-Fi panel should show an empty state for
Airplane Mode. This is currently not implemented in the
codebase.
This commit adds an Airplane Mode empty state for the Wi-Fi
panel, and a small logic adjustment to show it under these
circumstances.
The current Wi-Fi panel ties the Airplane Mode row to the access
point list of a given Wi-Fi adapter. That has unintended but
bad side effects: when enabling Airplane Mode, the row disappears
and we have to switch to another panel (e.g. Bluetooth) in order
to disable it. This is functionally wrong: we should be able to
enable or disable Airplane Mode from where we initially changed
it.
This commit reorganizes the widget hierarchy in order to put the
Airplane Mode row outside of the main GtkStack page. This is
necessary in order to fully implement the proposed mockups[1]
and, in general, because it's the right thing to do.
Notice that the logic of the empty states in [1] is not fully
implemented yet; this commit only reorganizes the widgets that
already exist to get closer to the mockups. Subsequent commits
will implement more of the empty states.
[1] https://github.com/gnome-design-team/gnome-mockups/raw/master/system-settings/network/aday3/wi-fi-wires.png
Fixes https://gitlab.gnome.org/GNOME/gnome-control-center/issues/121
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.
It's better for human-readable display than nm_device_get_product().
Unlike nm_device_get_product(), it never returns an empty string and
sanitizes the string.
With NM 1.12 it goes to great lengths to clean up the messy udev
strings.
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.
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.
This adds tests for the network panel based on the test service found in
NetworkManager. Another possible solution may be to use the one from
dbusmock, however NetworkManager already has readily available code to
write tests in C which makes checking the widget hierarchy easier.
When a device is removed the callback handler could still be called
because it was connected using g_signal_connect rather than
g_signal_connect_object. This fixes crashes in the UI after a device has
been removed again.
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.
This library is deprecated for a long time now, and Fedora Rawhide
removed the package. Since our CI is based on Rawhide, it began
to fail.
In the end, the usage was just legacy code that doesn't exist anymore,
so it's pretty safe to just plain drop it.
Both the Network panel and libnma expect UI resources in the
same location, which will cause problems when the Network panel loads
its own version that doesn't quite match up to the code used in libnma.
This fixes a crash when nma_wifi_dialog_new_for_hidden() is called and
libnma expects a domain widget to be present, which it isn't in our
version of the UI files.
https://bugzilla.gnome.org/show_bug.cgi?id=785099
1. open Wi-Fi Settings
2. Menu -> Known Wi-fi Networks
3. Click settings of some Wi-Fi network listed there.
4. Press escape twice to close all the dialogs
5. Menu -> Connect to Hidden network..,
Fix crashes when some object type names (WirelessSecurity and
EAPMethod in this case) are duplicated across the Network
panel and libnma.
Fixes a regression in commit 0470c04https://bugzilla.gnome.org/show_bug.cgi?id=785099
As NetworkManager from version 1.10 doesn't handle background scanning
itself, to minimise battery drain, we need to periodically request it to
scan for Wi-Fi Access Points.
We now do this request every 15 seconds, as NetworkManager-applet and
gnome-shell do, and disable that periodic scan if Wi-Fi is disabled.
https://bugzilla.gnome.org/show_bug.cgi?id=793647
The string we get back from the text entries are never NULL (as long as
the UI isn't broken that is), but can be empty strings. Consider an
empty IPv6 address to be invalid, but an empty gateway to be valid.
See https://bugzilla.redhat.com/show_bug.cgi?id=1467308
Recent versions of Gettext are able to translate several formats
that are used in GNOME applications. This patch migrates from
Intltool to Gettext by using meson's i18n features.
https://bugzilla.gnome.org/show_bug.cgi?id=787588
NetworkManager supports marking a connection as metered, meaning
that connection is e.g. charged by its usage or extremely limited.
When a network is metered, background network usage must cease
and the behavior of the various OS pieces must be adjusted.
This patch adds a switch to set a connection as metered or not.
The property is imediately propagated to NetworkManager.
https://bugzilla.gnome.org/show_bug.cgi?id=792608
With the old shell gone, there is no need to work around cut off panel
names (bug #647087). As it stands now, it only confuses translators
(invisible characters are hard to, well, see).
https://bugzilla.gnome.org/show_bug.cgi?id=792629
Meson is a build system focused on speed an ease of use, which
helps speeding up the software development. This patch adds meson
support along autotools.
https://bugzilla.gnome.org/show_bug.cgi?id=785414