]> Pileus Git - ~andy/gtk/commitdiff
Add a test for setting accessible name from gtkbuilder
authorMatthias Clasen <mclasen@redhat.com>
Sun, 10 Feb 2013 20:22:24 +0000 (15:22 -0500)
committerMatthias Clasen <mclasen@redhat.com>
Sun, 10 Feb 2013 20:47:08 +0000 (15:47 -0500)
This is wrongly documented in the GtkWidget docs.

tests/a11y/buttons.txt
tests/a11y/buttons.ui

index 075e2757d05b56c99350b874f918bd519731f9d6..6b1fd88acabc5e5d1d269dbde17a89c2ccd80895 100644 (file)
@@ -15,10 +15,24 @@ window1
     <AtkComponent>
     layer: widget
     alpha: 1
-    button5
+    button6
       "toggle button"
       parent: grid1
       index: 0
+      name: Test switch
+      description: Switches between on and off states
+      state: enabled focusable sensitive showing visible
+      toolkit: gtk
+      <AtkComponent>
+      layer: widget
+      alpha: 1
+      <AtkAction>
+      action 0 name: toggle
+      action 0 description: Toggles the switch
+    button5
+      "toggle button"
+      parent: grid1
+      index: 1
       name: Switch
       description: Switches between on and off states
       state: checked enabled focusable sensitive showing visible
@@ -32,7 +46,7 @@ window1
     button4
       "radio button"
       parent: grid1
-      index: 1
+      index: 2
       name: Hello World!
       member-of: button4
                  button3
@@ -50,7 +64,7 @@ window1
     button3
       "radio button"
       parent: grid1
-      index: 2
+      index: 3
       name: Hello World!
       member-of: button4
                  button3
@@ -68,7 +82,7 @@ window1
     button2
       "check box"
       parent: grid1
-      index: 3
+      index: 4
       name: Hello World!
       state: enabled focusable sensitive showing visible
       toolkit: gtk
@@ -84,7 +98,7 @@ window1
     button1
       "toggle button"
       parent: grid1
-      index: 4
+      index: 5
       name: Hello World!
       state: armed checked enabled focusable sensitive showing visible
       toolkit: gtk
index 88cbc0db6f20ce5cf9b6cfb264375d8528ac9435..b229bbb4a7c5173295f4f0845ff84f600a01972b 100644 (file)
             <property name="top_attach">0</property>
           </packing>
         </child>
+        <child>
+          <object class="GtkSwitch" id="button6">
+            <property name="visible">True</property>
+            <property name="active">False</property>
+            <property name="can_focus">True</property>
+            <property name="receives_default">True</property>
+            <child internal-child="accessible">
+              <object class="AtkObject" id="button6-accessible">
+                <property name="accessible-name">Test switch</property>
+              </object>
+            </child>
+          </object>
+          <packing>
+            <property name="left_attach">5</property>
+            <property name="top_attach">0</property>
+          </packing>
+        </child>
       </object>
     </child>
   </object>