This is a boolean property that notifies whether the
device is scanning for new access points. This is
implemented by monitoring the NMDeviceWifi::last-scan
property, as suggested by NetworkManager developers
(and due to the lack of a better API), since this
property is updated *after* the scan is completed.
Note that this also changes the way to detect that the connection is
currently active. This change is not required but but does simplify the
code a little bit.
The code tries to establish a connect by using an existing connection.
However, if that is possible the function will not even be called.
Remove the code in question.
NetDeviceWifi is a final class, and thus does not need a private
field. Remove this field and use the NetDeviceWifi struct itself
to store the previously private variables.
The periodic Wi-Fi scan is introduced in 84279c4a. It's designed to
scan the Wi-Fi list every 15 seconds and disable the scan when Wi-Fi is
disabled.
But currently the periodic check is disabled every time
wireless_enabled_toggled() is called, which is wrong. Because it can
mean Wi-Fi is enabled or disabled.
Fix that by disabling periodic scan only when Wi-Fi is disabled.
fixes 84279c4a
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.
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
Our NM async callbacks already handle being cancelled and we already
have a cancellable in the base NetObject class, we just weren't wiring
it up to the async calls. Do that to prevent use after free crashes.
https://bugzilla.gnome.org/show_bug.cgi?id=787010
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
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
By truncating the SSID to 32 bytes.
network-cc-panel-WARNING **: Failed to add new connection: (32) 802-11-wireless.ssid: SSID length is out of range <1-32> bytes
See https://bugzilla.redhat.com/show_bug.cgi?id=1309331
nm_utils_escape_ssid() should only be used for debugging purposes,
but was used in one place for UI display and another place
for doing actual AP comparison. Instead, the comparison should
just operate on the SSID bytes, and the UI display should use
nm_utils_ssid_to_utf8() which tries to interpret non-ASCII
characters for better display.
https://bugzilla.gnome.org/show_bug.cgi?id=767205https://bugzilla.redhat.com/show_bug.cgi?id=1336714
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
Making a new connection available to other users requires being an
admin, or entering an admin password.
If we enable that option by default for new connections, we effectively
prevent non-admin users from connecting to new networks when they go to
the coffee shop without their laptop admin.
https://bugzilla.gnome.org/show_bug.cgi?id=751378
Only the networks with existing connection should have gear buttons.
This is a regression from 9ffaff7472.
If the widget we add as a stack page isn't visible, the page will not be
shown. As we later add another page with that button, we'd end up
showing that by default.
https://bugzilla.gnome.org/show_bug.cgi?id=750841