summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2011-07-10 00:24:26 -0400
committerMatthias Clasen <mclasen@redhat.com>2011-07-10 00:24:26 -0400
commit07380c1e64d53884811684c86a39d03bdddca609 (patch)
treef8048fb006fdec3c57f434a69417db9016ae4492
parent634e95eba1e48c23eac0dc4aaf46b447f1c363c2 (diff)
downloadgtk+-07380c1e64d53884811684c86a39d03bdddca609.tar.gz
Make all of a11y/ compile with -Wshadow
-rw-r--r--gtk/a11y/gailutil.c16
-rw-r--r--gtk/a11y/gtktextcellaccessible.c4
-rw-r--r--gtk/a11y/gtkwidgetaccessible.c10
-rw-r--r--gtk/a11y/gtkwindowaccessible.c4
4 files changed, 12 insertions, 22 deletions
diff --git a/gtk/a11y/gailutil.c b/gtk/a11y/gailutil.c
index 7928d18c62..b835b02696 100644
--- a/gtk/a11y/gailutil.c
+++ b/gtk/a11y/gailutil.c
@@ -20,7 +20,6 @@
#include "config.h"
#include <stdlib.h>
-#include <string.h>
#include <gtk/gtk.h>
#include "gailutil.h"
#include "gtktoplevelaccessible.h"
@@ -51,7 +50,7 @@ struct _GailKeyEventInfo
static guint
add_listener (GSignalEmissionHook listener,
const gchar *object_type,
- const gchar *signal,
+ const gchar *signal_name,
const gchar *hook_data)
{
GType type;
@@ -61,7 +60,7 @@ add_listener (GSignalEmissionHook listener,
type = g_type_from_name (object_type);
if (type)
{
- signal_id = g_signal_lookup (signal, type);
+ signal_id = g_signal_lookup (signal_name, type);
if (signal_id > 0)
{
GailUtilListenerInfo *listener_info;
@@ -81,7 +80,7 @@ add_listener (GSignalEmissionHook listener,
}
else
{
- g_warning("Invalid signal type %s\n", signal);
+ g_warning("Invalid signal type %s\n", signal_name);
}
}
else
@@ -239,12 +238,7 @@ window_removed (AtkObject *atk_obj,
*/
if (gtk_window_is_active (window) &&
gtk_window_has_toplevel_focus (window))
- {
- AtkObject *atk_obj;
-
- atk_obj = gtk_widget_get_accessible (widget);
- g_signal_emit_by_name (atk_obj, "deactivate");
- }
+ g_signal_emit_by_name (child, "deactivate");
g_signal_handlers_disconnect_by_func (widget, (gpointer) window_focus, NULL);
g_signal_emit_by_name (child, "destroy");
@@ -278,7 +272,7 @@ gail_util_add_global_event_listener (GSignalEmissionHook listener,
if (split_string)
{
- if (!strcmp ("window", split_string[0]))
+ if (!g_strcmp0 ("window", split_string[0]))
{
static gboolean initialized = FALSE;
diff --git a/gtk/a11y/gtktextcellaccessible.c b/gtk/a11y/gtktextcellaccessible.c
index 01f1456ee4..94d85d39a5 100644
--- a/gtk/a11y/gtktextcellaccessible.c
+++ b/gtk/a11y/gtktextcellaccessible.c
@@ -18,7 +18,7 @@
*/
#include "config.h"
-#include <string.h>
+
#include <gtk/gtk.h>
#include "../gtkpango.h"
#include "gtktextcellaccessible.h"
@@ -161,7 +161,7 @@ gtk_text_cell_accessible_update_cache (GtkRendererCellAccessible *cell,
if (text_cell->cell_text)
{
- if (text == NULL || strcmp (text_cell->cell_text, text) != 0)
+ if (text == NULL || g_strcmp0 (text_cell->cell_text, text) != 0)
{
g_free (text_cell->cell_text);
temp_length = text_cell->cell_length;
diff --git a/gtk/a11y/gtkwidgetaccessible.c b/gtk/a11y/gtkwidgetaccessible.c
index d1c46347ba..edcb677da8 100644
--- a/gtk/a11y/gtkwidgetaccessible.c
+++ b/gtk/a11y/gtkwidgetaccessible.c
@@ -19,8 +19,6 @@
#include "config.h"
-#include <string.h>
-
#include <gtk/gtk.h>
#ifdef GDK_WINDOWING_X11
#include <gdk/x11/gdkx.h>
@@ -478,23 +476,23 @@ gtk_widget_accessible_notify_gtk (GObject *obj,
AtkState state;
gboolean value;
- if (strcmp (pspec->name, "has-focus") == 0)
+ if (g_strcmp0 (pspec->name, "has-focus") == 0)
/*
* We use focus-in-event and focus-out-event signals to catch
* focus changes so we ignore this.
*/
return;
- else if (strcmp (pspec->name, "visible") == 0)
+ else if (g_strcmp0 (pspec->name, "visible") == 0)
{
state = ATK_STATE_VISIBLE;
value = gtk_widget_get_visible (widget);
}
- else if (strcmp (pspec->name, "sensitive") == 0)
+ else if (g_strcmp0 (pspec->name, "sensitive") == 0)
{
state = ATK_STATE_SENSITIVE;
value = gtk_widget_get_sensitive (widget);
}
- else if (strcmp (pspec->name, "orientation") == 0)
+ else if (g_strcmp0 (pspec->name, "orientation") == 0)
{
GtkOrientable *orientable;
diff --git a/gtk/a11y/gtkwindowaccessible.c b/gtk/a11y/gtkwindowaccessible.c
index c5e2959047..a09d77dee9 100644
--- a/gtk/a11y/gtkwindowaccessible.c
+++ b/gtk/a11y/gtkwindowaccessible.c
@@ -19,8 +19,6 @@
#include "config.h"
-#include <string.h>
-
#include <gtk/gtkx.h>
#include "gtkwindowaccessible.h"
@@ -79,7 +77,7 @@ gtk_window_accessible_notify_gtk (GObject *obj,
GtkWidget *widget = GTK_WIDGET (obj);
AtkObject* atk_obj = gtk_widget_get_accessible (widget);
- if (strcmp (pspec->name, "title") == 0)
+ if (g_strcmp0 (pspec->name, "title") == 0)
{
g_object_notify (G_OBJECT (atk_obj), "accessible-name");
g_signal_emit_by_name (atk_obj, "visible_data_changed");