aboutsummaryrefslogtreecommitdiff
path: root/libindicator/indicator-ng.c
diff options
context:
space:
mode:
Diffstat (limited to 'libindicator/indicator-ng.c')
-rw-r--r--libindicator/indicator-ng.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/libindicator/indicator-ng.c b/libindicator/indicator-ng.c
index f2ffa6d..87deb14 100644
--- a/libindicator/indicator-ng.c
+++ b/libindicator/indicator-ng.c
@@ -240,9 +240,6 @@ indicator_ng_set_icon_from_variant (IndicatorNg *self,
return;
}
- if (!self->entry.image)
- self->entry.image = g_object_ref_sink (gtk_image_new ());
-
gtk_widget_show (GTK_WIDGET (self->entry.image));
icon = g_icon_deserialize (variant);
@@ -271,9 +268,6 @@ indicator_ng_set_label (IndicatorNg *self,
return;
}
- if (!self->entry.label)
- self->entry.label = g_object_ref_sink (gtk_label_new (NULL));
-
gtk_label_set_label (GTK_LABEL (self->entry.label), label);
gtk_widget_show (GTK_WIDGET (self->entry.label));
}
@@ -655,6 +649,9 @@ indicator_ng_initable_iface_init (GInitableIface *initable)
static void
indicator_ng_init (IndicatorNg *self)
{
+ self->entry.label = g_object_ref_sink (gtk_label_new (NULL));
+ self->entry.image = g_object_ref_sink (gtk_image_new ());
+
self->entry.menu = g_object_ref_sink (gtk_menu_new ());
/* work around IndicatorObject's warning that the accessible