Commit 8473bb31 authored by Dan Winship's avatar Dan Winship

tui: refresh the "nmtui connect" list when connections are added/removed

We were refreshing the list when the set of available devices changed,
or the set of active connections changed, but not when the set of
available connections changed.

https://bugzilla.gnome.org/show_bug.cgi?id=740333
parent 11c1cad8
......@@ -544,17 +544,9 @@ nmt_connect_connection_list_rebuild (NmtConnectConnectionList *list)
}
static void
rebuild_on_acs_changed (GObject *object,
GParamSpec *spec,
gpointer list)
{
nmt_connect_connection_list_rebuild (list);
}
static void
rebuild_on_devices_changed (NMClient *client,
NMDevice *device,
gpointer list)
rebuild_on_property_changed (GObject *object,
GParamSpec *spec,
gpointer list)
{
nmt_connect_connection_list_rebuild (list);
}
......@@ -565,11 +557,11 @@ nmt_connect_connection_list_constructed (GObject *object)
NmtConnectConnectionList *list = NMT_CONNECT_CONNECTION_LIST (object);
g_signal_connect (nm_client, "notify::" NM_CLIENT_ACTIVE_CONNECTIONS,
G_CALLBACK (rebuild_on_acs_changed), list);
g_signal_connect (nm_client, "device-added",
G_CALLBACK (rebuild_on_devices_changed), list);
g_signal_connect (nm_client, "device-removed",
G_CALLBACK (rebuild_on_devices_changed), list);
G_CALLBACK (rebuild_on_property_changed), list);
g_signal_connect (nm_client, "notify::" NM_CLIENT_CONNECTIONS,
G_CALLBACK (rebuild_on_property_changed), list);
g_signal_connect (nm_client, "notify::" NM_CLIENT_DEVICES,
G_CALLBACK (rebuild_on_property_changed), list);
nmt_connect_connection_list_rebuild (list);
......@@ -583,8 +575,7 @@ nmt_connect_connection_list_finalize (GObject *object)
g_slist_free_full (priv->nmt_devices, (GDestroyNotify) nmt_connect_device_free);
g_signal_handlers_disconnect_by_func (nm_client, G_CALLBACK (rebuild_on_acs_changed), object);
g_signal_handlers_disconnect_by_func (nm_client, G_CALLBACK (rebuild_on_devices_changed), object);
g_signal_handlers_disconnect_by_func (nm_client, G_CALLBACK (rebuild_on_property_changed), object);
G_OBJECT_CLASS (nmt_connect_connection_list_parent_class)->finalize (object);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment