orientation set through data parameter and not hardcoded in popup.
authorshilpa singh <shilpa.singh@samsung.com>
Tue, 31 Aug 2010 11:51:09 +0000 (20:51 +0900)
committershilpa singh <shilpa.singh@samsung.com>
Tue, 31 Aug 2010 11:51:09 +0000 (20:51 +0900)
src/lib/elm_popup.c

index 3876abe..7489102 100644 (file)
@@ -24,6 +24,7 @@ struct _Widget_Data
    Evas_Object *action_area;\r
    Eina_List *button_list;\r
    int rot_angle;\r
+   Elm_Notify_Orient notify_orient;\r
    Ecore_Job *del_job;\r
    Eina_Bool delete_me : 1;\r
 };\r
@@ -114,7 +115,7 @@ _theme_hook(Evas_Object *obj)
    \r
    if (!wd) return;\r
    elm_layout_theme_set(wd->layout, "popup", "base", elm_widget_style_get(obj));\r
-   elm_notify_orient_set(wd->notify, ELM_NOTIFY_ORIENT_CENTER);\r
+   elm_notify_orient_set(wd->notify, wd->notify_orient);\r
    edje_object_message_signal_process(elm_layout_edje_get(wd->layout));\r
    if (wd->title_area)\r
      {\r
@@ -372,6 +373,7 @@ elm_popup_add(Evas_Object *parent_app)
    wd->notify = elm_notify_add(parent);    \r
    elm_widget_resize_object_set(obj, wd->notify);\r
    elm_notify_orient_set(wd->notify, ELM_NOTIFY_ORIENT_CENTER);\r
+   wd->notify_orient = ELM_NOTIFY_ORIENT_CENTER;\r
    elm_notify_repeat_events_set(wd->notify, EINA_FALSE);\r
    evas_object_size_hint_weight_set(wd->notify, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);\r
    evas_object_size_hint_align_set(wd->notify, EVAS_HINT_FILL, EVAS_HINT_FILL);\r
@@ -854,6 +856,7 @@ elm_popup_orient_set(Evas_Object *obj, Elm_Popup_Orient orient)
        notify_orient = ELM_NOTIFY_ORIENT_BOTTOM_RIGHT;\r
        break;\r
      }\r
+   wd->notify_orient = notify_orient;\r
    elm_notify_orient_set(wd->notify, notify_orient);\r
 }\r
 \r