wifi: Add a refresh button

This way, user can scan anytime without having to wait.

https://bugzilla.gnome.org/show_bug.cgi?id=789869
This commit is contained in:
Xiang Fan 2017-11-03 22:54:10 +08:00 committed by Georges Basile Stavracas Neto
parent c12c3b9298
commit 5ad72b6faa
4 changed files with 65 additions and 2 deletions

View file

@ -92,6 +92,22 @@ net_device_wifi_get_title_widget (NetDeviceWifi *device_wifi)
return GTK_WIDGET (gtk_builder_get_object (device_wifi->priv->builder, "center_box"));
}
void
net_device_wifi_request_scan (NetDeviceWifi *device_wifi)
{
NMDevice *nm_device;
GError *error = NULL;
nm_device = net_device_get_nm_device (NET_DEVICE (device_wifi));
g_return_if_fail (nm_device_get_device_type (nm_device) == NM_DEVICE_TYPE_WIFI);
nm_device_wifi_request_scan (NM_DEVICE_WIFI (nm_device), NULL, &error);
if (error) {
g_debug ("scan request failed: %s", error->message);
g_error_free (error);
}
}
static GtkWidget *
device_wifi_proxy_add_to_stack (NetObject *object,
GtkStack *stack,