TizenRefApp-8361 [Apps Shorcut Widget] Remove usage of private API 17/124717/5
authorIgor Olshevskyi <i.olshevskyi@samsung.com>
Wed, 12 Apr 2017 05:33:10 +0000 (08:33 +0300)
committerIgor Olshevskyi <i.olshevskyi@samsung.com>
Wed, 12 Apr 2017 09:03:40 +0000 (12:03 +0300)
Change-Id: I4a3e57d885742ea44ea418b92d4a0e1147798006

46 files changed:
apptray-widget-app/.cproject
apptray-widget-app/CMakeLists.txt
apptray-widget-app/edc/apptray_wgt_app_select_view_ly.edc
apptray-widget-app/inc/apptray_wgt_app_common_def.h
apptray-widget-app/inc/apptray_wgt_app_item_info.h
apptray-widget-app/inc/apptray_wgt_app_utils.h
apptray-widget-app/org.tizen.apptray-widget.xml
apptray-widget-app/res/edje/CMakeLists.txt [deleted file]
apptray-widget-app/res/icon/org.tizen.apptray-widget-app-small.png [deleted file]
apptray-widget-app/res/icon/org.tizen.apptray-widget-app.png [deleted file]
apptray-widget-app/res/image/CMakeLists.txt [deleted file]
apptray-widget-app/res/image/apps_widget_preview.png [deleted file]
apptray-widget-app/res/image/b_home_screen_app_shortcut_preview.png [deleted file]
apptray-widget-app/res/image/b_home_screen_more_apps.png [deleted file]
apptray-widget-app/res/image/b_home_screen_recent_icon.png [deleted file]
apptray-widget-app/res/image/b_home_screen_widget_line.png [deleted file]
apptray-widget-app/res/image/home_indicator_clock_01.png [deleted file]
apptray-widget-app/res/image/home_indicator_clock_02.png [deleted file]
apptray-widget-app/res/image/home_indicator_horizontal_dot.png [deleted file]
apptray-widget-app/res/image/indicator_horizontal_dot.png [deleted file]
apptray-widget-app/res/image/tw_ic_popup_btn_check.png [deleted file]
apptray-widget-app/res/image/tw_ic_popup_btn_delete.png [deleted file]
apptray-widget-app/res/image/unknown.png [deleted file]
apptray-widget-app/res/images/unknown.png [new file with mode: 0755]
apptray-widget-app/shared/res/app-widget-app.png [deleted file]
apptray-widget-app/shared/res/org.tizen.apptray-widget-app.png [new file with mode: 0755]
apptray-widget-app/src/apptray_wgt_app.c
apptray-widget-app/src/apptray_wgt_app_item_info.c
apptray-widget-app/src/apptray_wgt_app_utils.c
apptray-widget-app/tizen-manifest.xml
apptray-widget/.cproject
apptray-widget/CMakeLists.txt
apptray-widget/inc/apptray_widget_common_defines.h
apptray-widget/inc/apptray_widget_utils.h
apptray-widget/res/edje/apptray_wgt.edc [new file with mode: 0755]
apptray-widget/res/edje/apptray_widget.edc [deleted file]
apptray-widget/res/icon/org.tizen.apptray-widget-small.png [deleted file]
apptray-widget/res/icon/org.tizen.apptray-widget.png [deleted file]
apptray-widget/res/images/unknown.png [deleted file]
apptray-widget/res/images/unknown_app.png [new file with mode: 0755]
apptray-widget/shared/res/apps_widget_preview.png
apptray-widget/shared/res/org.tizen.apptray-widget.png [new file with mode: 0755]
apptray-widget/src/apptray_widget.c
apptray-widget/src/apptray_widget_utils.c
apptray-widget/tizen-manifest.xml
packaging/org.tizen.apptray-widget.spec

index 2971c0e61d29514b399e0320cba843f7d208425a..356a93bec145b61a78ed046c6d8e97c01e06b255 100644 (file)
                                                        <tool id="org.tizen.nativecore.tool.sbi.gnu.archiver.mergelib.111065902" name="Archive Generator" superClass="org.tizen.nativecore.tool.sbi.gnu.archiver.mergelib"/>
                                                        <tool id="org.tizen.nativecore.tool.sbi.po.compiler.285409529" name="PO Resource Compiler" superClass="org.tizen.nativecore.tool.sbi.po.compiler"/>
                                                        <tool id="org.tizen.nativecore.tool.sbi.edc.compiler.1913130314" name="EDC Resource Compiler" superClass="org.tizen.nativecore.tool.sbi.edc.compiler">
-                                                               <option id="sbi.gnu.edc.compiler.option.misc.id.996502685" superClass="sbi.gnu.edc.compiler.option.misc.id" valueType="stringList">
+                                                               <option command="-id " id="sbi.gnu.edc.compiler.option.misc.id.996502685" name="Image Path (-id)" superClass="sbi.gnu.edc.compiler.option.misc.id" valueType="stringList">
                                                                        <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}}/edc/images&quot;"/>
                                                                </option>
                                                        </tool>
index 6b278a2a6c28e6d875054a4bdf13a4a22fae2b57..ad8c2f06a48addeddbcc6bbc5fc8f686eff5ce7f 100755 (executable)
@@ -12,29 +12,14 @@ SET(SRCS
 SET(VENDOR "tizen")
 SET(PACKAGE ${PROJECT_NAME})
 SET(PKGNAME "org.${VENDOR}.${PACKAGE}")
-SET(PREFIX ${CMAKE_INSTALL_PREFIX})
-#SET(INSTALL_DIR_APPS "/usr/apps/${PKGNAME}")
-SET(INSTALL_DIR_PRE "/usr")
 
 SET(BINDIR "${PREFIX}/bin")
 SET(RESDIR "${PREFIX}/res")
-SET(IMAGEDIR "${RESDIR}/image/${PROJECT_NAME}")
-SET(IMAGEDIR2 "${RESDIR}/edje/images")
-SET(DATADIR "${PREFIX}/data")
+SET(IMAGEDIR "${RESDIR}/images")
 SET(LOCALEDIR "${RESDIR}/locale")
-SET(ICONDIR "${RESDIR}/icons")
-SET(SOUNDDIR "${RESDIR}/sounds")
 SET(EDJDIR "${RESDIR}/edje")
 SET(SHARED_RES "${PREFIX}/shared/res")
 
-IF("${ARCH}" STREQUAL "arm")
-        ADD_DEFINITIONS("-DARM_TYPE")
-ELSE()
-        ADD_DEFINITIONS("-DEMULATOR_TYPE")
-ENDIF()
-MESSAGE("ARCH: ${ARCH}")
-
-
 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC")
 
 SET(GC_SECTIONS_FLAGS "-fdata-sections -ffunction-sections -Wl,--gc-sections")
@@ -43,14 +28,13 @@ SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${GC_SECTIONS_FLAGS}")
 
 INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/inc)
 
-
 INCLUDE(FindPkgConfig)
-pkg_check_modules(pkgs REQUIRED 
+pkg_check_modules(pkgs REQUIRED
        appcore-efl
-       aul
        bundle
        capi-appfw-application
        capi-appfw-package-manager
+       capi-appfw-app-manager
        capi-system-system-settings
        capi-appfw-widget-application
        capi-appfw-preference
@@ -75,16 +59,12 @@ pkg_check_modules(pkgs REQUIRED
        appsvc
        feedback
 )
-#??
-FIND_LIBRARY(LIB_M m)
 
 ADD_DEFINITIONS(${pkgs_CFLAGS})
 ADD_DEFINITIONS("-fpie")
 
 ADD_DEFINITIONS("-DPREFIX=\"${CMAKE_INSTALL_PREFIX}\"")
 ADD_DEFINITIONS("-DFACTORYFS=\"$ENV{FACTORYFS}\"")
-ADD_DEFINITIONS("-DSLP_DEBUG")
-ADD_DEFINITIONS("-DSLP_PROF")
 
 ADD_DEFINITIONS("-DVENDOR=\"${VENDOR}\"")
 ADD_DEFINITIONS("-DPACKAGE=\"${PACKAGE}\"")
@@ -94,33 +74,41 @@ ADD_DEFINITIONS("-DPREFIX=\"${PREFIX}\"")
 ADD_DEFINITIONS("-DINSTALL_DIR_APPS=\"${INSTALL_DIR_APPS}\"")
 ADD_DEFINITIONS("-DBINDIR=\"${BINDIR}\"")
 ADD_DEFINITIONS("-DLOCALEDIR=\"${LOCALEDIR}\"")
-ADD_DEFINITIONS("-DICON_DIR=\"${ICONDIR}\"")
 ADD_DEFINITIONS("-DIMAGEDIR=\"${IMAGEDIR}\"")
-ADD_DEFINITIONS("-DSOUND_DIR=\"${SOUNDDIR}\"")
 ADD_DEFINITIONS("-DEDJDIR=\"${EDJDIR}\"")
 ADD_DEFINITIONS("-DPROJECT=\"${PROJECT_NAME}\"")
 
 ADD_EXECUTABLE(${PROJECT_NAME}-app ${SRCS})
 TARGET_LINK_LIBRARIES(${PROJECT_NAME}-app ${pkgs_LDFLAGS} "-pie" ${LIB_M})
 
+#edc compile
+ADD_CUSTOM_TARGET(apptray_wgt_app.edj
+       COMMAND edje_cc -id
+       ${CMAKE_CURRENT_SOURCE_DIR}/edc/images ${EDJE_CFLAGS}
+       ${CMAKE_CURRENT_SOURCE_DIR}/res/edje/apptray_wgt_app.edc ${CMAKE_BINARY_DIR}/apptray_wgt_app.edj
+       DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/res/edje/apptray_wgt_app.edc
+               ${CMAKE_CURRENT_SOURCE_DIR}/edc/apptray_wgt_app_edit_slots_ly.edc
+               ${CMAKE_CURRENT_SOURCE_DIR}/edc/apptray_wgt_app_slots.edc
+               ${CMAKE_CURRENT_SOURCE_DIR}/edc/apptray_wgt_app_select_view_ly.edc
+)
+ADD_DEPENDENCIES(${PROJECT_NAME} apptray_wgt_app.edj)
+ADD_DEPENDENCIES(${PROJECT_NAME} edj_build2)
 
 # install files
 INSTALL(TARGETS ${PROJECT_NAME}-app DESTINATION ${BINDIR})
-
+INSTALL(FILES ${CMAKE_BINARY_DIR}/apptray_wgt_app.edj DESTINATION ${EDJDIR})
 
 # install application HOME directory
 INSTALL(DIRECTORY DESTINATION ${RESDIR})
 
-#ADD_SUBDIRECTORY(po)
-
 # install desktop files
 set(PREFIX ${CMAKE_INSTALL_PREFIX})
 INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/org.tizen.apptray-widget.xml DESTINATION /usr/share/packages)
 
+#shared res
+INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/shared/res/ DESTINATION ${SHARED_RES})
+
+#image
+INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/res/images/ DESTINATION ${IMAGEDIR})
 
-#icon
-INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/res/icon/org.tizen.apptray-widget-app.png DESTINATION /usr/share/icons)
-INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/res/icon/org.tizen.apptray-widget-app-small.png DESTINATION /usr/share/icons)
-ADD_SUBDIRECTORY(res/image)
-ADD_SUBDIRECTORY(res/edje)
 # End of a file
index ee923703806c7ed5610c405747b3245501ea1caf..fa19c9652fddc20f3f86167af39ec8e0a1758f90 100644 (file)
@@ -93,10 +93,7 @@ group { "select_indicator";
                                max: SELECT_INDICATOR_TEXT_MAX_SIZE_INC;
                                rel1 { relative: 1.0 1.0; to: "padding_top_left"; }
                                rel2 { relative: 0.0 0.0; to: "padding_bottom_right"; }
-                               text {
-                                       min: 1 0;
-                                       style: "select_indicator";
-                               }
+                               text.style: "select_indicator";
                                fixed: 0 1;
                        }
                }
index 2ec5ea72c7b184377f3e9c496714e6bd840a99f1..30651c00b780cb2ca10850fb0bd97c4f8ce1b4f0 100644 (file)
 #define BUF_SIZE_LARGE 512
 #define BUF_SIZE_BIG 1024
 
-#define APP_TYPE_WGT "wgt"
-
 #define EDJE_PATH apptray_wgt_app_utils_get_edje_path()
 
-#define DEFAULT_ICON IMAGEDIR"/unknown.png"
+#define DEFAULT_ICON apptray_wgt_app_utils_get_default_app_icon_path()
 
 #define APPS_PKG "org.tizen.apptray-widget-app"
 
index b4a02add27c00389ace66d3614c2e2ad622311cb..88f0facdcb3647a0c3d0ce68fea39468ee410d26 100755 (executable)
@@ -29,7 +29,6 @@ typedef struct {
        char *appid;
        char *name;
        char *icon;
-       char *type;
        int open_app;
        int removable;
        Eina_Bool is_selected;
index 56f82667c59a16e272cdfa353bc0056aa1d9d162..6269fb48b4e747277aecf865b8b9695371382804 100755 (executable)
@@ -22,4 +22,6 @@ const char *apptray_wgt_app_utils_get_edje_path();
 
 const char *apptray_wgt_app_utils_get_locale_path();
 
+const char *apptray_wgt_app_utils_get_default_app_icon_path();
+
 #endif /* __APPTRAY_WGT_APP_UTIL_H__ */
index 1873dd72d5229f94b93fed15b860e7d5bd801468..e057eeb49dad2de8abe669b5b56f3e2ffb1135f2 100755 (executable)
@@ -6,8 +6,8 @@
         <icon>org.tizen.apptray-widget-app.png</icon>
     </ui-application>
     <widget-application appid="org.tizen.apptray-widget" exec="apptray-widget" main="true" update-period="0" hw-acceleration="on">
-        <label>apptray-widget</label>
-        <icon>apps_widget_preview.png</icon>
+        <label>App Shortcuts</label>
+        <icon>org.tizen.apptray-widget.png</icon>
         <support-size preview="apps_widget_preview.png">2x2</support-size>
     </widget-application>
     <privileges>
diff --git a/apptray-widget-app/res/edje/CMakeLists.txt b/apptray-widget-app/res/edje/CMakeLists.txt
deleted file mode 100755 (executable)
index ab8cff2..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-FILE(GLOB edc_files ${CMAKE_CURRENT_SOURCE_DIR}/*.edc)
-FOREACH(edc_file ${edc_files})
-        GET_FILENAME_COMPONENT( FName ${edc_file} NAME_WE )
-        MESSAGE("${FName}")
-        ADD_CUSTOM_COMMAND(OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/${FName}.edj
-                        COMMAND edje_cc -id ${CMAKE_CURRENT_SOURCE_DIR}/../../edc/images
-                        ${CMAKE_CURRENT_SOURCE_DIR}/${FName}.edc ${FName}.edj ${EDJE_CFLAGS}
-                        DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${FName}.edc
-        )
-        ADD_CUSTOM_TARGET(${FName}.edj DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${FName}.edj)
-        ADD_DEPENDENCIES(${PROJECT_NAME}-app ${FName}.edj)
-ENDFOREACH(edc_file)
-
-# install edc files
-INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/ DESTINATION ${EDJEDIR} FILES_MATCHING PATTERN "*.edj")
diff --git a/apptray-widget-app/res/icon/org.tizen.apptray-widget-app-small.png b/apptray-widget-app/res/icon/org.tizen.apptray-widget-app-small.png
deleted file mode 100755 (executable)
index 2743f8d..0000000
Binary files a/apptray-widget-app/res/icon/org.tizen.apptray-widget-app-small.png and /dev/null differ
diff --git a/apptray-widget-app/res/icon/org.tizen.apptray-widget-app.png b/apptray-widget-app/res/icon/org.tizen.apptray-widget-app.png
deleted file mode 100755 (executable)
index 2743f8d..0000000
Binary files a/apptray-widget-app/res/icon/org.tizen.apptray-widget-app.png and /dev/null differ
diff --git a/apptray-widget-app/res/image/CMakeLists.txt b/apptray-widget-app/res/image/CMakeLists.txt
deleted file mode 100755 (executable)
index 2f5f5b7..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/unknown.png DESTINATION ${IMAGEDIR})
-INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/apps_widget_preview.png DESTINATION ${IMAGEDIR})
-INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/apps_widget_preview.png DESTINATION ${SHARED_RES})
-INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/apps_widget_preview.png DESTINATION /usr/share/icons)
-INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/b_home_screen_widget_line.png DESTINATION ${IMAGEDIR})
-INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/b_home_screen_recent_icon.png DESTINATION ${IMAGEDIR})
-INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/b_home_screen_more_apps.png DESTINATION ${IMAGEDIR})
-INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/indicator_horizontal_dot.png DESTINATION ${IMAGEDIR})
-INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/home_indicator_horizontal_dot.png DESTINATION ${IMAGEDIR})
-INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/home_indicator_clock_01.png DESTINATION ${IMAGEDIR})
-INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/home_indicator_clock_02.png DESTINATION ${IMAGEDIR})
-INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/tw_ic_popup_btn_check.png DESTINATION ${IMAGEDIR})
-INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/tw_ic_popup_btn_delete.png DESTINATION ${IMAGEDIR})
diff --git a/apptray-widget-app/res/image/apps_widget_preview.png b/apptray-widget-app/res/image/apps_widget_preview.png
deleted file mode 100755 (executable)
index 5740f73..0000000
Binary files a/apptray-widget-app/res/image/apps_widget_preview.png and /dev/null differ
diff --git a/apptray-widget-app/res/image/b_home_screen_app_shortcut_preview.png b/apptray-widget-app/res/image/b_home_screen_app_shortcut_preview.png
deleted file mode 100755 (executable)
index 8eff059..0000000
Binary files a/apptray-widget-app/res/image/b_home_screen_app_shortcut_preview.png and /dev/null differ
diff --git a/apptray-widget-app/res/image/b_home_screen_more_apps.png b/apptray-widget-app/res/image/b_home_screen_more_apps.png
deleted file mode 100755 (executable)
index d598ef8..0000000
Binary files a/apptray-widget-app/res/image/b_home_screen_more_apps.png and /dev/null differ
diff --git a/apptray-widget-app/res/image/b_home_screen_recent_icon.png b/apptray-widget-app/res/image/b_home_screen_recent_icon.png
deleted file mode 100755 (executable)
index 7e99860..0000000
Binary files a/apptray-widget-app/res/image/b_home_screen_recent_icon.png and /dev/null differ
diff --git a/apptray-widget-app/res/image/b_home_screen_widget_line.png b/apptray-widget-app/res/image/b_home_screen_widget_line.png
deleted file mode 100755 (executable)
index 4f4a320..0000000
Binary files a/apptray-widget-app/res/image/b_home_screen_widget_line.png and /dev/null differ
diff --git a/apptray-widget-app/res/image/home_indicator_clock_01.png b/apptray-widget-app/res/image/home_indicator_clock_01.png
deleted file mode 100755 (executable)
index 6abaeba..0000000
Binary files a/apptray-widget-app/res/image/home_indicator_clock_01.png and /dev/null differ
diff --git a/apptray-widget-app/res/image/home_indicator_clock_02.png b/apptray-widget-app/res/image/home_indicator_clock_02.png
deleted file mode 100755 (executable)
index ad037c6..0000000
Binary files a/apptray-widget-app/res/image/home_indicator_clock_02.png and /dev/null differ
diff --git a/apptray-widget-app/res/image/home_indicator_horizontal_dot.png b/apptray-widget-app/res/image/home_indicator_horizontal_dot.png
deleted file mode 100755 (executable)
index fa63eec..0000000
Binary files a/apptray-widget-app/res/image/home_indicator_horizontal_dot.png and /dev/null differ
diff --git a/apptray-widget-app/res/image/indicator_horizontal_dot.png b/apptray-widget-app/res/image/indicator_horizontal_dot.png
deleted file mode 100755 (executable)
index fab1773..0000000
Binary files a/apptray-widget-app/res/image/indicator_horizontal_dot.png and /dev/null differ
diff --git a/apptray-widget-app/res/image/tw_ic_popup_btn_check.png b/apptray-widget-app/res/image/tw_ic_popup_btn_check.png
deleted file mode 100755 (executable)
index f20f62e..0000000
Binary files a/apptray-widget-app/res/image/tw_ic_popup_btn_check.png and /dev/null differ
diff --git a/apptray-widget-app/res/image/tw_ic_popup_btn_delete.png b/apptray-widget-app/res/image/tw_ic_popup_btn_delete.png
deleted file mode 100755 (executable)
index 5f346cb..0000000
Binary files a/apptray-widget-app/res/image/tw_ic_popup_btn_delete.png and /dev/null differ
diff --git a/apptray-widget-app/res/image/unknown.png b/apptray-widget-app/res/image/unknown.png
deleted file mode 100755 (executable)
index 535db60..0000000
Binary files a/apptray-widget-app/res/image/unknown.png and /dev/null differ
diff --git a/apptray-widget-app/res/images/unknown.png b/apptray-widget-app/res/images/unknown.png
new file mode 100755 (executable)
index 0000000..535db60
Binary files /dev/null and b/apptray-widget-app/res/images/unknown.png differ
diff --git a/apptray-widget-app/shared/res/app-widget-app.png b/apptray-widget-app/shared/res/app-widget-app.png
deleted file mode 100755 (executable)
index 9765b1b..0000000
Binary files a/apptray-widget-app/shared/res/app-widget-app.png and /dev/null differ
diff --git a/apptray-widget-app/shared/res/org.tizen.apptray-widget-app.png b/apptray-widget-app/shared/res/org.tizen.apptray-widget-app.png
new file mode 100755 (executable)
index 0000000..2743f8d
Binary files /dev/null and b/apptray-widget-app/shared/res/org.tizen.apptray-widget-app.png differ
index 3b4a08dadda7cf0f78ff5005f964cae5ce1f2a2d..424ca3feaeb43ac53c61aeae0ed1f338a1c429b6 100755 (executable)
 #include <widget_service.h>
 #include <widget_errno.h>
 #include <feedback.h>
-#include <pkgmgr-info.h>
-#include <package-manager.h>
 #include <bundle.h>
 #include <efl_extension.h>
 #include <system_settings.h>
 #include <elm_theme.h>
+#include <app_info.h>
+#include <app_manager.h>
 
 #include "apptray_wgt_app_item_info.h"
 #include "apptray_wgt_app_key.h"
@@ -228,7 +228,7 @@ Evas_Object *_set_app_slot(const char *appid, int pos);
 static Eina_Bool _click_blocker_timer_cb(void *data);
 
 static int _apps_sort_cb(const void *d1, const void *d2);
-static int _apps_all_cb(pkgmgrinfo_appinfo_h handle, void *user_data);
+static bool _apps_all_cb(app_info_h handle, void *user_data);
 static Eina_List *_read_all_apps_on_device(Eina_List **list);
 
 /* Main UI components */
@@ -992,17 +992,21 @@ Evas_Object *_set_app_slot(const char *appid, int pos)
 
                g_info->appid_list[pos] = strdup(appid);
        } else {
-               pkgmgrinfo_appinfo_h appinfo_h = NULL;
-               char *icon_path_tmp = NULL;
-               char *icon_path = NULL;
+               app_info_h app_info = NULL;
                Evas_Object *btn_icon = NULL;
                Evas_Object *del_ly = NULL;
+               char *icon_path_tmp = NULL;
+               char *icon_path = NULL;
                char *label = NULL;
 
-               pkgmgrinfo_appinfo_get_appinfo(appid, &appinfo_h);
-               if (PMINFO_R_OK != pkgmgrinfo_appinfo_get_icon(appinfo_h, &icon_path)) {
-                       _E("get icon path failed");
+               if (app_info_create(appid, &app_info) != APP_MANAGER_ERROR_NONE) {
+                       _E("app_info_create() failed");
+               } else if (app_info_get_icon(app_info, &icon_path) != APP_MANAGER_ERROR_NONE) {
+                       _E("app_info_get_icon() failed");
+               } else if (app_info_get_label(app_info, &label) != APP_MANAGER_ERROR_NONE) {
+                       _E("app_info_get_label() failed");
                }
+
                if (icon_path) {
                        if (strlen(icon_path) > 0) {
                                icon_path_tmp = strdup(icon_path);
@@ -1013,10 +1017,6 @@ Evas_Object *_set_app_slot(const char *appid, int pos)
                        icon_path_tmp = strdup(DEFAULT_ICON);
                }
 
-               if (PMINFO_R_OK != pkgmgrinfo_appinfo_get_label(appinfo_h, &label)) {
-                       _E("get label failed");
-               }
-
                btn = _edit_view_create_slot_app_btn(slot);
                elm_object_part_content_set(slot, "icon", btn);
 
@@ -1030,10 +1030,12 @@ Evas_Object *_set_app_slot(const char *appid, int pos)
 
                g_info->appid_list[pos] = strdup(appid);
 
-               if (appinfo_h)
-                       pkgmgrinfo_appinfo_destroy_appinfo(appinfo_h);
+               free(icon_path_tmp);
+               free(icon_path);
+               free(label);
 
-               FREE(icon_path_tmp);
+               if (app_info)
+                       app_info_destroy(app_info);
        }
 
        _edit_view_update_slot_access_info(pos);
@@ -1050,7 +1052,7 @@ static Eina_Bool _ao_ev_ly_action_cb(void *data, Evas_Object *obj, Elm_Access_Ac
        if (action_info->action_type == ELM_ACCESS_ACTION_HIGHLIGHT) {
                _D("Edit layout [HIGHLIGHT]");
                info->ev_cur_highlighted_obj = obj;
-       } else if (action_info->action_type == ELM_ACCESS_ACTION_HIGHLIGHT) {
+       } else if (action_info->action_type == ELM_ACCESS_ACTION_UNHIGHLIGHT) {
                _D("Edit layout [UNHIGHLIGHT]");
                info->ev_cur_highlighted_obj = NULL;
        }
@@ -1713,7 +1715,7 @@ static Eina_Bool _ao_sv_counter_action_cb(void *data, Evas_Object *obj, Elm_Acce
        if (action_info->action_type == ELM_ACCESS_ACTION_HIGHLIGHT) {
                _D("Counter [HIGHLIGHT]");
                info->sv_cur_highlighted_obj = obj;
-       } else if (action_info->action_type == ELM_ACCESS_ACTION_HIGHLIGHT) {
+       } else if (action_info->action_type == ELM_ACCESS_ACTION_UNHIGHLIGHT) {
                _D("Counter [UNHIGHLIGHT]");
                info->sv_cur_highlighted_obj = NULL;
        }
@@ -1840,45 +1842,47 @@ static int _apps_sort_cb(const void *d1, const void *d2)
        return strcmp(tmp1->name, tmp2->name);
 }
 
-static int _apps_all_cb(pkgmgrinfo_appinfo_h handle, void *user_data)
+static bool _apps_all_cb(app_info_h handle, void *user_data)
 {
        _ENTER;
+
        Eina_List **list = user_data;
        char *appid = NULL;
        apptray_wgt_app_item_info_s *item_info = NULL;
 
-       retv_if(NULL == handle, 0);
-       retv_if(NULL == user_data, 0);
+       retv_if(!handle, 0);
+       retv_if(!user_data, 0);
 
-       pkgmgrinfo_appinfo_get_appid(handle, &appid);
-       _D("appid:%s",appid);
-       retv_if(NULL == appid, 0);
+       app_info_get_app_id(handle, &appid);
+       _D("appid [%s]", appid);
+       retv_if(!appid, false);
 
        item_info = apptray_wgt_app_item_info_create(appid);
-       if (NULL == item_info) {
+       if (!item_info) {
                _D("%s does not have the item_info", appid);
-               return 0;
+               free(appid);
+               return false;
        }
+       free(appid);
 
        *list = eina_list_append(*list, item_info);
 
-       return 0;
+       return true;
 }
 
 static Eina_List *_read_all_apps_on_device(Eina_List **list)
 {
        _ENTER;
-       pkgmgrinfo_appinfo_filter_h handle = NULL;
+       app_info_filter_h filter = NULL;
 
-       retv_if(PMINFO_R_OK != pkgmgrinfo_appinfo_filter_create(&handle), NULL);
-       goto_if(PMINFO_R_OK != pkgmgrinfo_appinfo_filter_add_bool(handle, PMINFO_APPINFO_PROP_APP_NODISPLAY, 0), ERROR);
-       goto_if(PMINFO_R_OK != pkgmgrinfo_appinfo_filter_foreach_appinfo(handle, _apps_all_cb, list), ERROR);
+       retv_if(app_info_filter_create(&filter) != APP_MANAGER_ERROR_NONE, NULL);
+       goto_if(app_info_filter_add_bool(filter, PACKAGE_INFO_PROP_APP_NODISPLAY, false) != APP_MANAGER_ERROR_NONE, ERROR);
+       goto_if(app_info_filter_foreach_appinfo(filter, _apps_all_cb, list) != APP_MANAGER_ERROR_NONE, ERROR);
        *list = eina_list_sort(*list, eina_list_count(*list), _apps_sort_cb);
-
        *list = eina_list_prepend(*list, apptray_wgt_app_item_info_create(APPS_PKG));
 ERROR:
-       if (handle)
-               pkgmgrinfo_appinfo_filter_destroy(handle);
+       if (filter)
+               app_info_filter_destroy(filter);
 
        return *list;
 }
@@ -2237,7 +2241,7 @@ static void _app_control(app_control_h service, void *data)
 static void _select_view_update_apps_label(appdata_s *ad)
 {
        int ret;
-       pkgmgrinfo_appinfo_h appinfo_h;
+       app_info_h app_info;
        char *label;
        apptray_wgt_app_item_info_s *item_info = NULL;
        Eina_List *l = NULL;
@@ -2245,7 +2249,7 @@ static void _select_view_update_apps_label(appdata_s *ad)
 
        EINA_LIST_FOREACH_SAFE(ad->all_app_list, l, n, item_info) {
                ret = 0;
-               appinfo_h = NULL;
+               app_info = NULL;
                label = NULL;
 
                if (!strcmp(item_info->appid, APPS_PKG)) {
@@ -2253,14 +2257,14 @@ static void _select_view_update_apps_label(appdata_s *ad)
                        continue;
                }
 
-               ret = pkgmgrinfo_appinfo_get_appinfo(item_info->appid, &appinfo_h);
-               if (ret != PMINFO_R_OK) {
+               ret = app_info_create(item_info->appid, &app_info);
+               if (ret != APP_MANAGER_ERROR_NONE) {
                        _E("get appinfo failed. ret[%d]", ret);
                        continue;
                }
 
-               ret = pkgmgrinfo_appinfo_get_label(appinfo_h, &label);
-               if (ret != PMINFO_R_OK) {
+               ret = app_info_get_label(app_info, &label);
+               if (ret != APP_MANAGER_ERROR_NONE) {
                        _E("Get label failed");
                } else {
                        if (!IS_STRING_EMPTY(label)) {
@@ -2269,7 +2273,8 @@ static void _select_view_update_apps_label(appdata_s *ad)
                                item_info->name = strdup("");
                        }
                }
-               pkgmgrinfo_appinfo_destroy_appinfo(appinfo_h);
+               free(label);
+               app_info_destroy(app_info);
        }
        elm_genlist_realized_items_update(ad->select_gl);
 }
@@ -2277,14 +2282,14 @@ static void _select_view_update_apps_label(appdata_s *ad)
 static void _edit_view_update_slots_apps_label(appdata_s *ad)
 {
        int ret;
-       pkgmgrinfo_appinfo_h appinfo_h;
+       app_info_h app_info;
        char *label;
        int i;
 
        for (i = 0; i < ATW_APP_SLOTS_MAX_COUNT; i++) {
                if (!IS_STRING_EMPTY(ad->appid_list[i]) && strcmp(ad->appid_list[i], "empty")) {
                        ret = 0;
-                       appinfo_h = NULL;
+                       app_info = NULL;
                        label = NULL;
 
                        if (!strcmp(ad->appid_list[i], APPS_PKG)) {
@@ -2292,13 +2297,14 @@ static void _edit_view_update_slots_apps_label(appdata_s *ad)
                                continue;
                        }
 
-                       ret = pkgmgrinfo_appinfo_get_appinfo(ad->appid_list[i], &appinfo_h);
-                       if (ret != PMINFO_R_OK) {
+                       ret = app_info_create(ad->appid_list[i], &app_info);
+                       if (ret != APP_MANAGER_ERROR_NONE) {
                                _E("get appinfo failed. ret[%d]", ret);
                                continue;
                        }
-                       ret = pkgmgrinfo_appinfo_get_label(appinfo_h, &label);
-                       if (ret != PMINFO_R_OK) {
+
+                       ret = app_info_get_label(app_info, &label);
+                       if (ret != APP_MANAGER_ERROR_NONE) {
                                _E("Get label failed");
                        } else {
                                char buff[BUF_SIZE_SMALL] = { 0 };
@@ -2308,7 +2314,8 @@ static void _edit_view_update_slots_apps_label(appdata_s *ad)
                                        elm_object_part_text_set(eo, "name", label);
                                }
                        }
-                       pkgmgrinfo_appinfo_destroy_appinfo(appinfo_h);
+                       free(label);
+                       app_info_destroy(app_info);
                }
        }
 }
index 2dafe70e318e657e859a81b9aa74124852b3bcad..b1cd4068159b3f80c49277a3e3db152cd8e1beef 100644 (file)
@@ -18,8 +18,8 @@
 #include "apptray_wgt_app_item_info.h"
 
 #include <stdlib.h>
-#include <pkgmgr-info.h>
-#include <package-manager.h>
+#include <app_info.h>
+#include <app_manager.h>
 
 #include "apptray_wgt_app_common_def.h"
 #include "apptray_wgt_app_log.h"
@@ -31,12 +31,10 @@ apptray_wgt_app_item_info_s *apptray_wgt_app_item_info_create(const char *appid)
        _ENTER;
 
        apptray_wgt_app_item_info_s *item_info = NULL;
-       pkgmgrinfo_appinfo_h appinfo_h = NULL;
-       pkgmgrinfo_pkginfo_h pkghandle = NULL;
+       app_info_h appinfo_h = NULL;
        char *pkgid = NULL;
        char *name = NULL;
        char *icon = NULL;
-       char *type = NULL;
        bool nodisplay = false;
        bool enabled = false;
        bool removable = false;
@@ -48,43 +46,33 @@ apptray_wgt_app_item_info_s *apptray_wgt_app_item_info_create(const char *appid)
                return NULL;
        }
 
-       int error = pkgmgrinfo_appinfo_get_appinfo(appid, &appinfo_h);
+       int error = app_info_create(appid, &appinfo_h);
        _D("AppTrayError Error = %d, AppID=%s", error, appid);
-       goto_if(0 > error, ERROR);
+       goto_if(error != APP_MANAGER_ERROR_NONE, ERROR);
 
-
-       goto_if(PMINFO_R_OK != pkgmgrinfo_appinfo_get_label(appinfo_h, &name), ERROR);
-       goto_if(PMINFO_R_OK != pkgmgrinfo_appinfo_get_icon(appinfo_h, &icon), ERROR);
+       goto_if(app_info_get_package(appinfo_h, &pkgid) != APP_MANAGER_ERROR_NONE, ERROR);
+       goto_if(app_info_get_label(appinfo_h, &name) != APP_MANAGER_ERROR_NONE, ERROR);
+       goto_if(app_info_get_icon(appinfo_h, &icon) != APP_MANAGER_ERROR_NONE, ERROR);
        _D("name:%s, icon:%s", name, icon);
 
-       do {
-               break_if(PMINFO_R_OK != pkgmgrinfo_appinfo_get_pkgid(appinfo_h, &pkgid));
-               break_if(NULL == pkgid);
-
-               break_if(0 > pkgmgrinfo_pkginfo_get_pkginfo(pkgid, &pkghandle));
-               break_if(NULL == pkghandle);
-       } while (0);
-
        if (strncmp(appid, APPS_PKG, strlen(APPS_PKG))) {
-               goto_if(PMINFO_R_OK != pkgmgrinfo_appinfo_is_nodisplay(appinfo_h, &nodisplay), ERROR);
-               if (nodisplay)
+               goto_if(app_info_is_nodisplay(appinfo_h, &nodisplay) != APP_MANAGER_ERROR_NONE, ERROR);
+               if (nodisplay) {
                        goto ERROR;
-
-               goto_if(PMINFO_R_OK != pkgmgrinfo_appinfo_is_enabled(appinfo_h, &enabled), ERROR);
-               if (!enabled)
+               }
+               goto_if(app_info_is_enabled(appinfo_h, &enabled) != APP_MANAGER_ERROR_NONE, ERROR);
+               if (!enabled) {
                        goto ERROR;
-
-               goto_if(PMINFO_R_OK != pkgmgrinfo_pkginfo_get_type(pkghandle, &type), ERROR);
+               }
        }
 
        if (pkgid) {
                item_info->pkgid = strdup(pkgid);
-               goto_if(NULL == item_info->pkgid, ERROR);
+               goto_if(!item_info->pkgid, ERROR);
        }
 
-
        item_info->appid = strdup(appid);
-       goto_if(NULL == item_info->appid, ERROR);
+       goto_if(!item_info->appid, ERROR);
 
        if (name) {
                if (!strncmp(appid, APPS_PKG, strlen(APPS_PKG))) {
@@ -97,16 +85,6 @@ apptray_wgt_app_item_info_s *apptray_wgt_app_item_info_create(const char *appid)
                goto_if(NULL == item_info->name, ERROR);
        }
 
-       if (type) {
-               item_info->type = strdup(type);
-               goto_if(NULL == item_info->type, ERROR);
-               if (!strncmp(item_info->type, APP_TYPE_WGT, strlen(APP_TYPE_WGT))) {
-                       item_info->open_app = 1;
-               } else {
-                       item_info->open_app = 0;
-               }
-       }
-
        if (icon) {
                if (strlen(icon) > 0) {
                        item_info->icon = strdup(icon);
@@ -121,20 +99,25 @@ apptray_wgt_app_item_info_s *apptray_wgt_app_item_info_create(const char *appid)
 
        item_info->removable = removable;
 
-       pkgmgrinfo_appinfo_destroy_appinfo(appinfo_h);
-       if (pkghandle)
-               pkgmgrinfo_pkginfo_destroy_pkginfo(pkghandle);
+       free(pkgid);
+       free(name);
+       free(icon);
 
+       if (appinfo_h) {
+               app_info_destroy(appinfo_h);
+       }
        return item_info;
 
 ERROR:
        apptray_wgt_app_item_info_destroy(item_info);
 
-       if (appinfo_h)
-               pkgmgrinfo_appinfo_destroy_appinfo(appinfo_h);
-       if (pkghandle)
-               pkgmgrinfo_pkginfo_destroy_pkginfo(pkghandle);
+       free(pkgid);
+       free(name);
+       free(icon);
 
+       if (appinfo_h) {
+               app_info_destroy(appinfo_h);
+       }
        return NULL;
 }
 
@@ -148,6 +131,5 @@ void apptray_wgt_app_item_info_destroy(apptray_wgt_app_item_info_s *item_info)
        free(item_info->appid);
        free(item_info->name);
        free(item_info->icon);
-       free(item_info->type);
        free(item_info);
 }
index d23a475f35b4093b7162f699f6c33e66b389c773..13cc383ae53858dc9092b6c937aa6b6610f3a148 100755 (executable)
@@ -27,6 +27,7 @@
 #define PATH_MAX 4096
 #define EDJE_FILE "edje/apptray_wgt_app.edj"
 #define PO_DIR "locale/"
+#define DEF_APP_IMAGE "images/unknown.png"
 
 static const char *_get_app_res_dir_path();
 
@@ -71,3 +72,15 @@ const char *apptray_wgt_app_utils_get_locale_path()
        return res_path;
 }
 
+const char *apptray_wgt_app_utils_get_default_app_icon_path()
+{
+       static char res_path[PATH_MAX] = {'\0'};
+       if (res_path[0] == '\0') {
+               const char *temp = _get_app_res_dir_path();
+               if (!temp) {
+                       return NULL;
+               }
+               snprintf(res_path, PATH_MAX, "%s%s", temp, DEF_APP_IMAGE);
+       }
+       return res_path;
+}
index d491f6fc4fc1f6d2d7cc67f2589a5997dfc919c1..628346d53f0f5c2918f6a1fa9e205e6a4275d549 100644 (file)
@@ -1,9 +1,9 @@
 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
 <manifest xmlns="http://tizen.org/ns/packages" api-version="3.0" package="org.tizen.apptray-widget-app" version="1.0.0">
     <profile name="wearable"/>
-    <ui-application appid="org.tizen.apptray-widget-app" exec="apptray-widget-app" multiple="false" nodisplay="true" taskmanage="false" type="capp" hw-acceleration="on">
+    <ui-application appid="org.tizen.apptray-widget-app" exec="apptray-widget-app" hw-acceleration="on" multiple="false" nodisplay="true" taskmanage="false" type="capp">
         <label>Apps</label>
-        <icon>app-widget-app.png</icon>
+        <icon>org.tizen.apptray-widget-app.png</icon>
     </ui-application>
     <privileges>
         <privilege>http://tizen.org/privilege/packagemanager.clearcache</privilege>
index 15a04b18cbf69487d49636dd04bdecdcf1dd1258..90d1a57726c1bc74973f1a01c3cb310acaad0e25 100644 (file)
                                                                <option id="sbi.gnu.cpp.compiler.option.frameworks.core.1561130709" name="Tizen-Frameworks" superClass="sbi.gnu.cpp.compiler.option.frameworks.core" valueType="userObjs">
                                                                        <listOptionValue builtIn="false" value="Native_API"/>
                                                                </option>
+                                                               <option id="gnu.cpp.compiler.option.dialect.std.1361070154" name="Language standard" superClass="gnu.cpp.compiler.option.dialect.std" value="gnu.cpp.compiler.dialect.default" valueType="enumerated"/>
                                                                <inputType id="cdt.managedbuild.tool.gnu.cpp.compiler.input.626320974" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input"/>
                                                        </tool>
                                                        <tool command="clang" id="org.tizen.nativecore.tool.sbi.gnu.c.compiler.1114323666" name="C Compiler" superClass="org.tizen.nativecore.tool.sbi.gnu.c.compiler">
                                                                <option id="sbi.gnu.c.compiler.option.frameworks.core.1264745576" name="Tizen-Frameworks" superClass="sbi.gnu.c.compiler.option.frameworks.core" valueType="userObjs">
                                                                        <listOptionValue builtIn="false" value="Native_API"/>
                                                                </option>
+                                                               <option id="gnu.c.compiler.option.dialect.std.1242722092" name="Language standard" superClass="gnu.c.compiler.option.dialect.std" value="gnu.c.compiler.dialect.default" valueType="enumerated"/>
                                                                <inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.1916726728" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
                                                        </tool>
                                                        <tool id="org.tizen.nativeide.tool.sbi.gnu.c.linker.base.845346077" name="C Linker" superClass="org.tizen.nativeide.tool.sbi.gnu.c.linker.base"/>
                                                                <option id="gnu.cpp.link.option.paths.219024350" name="Library search path (-L)" superClass="gnu.cpp.link.option.paths" valueType="libPaths">
                                                                        <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/lib}&quot;"/>
                                                                </option>
+                                                               <option id="gnu.cpp.link.option.libs.161125559" name="Libraries (-l)" superClass="gnu.cpp.link.option.libs" valueType="libs"/>
                                                                <inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.935706192" superClass="cdt.managedbuild.tool.gnu.cpp.linker.input">
                                                                        <additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
                                                                        <additionalInput kind="additionalinput" paths="$(LIBS)"/>
                                                        <tool id="org.tizen.nativecore.tool.ast.cpp.836782612" name="C++ Static Analyzer" superClass="org.tizen.nativecore.tool.ast.cpp"/>
                                                        <tool id="org.tizen.nativecore.tool.sbi.gnu.archiver.mergelib.1037269527" name="Archive Generator" superClass="org.tizen.nativecore.tool.sbi.gnu.archiver.mergelib"/>
                                                        <tool id="org.tizen.nativecore.tool.sbi.po.compiler.1805550950" name="PO Resource Compiler" superClass="org.tizen.nativecore.tool.sbi.po.compiler"/>
-                                                       <tool id="org.tizen.nativecore.tool.sbi.edc.compiler.723202489" name="EDC Resource Compiler" superClass="org.tizen.nativecore.tool.sbi.edc.compiler"/>
+                                                       <tool id="org.tizen.nativecore.tool.sbi.edc.compiler.723202489" name="EDC Resource Compiler" superClass="org.tizen.nativecore.tool.sbi.edc.compiler">
+                                                               <option id="sbi.gnu.edc.compiler.option.misc.id.70820036" name="Image Path (-id)" superClass="sbi.gnu.edc.compiler.option.misc.id" valueType="stringList">
+                                                                       <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}}/edc/images&quot;"/>
+                                                               </option>
+                                                       </tool>
                                                </toolChain>
                                        </folderInfo>
                                        <sourceEntries>
index 1312c56e8a90c1a03e5f610fbd0c76b128db4023..7d8978b774ef7638646aa6e2ec450004743ad01b 100755 (executable)
@@ -11,29 +11,15 @@ SET(VENDOR "tizen")
 SET(PACKAGE ${PROJECT_NAME})
 SET(PKGNAME "org.${VENDOR}.${PACKAGE}")
 SET(PREFIX ${CMAKE_INSTALL_PREFIX})
-#SET(INSTALL_DIR_APPS "/usr/apps/${PKGNAME}")
-SET(INSTALL_DIR_PRE "/usr")
 
 SET(BINDIR "${PREFIX}/bin")
 SET(RESDIR "${PREFIX}/res")
-SET(IMAGEDIR "${RESDIR}/image/${PROJECT_NAME}")
+SET(IMAGEDIR "${RESDIR}/images")
 SET(IMAGEDIR2 "${RESDIR}/edje/images")
-SET(DATADIR "${PREFIX}/data")
 SET(LOCALEDIR "${RESDIR}/locale")
-SET(ICONDIR "${RESDIR}/icons")
-SET(SOUNDDIR "${RESDIR}/sounds")
 SET(EDJDIR "${RESDIR}/edje")
 SET(SHARED_RES "${PREFIX}/shared/res")
 
-
-IF("${ARCH}" STREQUAL "arm")
-        ADD_DEFINITIONS("-DARM_TYPE")
-ELSE()
-        ADD_DEFINITIONS("-DEMULATOR_TYPE")
-ENDIF()
-MESSAGE("ARCH: ${ARCH}")
-
-
 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC")
 
 SET(GC_SECTIONS_FLAGS "-fdata-sections -ffunction-sections -Wl,--gc-sections")
@@ -42,14 +28,13 @@ SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${GC_SECTIONS_FLAGS}")
 
 INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/inc)
 
-
 INCLUDE(FindPkgConfig)
-pkg_check_modules(pkgs REQUIRED 
+pkg_check_modules(pkgs REQUIRED
        appcore-efl
-       aul
        bundle
        capi-appfw-application
        capi-appfw-package-manager
+       capi-appfw-app-manager
        capi-system-system-settings
        capi-appfw-widget-application
        capi-appfw-preference
@@ -68,23 +53,17 @@ pkg_check_modules(pkgs REQUIRED
        widget_viewer
        widget_viewer_evas
        widget_service
-       pkgmgr
-       pkgmgr-info
        efl-extension
        vconf
        appsvc
        feedback
 )
-#??
-FIND_LIBRARY(LIB_M m)
 
 ADD_DEFINITIONS(${pkgs_CFLAGS})
 ADD_DEFINITIONS("-fpie")
 
 ADD_DEFINITIONS("-DPREFIX=\"${CMAKE_INSTALL_PREFIX}\"")
 ADD_DEFINITIONS("-DFACTORYFS=\"$ENV{FACTORYFS}\"")
-ADD_DEFINITIONS("-DSLP_DEBUG")
-ADD_DEFINITIONS("-DSLP_PROF")
 
 ADD_DEFINITIONS("-DVENDOR=\"${VENDOR}\"")
 ADD_DEFINITIONS("-DPACKAGE=\"${PACKAGE}\"")
@@ -94,51 +73,41 @@ ADD_DEFINITIONS("-DPREFIX=\"${PREFIX}\"")
 ADD_DEFINITIONS("-DINSTALL_DIR_APPS=\"${INSTALL_DIR_APPS}\"")
 ADD_DEFINITIONS("-DBINDIR=\"${BINDIR}\"")
 ADD_DEFINITIONS("-DLOCALEDIR=\"${LOCALEDIR}\"")
-ADD_DEFINITIONS("-DICON_DIR=\"${ICONDIR}\"")
 ADD_DEFINITIONS("-DIMAGEDIR=\"${IMAGEDIR}\"")
-ADD_DEFINITIONS("-DSOUND_DIR=\"${SOUNDDIR}\"")
 ADD_DEFINITIONS("-DEDJDIR=\"${EDJDIR}\"")
-ADD_DEFINITIONS("-DWINDI_EDJ=\"${EDJDIR}/${PROJECT_NAME}.edj\"")
 ADD_DEFINITIONS("-DPROJECT=\"${PROJECT_NAME}\"")
 
 ADD_EXECUTABLE(${PROJECT_NAME} ${SRCS})
 TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${pkgs_LDFLAGS} "-pie" ${LIB_M} -licui18n -licuuc)
 
 #edc compile
-
-ADD_CUSTOM_TARGET(apptray_widget.edj
+ADD_CUSTOM_TARGET(apptray_wgt.edj
        COMMAND edje_cc -id
        ${CMAKE_CURRENT_SOURCE_DIR}/edc/images ${EDJE_CFLAGS}
-       ${CMAKE_CURRENT_SOURCE_DIR}/res/edje/apptray_widget.edc ${CMAKE_BINARY_DIR}/apptray_widget.edj
-       DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/res/edje/apptray_widget.edc
+       ${CMAKE_CURRENT_SOURCE_DIR}/res/edje/apptray_wgt.edc ${CMAKE_BINARY_DIR}/apptray_wgt.edj
+       DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/res/edje/apptray_wgt.edc
                ${CMAKE_CURRENT_SOURCE_DIR}/edc/apptray_widget_color_class.edc
                ${CMAKE_CURRENT_SOURCE_DIR}/edc/apptray_widget_common_defines.edc
                ${CMAKE_CURRENT_SOURCE_DIR}/edc/apptray_widget_main_ly.edc
                ${CMAKE_CURRENT_SOURCE_DIR}/edc/apptray_widget_slot_ly.edc
 )
-ADD_DEPENDENCIES(${PROJECT_NAME} apptray_widget.edj)
+ADD_DEPENDENCIES(${PROJECT_NAME} apptray_wgt.edj)
 ADD_DEPENDENCIES(${PROJECT_NAME} edj_build)
 
 # install files
 INSTALL(TARGETS ${PROJECT_NAME} DESTINATION ${BINDIR})
-INSTALL(FILES ${CMAKE_BINARY_DIR}/apptray_widget.edj DESTINATION ${EDJDIR})
+INSTALL(FILES ${CMAKE_BINARY_DIR}/apptray_wgt.edj DESTINATION ${EDJDIR})
 
 # install application HOME directory
 INSTALL(DIRECTORY DESTINATION ${RESDIR})
 
-#ADD_SUBDIRECTORY(po)
-
 # install desktop files
 set(PREFIX ${CMAKE_INSTALL_PREFIX})
-#INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/org.tizen.apptray-widget.xml DESTINATION /usr/share/packages)
 
+#shared res
+INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/shared/res/ DESTINATION ${SHARED_RES})
 
 #image
-#INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/res/image/ DESTINATION ${IMAGEDIR})
 INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/res/images/ DESTINATION ${IMAGEDIR})
 
-
-#icons
-INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/res/icon/org.tizen.apptray-widget.png DESTINATION /usr/share/icons)
-INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/res/icon/org.tizen.apptray-widget-small.png DESTINATION /usr/share/icons)
 # End of a file
index 5d4eaf757349ca45011fe3bdf5c0ef5e28fbaa46..bbf957d63fcf501fa474a9e9353d5294506880fb 100644 (file)
 #ifndef __APP_WIDGET_COMMON_DEFINES_H__
 #define __APP_WIDGET_COMMON_DEFINES_H__
 
-#define PATH_MAX 4096  /* # chars in a path name including nul */
+#include "apptray_widget_utils.h"
+
+#define PATH_MAX 4096  /* chars in a path name including nul */
 
 #define PUBLIC __attribute__((visibility("default")))
-#define EDJE_FILE "edje/apptray_widget.edj"
-#define DEFAULT_ICON "images/unknown.png"
-#define LANGUAGE_ARABIC "ar"
 
-#define MESSAGE_PKG "org.tizen.message"
+#define EDJE_FILE "edje/apptray_wgt.edj"
+#define DEFAULT_ICON apptray_wgt_utils_get_default_app_icon_path()
+
 #define WHOME_PKG "org.tizen.w-home"
 #define APPS_PKG "org.tizen.apptray-widget-app"
-#define APPS_WIDGET "org.tizen.apptray-widget"
-#define VCONFKEY_WMS_HOST_STATUS_VENDOR "db/wms/host_status/vendor"
-#define APP_TYPE_WGT "wgt"
 #define APP_LAUNCH_KEY "launch_apps"
 #define WHOME_APP_CONTROL "home_op"
 
 #define DEFAULT_APP_ORDER "org.tizen.apptray-widget-app org.tizen.watch-setting empty empty"
-#define BADGE_SIGNAL_LEN 16
 #define MAX_BADGE_COUNT 999
-#define SHORTCUT_W 123
-#define SHORTCUT_H 123
 #define WIDGET_SLOTS_MAX_COUNT 4
 
 #define BUFF_GIANT_SIZE 1024
index 4b186bf5e2873fde537351fadffba22d72a82c6f..3c187242d0446c6ffd53fd54c15adf51ff33c3a2 100755 (executable)
@@ -22,6 +22,8 @@ void apptray_wgt_utils_get_resource(const char *file_in, char *file_path_out, in
 
 const char *apptray_wgt_utils_get_locale_path();
 
+const char *apptray_wgt_utils_get_default_app_icon_path();
+
 char *apptray_wgt_utils_get_count_str_from_icu(int count);
 
 #endif /* __APPTRAY_WIDGET_UTILS_H__ */
diff --git a/apptray-widget/res/edje/apptray_wgt.edc b/apptray-widget/res/edje/apptray_wgt.edc
new file mode 100755 (executable)
index 0000000..8fbd9ce
--- /dev/null
@@ -0,0 +1,25 @@
+/*
+ * Samsung API
+ * Copyright (c) 2013 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Flora License, Version 1.1 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "../../edc/apptray_widget_color_class.edc"
+#include "../../edc/apptray_widget_common_defines.edc"
+
+collections {
+       base_scale: 1.3;
+       #include "../../edc/apptray_widget_main_ly.edc"
+       #include "../../edc/apptray_widget_slot_ly.edc"
+}
diff --git a/apptray-widget/res/edje/apptray_widget.edc b/apptray-widget/res/edje/apptray_widget.edc
deleted file mode 100755 (executable)
index 8fbd9ce..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Samsung API
- * Copyright (c) 2013 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Flora License, Version 1.1 (the License);
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://floralicense.org/license/
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an AS IS BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include "../../edc/apptray_widget_color_class.edc"
-#include "../../edc/apptray_widget_common_defines.edc"
-
-collections {
-       base_scale: 1.3;
-       #include "../../edc/apptray_widget_main_ly.edc"
-       #include "../../edc/apptray_widget_slot_ly.edc"
-}
diff --git a/apptray-widget/res/icon/org.tizen.apptray-widget-small.png b/apptray-widget/res/icon/org.tizen.apptray-widget-small.png
deleted file mode 100755 (executable)
index 2743f8d..0000000
Binary files a/apptray-widget/res/icon/org.tizen.apptray-widget-small.png and /dev/null differ
diff --git a/apptray-widget/res/icon/org.tizen.apptray-widget.png b/apptray-widget/res/icon/org.tizen.apptray-widget.png
deleted file mode 100755 (executable)
index 2743f8d..0000000
Binary files a/apptray-widget/res/icon/org.tizen.apptray-widget.png and /dev/null differ
diff --git a/apptray-widget/res/images/unknown.png b/apptray-widget/res/images/unknown.png
deleted file mode 100755 (executable)
index 535db60..0000000
Binary files a/apptray-widget/res/images/unknown.png and /dev/null differ
diff --git a/apptray-widget/res/images/unknown_app.png b/apptray-widget/res/images/unknown_app.png
new file mode 100755 (executable)
index 0000000..535db60
Binary files /dev/null and b/apptray-widget/res/images/unknown_app.png differ
index 5740f73f95ff868733ba1f8ef2b9969d8d1b4373..9803917d9d774b9ca0362c028631772406dd989f 100644 (file)
Binary files a/apptray-widget/shared/res/apps_widget_preview.png and b/apptray-widget/shared/res/apps_widget_preview.png differ
diff --git a/apptray-widget/shared/res/org.tizen.apptray-widget.png b/apptray-widget/shared/res/org.tizen.apptray-widget.png
new file mode 100755 (executable)
index 0000000..2743f8d
Binary files /dev/null and b/apptray-widget/shared/res/org.tizen.apptray-widget.png differ
index e1bfcc5e244672e36cf0e7e9136c2515bef3ccd0..45f8210a6dbcdcb7e1d494094b8c71988a7b39a1 100755 (executable)
 #include <widget_app_efl.h>
 #include <widget_errno.h>
 #include <app_control.h>
-#include <pkgmgr-info.h>
-#include <package-manager.h>
-#include <aul.h>
 #include <badge.h>
 #include <package_manager.h>
 
+#include <app_info.h>
+#include <app_manager.h>
+
 #ifndef TELEPHONY_DISABLE
 #include <feedback.h>
 #endif
@@ -56,8 +56,6 @@ struct slot_info {
        char *icon;
        char *label;
        char *pkgid;
-       char* dbox_id;
-       int open_app;
        int badge_count;
        Evas_Object *eo;
        Evas_Object *ao;
@@ -207,7 +205,13 @@ static int _get_app_badge_count(const char *appid)
 
        err = badge_get_display(appid, &is_display);
        _D("badge_get_display err:%d",err);
-       if (BADGE_ERROR_NONE != err) _E("cannot get badge display");
+
+       if (BADGE_ERROR_NOT_EXIST == err) {
+               _D("Badge does not exist");
+               return 0;
+       } else if (BADGE_ERROR_NONE != err) {
+               _E("Cannot get badge display. err[%d]", err);
+       }
 
        if (!is_display)
                return 0;
@@ -268,8 +272,12 @@ static void _badge_changed_cb(unsigned int action, const char *appid, unsigned i
                is_display = 0;
        } else {
                err = badge_get_display(appid, &is_display);
-               if (BADGE_ERROR_NONE != err)
-                       _E("cannot get badge display");
+               if (BADGE_ERROR_NOT_EXIST == err) {
+                       _D("Badge does not exist");
+                       count = 0;
+               } else if (BADGE_ERROR_NONE != err) {
+                       _E("Cannot get badge display. err[%d]", err);
+               }
                if (!is_display)
                        count = 0;
        }
@@ -301,48 +309,27 @@ static void _unregister_badge_changed_callback(void)
 
 static void _process_slot_click_event(struct slot_info *slot)
 {
-       if (!strcmp(slot->appid, APPS_PKG)) {
-               _D("Try luanch 'Apps'");
-               app_control_h service = NULL;
-
-               ret_if(APP_CONTROL_ERROR_NONE != app_control_create(&service));
-               ret_if(!service);
+       app_control_h service = NULL;
+       int ret = app_control_create(&service);
+       if (ret != APP_CONTROL_ERROR_NONE) {
+               _E("app_control_create() failed. ret[%d]", ret);
+       }
+       ret_if(!service);
 
+       if (!strcmp(slot->appid, APPS_PKG)) {
                app_control_set_operation(service, APP_CONTROL_OPERATION_DEFAULT);
                app_control_set_app_id(service, WHOME_PKG);
                app_control_add_extra_data(service, WHOME_APP_CONTROL, APP_LAUNCH_KEY);
-
-               int ret = app_control_send_launch_request(service, NULL, NULL);
-               if (APP_CONTROL_ERROR_NONE != ret) {
-                       _E("Send launch request failed. ret[%d]", ret);
-               }
-               app_control_destroy(service);
+       } else {
+               app_control_set_operation(service, APP_CONTROL_OPERATION_MAIN);
+               app_control_set_app_id(service, slot->appid);
        }
-       else{
-               _D("Try launch '%s'", slot->appid);
-               if (slot->open_app) {
-                       _D("launch wgt");
-                       int ret_aul  = aul_open_app(slot->appid);
-                       if (ret_aul < AUL_R_OK) {
-                               _E("wgt launch failed");
-                       }
-               } else {
-                       _D("launch normal");
-                       app_control_h service = NULL;
-
-                       ret_if(APP_CONTROL_ERROR_NONE != app_control_create(&service));
-                       ret_if(!service);
-
-                       app_control_set_operation(service, APP_CONTROL_OPERATION_MAIN);
-                       app_control_set_app_id(service, slot->appid);
 
-                       int ret = app_control_send_launch_request(service, NULL, NULL);
-                       if (APP_CONTROL_ERROR_NONE != ret) {
-                               _E("Send launch request failed. ret[%d]", ret);
-                       }
-                       app_control_destroy(service);
-               }
+       ret = app_control_send_launch_request(service, NULL, NULL);
+       if (APP_CONTROL_ERROR_NONE != ret) {
+               _E("Send launch request failed. ret[%d]", ret);
        }
+       app_control_destroy(service);
 }
 
 static void _slot_clicked_cb(void *data, Evas_Object *obj, const char *emission, const char *source)
@@ -361,7 +348,7 @@ static void _slot_clicked_cb(void *data, Evas_Object *obj, const char *emission,
 static Evas_Object *_create_slot_layout(struct info *item, int pos)
 {
        char full_path[PATH_MAX] = { 0 };
-       char index[SLOT_INDEX_BUF_SIZE] = { NULL };
+       char index[SLOT_INDEX_BUF_SIZE] = { 0 };
        Evas_Object *slot = NULL;
 
        snprintf(index, sizeof(index), "slot_%d", pos + 1);
@@ -379,9 +366,8 @@ static Evas_Object *_create_slot_layout(struct info *item, int pos)
 
 static Evas_Object *_create_slot_app_icon(struct info *item, int pos)
 {
-       Evas_Object *icon = NULL;
-
-       icon = evas_object_image_add(evas_object_evas_get(item->slot[pos].eo));
+       Evas_Object *icon = evas_object_image_add(
+                       evas_object_evas_get(item->slot[pos].eo));
        retv_if(!icon, NULL);
        evas_object_repeat_events_set(icon, EINA_TRUE);
        evas_object_image_file_set(icon, item->slot[pos].icon, NULL);
@@ -441,11 +427,9 @@ static bool _set_slot(struct info *item, const char *appid, int pos)
        _ENTER;
 
        int ret = 0;
-       pkgmgrinfo_appinfo_h appinfo_h = NULL;
-       pkgmgrinfo_pkginfo_h pkghandle = NULL;
+       app_info_h app_info = NULL;
        char *pkgid = NULL;
        char *label = NULL;
-       char *type = NULL;
        char *icon_path_tmp = NULL;
 
        _D("Try update slot [%d]", pos + 1);
@@ -463,50 +447,30 @@ static bool _set_slot(struct info *item, const char *appid, int pos)
                goto fail_return;
        }
 
-       ret = pkgmgrinfo_appinfo_get_appinfo(appid, &appinfo_h);
-       if (ret != PMINFO_R_OK) {
+       ret = app_info_create(appid, &app_info);
+       if (ret != APP_MANAGER_ERROR_NONE) {
                _E("get appinfo failed. ret[%d]", ret);
                goto fail_return;
        }
 
-       ret = pkgmgrinfo_appinfo_get_pkgid(appinfo_h, &pkgid);
-       if (ret != PMINFO_R_OK) {
-               _E("get pkgid failed. ret[%d]", ret);
-               goto fail_return;
-       }
-
-       ret = pkgmgrinfo_pkginfo_get_pkginfo(pkgid, &pkghandle);
-       if (ret < 0 ) {
-               _E("get pkghandle failed. ret[%d]", ret);
+       ret = app_info_get_package(app_info, &pkgid);
+       if (ret != APP_MANAGER_ERROR_NONE) {
+               _E("get appinfo failed. ret[%d]", ret);
                goto fail_return;
        }
+       item->slot[pos].pkgid = pkgid;
 
-       item->slot[pos].pkgid = strdup(pkgid);
-
-       ret = pkgmgrinfo_appinfo_get_label(appinfo_h, &label);
-       if (ret != PMINFO_R_OK) {
+       ret = app_info_get_label(app_info, &label);
+       if (ret != APP_MANAGER_ERROR_NONE) {
                _E("get label failed. ret[%d]", ret);
                item->slot[pos].label = strdup("");
        } else {
                item->slot[pos].label = strdup(label);
        }
-
        elm_object_part_text_set(item->slot[pos].eo, "name", item->slot[pos].label);
 
-       ret = pkgmgrinfo_pkginfo_get_type(pkghandle, &type);
-       if (ret != PMINFO_R_OK) {
-               _E("get app type failed. ret[%d]", ret);
-       }
-       if (type) {
-               if (!strncmp(type, APP_TYPE_WGT, strlen(APP_TYPE_WGT))) {
-                       item->slot[pos].open_app = 1;
-               } else {
-                       item->slot[pos].open_app = 0;
-               }
-       }
-
-       ret = pkgmgrinfo_appinfo_get_icon(appinfo_h, &icon_path_tmp);
-       if (ret != PMINFO_R_OK) {
+       ret = app_info_get_icon(app_info, &icon_path_tmp);
+       if (ret != APP_MANAGER_ERROR_NONE) {
                _E("get icon path failed. ret[%d]", ret);
        }
        if (icon_path_tmp) {
@@ -534,25 +498,27 @@ static bool _set_slot(struct info *item, const char *appid, int pos)
                _update_slot_access_object_info(&item->slot[pos]);
        }
 
-       if (appinfo_h)
-               pkgmgrinfo_appinfo_destroy_appinfo(appinfo_h);
+       free(label);
+       free(icon_path_tmp);
 
-       if (pkghandle)
-               pkgmgrinfo_pkginfo_destroy_pkginfo(pkghandle);
+       if (app_info)
+               app_info_destroy(app_info);
 
-       _D("slot is added %d", pos + 1);
+       _D("Slot [%d] was added", pos + 1);
 
        return true;
 
 fail_return:
 
-       if (appinfo_h)
-               pkgmgrinfo_appinfo_destroy_appinfo(appinfo_h);
+       _reset_slot_info(item, pos);
 
-       if (pkghandle)
-               pkgmgrinfo_pkginfo_destroy_pkginfo(pkghandle);
+       free(label);
+       free(icon_path_tmp);
 
-       _reset_slot_info(item, pos);
+       if (app_info)
+               app_info_destroy(app_info);
+
+       _D("Slot [%d] was not added", pos + 1);
 
        return false;
 }
@@ -565,8 +531,6 @@ static void _reset_slot_info(struct info *item, int index)
        FREE(item->slot[index].icon);
        FREE(item->slot[index].label);
        FREE(item->slot[index].pkgid);
-       FREE(item->slot[index].dbox_id);
-       item->slot[index].open_app = 0;
 
        char index_str[10] = { 0 };
        snprintf(index_str, sizeof(index_str), "slot_%d", index + 1);
@@ -1143,33 +1107,37 @@ static void _process_widget_instance_lang_change_event(struct info *item)
        _ENTER;
 
        int ret;
-       pkgmgrinfo_appinfo_h appinfo_h;
+       app_info_h app_info;
        char *label;
        int i;
 
        for (i = 0; i < WIDGET_SLOTS_MAX_COUNT; i++) {
                if (!IS_STRING_EMPTY(item->slot[i].appid) && strcmp(item->slot[i].appid, "empty")) {
                        ret = 0;
-                       appinfo_h = NULL;
+                       app_info = NULL;
                        label = NULL;
 
-                       ret = pkgmgrinfo_appinfo_get_appinfo(item->slot[i].appid, &appinfo_h);
-                       if (ret != PMINFO_R_OK) {
+                       ret = app_info_create(item->slot[i].appid, &app_info);
+                       if (ret != APP_MANAGER_ERROR_NONE) {
                                _E("get appinfo failed. ret[%d]", ret);
                                continue;
                        }
 
-                       ret = pkgmgrinfo_appinfo_get_label(appinfo_h, &label);
-                       if (ret == PMINFO_R_OK) {
+                       ret = app_info_get_label(app_info, &label);
+                       if (ret == APP_MANAGER_ERROR_NONE) {
                                free(item->slot[i].label);
-                               item->slot[i].label = strdup(label);
+                               if (label) {
+                                       item->slot[i].label = strdup(label);
+                               } else {
+                                       item->slot[i].label = strdup("");
+                               }
                        }
-
                        elm_object_part_text_set(item->slot[i].eo, "name", item->slot[i].label);
 
                        _update_slot_access_object_info(&item->slot[i]);
 
-                       pkgmgrinfo_appinfo_destroy_appinfo(appinfo_h);
+                       free(label);
+                       app_info_destroy(app_info);
                }
        }
        _update_add_apps_access_object_info(item);
index 66e778b42269401cbf349adbfa2ec4ca3d192434..0fffbac46281d1ffcf6633a5be7679e2079093fa 100755 (executable)
@@ -29,6 +29,7 @@
 
 #define LOCALE_LEN 32
 #define PO_DIR "locale/"
+#define DEF_APP_ICON "images/unknown_app.png"
 
 static const char *_get_app_res_dir_path();
 
@@ -66,6 +67,17 @@ const char *apptray_wgt_utils_get_locale_path()
        return res_path;
 }
 
+const char *apptray_wgt_utils_get_default_app_icon_path()
+{
+       static char res_path[PATH_MAX] = {'\0'};
+       if (res_path[0] == '\0') {
+               const char *temp = _get_app_res_dir_path();
+               retv_if(!temp, NULL);
+               snprintf(res_path, PATH_MAX, "%s%s", temp, DEF_APP_ICON);
+       }
+       return res_path;
+}
+
 char *apptray_wgt_utils_get_count_str_from_icu(int count)
 {
        char *p = NULL;
index 16201d8861df92fc3abda51dc60b9e978346ef4a..4435c6716f3b1113e4946c54256d8d6c04a9d34a 100644 (file)
@@ -1,12 +1,20 @@
 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
 <manifest xmlns="http://tizen.org/ns/packages" api-version="3.0" package="org.tizen.apptray-widget" version="1.0.0">
     <profile name="wearable"/>
-    <widget-application appid="org.tizen.apptray-widget" exec="apptray-widget" hw-acceleration="on" main="true" update-period="0">
-        <label>apptray-widget</label>
-        <icon>apps_widget_preview.png</icon>
+    <widget-application appid="org.tizen.apptray-widget" exec="apptray-widget" hw-acceleration="on" main="true" setup-appid="" update-period="0">
+        <label>App Shortcuts</label>
+        <icon>org.tizen.apptray-widget.png</icon>
         <support-size preview="apps_widget_preview.png">2x2</support-size>
     </widget-application>
     <privileges>
+        <privilege>http://tizen.org/privilege/packagemanager.clearcache</privilege>
+        <privilege>http://tizen.org/privilege/appmanager.launch</privilege>
+        <privilege>http://tizen.org/privilege/contact.read</privilege>
+        <privilege>http://tizen.org/privilege/message.write</privilege>
+        <privilege>http://tizen.org/privilege/notification</privilege>
+        <privilege>http://tizen.org/privilege/message.read</privilege>
         <privilege>http://tizen.org/privilege/packagemanager.info</privilege>
+        <privilege>http://tizen.org/privilege/power</privilege>
+        <privilege>http://tizen.org/privilege/widget.viewer</privilege>
     </privileges>
 </manifest>
index 27cb8a71d17d037bbf66c1e729e00dc2da075946..124a5610277a13ccfb1bbaf7375f3a88b8cd798f 100755 (executable)
@@ -13,11 +13,11 @@ BuildRequires: pkgconfig(badge)
 BuildRequires: pkgconfig(embryo)
 BuildRequires: pkgconfig(elementary)
 BuildRequires: pkgconfig(appcore-efl)
-BuildRequires: pkgconfig(aul)
 BuildRequires: pkgconfig(bundle)
 BuildRequires: pkgconfig(capi-appfw-application)
 BuildRequires: pkgconfig(capi-appfw-widget-application)
 BuildRequires: pkgconfig(capi-appfw-package-manager)
+BuildRequires: pkgconfig(capi-appfw-app-manager)
 BuildRequires: pkgconfig(capi-appfw-preference)
 BuildRequires: pkgconfig(capi-system-system-settings)
 BuildRequires: pkgconfig(dlog)
@@ -26,8 +26,6 @@ BuildRequires: pkgconfig(eina)
 BuildRequires: pkgconfig(evas)
 BuildRequires: pkgconfig(widget_service)
 BuildRequires: pkgconfig(widget_viewer_evas)
-BuildRequires: pkgconfig(pkgmgr)
-BuildRequires: pkgconfig(pkgmgr-info)
 BuildRequires: pkgconfig(efl-extension)
 BuildRequires: pkgconfig(vconf)
 BuildRequires: pkgconfig(appsvc)
@@ -77,9 +75,4 @@ mkdir -p %{buildroot}/opt/usr/apps/org.tizen.apptray-widget
 %{PREFIX}/res/edje/*
 %{PREFIX}/shared/res/*
 /usr/share/packages/*
-/usr/share/icons/org.tizen.apptray-widget-app.png
-/usr/share/icons/org.tizen.apptray-widget-app-small.png
-/usr/share/icons/org.tizen.apptray-widget.png
-/usr/share/icons/org.tizen.apptray-widget-small.png
-/usr/share/icons/apps_widget_preview.png