#define MOVE_THRESHOLD 5
#define SLIPPED_LENGTH 60
+#define APP_CONTROL_DATA_WIDGET_INSTANCE_ID "instance_id"
+#define APP_CONTROL_DATA_WIDGET_CONTENT "content_info"
+
static void _destroy_proxy_bg(Evas_Object *clip_bg);
static Evas_Object *_create_proxy_bg(Evas_Object *item);
static Eina_Bool _widget_access_activate_cb(void *data, Evas_Object *obj, Elm_Access_Action_Info *action_info);
page_info_s *page_info = NULL;
const char *widget_id = NULL;
const char *content_info = NULL;
+ const char *instance_id = NULL;
if(!layout) {
_E("layout is null " );
ret_if(APP_CONTROL_ERROR_NONE != app_control_create(&service));
ret_if(NULL == service);
+ instance_id = widget_viewer_evas_get_widget_instance_id(page_info->item);
app_control_set_operation(service, APP_CONTROL_OPERATION_MAIN);
- app_control_add_extra_data(service, "instance_id", widget_id);
+ app_control_add_extra_data(service, APP_CONTROL_DATA_WIDGET_INSTANCE_ID, instance_id);
if (content_info) {
- app_control_add_extra_data(service, "content_info", content_info);
+ app_control_add_extra_data(service, APP_CONTROL_DATA_WIDGET_CONTENT, content_info);
}
- app_control_set_app_id(service, SHORTCUT_APP_ID);
+ char *setup_appid = widget_service_get_app_id_of_setup_app(page_info->id);
+ app_control_set_app_id(service, setup_appid);
int ret = app_control_send_launch_request(service, NULL, NULL);
if (APP_CONTROL_ERROR_NONE != ret) {
return;
}
+ free(setup_appid);
app_control_destroy(service);
- //util_launch_app(SHORTCUT_APP_ID, NULL, NULL);
}
{
if(page_info->id)
{
- if (strcmp(page_info->id, SHORTCUT_WIDGET_ID) == 0) {
- _D( " Showing edit button for page %s", page_info->id);
+ char *setup_appid = NULL;
+
+ setup_appid = widget_service_get_app_id_of_setup_app(page_info->id);
+ if (setup_appid) {
+ _D( " Showing edit button for page %s", setup_appid);
elm_object_signal_emit(layout_info->edit, "edit,show", "edit");
- }
- else {
- _D( " Hiding edit button for page %s", page_info->id);
+ } else {
+ _D( " Hiding edit button for page %s", setup_appid);
elm_object_signal_emit(layout_info->edit, "edit,hide", "edit");
}
-
- }
- else
- {
+ free(setup_appid);
+ } else {
_D( " Hiding edit button for page %s", page_info->id);
elm_object_signal_emit(layout_info->edit, "edit,hide", "edit");
}