mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-23 10:42:11 +01:00
gnetworkmonitornm: Do not re-update cached property
GDBusProxy already takes care of updating the cached property before emitting the signal, so there is no need to do this a second time ourselves.
This commit is contained in:
parent
8e0a5d9879
commit
56e6e247f6
@ -252,34 +252,12 @@ sync_properties (GNetworkMonitorNM *nm,
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
update_cached_property (GDBusProxy *proxy,
|
||||
const char *property_name,
|
||||
GVariantDict *dict)
|
||||
{
|
||||
GVariant *v;
|
||||
|
||||
v = g_variant_dict_lookup_value (dict, property_name, NULL);
|
||||
if (!v)
|
||||
return;
|
||||
g_dbus_proxy_set_cached_property (proxy, property_name, v);
|
||||
g_variant_unref (v);
|
||||
}
|
||||
|
||||
static void
|
||||
proxy_properties_changed_cb (GDBusProxy *proxy,
|
||||
GVariant *changed_properties,
|
||||
GStrv invalidated_properties,
|
||||
GNetworkMonitorNM *nm)
|
||||
{
|
||||
GVariantDict *dict;
|
||||
|
||||
dict = g_variant_dict_new (changed_properties);
|
||||
|
||||
update_cached_property (nm->priv->proxy, "Connectivity", dict);
|
||||
|
||||
g_variant_dict_unref (dict);
|
||||
|
||||
sync_properties (nm, TRUE);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user