[gtk: 1/2] label: Maintain value for `has-tooltip` for labels with links
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk: 1/2] label: Maintain value for `has-tooltip` for labels with links
- Date: Thu, 14 Apr 2022 18:00:44 +0000 (UTC)
commit 764a8cea59671e56cbae5d1843aaca1af980e4e3
Author: Julian Sparber <julian sparber net>
Date: Wed Apr 13 18:56:29 2022 +0200
label: Maintain value for `has-tooltip` for labels with links
The `has-tooltip` property gets set to `false` for label with links if no
link is selected. This makes sure to only change the property to `true`
but never to `false`.
gtk/gtklabel.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
---
diff --git a/gtk/gtklabel.c b/gtk/gtklabel.c
index 7560e551fe..0a15b0b5c4 100644
--- a/gtk/gtklabel.c
+++ b/gtk/gtklabel.c
@@ -3615,7 +3615,11 @@ static void
gtk_label_ensure_has_tooltip (GtkLabel *self)
{
guint i;
- gboolean has_tooltip = FALSE;
+ gboolean has_tooltip = gtk_widget_get_has_tooltip(GTK_WIDGET(self));
+
+ if (has_tooltip) {
+ return;
+ }
for (i = 0; i < self->select_info->n_links; i++)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]