Skip to content
Snippets Groups Projects
Commit 7369a955 authored by Konstantin's avatar Konstantin
Browse files

snproxy: correctly propagate status.

parent a3815ca0
No related branches found
No related tags found
No related merge requests found
Pipeline #55102305 passed
......@@ -180,15 +180,14 @@ namespace StatusNotifier
this.label.set_text(proxy.x_ayatana_label);
iface_new_icon_cb();
this.trigger_tooltip_query();
switch(proxy.status)
this.status = proxy.status;
switch(this.status)
{
case Status.PASSIVE:
case Status.ACTIVE:
iface_new_icon_cb();
this.get_style_context().remove_class(STYLE_CLASS_NEEDS_ATTENTION);
break;
case Status.ATTENTION:
iface_new_icon_cb();
this.get_style_context().add_class(STYLE_CLASS_NEEDS_ATTENTION);
break;
}
......
......@@ -540,7 +540,10 @@ static void sn_proxy_reload_finish(GObject *source_object, GAsyncResult *res, gp
SnStatus new_st =
sn_status_get_value_from_nick(g_variant_get_string(value, NULL));
if (self->status != new_st)
{
self->status = new_st;
g_object_notify_by_pspec(G_OBJECT(self), pspecs[PROP_STATUS]);
}
}
else if (!g_strcmp0(name, "Title"))
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment