]> Pileus Git - ~andy/gtk/commitdiff
a11y: Remove "press" and "release" actions from buttons
authorBenjamin Otte <otte@redhat.com>
Tue, 28 Jun 2011 17:13:43 +0000 (19:13 +0200)
committerMatthias Clasen <mclasen@redhat.com>
Tue, 5 Jul 2011 20:08:55 +0000 (16:08 -0400)
http://mail.gnome.org/archives/gnome-accessibility-devel/2011-June/msg00020.html
has some details about this.
The main problem is that the internal button states get fiddled with and
that is not a good idea to do from an AT.

Also update tests to reflect that.

13 files changed:
gtk/a11y/gailbutton.c
tests/a11y/about.txt
tests/a11y/accessible-name.txt
tests/a11y/appchooser.txt
tests/a11y/assistant.txt
tests/a11y/buttons.txt
tests/a11y/colorchooser.txt
tests/a11y/hello-world.txt
tests/a11y/link.txt
tests/a11y/lockbutton.txt
tests/a11y/notebook.txt
tests/a11y/pickers.txt
tests/a11y/tree.txt

index a15f5752c69876f21bb8baa593ad8f7182fb9669..255786e8f34b793296b8d8d8eeef7e1a9a31d8f6 100644 (file)
@@ -511,30 +511,6 @@ idle_do_action (gpointer data)
           */
          g_signal_emit_by_name (button, "leave");
          break;
-       case 1:
-          /* FIXME: Do not access public member
-         button->in_button = TRUE;
-          */
-         g_signal_emit_by_name (button, "enter");
-         /*
-          * Simulate a button press event. calling gtk_button_pressed() does
-          * not get the job done for a GtkOptionMenu.  
-          */
-         tmp_event.button.type = GDK_BUTTON_PRESS;
-         tmp_event.button.window = window;
-         tmp_event.button.button = 1;
-         tmp_event.button.send_event = TRUE;
-         tmp_event.button.time = GDK_CURRENT_TIME;
-         tmp_event.button.axes = NULL;
-         
-         gtk_widget_event (widget, &tmp_event);
-         break;
-       case 2:
-          /* FIXME: Do not access public member
-         button->in_button = FALSE;
-          */
-         g_signal_emit_by_name (button, "leave");
-         break;
        default:
          g_assert_not_reached ();
          break;
@@ -547,7 +523,7 @@ idle_do_action (gpointer data)
 static gint
 gail_button_get_n_actions (AtkAction *action)
 {
-  return 3;
+  return 1;
 }
 
 static const gchar*
@@ -639,23 +615,6 @@ gail_button_action_get_name (AtkAction *action,
        */ 
       return_value = "click";
       break;
-    case 1:
-      /*
-       * This action simulates a button press by simulating moving the
-       * mouse into the button followed by pressing the left mouse button.
-       */
-      return_value = "press";
-      break;
-    case 2:
-      /*
-       * This action simulates releasing the left mouse button outside the 
-       * button.
-       *
-       * To simulate releasing the left mouse button inside the button use
-       * the click action.
-       */
-      return_value = "release";
-      break;
     default:
       return_value = NULL;
       break;
index 0e89431cb70a292688e4785b37ba90d19635ac48..6bf8e886d9290a313cdef992ef1b7e95d4a4d862 100644 (file)
@@ -368,8 +368,6 @@ window1
         <AtkAction>
         action 0 name: click
         action 0 keybinding: <Alt>l
-        action 1 name: press
-        action 2 name: release
       Credits
         "toggle button"
         parent: unnamed-GailContainer-7
@@ -417,8 +415,6 @@ window1
         <AtkAction>
         action 0 name: click
         action 0 keybinding: <Alt>r
-        action 1 name: press
-        action 2 name: release
       Close
         "push button"
         parent: unnamed-GailContainer-7
@@ -466,5 +462,3 @@ window1
         <AtkAction>
         action 0 name: click
         action 0 keybinding: <Alt>c
-        action 1 name: press
-        action 2 name: release
index ce590a69f5e166bf0f28c27b122114122a4fae0c..43356e77ab6f24eba84b08e396a0da2608d3374f 100644 (file)
@@ -52,5 +52,3 @@ window1
     image description: (null)
     <AtkAction>
     action 0 name: click
-    action 1 name: press
-    action 2 name: release
index ea0ba6ce4263379c98f5dc3ffa767c75613abc11..8368528c5cfab8ea386ecab09e03bf5cba411004 100644 (file)
@@ -153,8 +153,6 @@ window1
                 image description: (null)
                 <AtkAction>
                 action 0 name: click
-                action 1 name: press
-                action 2 name: release
               
                 "table column header"
                 parent: unnamed-GailTreeView-5
@@ -201,8 +199,6 @@ window1
                 image description: (null)
                 <AtkAction>
                 action 0 name: click
-                action 1 name: press
-                action 2 name: release
               unnamed-GailContainerCell-6
                 "table cell"
                 parent: unnamed-GailTreeView-5
@@ -474,8 +470,6 @@ Click "Show other applications", for more options, or "Find applications online"
             image description: (null)
             <AtkAction>
             action 0 name: click
-            action 1 name: press
-            action 2 name: release
     unnamed-GailContainer-10
       "filler"
       parent: unnamed-GailContainer-0
@@ -532,8 +526,6 @@ Click "Show other applications", for more options, or "Find applications online"
         <AtkAction>
         action 0 name: click
         action 0 keybinding: <Alt>s
-        action 1 name: press
-        action 2 name: release
       Cancel
         "push button"
         parent: unnamed-GailContainer-10
@@ -581,5 +573,3 @@ Click "Show other applications", for more options, or "Find applications online"
         <AtkAction>
         action 0 name: click
         action 0 keybinding: <Alt>c
-        action 1 name: press
-        action 2 name: release
index 7c061e5b5c0e8f47b66415e6e999614e4e69ac3a..889f1c5c369981cc0b8bb725ccd92328962bc48a 100644 (file)
@@ -51,8 +51,6 @@ window1
     image description: (null)
     <AtkAction>
     action 0 name: click
-    action 1 name: press
-    action 2 name: release
   button2
     "push button"
     index: 1
@@ -98,8 +96,6 @@ window1
     image description: (null)
     <AtkAction>
     action 0 name: click
-    action 1 name: press
-    action 2 name: release
   unnamed-GailContainer-0
     "filler"
     parent: unnamed-GailContainer-1
@@ -156,8 +152,6 @@ window1
       <AtkAction>
       action 0 name: click
       action 0 keybinding: <Alt>c
-      action 1 name: press
-      action 2 name: release
     Cancel
       "push button"
       parent: unnamed-GailContainer-0
@@ -205,8 +199,6 @@ window1
       <AtkAction>
       action 0 name: click
       action 0 keybinding: <Alt>c
-      action 1 name: press
-      action 2 name: release
     Finish
       "push button"
       parent: unnamed-GailContainer-0
@@ -254,8 +246,6 @@ window1
       <AtkAction>
       action 0 name: click
       action 0 keybinding: <Alt>f
-      action 1 name: press
-      action 2 name: release
     Go Back
       "push button"
       parent: unnamed-GailContainer-0
@@ -303,8 +293,6 @@ window1
       <AtkAction>
       action 0 name: click
       action 0 keybinding: <Alt>b
-      action 1 name: press
-      action 2 name: release
     Continue
       "push button"
       parent: unnamed-GailContainer-0
@@ -352,8 +340,6 @@ window1
       <AtkAction>
       action 0 name: click
       action 0 keybinding: <Alt>o
-      action 1 name: press
-      action 2 name: release
     Apply
       "push button"
       parent: unnamed-GailContainer-0
@@ -401,5 +387,3 @@ window1
       <AtkAction>
       action 0 name: click
       action 0 keybinding: <Alt>a
-      action 1 name: press
-      action 2 name: release
index 74fa49fc14a3653a1a5418a96b0d1cda2b118c00..0f58210c783f202297238689d670d24cd4419b90 100644 (file)
@@ -76,8 +76,6 @@ window1
       image description: (null)
       <AtkAction>
       action 0 name: click
-      action 1 name: press
-      action 2 name: release
     button3
       "radio button"
       parent: grid1
@@ -126,8 +124,6 @@ window1
       image description: (null)
       <AtkAction>
       action 0 name: click
-      action 1 name: press
-      action 2 name: release
     button2
       "check box"
       parent: grid1
@@ -174,8 +170,6 @@ window1
       image description: (null)
       <AtkAction>
       action 0 name: click
-      action 1 name: press
-      action 2 name: release
     button1
       "toggle button"
       parent: grid1
@@ -222,5 +216,3 @@ window1
       image description: (null)
       <AtkAction>
       action 0 name: click
-      action 1 name: press
-      action 2 name: release
index aeeec2d6f6df4670f076b5d19fcd4804d755b606..a14baf769d2216bfea3dc62cfd3fbf5af931dd4b 100644 (file)
@@ -121,8 +121,6 @@ window1
               image description: (null)
               <AtkAction>
               action 0 name: click
-              action 1 name: press
-              action 2 name: release
         unnamed-GailContainer-11
           "filler"
           parent: unnamed-GailContainer-2
@@ -1362,8 +1360,6 @@ window1
         <AtkAction>
         action 0 name: click
         action 0 keybinding: <Alt>h
-        action 1 name: press
-        action 2 name: release
       OK
         "push button"
         parent: unnamed-GailContainer-57
@@ -1411,8 +1407,6 @@ window1
         <AtkAction>
         action 0 name: click
         action 0 keybinding: <Alt>o
-        action 1 name: press
-        action 2 name: release
       Cancel
         "push button"
         parent: unnamed-GailContainer-57
@@ -1460,5 +1454,3 @@ window1
         <AtkAction>
         action 0 name: click
         action 0 keybinding: <Alt>c
-        action 1 name: press
-        action 2 name: release
index 093413102fe6cf7cc586ec42342071bc61f89242..feb415a4b5a92fee94fd3af55d5895e82bc59e13 100644 (file)
@@ -52,5 +52,3 @@ window1
     image description: (null)
     <AtkAction>
     action 0 name: click
-    action 1 name: press
-    action 2 name: release
index 89901b8a7babd9b435e26658d8867202da525802..3dd8a184369617965bd60388a9fdde2f3dfd8a9a 100644 (file)
@@ -52,7 +52,5 @@ window1
     image description: (null)
     <AtkAction>
     action 0 name: click
-    action 1 name: press
-    action 2 name: release
     <AtkHyperlinkImpl>
     anchors: http://www.gtk.org
index f4e20138c49c174d32f4af847e6a3d37e989ec31..508c966336d5413ff4be18455e704ba2bd5d4cd0 100644 (file)
@@ -26,8 +26,6 @@ Click to prevent further changes
     image description: (null)
     <AtkAction>
     action 0 name: click
-    action 1 name: press
-    action 2 name: release
     Lock
       "label"
       parent: button1
index 419f3bbaaeb27c254526e39863b2fbb39fbe12f1..c363093e0da71764d6036222dc5f11c72b074ac8 100644 (file)
@@ -104,8 +104,6 @@ window1
         <AtkAction>
         action 0 name: click
         action 0 keybinding: <Alt>y
-        action 1 name: press
-        action 2 name: release
     Tab 2
       "page tab"
       parent: notebook1
@@ -192,5 +190,3 @@ window1
         <AtkAction>
         action 0 name: click
         action 0 keybinding: <Alt>n
-        action 1 name: press
-        action 2 name: release
index 85b80d198d609d4f1509704ff6dd46ec40556755..eb049375b8e9428a0cd17c658812c2664a355380 100644 (file)
@@ -70,8 +70,6 @@ window1
         image description: (null)
         <AtkAction>
         action 0 name: click
-        action 1 name: press
-        action 2 name: release
       unnamed-GailComboBox-0
         "combo box"
         parent: button4
@@ -176,8 +174,6 @@ window1
       image description: (null)
       <AtkAction>
       action 0 name: click
-      action 1 name: press
-      action 2 name: release
       Sans
         "label"
         parent: button3
@@ -274,8 +270,6 @@ window1
       image description: (null)
       <AtkAction>
       action 0 name: click
-      action 1 name: press
-      action 2 name: release
     button1
       "combo box"
       parent: grid1
index 8963b60d414a498609af7baf5bce198e96f19748..cef74987a333ca47c9f220e030e622875c566da0 100644 (file)
@@ -70,8 +70,6 @@ window1
       image description: (null)
       <AtkAction>
       action 0 name: click
-      action 1 name: press
-      action 2 name: release
     column 1 description: Column 2
     <column 1 header>
     Column 2
@@ -120,8 +118,6 @@ window1
       image description: (null)
       <AtkAction>
       action 0 name: click
-      action 1 name: press
-      action 2 name: release
     Column 1
       "table column header"
       parent: tree1
@@ -168,8 +164,6 @@ window1
       image description: (null)
       <AtkAction>
       action 0 name: click
-      action 1 name: press
-      action 2 name: release
     Column 2
       "table column header"
       parent: tree1
@@ -216,8 +210,6 @@ window1
       image description: (null)
       <AtkAction>
       action 0 name: click
-      action 1 name: press
-      action 2 name: release
     One
       "table cell"
       parent: tree1