mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-04-04 22:30:38 +02:00
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
This commit is contained in:
parent
11c1cad8ae
commit
8473bb310d
1 changed files with 9 additions and 18 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue