add window to service, remove popup when share app is nothing
authorJisung Ahn <jcastle.ahn@samsung.com>
Fri, 7 Sep 2012 03:59:14 +0000 (12:59 +0900)
committerJisung Ahn <jcastle.ahn@samsung.com>
Fri, 7 Sep 2012 03:59:14 +0000 (12:59 +0900)
Change-Id: Ibf247d24bac2a662b67d9abd1a55bf61334c2f82

feature/src/ivug-ext-ug.c
main/src/view/ivug-main-view-menu.cpp

index e8d1e4e..c85bec0 100755 (executable)
@@ -478,7 +478,14 @@ bool ivug_ext_launch_default(const char *uri, const char *operation, const char
        {
                MSG_IMAGEVIEW_ERROR("service_set_package %s failed, %d", pkg, ret);
                goto LAUNCH_END;
-       }
+       }\r
+\r
+       ret = service_set_window(handle, ug_get_window());\r
+       if(ret != SERVICE_ERROR_NONE)\r
+       {
+               MSG_IMAGEVIEW_ERROR("service_set_window %s failed, %d", pkg, ret);\r
+               goto LAUNCH_END;
+       }\r
 
        ret = service_send_launch_request(handle, ivug_ext_service_reply_cb, NULL);
        if(ret != SERVICE_ERROR_NONE)
index 9deedb9..c9d401b 100755 (executable)
@@ -658,7 +658,15 @@ void on_btn_share_clicked(void *data, Evas_Object *obj, void *event_info)
        service_create(&service);
        service_set_operation(service, SERVICE_OPERATION_SEND);
        service_set_uri(service, path);\r
-       service_foreach_app_matched(service, _share_pkg_cb, (void *)popup);
+       service_foreach_app_matched(service, _share_pkg_cb, (void *)popup);\r
+\r
+       Eina_List *list = ivug_listpopup_items_get(popup);\r
+       if(eina_list_count(list) == 0)\r
+       {\r
+               MSG_MAIN_WARN("Matched app is nothing!");\r
+               evas_object_del(popup);\r
+               return;\r
+       }\r
 
        const Elm_Object_Item *item = pMainView->items[TOOLBUTTON_SHARE].item;
        Evas_Object *button = elm_toolbar_item_object_get(item);