[gtk/issue-137] Set the a11y name of the "create folder" button
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/issue-137] Set the a11y name of the "create folder" button
- Date: Mon, 1 Apr 2019 13:45:39 +0000 (UTC)
commit 6ed7d60a20a90ab6a0fe28b3fcb58527f378c57c
Author: Emmanuele Bassi <ebassi gnome org>
Date: Mon Apr 1 14:42:43 2019 +0100
Set the a11y name of the "create folder" button
Otherwise it'll get a generic "Menu" name.
https://gitlab.gnome.org/GNOME/gtk/issues/137
gtk/gtkfilechooserwidget.c | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
---
diff --git a/gtk/gtkfilechooserwidget.c b/gtk/gtkfilechooserwidget.c
index 5cdb208ff7..ce708670c9 100644
--- a/gtk/gtkfilechooserwidget.c
+++ b/gtk/gtkfilechooserwidget.c
@@ -22,6 +22,7 @@
#include "gtkfilechooserwidget.h"
#include "gtkfilechooserwidgetprivate.h"
+#include "gtkaccessible.h"
#include "gtkbindings.h"
#include "gtkbutton.h"
#include "gtkcelllayout.h"
@@ -8502,9 +8503,10 @@ static void
post_process_ui (GtkFileChooserWidget *impl)
{
GtkTreeSelection *selection;
- GtkCellRenderer *cell;
- GList *cells;
- GFile *file;
+ GtkCellRenderer *cell;
+ AtkObject *atk_obj;
+ GList *cells;
+ GFile *file;
/* Some qdata, qdata can't be set with GtkBuilder */
g_object_set_data (G_OBJECT (impl->priv->browse_files_tree_view), "fmq-name", "file_list");
@@ -8559,6 +8561,10 @@ post_process_ui (GtkFileChooserWidget *impl)
*/
set_icon_cell_renderer_fixed_size (impl);
+ atk_obj = gtk_widget_get_accessible (impl->priv->browse_new_folder_button);
+ if (GTK_IS_ACCESSIBLE (atk_obj))
+ atk_object_set_name (atk_obj, _("Create Folder"));
+
gtk_popover_set_default_widget (GTK_POPOVER (impl->priv->new_folder_popover),
impl->priv->new_folder_create_button);
gtk_popover_set_default_widget (GTK_POPOVER (impl->priv->rename_file_popover),
impl->priv->rename_file_rename_button);
gtk_popover_set_relative_to (GTK_POPOVER (impl->priv->rename_file_popover),
impl->priv->browse_files_tree_view);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]