conr2d pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=bcb7eb99b3c0390d0708fd80b0ef6718848092fe

commit bcb7eb99b3c0390d0708fd80b0ef6718848092fe
Author: JinYong Park <[email protected]>
Date:   Fri Jun 2 16:25:11 2017 +0900

    popup: fix object_mirrored_set didn't work
    
    Summary:
    object_mirroed_set as opposed to config_mirrored_set doesn't work with
    popup. This patch broadcasts a change on 'mirrored' to internal notify,
    main layout, scroller and action area layout to make API work.
    
    @fix
    
    Reviewers: singh.amitesh, jpeg, conr2d, cedric, raster
    
    Reviewed By: conr2d
    
    Subscribers: herb
    
    Differential Revision: https://phab.enlightenment.org/D4900
---
 src/lib/elementary/elc_popup.c | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/src/lib/elementary/elc_popup.c b/src/lib/elementary/elc_popup.c
index 58a51c8f34..9608630783 100644
--- a/src/lib/elementary/elc_popup.c
+++ b/src/lib/elementary/elc_popup.c
@@ -280,6 +280,17 @@ _mirrored_set(Evas_Object *obj,
    ELM_POPUP_DATA_GET(obj, sd);
 
    elm_object_mirrored_set(sd->notify, rtl);
+   elm_object_mirrored_set(sd->main_layout, rtl);
+   if (sd->scr) elm_object_mirrored_set(sd->scr, rtl);
+   if (sd->action_area) elm_object_mirrored_set(sd->action_area, rtl);
+   if (sd->items)
+     {
+        Elm_Popup_Item_Data *it;
+        Eina_List *l;
+
+        EINA_LIST_FOREACH(sd->items, l, it)
+           elm_object_mirrored_set(VIEW(it), rtl);
+     }
 }
 
 static void
@@ -687,6 +698,8 @@ _create_scroller(Evas_Object *obj)
    elm_scroller_bounce_set(sd->scr, EINA_FALSE, EINA_TRUE);
    evas_object_event_callback_add(sd->scr, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
                                   _size_hints_changed_cb, obj);
+   elm_widget_mirrored_automatic_set(sd->scr, EINA_FALSE);
+   elm_object_mirrored_set(sd->scr, elm_object_mirrored_get(obj));
    elm_table_pack(sd->tbl, sd->scr, 0, 0, 1, 1);
    evas_object_show(sd->scr);
 }
@@ -914,6 +927,8 @@ _item_new(Elm_Popup_Item_Data *it)
 
    VIEW(it) = elm_layout_add(WIDGET(it));
    elm_object_focus_allow_set(VIEW(it), EINA_TRUE);
+   elm_widget_mirrored_automatic_set(VIEW(it), EINA_FALSE);
+   elm_object_mirrored_set(VIEW(it), elm_object_mirrored_get(WIDGET(it)));
 
    snprintf(style, sizeof(style), "popup/%s", 
elm_widget_style_get(WIDGET(it)));
    if (!elm_layout_theme_set(VIEW(it), "popup", "item", style))
@@ -1194,6 +1209,8 @@ _action_button_set(Evas_Object *obj,
         evas_object_event_callback_add
           (sd->action_area, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
            _size_hints_changed_cb, sd->main_layout);
+        elm_widget_mirrored_automatic_set(sd->action_area, EINA_FALSE);
+        elm_object_mirrored_set(sd->action_area, elm_object_mirrored_get(obj));
         efl_content_set(efl_part(sd->main_layout, "elm.swallow.action_area"), 
sd->action_area);
 
         _visuals_set(obj);
@@ -1512,6 +1529,8 @@ _elm_popup_efl_canvas_group_group_add(Eo *obj, 
Elm_Popup_Data *priv)
    evas_object_size_hint_align_set
      (priv->notify, EVAS_HINT_FILL, EVAS_HINT_FILL);
    evas_object_smart_member_add(priv->notify, obj);
+   elm_widget_mirrored_automatic_set(priv->notify, EINA_FALSE);
+   elm_object_mirrored_set(priv->notify, elm_object_mirrored_get(obj));
 
    evas_object_event_callback_add(priv->notify, EVAS_CALLBACK_RESIZE, 
_notify_resize_cb, obj);
 
@@ -1523,6 +1542,8 @@ _elm_popup_efl_canvas_group_group_add(Eo *obj, 
Elm_Popup_Data *priv)
    elm_object_content_set(priv->notify, priv->main_layout);
 
    evas_object_event_callback_add(obj, EVAS_CALLBACK_SHOW, _on_show, NULL);
+   elm_widget_mirrored_automatic_set(priv->main_layout, EINA_FALSE);
+   elm_object_mirrored_set(priv->main_layout, elm_object_mirrored_get(obj));
 
    elm_layout_signal_callback_add
      (priv->main_layout, "elm,state,title_area,visible", "elm", 
_layout_change_cb, NULL);

-- 


Reply via email to