Evas_Object *action_area;\r
Eina_List *button_list;\r
int rot_angle;\r
+ int no_of_buttons;\r
+ Evas_Object *content;\r
Elm_Notify_Orient notify_orient;\r
Ecore_Job *del_job;\r
Eina_Bool delete_me : 1;\r
char buf[4096];\r
Eina_List *list = NULL;\r
Action_Area_Data *action_data = NULL;\r
-\r
+ int index =0; \r
+ \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, wd->notify_orient);\r
edje_object_message_signal_process(elm_layout_edje_get(wd->layout));\r
-\r
if (wd->action_area)\r
{\r
+ snprintf(buf, sizeof(buf), "buttons%d", wd->no_of_buttons); \r
+ elm_layout_theme_set(wd->action_area, "popup", buf, elm_widget_style_get(obj)); \r
EINA_LIST_FOREACH(wd->button_list, list, action_data)\r
{\r
snprintf(buf, sizeof(buf), "popup_button/%s", elm_widget_style_get(obj));\r
elm_object_style_set(action_data->btn, buf);\r
+ ++index;\r
+ snprintf(buf, sizeof(buf), "actionbtn%d", index); \r
+ elm_layout_content_set(wd->action_area, buf, action_data->btn); \r
}\r
+ elm_layout_content_set(wd->layout, "elm.swallow.buttonArea", wd->action_area);\r
}\r
if (wd->content_area)\r
{\r
{\r
snprintf(buf, sizeof(buf), "popup_description/%s", elm_widget_style_get(obj));\r
elm_object_style_set(wd->desc_label, buf);\r
+ elm_layout_content_set(wd->content_area, "elm.swallow.content", wd->desc_label); \r
+ }\r
+ else if(wd->content)\r
+ {\r
+ elm_layout_content_set(wd->content_area, "elm.swallow.content", wd->content);\r
}\r
+ elm_layout_content_set(wd->layout, "elm.swallow.content", wd->content_area);\r
} \r
+ if(wd->title_area)\r
+ {\r
+ edje_object_part_text_set(elm_layout_edje_get(wd->layout), "elm.swallow.title", wd->title_area);\r
+ }\r
_sizing_eval(obj);\r
}\r
\r
_hide(void *data, Evas *e, Evas_Object *obj, void *event_info)\r
{\r
Widget_Data *wd = elm_widget_data_get(obj);\r
-\r
if (!wd) return;\r
edje_object_signal_emit(elm_layout_edje_get(wd->layout), "elm,state,hide", "elm");\r
edje_object_message_signal_process(wd->layout);\r
evas_object_resize(parent, w, h);\r
evas_object_move(parent, x, y);\r
if (rotation != -1) \r
- elm_win_rotation_with_resize_set(parent, rotation); \r
+ elm_win_rotation_with_resize_set(parent, rotation); \r
\r
}\r
else\r
evas_object_event_callback_add(parent, EVAS_CALLBACK_DEL, _del_parent, obj);\r
}\r
\r
- ecore_x_netwm_window_type_get(elm_win_xwindow_get(parent), &type); \r
+ ecore_x_netwm_window_type_get(elm_win_xwindow_get(parent), &type); \r
if (type == ECORE_X_WINDOW_TYPE_DIALOG)\r
{\r
elm_object_style_set(wd->notify, "popup");\r
wd->action_area = elm_layout_add(popup);\r
elm_layout_content_set(wd->layout, "elm.swallow.buttonArea", wd->action_area);\r
snprintf(buf,sizeof(buf), "buttons%d", no_of_buttons);\r
+ wd->no_of_buttons = no_of_buttons;\r
elm_layout_theme_set(wd->action_area, "popup", buf, elm_widget_style_get(popup));\r
edje_object_signal_emit(elm_layout_edje_get(wd->layout), "elm,state,button,visible", "elm");\r
if (wd->title_area)\r
{\r
ELM_CHECK_WIDTYPE(obj, widtype);\r
Widget_Data *wd = elm_widget_data_get(obj); \r
-\r
+ \r
if (!wd) return;\r
+ if (wd->content == content) return;\r
if (wd->content_area)\r
{\r
evas_object_del(wd->content_area);\r
wd->content_area = NULL;\r
} \r
- wd->content_area = elm_layout_add(obj);\r
- elm_layout_theme_set(wd->content_area, "popup","content", elm_widget_style_get(obj));\r
- elm_layout_content_set(wd->content_area, "elm.swallow.content", content); \r
- elm_layout_content_set(wd->layout, "elm.swallow.content", wd->content_area); \r
- evas_object_event_callback_add(wd->content_area, EVAS_CALLBACK_CHANGED_SIZE_HINTS,\r
- _changed_size_hints, obj);\r
+ wd->content = content;\r
+ if(content)\r
+ {\r
+ wd->content_area = elm_layout_add(obj);\r
+ elm_layout_theme_set(wd->content_area, "popup","content", elm_widget_style_get(obj));\r
+ elm_layout_content_set(wd->content_area, "elm.swallow.content", content); \r
+ elm_layout_content_set(wd->layout, "elm.swallow.content", wd->content_area); \r
+ evas_object_event_callback_add(wd->content_area, EVAS_CALLBACK_CHANGED_SIZE_HINTS,\r
+ _changed_size_hints, obj);\r
+ }\r
_sizing_eval(obj);\r
}\r
\r
{\r
ELM_CHECK_WIDTYPE(obj, widtype) NULL;\r
Widget_Data *wd = elm_widget_data_get(obj);\r
- Evas_Object *content;\r
- \r
+ \r
if (!wd) return NULL;\r
- content = edje_object_part_swallow_get(elm_layout_edje_get(wd->content_area), \r
- "elm.swallow.content");\r
- return content;\r
+ return wd->content;\r
}\r
\r
/**\r
*/\r
EAPI void \r
elm_popup_buttons_add(Evas_Object *obj,int no_of_buttons, char *first_button_text, ...)\r
-\r
{\r
ELM_CHECK_WIDTYPE(obj, widtype);\r
Widget_Data *wd = elm_widget_data_get(obj); \r
char buf[4096]; \r
va_list args; \r
-\r
+ \r
if (!wd) return;\r
va_start(args, first_button_text); \r
if (wd->action_area)\r
evas_object_size_hint_align_set(wd->action_area, EVAS_HINT_FILL, EVAS_HINT_FILL);\r
snprintf(buf, sizeof(buf), "buttons%d", no_of_buttons); \r
elm_layout_theme_set(wd->action_area, "popup", buf, elm_widget_style_get(obj)); \r
+ wd->no_of_buttons = no_of_buttons;\r
edje_object_signal_emit(elm_layout_edje_get(wd->layout), "elm,state,button,visible", "elm");\r
if (wd->title_area)\r
- edje_object_signal_emit(elm_layout_edje_get(wd->layout), "elm,state,button,title,visible", "elm");\r
+ edje_object_signal_emit(elm_layout_edje_get(wd->layout), "elm,state,button,title,visible", "elm");\r
_elm_popup_buttons_add_valist (obj, first_button_text, args);\r
va_end(args);\r
edje_object_message_signal_process(wd->layout);\r
{ \r
ELM_CHECK_WIDTYPE(obj, widtype);\r
Widget_Data *wd = elm_widget_data_get(obj);\r
-\r
+ \r
if (!wd) return; \r
elm_notify_timeout_set(wd->notify, timeout);\r
evas_object_smart_callback_add(wd->notify, "notify,timeout", _elm_popup_timeout, obj);\r
/*Finger waggle warning*/\r
_elm_dangerous_call_check(__FUNCTION__);\r
evas_object_show(obj);\r
- evas_object_smart_callback_add(obj, "response", response_cb, &response_id); \r
+ evas_object_smart_callback_add(obj, "response", response_cb, &response_id); \r
_elm_exit_handler = ecore_event_handler_add(ECORE_EVENT_SIGNAL_EXIT, _elm_signal_exit, &response_id);\r
ecore_main_loop_begin();\r
if (_elm_exit_handler)\r