diff options
author | Vadim Rutkovsky <vrutkovs@redhat.com> | 2015-03-19 12:00:01 +0100 |
---|---|---|
committer | Vadim Rutkovsky <vrutkovs@redhat.com> | 2015-03-19 17:01:23 +0100 |
commit | 3211e82b593fd1c76f5962d03f8ba3807f38ada6 (patch) | |
tree | 10ad4a5d5cee49d654b73547d46645de475a6d90 | |
parent | 6c8c37abbb641f3959ab45a5de4adb2aeb36f653 (diff) | |
download | gtk+-3211e82b593fd1c76f5962d03f8ba3807f38ada6.tar.gz |
inspector: show accessible name and description
-rw-r--r-- | gtk/inspector/misc-info.c | 14 | ||||
-rw-r--r-- | gtk/inspector/misc-info.ui | 68 | ||||
-rw-r--r-- | gtk/inspector/misc-info.ui.h | 2 |
3 files changed, 84 insertions, 0 deletions
diff --git a/gtk/inspector/misc-info.c b/gtk/inspector/misc-info.c index d390c16abd..c3496b88a3 100644 --- a/gtk/inspector/misc-info.c +++ b/gtk/inspector/misc-info.c @@ -63,6 +63,10 @@ struct _GtkInspectorMiscInfoPrivate { GtkWidget *framecount; 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; @@ -316,6 +320,8 @@ update_info (gpointer data) accessible = ATK_OBJECT (gtk_widget_get_accessible (GTK_WIDGET (sl->priv->object))); role = atk_object_get_role (accessible); gtk_label_set_text (GTK_LABEL (sl->priv->accessible_role), atk_role_get_name (role)); + gtk_label_set_text (GTK_LABEL (sl->priv->accessible_name), atk_object_get_name (accessible)); + gtk_label_set_text (GTK_LABEL (sl->priv->accessible_description), atk_object_get_description (accessible)); gtk_widget_set_visible (sl->priv->mapped, gtk_widget_get_mapped (GTK_WIDGET (sl->priv->object))); gtk_widget_set_visible (sl->priv->realized, gtk_widget_get_realized (GTK_WIDGET (sl->priv->object))); gtk_widget_set_visible (sl->priv->is_toplevel, gtk_widget_is_toplevel (GTK_WIDGET (sl->priv->object))); @@ -407,6 +413,8 @@ gtk_inspector_misc_info_set_object (GtkInspectorMiscInfo *sl, gtk_widget_show (sl->priv->mnemonic_label_row); gtk_widget_show (sl->priv->tick_callback_row); gtk_widget_show (sl->priv->accessible_role_row); + gtk_widget_show (sl->priv->accessible_name_row); + gtk_widget_show (sl->priv->accessible_description_row); gtk_widget_show (sl->priv->mapped_row); gtk_widget_show (sl->priv->realized_row); gtk_widget_show (sl->priv->is_toplevel_row); @@ -426,6 +434,8 @@ gtk_inspector_misc_info_set_object (GtkInspectorMiscInfo *sl, gtk_widget_hide (sl->priv->clip_area_row); gtk_widget_hide (sl->priv->tick_callback_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); @@ -581,6 +591,10 @@ gtk_inspector_misc_info_class_init (GtkInspectorMiscInfoClass *klass) gtk_widget_class_bind_template_child_private (widget_class, GtkInspectorMiscInfo, framerate); 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 c51814d5a5..558188e6ef 100644 --- a/gtk/inspector/misc-info.ui +++ b/gtk/inspector/misc-info.ui @@ -492,6 +492,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 d843c0902d..2c00397984 100644 --- a/gtk/inspector/misc-info.ui.h +++ b/gtk/inspector/misc-info.ui.h @@ -13,6 +13,8 @@ N_("Tick callback"); N_("Frame count"); N_("Frame rate"); N_("Accessible role"); +N_("Accessible name"); +N_("Accessible description"); N_("Mapped"); N_("Realized"); N_("Is Toplevel"); |