aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2020-09-05 21:15:45 +0200
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2020-09-05 21:15:45 +0200
commitcba1c3cb8d17d0ea4058537c0c250f10d4170f33 (patch)
tree440b63f3168ec7bb9d473811b5fd0f7952a8a5d3
parent242b20becbfa33c2f83e4fb06d20dc15e2807b00 (diff)
parentd8b5315ba904348de5b06d2a667faac9877dc6c4 (diff)
downloadlibayatana-indicator-cba1c3cb8d17d0ea4058537c0c250f10d4170f33.tar.gz
libayatana-indicator-cba1c3cb8d17d0ea4058537c0c250f10d4170f33.tar.bz2
libayatana-indicator-cba1c3cb8d17d0ea4058537c0c250f10d4170f33.zip
Merge branch 'tari01-pr/blank-label'
Attributes GH PR #25: https://github.com/AyatanaIndicators/libayatana-indicator/pull/25
-rw-r--r--libayatana-indicator/indicator-ng.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/libayatana-indicator/indicator-ng.c b/libayatana-indicator/indicator-ng.c
index b31d298..58cc2a6 100644
--- a/libayatana-indicator/indicator-ng.c
+++ b/libayatana-indicator/indicator-ng.c
@@ -522,19 +522,21 @@ indicator_ng_set_icon_from_variant (IndicatorNg *self,
}
}
-static void
-indicator_ng_set_label (IndicatorNg *self,
- const gchar *label)
+static void indicator_ng_set_label(IndicatorNg *self, const gchar *label)
{
- if (label == NULL || *label == '\0')
+ if (label == NULL || *label == '\0')
{
- if (self->entry.label)
- gtk_widget_hide (GTK_WIDGET (self->entry.label));
- return;
+ if (self->entry.label)
+ {
+ // Hiding the label also hides the image - set the label instead of gtk_widget_hide
+ gtk_label_set_label(GTK_LABEL (self->entry.label), NULL);
+ }
+
+ return;
}
- gtk_label_set_label (GTK_LABEL (self->entry.label), label);
- gtk_widget_show (GTK_WIDGET (self->entry.label));
+ gtk_label_set_label(GTK_LABEL (self->entry.label), label);
+ gtk_widget_show(GTK_WIDGET (self->entry.label));
}
static void