From: Denis Dolzhenko Date: Thu, 2 Feb 2017 12:30:23 +0000 (+0200) Subject: Delete test code. X-Git-Tag: submit/tizen/20170203.123749~1^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b8d20038d75d5daefe713ff26d17165f398ad337;p=profile%2Fwearable%2Fapps%2Fnative%2Ftaskmanager.git Delete test code. Replace evas_image to elm_object_image Change-Id: I4a21af867b6aa20abb2782a8361fe023ae4bac39 Signed-off-by: Denis Dolzhenko --- diff --git a/inc/Config.h b/inc/Config.h index 55b7c93..a4f1b58 100644 --- a/inc/Config.h +++ b/inc/Config.h @@ -33,7 +33,4 @@ #define SYS_DOMAIN "sys_string" #define APP_DOMAIN PROJECT_NAME -// Preference storage prefix -#define PREF_PREFX "db/private/" PACKAGE_NAME "/" - #endif // Config_h_ diff --git a/res/images/test.jpg b/res/images/test.jpg deleted file mode 100644 index eecbe4d..0000000 Binary files a/res/images/test.jpg and /dev/null differ diff --git a/src/App/src/MainController.cpp b/src/App/src/MainController.cpp index c0be439..26e380a 100644 --- a/src/App/src/MainController.cpp +++ b/src/App/src/MainController.cpp @@ -56,15 +56,6 @@ void MainController::update() } } - //TODO: only for test will be removed. - /*AppInfo appInfo; - appInfo.icon = PathUtils::getResourcePath("images/test.jpg"); - appInfo.name = "Hello"; - m_pTaskListView->appendItem(*new TaskListViewItem(*m_pTaskListView, appInfo)); - m_pTaskListView->appendItem(*new TaskListViewItem(*m_pTaskListView, appInfo)); - m_pTaskListView->appendItem(*new TaskListViewItem(*m_pTaskListView, appInfo)); - m_pTaskListView->appendItem(*new TaskListViewItem(*m_pTaskListView, appInfo));*/ - int itemsCount = m_pTaskListView->getItemsCount(); updateIndex(itemsCount); updateNoContents(itemsCount); diff --git a/src/App/src/TaskListViewItem.cpp b/src/App/src/TaskListViewItem.cpp index 38fc11b..191dd6c 100644 --- a/src/App/src/TaskListViewItem.cpp +++ b/src/App/src/TaskListViewItem.cpp @@ -85,15 +85,15 @@ void TaskListViewItem::setIcon(const std::string &path) if (path.empty()) return; - Evas_Object *icon = evas_object_image_add(getEvas()); - evas_object_image_file_set(icon, path.c_str(), nullptr); - if (evas_object_image_load_error_get(icon) != EVAS_LOAD_ERROR_NONE) + Evas_Object *icon = elm_image_add(m_pTaskLayout); + elm_image_prescale_set(icon, ICON_WIDTH); + elm_image_preload_disabled_set(icon, false); + if (!elm_image_file_set(icon, path.c_str(), nullptr)) { LOG_ERROR("Can't load image: ", path); // TODO: load default icon } elm_object_focus_allow_set(icon, false); - evas_object_image_filled_set(icon, true); elm_object_part_content_set(m_pTaskLayout, "img.app_image", icon); m_AoIcon = elm_access_object_register(icon, m_pTaskLayout);