widget: Apply paragraph direction when language is changed 80/76080/4
authorYoungbok Shin <youngb.shin@samsung.com>
Wed, 22 Jun 2016 14:58:37 +0000 (23:58 +0900)
committerYoungbok Shin <youngb.shin@samsung.com>
Thu, 23 Jun 2016 10:47:41 +0000 (03:47 -0700)
@tizen_feature

Change-Id: I2eed979e67a08e81470e14aa14f2699f16b4870b

src/lib/elm_win.c

index 02c266f..e570cc3 100644 (file)
@@ -2772,8 +2772,20 @@ _elm_win_translate(void)
    const Eina_List *l;
    Evas_Object *obj;
 
+   /* TIZEN_ONLY(20160622): Apply paragraph direction when language is changed
    EINA_LIST_FOREACH(_elm_win_list, l, obj)
      elm_widget_translate(obj);
+    */
+   EINA_LIST_FOREACH(_elm_win_list, l, obj)
+     {
+        if (!strcmp(E_("default:LTR"), "default:RTL"))
+          evas_object_paragraph_direction_set(obj, EVAS_BIDI_DIRECTION_RTL);
+        else
+          evas_object_paragraph_direction_set(obj, EVAS_BIDI_DIRECTION_LTR);
+
+        elm_widget_translate(obj);
+     }
+   /* END */
 }
 
 void
@@ -4393,6 +4405,14 @@ _elm_win_finalize_internal(Eo *obj, Elm_Win_Data *sd, const char *name, Elm_Win_
         _elm_win_resize_job(obj);
         _elm_win_move(sd->ee);
      }
+
+   /* TIZEN_ONLY(20160622): Apply paragraph direction when language is changed */
+   if (!strcmp(E_("default:LTR"), "default:RTL"))
+     evas_object_paragraph_direction_set(obj, EVAS_BIDI_DIRECTION_RTL);
+   else
+     evas_object_paragraph_direction_set(obj, EVAS_BIDI_DIRECTION_LTR);
+   /* END */
+
    return obj;
 }