[screen-reader] Read the number of characters in password entry at the time insert... 60/81660/3
authorPrasoon Singh <prasoon.16@samsung.com>
Wed, 27 Jul 2016 13:11:59 +0000 (18:41 +0530)
committerPrasoon Singh <prasoon.16@samsung.com>
Thu, 28 Jul 2016 08:57:53 +0000 (14:27 +0530)
Change-Id: I056d36d66d916ab81add851360adba614efcfba4

res/po/en_US.po
src/app_tracker.c

index d3c1ccc5ab46dfdf4adeb694cf053cf463f1414c..8207b8c9f05b8c625d2d4a96eb4f464cb19351ad 100644 (file)
@@ -267,3 +267,6 @@ msgstr "Item dropped into position %d"
 
 msgid "IDS_TRAIT_ITEM_EDIT"
 msgstr "Double tap to edit"
+
+msgid "IDS_PASSWORD_CHARACTER_COUNT"
+msgstr "%d characters"
\ No newline at end of file
index 50406619dfe7928eefcff0e850f8e590c1e6267b..5a161935755790cc7962adcdf8da4316913e0d0a 100644 (file)
@@ -225,6 +225,19 @@ static void _on_atspi_event_cb(const AtspiEvent * event)
                        DEBUG("Text deleted :%s", buf);
                        tts_speak(buf, EINA_TRUE);
                }
+
+               if ((!strcmp(event->type, "object:text-changed:insert") || !strcmp(event->type, "object:text-changed:delete")) && atspi_accessible_get_role(event->source, NULL) == ATSPI_ROLE_PASSWORD_TEXT) {
+                       AtspiText *iface_text = NULL;
+                       char buf[64] = "\0";
+                       iface_text = atspi_accessible_get_text_iface(event->source);
+                       if (iface_text) {
+                               gint count = atspi_text_get_character_count(iface_text, NULL);
+                               snprintf(buf, sizeof(buf), _("IDS_PASSWORD_CHARACTER_COUNT"), count);
+                               g_object_unref(iface_text);
+                       }
+                       tts_speak(buf, EINA_TRUE);
+               }
+
        }
        if (!strcmp(event->type, "object:property-change:accessible-name") && _object_has_highlighted_state(event->source)) {
                gchar *name = atspi_accessible_get_name(event->source, NULL);