[TSAM-6174]Fixed selection Logic for Unsupported file 04/79704/1 accepted/tizen/mobile/20160712.133218 submit/tizen_mobile/20160712.113336
authorRahul Dadhich <r.dadhich@samsung.com>
Tue, 12 Jul 2016 11:04:26 +0000 (16:34 +0530)
committerRahul Dadhich <r.dadhich@samsung.com>
Tue, 12 Jul 2016 11:04:26 +0000 (16:34 +0530)
Change-Id: I21cfda38c120b161e3012b7dcfca9a4a10d5665e
Signed-off-by: Rahul Dadhich <r.dadhich@samsung.com>
CMakeLists.txt
packaging/attach-panel-gallery.spec
src/view/ge-albums.c

index 0be57f9..872d8da 100644 (file)
@@ -103,7 +103,7 @@ ADD_DEPENDENCIES(${PROJECT_NAME} gallery_efl_edj_build)
 INSTALL(FILES ${CMAKE_BINARY_DIR}/attach-panel-gallery.edj DESTINATION ${RESDIR}/edje/${PROJECT_NAME})
 INSTALL(FILES ${CMAKE_BINARY_DIR}/attach-panel-gallery-images.edj DESTINATION ${RESDIR}/edje/${PROJECT_NAME})
 
-INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/res/${GE_IMG_C_DIR} DESTINATION ${RESDIR}/images/attach-panel-gallery)
+INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/res/${GE_IMG_C_DIR} DESTINATION ${RESDIR}/images/${PROJECT_NAME})
 INSTALL(TARGETS ${PROJECT_NAME} DESTINATION ${LIBDIR})
 
 INSTALL(FILES attach-panel-gallery.xml DESTINATION ${TZ_SYS_RO_PACKAGES})
index 77a63f7..1405c5d 100644 (file)
@@ -74,7 +74,7 @@ ln -sf /usr/bin/ug-client %{TZ_SYS_RO_UG}/bin/attach-panel-gallery
 %defattr(-,root,root,-)
 %{TZ_SYS_RO_UG}/lib/libug-attach-panel-gallery.so*
 %{TZ_SYS_RO_UG}/res/edje/ug-attach-panel-gallery/*
-%{TZ_SYS_RO_UG}/res/images/attach-panel-gallery/*
+%{TZ_SYS_RO_UG}/res/images/ug-attach-panel-gallery/*
 %{TZ_SYS_RO_UG}/res/locale/*/*/attach-panel-gallery.mo
 %{TZ_SYS_RO_PACKAGES}/attach-panel-gallery.xml
 %{TZ_SYS_RO_UG}/res/images/attach-panel-gallery/attach-panel-gallery.png
index e857f34..0ebd9fb 100644 (file)
@@ -990,7 +990,8 @@ __ge_check_state_changed_cb(void *data, Evas_Object *obj, void *ei)
        stat(sit->file_url, &stFileInfo);
 #endif
        if (state == EINA_TRUE) {
-               if (!g_strcmp0(gitem->item->thumb_url, DEFAULT_THUMBNAIL)) {
+               if ((!gitem->item->thumb_url) || (!g_strcmp0(gitem->item->thumb_url, DEFAULT_THUMBNAIL)) ||
+                               (strlen(gitem->item->thumb_url) == 0)) {
                        elm_check_state_set(obj, EINA_FALSE);
                        char *pStrWarning = g_strdup_printf(
                                                GE_STR_UNSUPPORTED_FILE);
@@ -1116,7 +1117,8 @@ __ge_gengrid_item_content_get(void *data, Evas_Object *obj, const char *part)
        if (!g_strcmp0(part, "content_swallow")) {
                ge_dbgE("gitem->item->thumb_url : %s", gitem->item->thumb_url);
                /* Use default image */
-               if (!g_strcmp0(gitem->item->thumb_url, DEFAULT_THUMBNAIL)) {
+               if ((!gitem->item->thumb_url) || (!g_strcmp0(gitem->item->thumb_url, DEFAULT_THUMBNAIL)) ||
+                               (strlen(gitem->item->thumb_url) == 0)) {
                        path = GE_ICON_CONTENTS_BROKEN;
                } else {
                        path = gitem->item->thumb_url;
@@ -1250,7 +1252,8 @@ __ge_grid_select_one(ge_item *gitem, char *file_url)
 
        int ret = -1;
 
-       if (!g_strcmp0(gitem->item->thumb_url, DEFAULT_THUMBNAIL)) {
+       if ((!gitem->item->thumb_url) || (!g_strcmp0(gitem->item->thumb_url, DEFAULT_THUMBNAIL)) ||
+                       (strlen(gitem->item->thumb_url) == 0)) {
                char *pStrWarning = g_strdup_printf(GE_STR_UNSUPPORTED_FILE);
                notification_status_message_post(pStrWarning);
                GE_FREE(pStrWarning);
@@ -1320,7 +1323,8 @@ __ge_gengrid_item_sel_cb(void *data, Evas_Object *obj, void *ei)
                Eina_Bool bl = elm_check_state_get(ck);
 
                if (bl == EINA_FALSE) {
-                       if (!g_strcmp0(gitem->item->thumb_url, DEFAULT_THUMBNAIL)) {
+                       if ((!gitem->item->thumb_url) || (!g_strcmp0(gitem->item->thumb_url, DEFAULT_THUMBNAIL)) ||
+                                       (strlen(gitem->item->thumb_url) == 0)) {
                                char *pStrWarning = g_strdup_printf(
                                                        GE_STR_UNSUPPORTED_FILE);
                                notification_status_message_post(pStrWarning);