[gtk+/gtk-3-14] inspector: show accessible name and description
- From: Vadim Rutkovsky <vrutkovsky src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-3-14] inspector: show accessible name and description
- Date: Thu, 19 Mar 2015 16:35:33 +0000 (UTC)
commit f12e76c61fcd12d3142b1fff789edb2af08b2587
Author: Vadim Rutkovsky <vrutkovs redhat com>
Date: Thu Mar 19 12:00:01 2015 +0100
inspector: show accessible name and description
https://bugzilla.gnome.org/show_bug.cgi?id=746458
gtk/inspector/misc-info.c | 16 ++++++++++
gtk/inspector/misc-info.ui | 68 ++++++++++++++++++++++++++++++++++++++++++
gtk/inspector/misc-info.ui.h | 2 +
3 files changed, 86 insertions(+), 0 deletions(-)
---
diff --git a/gtk/inspector/misc-info.c b/gtk/inspector/misc-info.c
index cd99658..34ff8f5 100644
--- a/gtk/inspector/misc-info.c
+++ b/gtk/inspector/misc-info.c
@@ -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);
diff --git a/gtk/inspector/misc-info.ui b/gtk/inspector/misc-info.ui
index e357d43..eb4b5b1 100644
--- a/gtk/inspector/misc-info.ui
+++ b/gtk/inspector/misc-info.ui
@@ -309,6 +309,74 @@
</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>
<property name="activatable">false</property>
diff --git a/gtk/inspector/misc-info.ui.h b/gtk/inspector/misc-info.ui.h
index 1d4dee8..8e03cd7 100644
--- a/gtk/inspector/misc-info.ui.h
+++ b/gtk/inspector/misc-info.ui.h
@@ -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");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]