[gtk+] GtkEntryAccessible: also handle entry icon tooltip NULL in notify_gtk.
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] GtkEntryAccessible: also handle entry icon tooltip NULL in notify_gtk.
- Date: Sun, 17 Mar 2013 20:12:20 +0000 (UTC)
commit da961b7ab8f736c963954f5f39dfa395c1670d86
Author: Alban Browaeys <prahal yahoo com>
Date: Thu Mar 7 15:54:04 2013 +0100
GtkEntryAccessible: also handle entry icon tooltip NULL in notify_gtk.
To clear the tooltip one is to set the tooltip to NULL. Though
the GtkEntryAccessible expect this tooltip to not be NULL in
gtk_entry_accessible_notify_gtk (already handling this case
in its _init).
Fixes:
** (epiphany:23914): CRITICAL **: atk_object_set_description: assertion
`description != NULL' failed
when epiphany g_object_set the entry icon tooltip to NULL (clear the
tooltip) in its find bar.
https://bugzilla.gnome.org/show_bug.cgi?id=695375
gtk/a11y/gtkentryaccessible.c | 24 ++++++++++++++++++++----
1 files changed, 20 insertions(+), 4 deletions(-)
---
diff --git a/gtk/a11y/gtkentryaccessible.c b/gtk/a11y/gtkentryaccessible.c
index 31414c6..7d82e38 100644
--- a/gtk/a11y/gtkentryaccessible.c
+++ b/gtk/a11y/gtkentryaccessible.c
@@ -572,9 +572,17 @@ gtk_entry_accessible_notify_gtk (GObject *obj,
gchar *text;
text = gtk_entry_get_icon_tooltip_text (gtk_entry,
GTK_ENTRY_ICON_PRIMARY);
- atk_object_set_description (priv->icons[GTK_ENTRY_ICON_PRIMARY],
+ if (text)
+ {
+ atk_object_set_description (priv->icons[GTK_ENTRY_ICON_PRIMARY],
text);
- g_free (text);
+ g_free (text);
+ }
+ else
+ {
+ atk_object_set_description (priv->icons[GTK_ENTRY_ICON_PRIMARY],
+ "");
+ }
}
}
else if (g_strcmp0 (pspec->name, "secondary-icon-tooltip-text") == 0)
@@ -584,9 +592,17 @@ gtk_entry_accessible_notify_gtk (GObject *obj,
gchar *text;
text = gtk_entry_get_icon_tooltip_text (gtk_entry,
GTK_ENTRY_ICON_SECONDARY);
- atk_object_set_description (priv->icons[GTK_ENTRY_ICON_SECONDARY],
+ if (text)
+ {
+ atk_object_set_description (priv->icons[GTK_ENTRY_ICON_SECONDARY],
text);
- g_free (text);
+ g_free (text);
+ }
+ else
+ {
+ atk_object_set_description (priv->icons[GTK_ENTRY_ICON_PRIMARY],
+ "");
+ }
}
}
else if (g_strcmp0 (pspec->name, "primary-icon-activatable") == 0)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]