[caja] 01/01: debian/patches: Add 0002_emit_a11y-name-change_only_when_icons_renamed.patch. Emit accessible-name-change signal for icons only when icons are renamed.
Martin Wimpress
flexiondotorg-guest at moszumanska.debian.org
Mon Apr 23 16:22:13 BST 2018
This is an automated email from the git hooks/post-receive script.
flexiondotorg-guest pushed a commit to branch master
in repository caja.
commit b16e5767c35b29ccc8e18e388ddee5e6291b4fae
Author: Martin Wimpress <martin.wimpress at ubuntu.com>
Date: Mon Apr 23 16:20:19 2018 +0100
debian/patches: Add 0002_emit_a11y-name-change_only_when_icons_renamed.patch. Emit accessible-name-change signal for icons only when icons are renamed.
---
..._a11y-name-change_only_when_icons_renamed.patch | 50 ++++++++++++++++++++++
debian/patches/series | 1 +
2 files changed, 51 insertions(+)
diff --git a/debian/patches/0002_emit_a11y-name-change_only_when_icons_renamed.patch b/debian/patches/0002_emit_a11y-name-change_only_when_icons_renamed.patch
new file mode 100644
index 0000000..b65b441
--- /dev/null
+++ b/debian/patches/0002_emit_a11y-name-change_only_when_icons_renamed.patch
@@ -0,0 +1,50 @@
+Author: Joanmarie Diggs <jdiggs at igalia.com>
+Description: Emit accessible-name-change signal for icons only when icons are renamed
+ .
+ caja_icon_canvas_item_set_property was emitting accessible-name-change
+ signals whenever the PROP_EDITABLE_TEXT was being set for an icon. This
+ method is called by caja_icon_container_request_update_all when the icon
+ view is first loaded. Thus irrelevant events are being emitted (the name
+ of each icon didn't change, as far as the user is concerned). Furthermore,
+ this floods assistive technologies any time the user opens a folder with
+ a large number of files.
+ .
+ Moving the notification out of caja_icon_canvas_item_set_property and
+ into end_renaming_mode (where ICON_TEXT_CHANGED is also emitted) solves
+ the problem of floods of irrelevant notifications while still emitting
+ the signal when the name actually changes.
+
+diff --git a/libcaja-private/caja-icon-canvas-item.c b/libcaja-private/caja-icon-canvas-item.c
+index 7763811d..6751628b 100644
+--- a/libcaja-private/caja-icon-canvas-item.c
++++ b/libcaja-private/caja-icon-canvas-item.c
+@@ -379,7 +379,6 @@ caja_icon_canvas_item_set_property (GObject *object,
+ {
+ gail_text_util_text_setup (details->text_util,
+ details->editable_text);
+- g_object_notify (G_OBJECT(accessible), "accessible-name");
+ }
+
+ caja_icon_canvas_item_invalidate_label_size (item);
+diff --git a/libcaja-private/caja-icon-container.c b/libcaja-private/caja-icon-container.c
+index 5f941eab..3a434d32 100644
+--- a/libcaja-private/caja-icon-container.c
++++ b/libcaja-private/caja-icon-container.c
+@@ -9078,6 +9078,7 @@ end_renaming_mode (CajaIconContainer *container, gboolean commit)
+ {
+ CajaIcon *icon;
+ const char *changed_text;
++ AtkObject *accessible_icon;
+
+ set_pending_icon_to_rename (container, NULL);
+
+@@ -9110,6 +9111,9 @@ end_renaming_mode (CajaIconContainer *container, gboolean commit)
+ signals[ICON_TEXT_CHANGED], 0,
+ icon->data,
+ changed_text);
++
++ accessible_icon = atk_gobject_accessible_for_object (G_OBJECT(icon->item));
++ g_object_notify (G_OBJECT(accessible_icon), "accessible-name");
+ }
+ }
+
diff --git a/debian/patches/series b/debian/patches/series
index 6c7a762..b99ee97 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,4 @@
1001_use-correct-macros-to-cross-build.patch
0001_fix_random_segfaults.patch
1002_use-gio-open-instead-of-gvfs-open.patch
+0002_emit_a11y-name-change_only_when_icons_renamed.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mate/caja.git
More information about the pkg-mate-commits
mailing list