diff options
Diffstat (limited to 'clients')
-rw-r--r-- | clients/tui/nmt-connect-connection-list.c | 27 |
1 files changed, 9 insertions, 18 deletions
diff --git a/clients/tui/nmt-connect-connection-list.c b/clients/tui/nmt-connect-connection-list.c index bd54af22cd..0805806639 100644 --- a/clients/tui/nmt-connect-connection-list.c +++ b/clients/tui/nmt-connect-connection-list.c @@ -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); } |