mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-26 13:41:07 +00:00
tests: Don't dump stuff twice for tables
Captions and headers are printed as part of the children, so we can avoid the duplication by just printing the name.
This commit is contained in:
parent
bbf59c75d7
commit
74e8ac1208
@ -513,10 +513,6 @@ dump_atk_streamable_content (AtkStreamableContent *content,
|
||||
g_string_append_c (string, '\n');
|
||||
}
|
||||
|
||||
static void dump_accessible (AtkObject *accessible,
|
||||
guint depth,
|
||||
GString *string);
|
||||
|
||||
static void
|
||||
dump_atk_table (AtkTable *table,
|
||||
guint depth,
|
||||
@ -532,17 +528,11 @@ dump_atk_table (AtkTable *table,
|
||||
|
||||
obj = atk_table_get_summary (table);
|
||||
if (obj)
|
||||
{
|
||||
g_string_append_printf (string, "%*s<summary>\n", depth, "");
|
||||
dump_accessible (obj, depth, string);
|
||||
}
|
||||
g_string_append_printf (string, "%*ssummary: %s\n", depth, "", get_name (obj));
|
||||
|
||||
obj = atk_table_get_caption (table);
|
||||
if (obj)
|
||||
{
|
||||
g_string_append_printf (string, "%*s<caption>\n", depth, "");
|
||||
dump_accessible (obj, depth, string);
|
||||
}
|
||||
g_string_append_printf (string, "%*scaption: %s\n", depth, "", get_name (obj));
|
||||
|
||||
g_string_append_printf (string, "%*srows: %d\n", depth, "", atk_table_get_n_rows (table));
|
||||
g_string_append_printf (string, "%*scolumns: %d\n", depth, "", atk_table_get_n_columns (table));
|
||||
@ -577,10 +567,7 @@ dump_atk_table (AtkTable *table,
|
||||
g_string_append_printf (string, "%*scolumn %d description: %s\n", depth, "", i, desc);
|
||||
obj = atk_table_get_column_header (table, i);
|
||||
if (obj)
|
||||
{
|
||||
g_string_append_printf (string, "%*s<column %d header>\n", depth, "", i);
|
||||
dump_accessible (obj, depth, string);
|
||||
}
|
||||
g_string_append_printf (string, "%*scolumn %d header: %s\n", depth, "", i, get_name (obj));
|
||||
}
|
||||
|
||||
for (i = 0; i < atk_table_get_n_rows (table); i++)
|
||||
@ -590,10 +577,7 @@ dump_atk_table (AtkTable *table,
|
||||
g_string_append_printf (string, "%*srow %d description: %s\n", depth, "", i, desc);
|
||||
obj = atk_table_get_row_header (table, i);
|
||||
if (obj)
|
||||
{
|
||||
g_string_append_printf (string, "%*s<row %d header>\n", depth, "", i);
|
||||
dump_accessible (obj, depth, string);
|
||||
}
|
||||
g_string_append_printf (string, "%*srow %d header: %s\n", depth, "", i, get_name (obj));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -105,22 +105,7 @@ window1
|
||||
rows: 1
|
||||
columns: 1
|
||||
column 0 description:
|
||||
<column 0 header>
|
||||
unnamed-GtkButtonAccessible-6
|
||||
"table column header"
|
||||
parent: unnamed-GtkTreeViewAccessible-5
|
||||
index: 0
|
||||
name:
|
||||
state: enabled focusable selectable sensitive
|
||||
toolkit: gtk
|
||||
<AtkComponent>
|
||||
layer: widget
|
||||
alpha: 1
|
||||
<AtkImage>
|
||||
image size: -1 x -1
|
||||
image description: (null)
|
||||
<AtkAction>
|
||||
action 0 name: click
|
||||
column 0 header: unnamed-GtkButtonAccessible-6
|
||||
unnamed-GtkButtonAccessible-6
|
||||
"table column header"
|
||||
parent: unnamed-GtkTreeViewAccessible-5
|
||||
|
@ -23,39 +23,9 @@ window1
|
||||
columns: 2
|
||||
selected rows: 0
|
||||
column 0 description: Column 1
|
||||
<column 0 header>
|
||||
unnamed-GtkButtonAccessible-0
|
||||
"table column header"
|
||||
parent: tree1
|
||||
index: 0
|
||||
name: Column 1
|
||||
state: enabled sensitive showing visible
|
||||
toolkit: gtk
|
||||
<AtkComponent>
|
||||
layer: widget
|
||||
alpha: 1
|
||||
<AtkImage>
|
||||
image size: -1 x -1
|
||||
image description: (null)
|
||||
<AtkAction>
|
||||
action 0 name: click
|
||||
column 0 header: unnamed-GtkButtonAccessible-0
|
||||
column 1 description: Column 2
|
||||
<column 1 header>
|
||||
unnamed-GtkButtonAccessible-1
|
||||
"table column header"
|
||||
parent: tree1
|
||||
index: 1
|
||||
name: Column 2
|
||||
state: enabled sensitive showing visible
|
||||
toolkit: gtk
|
||||
<AtkComponent>
|
||||
layer: widget
|
||||
alpha: 1
|
||||
<AtkImage>
|
||||
image size: -1 x -1
|
||||
image description: (null)
|
||||
<AtkAction>
|
||||
action 0 name: click
|
||||
column 1 header: unnamed-GtkButtonAccessible-1
|
||||
unnamed-GtkButtonAccessible-0
|
||||
"table column header"
|
||||
parent: tree1
|
||||
|
Loading…
Reference in New Issue
Block a user