inspector: show accessible name and description

https://bugzilla.gnome.org/show_bug.cgi?id=746458
This commit is contained in:
Vadim Rutkovsky
2015-03-19 12:00:01 +01:00
parent baba3ff0e5
commit f12e76c61f
3 changed files with 86 additions and 0 deletions

View File

@@ -54,6 +54,10 @@ struct _GtkInspectorMiscInfoPrivate {
GtkWidget *clip_area;
GtkWidget *accessible_role_row;
GtkWidget *accessible_role;
GtkWidget *accessible_name_row;
GtkWidget *accessible_name;
GtkWidget *accessible_description_row;
GtkWidget *accessible_description;
GtkWidget *mapped_row;
GtkWidget *mapped;
GtkWidget *realized_row;
@@ -325,6 +329,12 @@ gtk_inspector_misc_info_set_object (GtkInspectorMiscInfo *sl,
gtk_widget_set_visible (sl->priv->mapped, gtk_widget_get_mapped (GTK_WIDGET (sl->priv->object)));
gtk_widget_show (sl->priv->mapped_row);
gtk_label_set_text (GTK_LABEL (sl->priv->accessible_name), atk_object_get_name (accessible));
gtk_widget_show (sl->priv->accessible_name);
gtk_label_set_text (GTK_LABEL (sl->priv->accessible_description), atk_object_get_description (accessible));
gtk_widget_show (sl->priv->accessible_description);
gtk_widget_set_visible (sl->priv->realized, gtk_widget_get_realized (GTK_WIDGET (sl->priv->object)));
gtk_widget_show (sl->priv->realized_row);
@@ -341,6 +351,8 @@ gtk_inspector_misc_info_set_object (GtkInspectorMiscInfo *sl,
gtk_widget_hide (sl->priv->allocated_size_row);
gtk_widget_hide (sl->priv->clip_area_row);
gtk_widget_hide (sl->priv->accessible_role_row);
gtk_widget_hide (sl->priv->accessible_name_row);
gtk_widget_hide (sl->priv->accessible_description_row);
gtk_widget_hide (sl->priv->mapped_row);
gtk_widget_hide (sl->priv->realized_row);
gtk_widget_hide (sl->priv->is_toplevel_row);
@@ -454,6 +466,10 @@ gtk_inspector_misc_info_class_init (GtkInspectorMiscInfoClass *klass)
gtk_widget_class_bind_template_child_private (widget_class, GtkInspectorMiscInfo, clip_area);
gtk_widget_class_bind_template_child_private (widget_class, GtkInspectorMiscInfo, accessible_role_row);
gtk_widget_class_bind_template_child_private (widget_class, GtkInspectorMiscInfo, accessible_role);
gtk_widget_class_bind_template_child_private (widget_class, GtkInspectorMiscInfo, accessible_name_row);
gtk_widget_class_bind_template_child_private (widget_class, GtkInspectorMiscInfo, accessible_name);
gtk_widget_class_bind_template_child_private (widget_class, GtkInspectorMiscInfo, accessible_description_row);
gtk_widget_class_bind_template_child_private (widget_class, GtkInspectorMiscInfo, accessible_description);
gtk_widget_class_bind_template_child_private (widget_class, GtkInspectorMiscInfo, mapped_row);
gtk_widget_class_bind_template_child_private (widget_class, GtkInspectorMiscInfo, mapped);
gtk_widget_class_bind_template_child_private (widget_class, GtkInspectorMiscInfo, realized_row);

View File

@@ -308,6 +308,74 @@
</object>
</child>
<child>
<object class="GtkListBoxRow" id="accessible_name_row">
<property name="visible">true</property>
<property name="activatable">false</property>
<child>
<object class="GtkBox">
<property name="visible">true</property>
<property name="orientation">horizontal</property>
<property name="margin">10</property>
<property name="spacing">40</property>
<child>
<object class="GtkLabel">
<property name="visible">true</property>
<property name="label" translatable="yes">Accessible name</property>
<property name="halign">start</property>
<property name="valign">baseline</property>
<property name="xalign">0</property>
</object>
<packing>
<property name="expand">true</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="accessible_name">
<property name="visible">true</property>
<property name="halign">end</property>
<property name="valign">baseline</property>
</object>
</child>
</object>
</child>
</object>
</child>
<child>
<object class="GtkListBoxRow" id="accessible_description_row">
<property name="visible">true</property>
<property name="activatable">false</property>
<child>
<object class="GtkBox">
<property name="visible">true</property>
<property name="orientation">horizontal</property>
<property name="margin">10</property>
<property name="spacing">40</property>
<child>
<object class="GtkLabel">
<property name="visible">true</property>
<property name="label" translatable="yes">Accessible description</property>
<property name="halign">start</property>
<property name="valign">baseline</property>
<property name="xalign">0</property>
</object>
<packing>
<property name="expand">true</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="accessible_description">
<property name="visible">true</property>
<property name="halign">end</property>
<property name="valign">baseline</property>
</object>
</child>
</object>
</child>
</object>
</child>
<child>
<object class="GtkListBoxRow" id="mapped_row">
<property name="visible">true</property>

View File

@@ -8,6 +8,8 @@ N_("Mnemonic Label");
N_("Allocated size");
N_("Clip area");
N_("Accessible role");
N_("Accessible name");
N_("Accessible description");
N_("Mapped");
N_("Realized");
N_("Is Toplevel");