Read page index without a delay 60/271360/1 accepted/tizen/unified/20220310.120828 submit/tizen/20220307.015630
authorLukasz Oleksak <l.oleksak@samsung.com>
Fri, 18 Feb 2022 09:18:50 +0000 (10:18 +0100)
committerLukasz Oleksak <l.oleksak@samsung.com>
Fri, 18 Feb 2022 09:18:50 +0000 (10:18 +0100)
Change-Id: I6e9cccacf7f68506343b0c175f14f9b280a28fe4

src/reading_composer.c

index 59a19d5b834a494c67601693d827dd208ea30887..e7078addd2789ab1d984270547f422e45e7d6ea1 100644 (file)
@@ -120,8 +120,17 @@ TIZEN_PROD_STATIC char *generate_role_trait(AtspiAccessibleReadingMaterial *rm)
                GHashTable *hash_table = rm->attributes;
                if (hash_table) {
                        const char *style = g_hash_table_lookup(hash_table, "style");
-                       if (!g_strcmp0(style, "default"))
+                       if (!g_strcmp0(style, "default")) {
                                ESAL(buf, _("IDS_ACCS_TBOPT_ALPHABETICAL_INDEX_BAR"));
+                       } else if (!g_strcmp0(style, "pagecontrol")) {
+                               int child_count = rm->child_count;
+                               int idx = rm->first_selected_child_index;
+                               SUPPRESS_FORMAT_ERROR(eina_strbuf_append_printf(buf, _("IDS_ACCS_POP_PAGE_P1SD_OF_P2SD_M_DESCRIPTIVE_FORM_TTS"), idx + 1, child_count));
+                       } else if (!g_strcmp0(style, "pagecontrolbyvalue")) {
+                               int page_count = (int)rm->upper;
+                               int idx = (int)rm->value;
+                               SUPPRESS_FORMAT_ERROR(eina_strbuf_append_printf(buf, _("IDS_ACCS_POP_PAGE_P1SD_OF_P2SD_M_DESCRIPTIVE_FORM_TTS"), idx + 1, page_count));
+                       }
                }
                break;
        }
@@ -337,15 +346,7 @@ TIZEN_PROD_STATIC char *generate_description_trait(AtspiAccessibleReadingMateria
                GHashTable *hash_table = rm->attributes;
                if (hash_table) {
                        const char *style = g_hash_table_lookup(hash_table, "style");
-                       if (!g_strcmp0(style, "pagecontrol")) {
-                               int child_count = rm->child_count;
-                               int idx = rm->first_selected_child_index;
-                               SUPPRESS_FORMAT_ERROR(eina_strbuf_append_printf(buf, _("IDS_ACCS_POP_PAGE_P1SD_OF_P2SD_M_DESCRIPTIVE_FORM_TTS"), idx + 1, child_count));
-                       } else if (!g_strcmp0(style, "pagecontrolbyvalue")) {
-                               int page_count = (int)rm->upper;
-                               int idx = (int)rm->value;
-                               SUPPRESS_FORMAT_ERROR(eina_strbuf_append_printf(buf, _("IDS_ACCS_POP_PAGE_P1SD_OF_P2SD_M_DESCRIPTIVE_FORM_TTS"), idx + 1, page_count));
-                       } else {
+                       if (!g_strcmp0(style, "default")) {
                                ESAL(buf, _IGNORE_ON_TV("IDS_ACCS_TBBODY_SWIPE_RIGHT_OR_LEFT_WITH_ONE_FINGER_TO_SELECT_NEXT_OR_PREVIOUS_LETTER"));
                        }
                }