Silence unused variable warnings in gail
This commit is contained in:
parent
cb6e036d67
commit
2ba878ca1b
@ -618,7 +618,7 @@ gail_entry_get_character_extents (AtkText *text,
|
|||||||
GtkWidget *widget;
|
GtkWidget *widget;
|
||||||
GtkEntry *entry;
|
GtkEntry *entry;
|
||||||
PangoRectangle char_rect;
|
PangoRectangle char_rect;
|
||||||
gint index, cursor_index, x_layout, y_layout;
|
gint index, x_layout, y_layout;
|
||||||
const gchar *entry_text;
|
const gchar *entry_text;
|
||||||
gint start_pos, end_pos;
|
gint start_pos, end_pos;
|
||||||
|
|
||||||
@ -635,8 +635,9 @@ gail_entry_get_character_extents (AtkText *text,
|
|||||||
entry_text = gtk_entry_get_text (entry);
|
entry_text = gtk_entry_get_text (entry);
|
||||||
|
|
||||||
index = g_utf8_offset_to_pointer (entry_text, offset) - entry_text;
|
index = g_utf8_offset_to_pointer (entry_text, offset) - entry_text;
|
||||||
cursor_index = g_utf8_offset_to_pointer (entry_text, end_pos) - entry_text;
|
|
||||||
/* FIXME: entry->preedit cannot be accessed directly
|
/* FIXME: entry->preedit cannot be accessed directly
|
||||||
|
cursor_index = g_utf8_offset_to_pointer (entry_text, end_pos) - entry_text;
|
||||||
if (index > cursor_index)
|
if (index > cursor_index)
|
||||||
index += entry->preedit_length;
|
index += entry->preedit_length;
|
||||||
*/
|
*/
|
||||||
@ -654,7 +655,7 @@ gail_entry_get_offset_at_point (AtkText *text,
|
|||||||
{
|
{
|
||||||
GtkWidget *widget;
|
GtkWidget *widget;
|
||||||
GtkEntry *entry;
|
GtkEntry *entry;
|
||||||
gint index, cursor_index, x_layout, y_layout;
|
gint index, x_layout, y_layout;
|
||||||
const gchar *entry_text;
|
const gchar *entry_text;
|
||||||
|
|
||||||
widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text));
|
widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text));
|
||||||
@ -682,8 +683,8 @@ gail_entry_get_offset_at_point (AtkText *text,
|
|||||||
|
|
||||||
gtk_editable_get_selection_bounds (GTK_EDITABLE (entry),
|
gtk_editable_get_selection_bounds (GTK_EDITABLE (entry),
|
||||||
&start_pos, &end_pos);
|
&start_pos, &end_pos);
|
||||||
cursor_index = g_utf8_offset_to_pointer (entry_text, end_pos) - entry_text;
|
|
||||||
/* FIXME: entry->preedit_length cannot be accessed directly
|
/* FIXME: entry->preedit_length cannot be accessed directly
|
||||||
|
cursor_index = g_utf8_offset_to_pointer (entry_text, end_pos) - entry_text;
|
||||||
if (index >= cursor_index && entry->preedit_length)
|
if (index >= cursor_index && entry->preedit_length)
|
||||||
{
|
{
|
||||||
if (index >= cursor_index + entry->preedit_length)
|
if (index >= cursor_index + entry->preedit_length)
|
||||||
|
@ -209,7 +209,6 @@ gail_expander_ref_child (AtkObject *obj,
|
|||||||
GtkWidget *widget;
|
GtkWidget *widget;
|
||||||
GtkWidget *label;
|
GtkWidget *label;
|
||||||
gint index;
|
gint index;
|
||||||
gint count;
|
|
||||||
|
|
||||||
g_return_val_if_fail (GAIL_IS_CONTAINER (obj), NULL);
|
g_return_val_if_fail (GAIL_IS_CONTAINER (obj), NULL);
|
||||||
g_return_val_if_fail ((i >= 0), NULL);
|
g_return_val_if_fail ((i >= 0), NULL);
|
||||||
@ -225,7 +224,6 @@ gail_expander_ref_child (AtkObject *obj,
|
|||||||
*/
|
*/
|
||||||
label = gtk_expander_get_label_widget (GTK_EXPANDER (widget));
|
label = gtk_expander_get_label_widget (GTK_EXPANDER (widget));
|
||||||
if (label) {
|
if (label) {
|
||||||
count = g_list_length (children);
|
|
||||||
for (index = 0; index <= i; index++) {
|
for (index = 0; index <= i; index++) {
|
||||||
tmp_list = g_list_nth (children, index);
|
tmp_list = g_list_nth (children, index);
|
||||||
if (label == GTK_WIDGET (tmp_list->data)) {
|
if (label == GTK_WIDGET (tmp_list->data)) {
|
||||||
|
@ -70,7 +70,6 @@ gail_renderer_cell_new (void)
|
|||||||
{
|
{
|
||||||
GObject *object;
|
GObject *object;
|
||||||
AtkObject *atk_object;
|
AtkObject *atk_object;
|
||||||
GailRendererCell *cell;
|
|
||||||
|
|
||||||
object = g_object_new (GAIL_TYPE_RENDERER_CELL, NULL);
|
object = g_object_new (GAIL_TYPE_RENDERER_CELL, NULL);
|
||||||
|
|
||||||
@ -79,7 +78,5 @@ gail_renderer_cell_new (void)
|
|||||||
atk_object = ATK_OBJECT (object);
|
atk_object = ATK_OBJECT (object);
|
||||||
atk_object->role = ATK_ROLE_TABLE_CELL;
|
atk_object->role = ATK_ROLE_TABLE_CELL;
|
||||||
|
|
||||||
cell = GAIL_RENDERER_CELL(object);
|
|
||||||
|
|
||||||
return atk_object;
|
return atk_object;
|
||||||
}
|
}
|
||||||
|
@ -508,7 +508,6 @@ gail_text_view_get_offset_at_point (AtkText *text,
|
|||||||
AtkCoordType coords)
|
AtkCoordType coords)
|
||||||
{
|
{
|
||||||
GtkTextView *view;
|
GtkTextView *view;
|
||||||
GtkTextBuffer *buffer;
|
|
||||||
GtkTextIter loc_itr;
|
GtkTextIter loc_itr;
|
||||||
gint x_widget, y_widget, x_window, y_window, buff_x, buff_y;
|
gint x_widget, y_widget, x_window, y_window, buff_x, buff_y;
|
||||||
GtkWidget *widget;
|
GtkWidget *widget;
|
||||||
@ -521,7 +520,6 @@ gail_text_view_get_offset_at_point (AtkText *text,
|
|||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
view = GTK_TEXT_VIEW (widget);
|
view = GTK_TEXT_VIEW (widget);
|
||||||
buffer = gtk_text_view_get_buffer (view);
|
|
||||||
|
|
||||||
window = gtk_text_view_get_window (view, GTK_TEXT_WINDOW_WIDGET);
|
window = gtk_text_view_get_window (view, GTK_TEXT_WINDOW_WIDGET);
|
||||||
gdk_window_get_origin (window, &x_widget, &y_widget);
|
gdk_window_get_origin (window, &x_widget, &y_widget);
|
||||||
|
@ -341,7 +341,6 @@ is_combo_window (GtkWidget *widget)
|
|||||||
{
|
{
|
||||||
GtkWidget *child;
|
GtkWidget *child;
|
||||||
AtkObject *obj;
|
AtkObject *obj;
|
||||||
GtkAccessible *accessible;
|
|
||||||
|
|
||||||
child = gtk_bin_get_child (GTK_BIN (widget));
|
child = gtk_bin_get_child (GTK_BIN (widget));
|
||||||
|
|
||||||
@ -360,7 +359,6 @@ is_combo_window (GtkWidget *widget)
|
|||||||
|
|
||||||
obj = gtk_widget_get_accessible (child);
|
obj = gtk_widget_get_accessible (child);
|
||||||
obj = atk_object_get_parent (obj);
|
obj = atk_object_get_parent (obj);
|
||||||
accessible = GTK_ACCESSIBLE (obj);
|
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
@ -1479,10 +1479,7 @@ gail_tree_view_add_row_selection (AtkTable *table,
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
set_iter_nth_row (tree_view, &iter_to_row, row);
|
set_iter_nth_row (tree_view, &iter_to_row, row);
|
||||||
if (&iter_to_row != NULL)
|
gtk_tree_selection_select_iter (selection, &iter_to_row);
|
||||||
gtk_tree_selection_select_iter (selection, &iter_to_row);
|
|
||||||
else
|
|
||||||
return FALSE;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3936,7 +3933,6 @@ static void
|
|||||||
toggle_cell_toggled (GailCell *cell)
|
toggle_cell_toggled (GailCell *cell)
|
||||||
{
|
{
|
||||||
GailTreeViewCellInfo *cell_info;
|
GailTreeViewCellInfo *cell_info;
|
||||||
GtkTreeView *tree_view;
|
|
||||||
GtkTreePath *path;
|
GtkTreePath *path;
|
||||||
gchar *pathstring;
|
gchar *pathstring;
|
||||||
GList *renderers, *cur_renderer;
|
GList *renderers, *cur_renderer;
|
||||||
@ -3955,7 +3951,6 @@ toggle_cell_toggled (GailCell *cell)
|
|||||||
gail_return_if_fail (cell_info->cell_col_ref);
|
gail_return_if_fail (cell_info->cell_col_ref);
|
||||||
gail_return_if_fail (cell_info->cell_row_ref);
|
gail_return_if_fail (cell_info->cell_row_ref);
|
||||||
|
|
||||||
tree_view = GTK_TREE_VIEW (gtk_accessible_get_widget (GTK_ACCESSIBLE (parent)));
|
|
||||||
path = gtk_tree_row_reference_get_path (cell_info->cell_row_ref);
|
path = gtk_tree_row_reference_get_path (cell_info->cell_row_ref);
|
||||||
gail_return_if_fail (path);
|
gail_return_if_fail (path);
|
||||||
pathstring = gtk_tree_path_to_string (path);
|
pathstring = gtk_tree_path_to_string (path);
|
||||||
@ -3993,15 +3988,11 @@ edit_cell (GailCell *cell)
|
|||||||
GtkTreeView *tree_view;
|
GtkTreeView *tree_view;
|
||||||
GtkTreePath *path;
|
GtkTreePath *path;
|
||||||
AtkObject *parent;
|
AtkObject *parent;
|
||||||
gboolean is_container_cell = FALSE;
|
|
||||||
|
|
||||||
editing = TRUE;
|
editing = TRUE;
|
||||||
parent = atk_object_get_parent (ATK_OBJECT (cell));
|
parent = atk_object_get_parent (ATK_OBJECT (cell));
|
||||||
if (GAIL_IS_CONTAINER_CELL (parent))
|
if (GAIL_IS_CONTAINER_CELL (parent))
|
||||||
{
|
parent = atk_object_get_parent (parent);
|
||||||
is_container_cell = TRUE;
|
|
||||||
parent = atk_object_get_parent (parent);
|
|
||||||
}
|
|
||||||
|
|
||||||
cell_info = find_cell_info (GAIL_TREE_VIEW (parent), cell, NULL, TRUE);
|
cell_info = find_cell_info (GAIL_TREE_VIEW (parent), cell, NULL, TRUE);
|
||||||
gail_return_if_fail (cell_info);
|
gail_return_if_fail (cell_info);
|
||||||
@ -4023,15 +4014,11 @@ activate_cell (GailCell *cell)
|
|||||||
GtkTreeView *tree_view;
|
GtkTreeView *tree_view;
|
||||||
GtkTreePath *path;
|
GtkTreePath *path;
|
||||||
AtkObject *parent;
|
AtkObject *parent;
|
||||||
gboolean is_container_cell = FALSE;
|
|
||||||
|
|
||||||
editing = TRUE;
|
editing = TRUE;
|
||||||
parent = atk_object_get_parent (ATK_OBJECT (cell));
|
parent = atk_object_get_parent (ATK_OBJECT (cell));
|
||||||
if (GAIL_IS_CONTAINER_CELL (parent))
|
if (GAIL_IS_CONTAINER_CELL (parent))
|
||||||
{
|
parent = atk_object_get_parent (parent);
|
||||||
is_container_cell = TRUE;
|
|
||||||
parent = atk_object_get_parent (parent);
|
|
||||||
}
|
|
||||||
|
|
||||||
cell_info = find_cell_info (GAIL_TREE_VIEW (parent), cell, NULL, TRUE);
|
cell_info = find_cell_info (GAIL_TREE_VIEW (parent), cell, NULL, TRUE);
|
||||||
gail_return_if_fail (cell_info);
|
gail_return_if_fail (cell_info);
|
||||||
|
@ -269,7 +269,8 @@ typedef struct
|
|||||||
static void
|
static void
|
||||||
_send_to_magnifier(gint x, gint y, gint w, gint h)
|
_send_to_magnifier(gint x, gint y, gint w, gint h)
|
||||||
{
|
{
|
||||||
int desc, length_msg;
|
int desc;
|
||||||
|
int length_msg G_GNUC_UNUSED;
|
||||||
gchar buff[100];
|
gchar buff[100];
|
||||||
|
|
||||||
sprintf (buff, "~5:%d,%d", x+w/2, y+h/2);
|
sprintf (buff, "~5:%d,%d", x+w/2, y+h/2);
|
||||||
@ -1330,12 +1331,9 @@ _print_text_attributes (AtkText *aobject)
|
|||||||
gchar *output_str, *label_str;
|
gchar *output_str, *label_str;
|
||||||
gint start_offset, end_offset, caret_offset;
|
gint start_offset, end_offset, caret_offset;
|
||||||
gint attribute_set_len, attribute_offset, i;
|
gint attribute_set_len, attribute_offset, i;
|
||||||
gint n_chars;
|
|
||||||
gint group_num;
|
gint group_num;
|
||||||
TabNumber tab_n = TEXT;
|
TabNumber tab_n = TEXT;
|
||||||
|
|
||||||
n_chars = atk_text_get_character_count(aobject);
|
|
||||||
|
|
||||||
group_num = _print_groupname (tab_n, TEXT_ATTRIBUTES,
|
group_num = _print_groupname (tab_n, TEXT_ATTRIBUTES,
|
||||||
"Text Attributes at Caret");
|
"Text Attributes at Caret");
|
||||||
|
|
||||||
|
@ -14,7 +14,6 @@ static void _check_children (AtkObject *obj)
|
|||||||
gint n_children, i, j;
|
gint n_children, i, j;
|
||||||
AtkObject *child;
|
AtkObject *child;
|
||||||
AtkObject *grand_child;
|
AtkObject *grand_child;
|
||||||
AtkObject *parent;
|
|
||||||
|
|
||||||
n_children = atk_object_get_n_accessible_children (obj);
|
n_children = atk_object_get_n_accessible_children (obj);
|
||||||
|
|
||||||
@ -28,7 +27,6 @@ static void _check_children (AtkObject *obj)
|
|||||||
{
|
{
|
||||||
child = atk_object_ref_accessible_child (obj, 1);
|
child = atk_object_ref_accessible_child (obj, 1);
|
||||||
g_return_if_fail (atk_object_get_role (child) == ATK_ROLE_TEXT);
|
g_return_if_fail (atk_object_get_role (child) == ATK_ROLE_TEXT);
|
||||||
parent = atk_object_get_parent (child);
|
|
||||||
j = atk_object_get_index_in_parent (child);
|
j = atk_object_get_index_in_parent (child);
|
||||||
if (j != 1)
|
if (j != 1)
|
||||||
g_print ("*** inconsistency between parent and children %d %d ***\n",
|
g_print ("*** inconsistency between parent and children %d %d ***\n",
|
||||||
@ -38,7 +36,6 @@ static void _check_children (AtkObject *obj)
|
|||||||
|
|
||||||
child = atk_object_ref_accessible_child (obj, 0);
|
child = atk_object_ref_accessible_child (obj, 0);
|
||||||
g_return_if_fail (atk_object_get_role (child) == ATK_ROLE_LIST);
|
g_return_if_fail (atk_object_get_role (child) == ATK_ROLE_LIST);
|
||||||
parent = atk_object_get_parent (child);
|
|
||||||
j = atk_object_get_index_in_parent (child);
|
j = atk_object_get_index_in_parent (child);
|
||||||
if (j != 0)
|
if (j != 0)
|
||||||
g_print ("*** inconsistency between parent and children %d %d ***\n",
|
g_print ("*** inconsistency between parent and children %d %d ***\n",
|
||||||
|
@ -553,7 +553,6 @@ _create_select_tests_window (AtkObject *obj,
|
|||||||
TLruntest runtest,
|
TLruntest runtest,
|
||||||
OutputWindow **outwin)
|
OutputWindow **outwin)
|
||||||
{
|
{
|
||||||
AtkText *textwidget;
|
|
||||||
GtkWidget *hbuttonbox;
|
GtkWidget *hbuttonbox;
|
||||||
GtkWidget *scrolledWindow;
|
GtkWidget *scrolledWindow;
|
||||||
|
|
||||||
@ -561,8 +560,6 @@ _create_select_tests_window (AtkObject *obj,
|
|||||||
{
|
{
|
||||||
md[window_no] = (MainDialog *) malloc (sizeof(MainDialog));
|
md[window_no] = (MainDialog *) malloc (sizeof(MainDialog));
|
||||||
|
|
||||||
textwidget = ATK_TEXT (obj);
|
|
||||||
|
|
||||||
/* Setup Window */
|
/* Setup Window */
|
||||||
md[window_no]->selecttestsTitle = "Test Setting";
|
md[window_no]->selecttestsTitle = "Test Setting";
|
||||||
md[window_no]->selecttestsWindow = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
md[window_no]->selecttestsWindow = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||||
|
@ -52,11 +52,8 @@ static gint _test_paned (gpointer data)
|
|||||||
{
|
{
|
||||||
AtkObject *obj = ATK_OBJECT (data);
|
AtkObject *obj = ATK_OBJECT (data);
|
||||||
AtkRole role = atk_object_get_role (obj);
|
AtkRole role = atk_object_get_role (obj);
|
||||||
GtkWidget *widget;
|
|
||||||
static gint times = 0;
|
static gint times = 0;
|
||||||
|
|
||||||
widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (obj));
|
|
||||||
|
|
||||||
if (role == ATK_ROLE_SPLIT_PANE)
|
if (role == ATK_ROLE_SPLIT_PANE)
|
||||||
{
|
{
|
||||||
GValue *value, val;
|
GValue *value, val;
|
||||||
|
Loading…
Reference in New Issue
Block a user