#include "item_info.h"
#include "elm_layout_legacy.h"
-#define IDS_IDLE_BODY_APPS "apps"
+#define IDS_IDLE_BODY_APPS "Apps"
#define EDJE_FILE "edje/add_to_shortcut.edj"
#define SCHEDULE_ICON_ARABIC "res/schedule_arabic_%s.png"
#define APP_WIDGET_PKGID "org.tizen.app-widget"
-#define DEFAULT_APP_ORDER "org.tizen.watch-setting empty empty empty"
-#define APPS_PKG "org.tizen.appptray-widget-app"
+#define DEFAULT_APP_ORDER "org.tizen.apptray-widget-app empty org.tizen.watch-setting empty"
+#define APPS_PKG "org.tizen.apptray-widget-app"
#define APP_WIDGET_CONTENT_KEY "org.tizen.apptray-widget"
_D("scroller create done");
/* get apps list */
item_info_list = g_info->app_list;
- //todo : check why this is required
-#if 0
+
+ //Handle AppsUI case
item_info_s *apps_item_info = NULL;
Evas_Object *apps_item = NULL;
g_info->item_list = NULL;
apps_item = _create_item(scroller, apps_item_info);
g_info->item_list = eina_list_append(g_info->item_list, apps_item);
}
-#endif
+
Eina_List *l = NULL;
Eina_List *n = NULL;
EINA_LIST_FOREACH_SAFE(item_info_list, l, n, item_info) {
return NULL;
}
- goto_if(0 > pkgmgrinfo_appinfo_get_appinfo(appid, &appinfo_h), ERROR);
+ int error = pkgmgrinfo_appinfo_get_appinfo(appid, &appinfo_h);
+ _D("AppTrayError Error = %d, AppID=%s", error, appid);
+ goto_if(0 > error, 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);
break_if(NULL == pkghandle);
} while (0);
- goto_if(PMINFO_R_OK != pkgmgrinfo_appinfo_is_nodisplay(appinfo_h, &nodisplay), ERROR);
- if (nodisplay) goto ERROR;
+ if(appid != APPS_PKG){
+ goto_if(PMINFO_R_OK != pkgmgrinfo_appinfo_is_nodisplay(appinfo_h, &nodisplay), ERROR);
+ if (nodisplay) goto ERROR;
- goto_if(PMINFO_R_OK != pkgmgrinfo_appinfo_is_enabled(appinfo_h, &enabled), ERROR);
- if (!enabled) goto ERROR;
+ goto_if(PMINFO_R_OK != pkgmgrinfo_appinfo_is_enabled(appinfo_h, &enabled), ERROR);
+ if (!enabled) goto ERROR;
- goto_if(PMINFO_R_OK != pkgmgrinfo_pkginfo_get_type(pkghandle, &type), 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);
}
+
item_info->appid = strdup(appid);
goto_if(NULL == item_info->appid, ERROR);
#define VCONFKEY_WMS_HOST_STATUS_VENDOR "db/wms/host_status/vendor"
#define APP_TYPE_WGT "wgt"
#define APP_WIDGET_CONTENT_KEY "org.tizen.apptray-widget"
+#define APP_LAUNCH_KEY "launch_apps"
+ #define WHOME_APP_CONTROL "home_op"
-#define DEFAULT_APP_ORDER "org.tizen.watch-setting empty empty empty"
+#define DEFAULT_APP_ORDER "org.tizen.apptray-widget-app empty org.tizen.watch-setting empty"
static Eina_List *s_list;
//int errno;
static void _slot_l_mouse_clicked_cb(void *data, Evas_Object *o, const char *emission, const char *source){
_D("icon clicked");
_ENTER;
-
}
static void _slot_r_mouse_clicked_cb(void *data, Evas_Object *o, const char *emission, const char *source){
info = data;
if(!strcmp(info->appid, APPS_PKG)){
app_control_h service = NULL;
- char *type = "launch_apps";
+ char *type = APP_LAUNCH_KEY;
ret_if(APP_CONTROL_ERROR_NONE != app_control_create(&service));
ret_if(NULL == service);
app_control_set_operation(service, APP_CONTROL_OPERATION_DEFAULT);
- app_control_set_app_id(service, "WHOME_PKG");
- app_control_add_extra_data(service, "home_op", type);
+ app_control_set_app_id(service, WHOME_PKG);
+ app_control_add_extra_data(service, WHOME_APP_CONTROL, type);
int ret = app_control_send_launch_request(service, NULL, NULL);
+ _D("Send Launch Request = %d", ret);
if (APP_CONTROL_ERROR_NONE != ret) {
LOGE("error");
app_control_destroy(service);