summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJisung Ahn <jcastle.ahn@samsung.com>2012-09-07 03:59:14 (GMT)
committerJisung Ahn <jcastle.ahn@samsung.com>2012-09-07 03:59:14 (GMT)
commitf04c491e25eadfebeb6f70d205c551d536b8b92a (patch)
tree2f8ba2915298dfb4881ad1c18557f590c926c7ed
parent73dc415faa98b5eaac832bc3eaeb84e8793d8878 (diff)
downloadug-image-viewer-efl-f04c491e25eadfebeb6f70d205c551d536b8b92a.zip
ug-image-viewer-efl-f04c491e25eadfebeb6f70d205c551d536b8b92a.tar.gz
ug-image-viewer-efl-f04c491e25eadfebeb6f70d205c551d536b8b92a.tar.bz2
add window to service, remove popup when share app is nothing
Change-Id: Ibf247d24bac2a662b67d9abd1a55bf61334c2f82
-rwxr-xr-xfeature/src/ivug-ext-ug.c9
-rwxr-xr-xmain/src/view/ivug-main-view-menu.cpp10
2 files changed, 17 insertions, 2 deletions
diff --git a/feature/src/ivug-ext-ug.c b/feature/src/ivug-ext-ug.c
index e8d1e4e..c85bec0 100755
--- a/feature/src/ivug-ext-ug.c
+++ b/feature/src/ivug-ext-ug.c
@@ -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;
- }
+ }
+
+ ret = service_set_window(handle, ug_get_window());
+ if(ret != SERVICE_ERROR_NONE)
+ {
+ MSG_IMAGEVIEW_ERROR("service_set_window %s failed, %d", pkg, ret);
+ goto LAUNCH_END;
+ }
ret = service_send_launch_request(handle, ivug_ext_service_reply_cb, NULL);
if(ret != SERVICE_ERROR_NONE)
diff --git a/main/src/view/ivug-main-view-menu.cpp b/main/src/view/ivug-main-view-menu.cpp
index 9deedb9..c9d401b 100755
--- a/main/src/view/ivug-main-view-menu.cpp
+++ b/main/src/view/ivug-main-view-menu.cpp
@@ -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);
- service_foreach_app_matched(service, _share_pkg_cb, (void *)popup);
+ service_foreach_app_matched(service, _share_pkg_cb, (void *)popup);
+
+ Eina_List *list = ivug_listpopup_items_get(popup);
+ if(eina_list_count(list) == 0)
+ {
+ MSG_MAIN_WARN("Matched app is nothing!");
+ evas_object_del(popup);
+ return;
+ }
const Elm_Object_Item *item = pMainView->items[TOOLBUTTON_SHARE].item;
Evas_Object *button = elm_toolbar_item_object_get(item);