[gtk+] Remove an unnecessary warning
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] Remove an unnecessary warning
- Date: Fri, 30 Dec 2011 07:02:08 +0000 (UTC)
commit 2637240abe5ac158735c700a876a2199602e0d0f
Author: Matthias Clasen <mclasen redhat com>
Date: Fri Dec 30 02:01:15 2011 -0500
Remove an unnecessary warning
Don't warn if there's more than one mnemonic label for a widget,
and skip invisible labels.
Bug 665015
gtk/a11y/gtkwidgetaccessible.c | 15 ++++++++-------
1 files changed, 8 insertions(+), 7 deletions(-)
---
diff --git a/gtk/a11y/gtkwidgetaccessible.c b/gtk/a11y/gtkwidgetaccessible.c
index bf5adb6..3f2d142 100644
--- a/gtk/a11y/gtkwidgetaccessible.c
+++ b/gtk/a11y/gtkwidgetaccessible.c
@@ -197,20 +197,21 @@ find_label (GtkWidget *widget)
GList *labels;
GtkWidget *label;
GtkWidget *temp_widget;
+ GList *ptr;
labels = gtk_widget_list_mnemonic_labels (widget);
label = NULL;
- if (labels)
+ ptr = labels;
+ while (ptr)
{
- if (labels->data)
+ if (ptr->data && gtk_widget_get_visible (GTK_WIDGET (ptr->data)))
{
- if (labels->next)
- g_warning ("Widget (%s) has more than one label", G_OBJECT_TYPE_NAME (widget));
- else
- label = labels->data;
+ label = ptr->data;
+ break;
}
- g_list_free (labels);
+ ptr = ptr->next;
}
+ g_list_free (labels);
/* Ignore a label within a button; bug #136602 */
if (label && GTK_IS_BUTTON (widget))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]