]> Pileus Git - ~andy/gtk/blobdiff - gtk/a11y/gtkcolorswatchaccessible.c
filechooser: Show FUSE mounted locations in shortcuts
[~andy/gtk] / gtk / a11y / gtkcolorswatchaccessible.c
index 825e25b4ca9cfe8c45537afbf060effe54bf11b9..6ad4138e5f9707910db9bc13ba994c9597a5576d 100644 (file)
@@ -1,4 +1,4 @@
-/*
+/* GTK+ - accessibility implementations
  * Copyright 2012 Red Hat, Inc
  *
  * This library is free software; you can redistribute it and/or
  * Lesser General Public License for more details.
  *
  * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
  */
 
 #include "config.h"
 
+#include <glib/gi18n-lib.h>
 #include <gtk/gtk.h>
-#include "gtkcolorswatchaccessible.h"
+#include "gtkcolorswatchaccessibleprivate.h"
 
 static void atk_action_interface_init (AtkActionIface *iface);
 
@@ -63,6 +62,32 @@ gtk_color_swatch_accessible_get_name (AtkAction *action,
     }
 }
 
+static const gchar *
+gtk_color_swatch_accessible_get_localized_name (AtkAction *action,
+                                                gint       i)
+{
+  switch (i)
+    {
+    case 0: return C_("Action name", "Select");
+    case 1: return C_("Action name", "Activate");
+    case 2: return C_("Action name", "Customize");
+    default: return NULL;
+    }
+}
+
+static const gchar *
+gtk_color_swatch_accessible_get_description (AtkAction *action,
+                                             gint       i)
+{
+  switch (i)
+    {
+    case 0: return C_("Action description", "Selects the color");
+    case 1: return C_("Action description", "Activates the color");
+    case 2: return C_("Action description", "Customizes the color");
+    default: return NULL;
+    }
+}
+
 static gboolean
 gtk_color_swatch_accessible_do_action (AtkAction *action,
                                        gint       i)
@@ -101,4 +126,6 @@ atk_action_interface_init (AtkActionIface *iface)
   iface->get_n_actions = gtk_color_swatch_accessible_get_n_actions;
   iface->get_keybinding = gtk_color_swatch_accessible_get_keybinding;
   iface->get_name = gtk_color_swatch_accessible_get_name;
+  iface->get_localized_name = gtk_color_swatch_accessible_get_localized_name;
+  iface->get_description = gtk_color_swatch_accessible_get_description;
 }