[gtk+] a11y: fix uninitialized variables compiler warning
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] a11y: fix uninitialized variables compiler warning
- Date: Fri, 14 Dec 2012 02:57:43 +0000 (UTC)
commit 3782cf77c38702351feb412bd0a8a08b3dce3dc6
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Thu Dec 13 21:52:51 2012 -0500
a11y: fix uninitialized variables compiler warning
The code path where we update the tooltip text property doesn't set
the state and value variables, and so doesn't need to call
notify_state_change().
Return early, and move the if block at the beginning of the function for
clarity.
gtk/a11y/gtkwidgetaccessible.c | 11 ++++++-----
1 files changed, 6 insertions(+), 5 deletions(-)
---
diff --git a/gtk/a11y/gtkwidgetaccessible.c b/gtk/a11y/gtkwidgetaccessible.c
index 52d7039..ebbcf30 100644
--- a/gtk/a11y/gtkwidgetaccessible.c
+++ b/gtk/a11y/gtkwidgetaccessible.c
@@ -474,6 +474,12 @@ gtk_widget_accessible_notify_gtk (GObject *obj,
* focus changes so we ignore this.
*/
return;
+ else if (g_strcmp0 (pspec->name, "tooltip-text") == 0)
+ {
+ gtk_widget_accessible_update_tooltip (GTK_WIDGET_ACCESSIBLE (atk_obj),
+ widget);
+ return;
+ }
else if (g_strcmp0 (pspec->name, "visible") == 0)
{
state = ATK_STATE_VISIBLE;
@@ -494,11 +500,6 @@ gtk_widget_accessible_notify_gtk (GObject *obj,
state = ATK_STATE_HORIZONTAL;
value = (gtk_orientable_get_orientation (orientable) == GTK_ORIENTATION_HORIZONTAL);
}
- else if (g_strcmp0 (pspec->name, "tooltip-text") == 0)
- {
- gtk_widget_accessible_update_tooltip (GTK_WIDGET_ACCESSIBLE (atk_obj),
- widget);
- }
else
return;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]