mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-28 22:41:43 +00:00
a11y: Remove needless checks
The cell_row_ref and cell_col_ref variables are always non-NULL, so there's no need to check it.
This commit is contained in:
parent
918a9d0e3a
commit
24e4a03af2
@ -1361,7 +1361,7 @@ gtk_tree_view_accessible_get_cell_area (GtkCellAccessibleParent *parent,
|
|||||||
else
|
else
|
||||||
top_cell = cell;
|
top_cell = cell;
|
||||||
cell_info = find_cell_info (GTK_TREE_VIEW_ACCESSIBLE (parent), top_cell, TRUE);
|
cell_info = find_cell_info (GTK_TREE_VIEW_ACCESSIBLE (parent), top_cell, TRUE);
|
||||||
if (!cell_info || !cell_info->cell_col_ref || !cell_info->cell_row_ref)
|
if (!cell_info)
|
||||||
return;
|
return;
|
||||||
path = cell_info_get_path (cell_info);
|
path = cell_info_get_path (cell_info);
|
||||||
tv_col = cell_info->cell_col_ref;
|
tv_col = cell_info->cell_col_ref;
|
||||||
@ -1490,7 +1490,7 @@ gtk_tree_view_accessible_grab_cell_focus (GtkCellAccessibleParent *parent,
|
|||||||
tree_view = GTK_TREE_VIEW (widget);
|
tree_view = GTK_TREE_VIEW (widget);
|
||||||
|
|
||||||
cell_info = find_cell_info (GTK_TREE_VIEW_ACCESSIBLE (parent), cell, TRUE);
|
cell_info = find_cell_info (GTK_TREE_VIEW_ACCESSIBLE (parent), cell, TRUE);
|
||||||
if (!cell_info || !cell_info->cell_col_ref || !cell_info->cell_row_ref)
|
if (!cell_info)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
cell_object = ATK_OBJECT (cell);
|
cell_object = ATK_OBJECT (cell);
|
||||||
parent_cell = atk_object_get_parent (cell_object);
|
parent_cell = atk_object_get_parent (cell_object);
|
||||||
@ -1543,7 +1543,7 @@ gtk_tree_view_accessible_get_child_index (GtkCellAccessibleParent *parent,
|
|||||||
GtkTreeView *tree_view;
|
GtkTreeView *tree_view;
|
||||||
|
|
||||||
cell_info = find_cell_info (GTK_TREE_VIEW_ACCESSIBLE (parent), cell, TRUE);
|
cell_info = find_cell_info (GTK_TREE_VIEW_ACCESSIBLE (parent), cell, TRUE);
|
||||||
if (!cell_info || !cell_info->cell_col_ref || !cell_info->cell_row_ref)
|
if (!cell_info)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
tree_view = GTK_TREE_VIEW (gtk_accessible_get_widget (GTK_ACCESSIBLE (parent)));
|
tree_view = GTK_TREE_VIEW (gtk_accessible_get_widget (GTK_ACCESSIBLE (parent)));
|
||||||
@ -2341,7 +2341,7 @@ update_cell_value (GtkRendererCellAccessible *renderer_cell,
|
|||||||
|
|
||||||
cell = GTK_CELL_ACCESSIBLE (renderer_cell);
|
cell = GTK_CELL_ACCESSIBLE (renderer_cell);
|
||||||
cell_info = find_cell_info (accessible, cell, TRUE);
|
cell_info = find_cell_info (accessible, cell, TRUE);
|
||||||
if (!cell_info || !cell_info->cell_col_ref || !cell_info->cell_row_ref)
|
if (!cell_info)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
if (emit_change_signal)
|
if (emit_change_signal)
|
||||||
@ -2929,7 +2929,7 @@ toggle_cell_expanded (GtkCellAccessible *cell)
|
|||||||
parent = atk_object_get_parent (parent);
|
parent = atk_object_get_parent (parent);
|
||||||
|
|
||||||
cell_info = find_cell_info (GTK_TREE_VIEW_ACCESSIBLE (parent), cell, TRUE);
|
cell_info = find_cell_info (GTK_TREE_VIEW_ACCESSIBLE (parent), cell, TRUE);
|
||||||
if (!cell_info || !cell_info->cell_col_ref || !cell_info->cell_row_ref)
|
if (!cell_info)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
tree_view = GTK_TREE_VIEW (gtk_accessible_get_widget (GTK_ACCESSIBLE (parent)));
|
tree_view = GTK_TREE_VIEW (gtk_accessible_get_widget (GTK_ACCESSIBLE (parent)));
|
||||||
@ -2964,7 +2964,7 @@ toggle_cell_toggled (GtkCellAccessible *cell)
|
|||||||
}
|
}
|
||||||
|
|
||||||
cell_info = find_cell_info (GTK_TREE_VIEW_ACCESSIBLE (parent), cell, TRUE);
|
cell_info = find_cell_info (GTK_TREE_VIEW_ACCESSIBLE (parent), cell, TRUE);
|
||||||
if (!cell_info || !cell_info->cell_col_ref || !cell_info->cell_row_ref)
|
if (!cell_info)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
path = cell_info_get_path (cell_info);
|
path = cell_info_get_path (cell_info);
|
||||||
@ -3005,7 +3005,7 @@ edit_cell (GtkCellAccessible *cell)
|
|||||||
parent = atk_object_get_parent (parent);
|
parent = atk_object_get_parent (parent);
|
||||||
|
|
||||||
cell_info = find_cell_info (GTK_TREE_VIEW_ACCESSIBLE (parent), cell, TRUE);
|
cell_info = find_cell_info (GTK_TREE_VIEW_ACCESSIBLE (parent), cell, TRUE);
|
||||||
if (!cell_info || !cell_info->cell_col_ref || !cell_info->cell_row_ref)
|
if (!cell_info)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
tree_view = GTK_TREE_VIEW (gtk_accessible_get_widget (GTK_ACCESSIBLE (parent)));
|
tree_view = GTK_TREE_VIEW (gtk_accessible_get_widget (GTK_ACCESSIBLE (parent)));
|
||||||
@ -3029,7 +3029,7 @@ activate_cell (GtkCellAccessible *cell)
|
|||||||
parent = atk_object_get_parent (parent);
|
parent = atk_object_get_parent (parent);
|
||||||
|
|
||||||
cell_info = find_cell_info (GTK_TREE_VIEW_ACCESSIBLE (parent), cell, TRUE);
|
cell_info = find_cell_info (GTK_TREE_VIEW_ACCESSIBLE (parent), cell, TRUE);
|
||||||
if (!cell_info || !cell_info->cell_col_ref || !cell_info->cell_row_ref)
|
if (!cell_info)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
tree_view = GTK_TREE_VIEW (gtk_accessible_get_widget (GTK_ACCESSIBLE (parent)));
|
tree_view = GTK_TREE_VIEW (gtk_accessible_get_widget (GTK_ACCESSIBLE (parent)));
|
||||||
|
Loading…
Reference in New Issue
Block a user