mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-11 11:20:12 +00:00
Make all of a11y/ compile with -Wshadow
This commit is contained in:
parent
634e95eba1
commit
07380c1e64
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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");
|
||||
|
Loading…
Reference in New Issue
Block a user