[accerciser] Show accessible ID



commit 63ff90715463b83b5e9eea4d95cd4f618e29020b
Author: Samuel Thibault <samuel thibault ens-lyon org>
Date:   Tue Apr 30 18:46:08 2019 +0200

    Show accessible ID

 plugins/interface_view.py |  5 +++++
 plugins/interface_view.ui | 50 +++++++++++++++++++++++++++++++++++++++++++++--
 po/fr.po                  |  5 +++++
 3 files changed, 58 insertions(+), 2 deletions(-)
---
diff --git a/plugins/interface_view.py b/plugins/interface_view.py
index 7a65364..56631fb 100644
--- a/plugins/interface_view.py
+++ b/plugins/interface_view.py
@@ -308,6 +308,7 @@ class _SectionAccessible(_InterfaceSection):
     # Child count and description labels
     self.child_count_label = ui_xml.get_object('label_acc_child count')
     self.desc_label = ui_xml.get_object('label_acc_desc')
+    self.id_label = ui_xml.get_object('label_acc_id')
 
     # configure states tree view
     self.states_model = ui_xml.get_object('states_liststore')
@@ -341,6 +342,10 @@ class _SectionAccessible(_InterfaceSection):
 
     self.child_count_label.set_text(str(acc.childCount))
     self.desc_label.set_label(acc.description or _('(no description)'))
+    if 'accessibleId' in dir(acc) and acc.accessibleId:
+        self.id_label.set_label(acc.accessibleId)
+    else:
+        self.id_label.set_label(_('(no id)'))
 
     states = [pyatspi.stateToString(s) for s in acc.getState().getStates()]
     states.sort()
diff --git a/plugins/interface_view.ui b/plugins/interface_view.ui
index 4f69bab..c052338 100644
--- a/plugins/interface_view.ui
+++ b/plugins/interface_view.ui
@@ -203,6 +203,52 @@
                             <property name="position">1</property>
                           </packing>
                         </child>
+                        <child>
+                          <object class="GtkFrame">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | 
GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="label_xalign">0</property>
+                            <property name="shadow_type">none</property>
+                            <child>
+                              <object class="GtkAlignment">
+                                <property name="visible">True</property>
+                                <property name="can_focus">False</property>
+                                <property name="events">GDK_POINTER_MOTION_MASK | 
GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                <property name="left_padding">12</property>
+                                <child>
+                                  <object class="GtkLabel" id="label_acc_id">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
+                                    <property name="events">GDK_POINTER_MOTION_MASK | 
GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                    <property name="label" translatable="yes">(no id)</property>
+                                    <property name="selectable">True</property>
+                                    <property name="xalign">0</property>
+                                    <attributes>
+                                      <attribute name="style" value="italic"/>
+                                    </attributes>
+                                  </object>
+                                </child>
+                              </object>
+                            </child>
+                            <child type="label">
+                              <object class="GtkLabel">
+                                <property name="visible">True</property>
+                                <property name="can_focus">False</property>
+                                <property name="events">GDK_POINTER_MOTION_MASK | 
GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                <property name="label" translatable="yes">Id</property>
+                                <attributes>
+                                  <attribute name="weight" value="bold"/>
+                                </attributes>
+                              </object>
+                            </child>
+                          </object>
+                          <packing>
+                            <property name="expand">True</property>
+                            <property name="fill">True</property>
+                            <property name="position">2</property>
+                          </packing>
+                        </child>
                         <child>
                           <object class="GtkHBox" id="hbox6">
                             <property name="visible">True</property>
@@ -356,7 +402,7 @@
                           <packing>
                             <property name="expand">True</property>
                             <property name="fill">True</property>
-                            <property name="position">2</property>
+                            <property name="position">3</property>
                           </packing>
                         </child>
                         <child>
@@ -497,7 +543,7 @@
                           <packing>
                             <property name="expand">True</property>
                             <property name="fill">True</property>
-                            <property name="position">3</property>
+                            <property name="position">4</property>
                           </packing>
                         </child>
                       </object>
diff --git a/po/fr.po b/po/fr.po
index e561834..784d06c 100644
--- a/po/fr.po
+++ b/po/fr.po
@@ -306,6 +306,11 @@ msgstr "0"
 msgid "(no description)"
 msgstr "(aucune description)"
 
+#: ../plugins/interface_view.ui.h:3 ../plugins/interface_view.py:343
+#: ../plugins/interface_view.py:859
+msgid "(no id)"
+msgstr "(aucun identifiant)"
+
 #. add description to buffer
 #: ../plugins/interface_view.ui.h:4 ../plugins/validate.py:229
 #: ../plugins/validate.py:292


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]