mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-26 12:12:10 +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
f419966808
commit
643fc7ea49
@ -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
|
static void
|
||||||
proxy_properties_changed_cb (GDBusProxy *proxy,
|
proxy_properties_changed_cb (GDBusProxy *proxy,
|
||||||
GVariant *changed_properties,
|
GVariant *changed_properties,
|
||||||
GStrv invalidated_properties,
|
GStrv invalidated_properties,
|
||||||
GNetworkMonitorNM *nm)
|
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);
|
sync_properties (nm, TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user