From 59e2a79dcb5ba4f59ea5ee2eb353594eb8bd549c Mon Sep 17 00:00:00 2001 From: junkyu Han Date: Wed, 9 Sep 2015 09:35:42 +0900 Subject: [PATCH] Change license & Add privilege for app launch Change-Id: I03ef181add5f89d061c6f06399190a5030c92f9b --- data/edje/all_apps_portrait.edc | 2 +- data/edje/button_edit.edc | 2 +- data/edje/group_4x4_portrait.edc | 2 +- data/edje/index.edc | 2 +- data/edje/item_4x4.edc | 2 +- data/edje/layout_portrait.edc | 2 +- data/org.tizen.menu-screen.xml.in | 3 ++ include/all_apps/db.h | 2 +- include/all_apps/layout.h | 2 +- include/all_apps/list.h | 2 +- include/all_apps/shortcut.h | 2 +- include/conf.h | 2 +- include/db.h | 2 +- include/index.h | 2 +- include/item.h | 2 +- include/item_badge.h | 2 +- include/item_event.h | 2 +- include/key.h | 2 +- include/layout.h | 2 +- include/list.h | 2 +- include/mapbuf.h | 2 +- include/menu_screen.h | 2 +- include/mouse.h | 2 +- include/page.h | 2 +- include/page_scroller.h | 2 +- include/pkgmgr.h | 2 +- include/popup.h | 2 +- include/util.h | 2 +- packaging/org.tizen.menu-screen.spec | 2 +- src/all_apps/db.c | 2 +- src/all_apps/layout.c | 2 +- src/all_apps/list.c | 26 ++++++++-------- src/all_apps/shortcut.c | 2 +- src/db.c | 2 +- src/index.c | 2 +- src/item.c | 2 +- src/item_badge.c | 2 +- src/item_event.c | 2 +- src/key.c | 4 +-- src/layout.c | 4 +-- src/list.c | 2 +- src/mapbuf.c | 2 +- src/menu_screen.c | 60 ++++++++++-------------------------- src/mouse.c | 2 +- src/page.c | 2 +- src/page_scroller.c | 2 +- src/pkgmgr.c | 2 +- src/popup.c | 2 +- src/util.c | 2 +- 49 files changed, 78 insertions(+), 107 deletions(-) diff --git a/data/edje/all_apps_portrait.edc b/data/edje/all_apps_portrait.edc index 4b2c759..2f3773d 100644 --- a/data/edje/all_apps_portrait.edc +++ b/data/edje/all_apps_portrait.edc @@ -1,7 +1,7 @@ /* * MENU-SCREEN * - * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2009-2015 Samsung Electronics Co., Ltd All Rights Reserved * * Contact: Jin Yoon * Junkyu Han diff --git a/data/edje/button_edit.edc b/data/edje/button_edit.edc index fefa59f..b9b53e8 100644 --- a/data/edje/button_edit.edc +++ b/data/edje/button_edit.edc @@ -1,7 +1,7 @@ /* * MENU-SCREEN * - * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2009-2015 Samsung Electronics Co., Ltd All Rights Reserved * * Contact: Jin Yoon * Junkyu Han diff --git a/data/edje/group_4x4_portrait.edc b/data/edje/group_4x4_portrait.edc index ff7a34a..00f64d6 100644 --- a/data/edje/group_4x4_portrait.edc +++ b/data/edje/group_4x4_portrait.edc @@ -1,7 +1,7 @@ /* * MENU-SCREEN * - * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2009-2015 Samsung Electronics Co., Ltd All Rights Reserved * * Contact: Jin Yoon * Junkyu Han diff --git a/data/edje/index.edc b/data/edje/index.edc index 713e382..50d1906 100644 --- a/data/edje/index.edc +++ b/data/edje/index.edc @@ -1,7 +1,7 @@ /* * MENU-SCREEN * - * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2009-2015 Samsung Electronics Co., Ltd All Rights Reserved * * Contact: Jin Yoon * Junkyu Han diff --git a/data/edje/item_4x4.edc b/data/edje/item_4x4.edc index 541e59c..8f33fc2 100644 --- a/data/edje/item_4x4.edc +++ b/data/edje/item_4x4.edc @@ -1,7 +1,7 @@ /* * MENU-SCREEN * - * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2009-2015 Samsung Electronics Co., Ltd All Rights Reserved * * Contact: Jin Yoon * Junkyu Han diff --git a/data/edje/layout_portrait.edc b/data/edje/layout_portrait.edc index dc95b87..6bcea05 100644 --- a/data/edje/layout_portrait.edc +++ b/data/edje/layout_portrait.edc @@ -1,7 +1,7 @@ /* * MENU-SCREEN * - * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2009-2015 Samsung Electronics Co., Ltd All Rights Reserved * * Contact: Jin Yoon * Junkyu Han diff --git a/data/org.tizen.menu-screen.xml.in b/data/org.tizen.menu-screen.xml.in index 75ab124..66c6134 100644 --- a/data/org.tizen.menu-screen.xml.in +++ b/data/org.tizen.menu-screen.xml.in @@ -10,4 +10,7 @@ /usr/share/icons/default/small/org.tizen.menu-screen.png + + http://tizen.org/privilege/appmanager.launch + diff --git a/include/all_apps/db.h b/include/all_apps/db.h index 08997d5..23745e8 100644 --- a/include/all_apps/db.h +++ b/include/all_apps/db.h @@ -1,7 +1,7 @@ /* * MENU-SCREEN * - * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2009-2015 Samsung Electronics Co., Ltd All Rights Reserved * * Contact: Jin Yoon * Junkyu Han diff --git a/include/all_apps/layout.h b/include/all_apps/layout.h index f3d6151..9f0087d 100644 --- a/include/all_apps/layout.h +++ b/include/all_apps/layout.h @@ -1,7 +1,7 @@ /* * MENU-SCREEN * - * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2009-2015 Samsung Electronics Co., Ltd All Rights Reserved * * Contact: Jin Yoon * Junkyu Han diff --git a/include/all_apps/list.h b/include/all_apps/list.h index 126aed8..6f25303 100644 --- a/include/all_apps/list.h +++ b/include/all_apps/list.h @@ -1,7 +1,7 @@ /* * MENU-SCREEN * - * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2009-2015 Samsung Electronics Co., Ltd All Rights Reserved * * Contact: Jin Yoon * Junkyu Han diff --git a/include/all_apps/shortcut.h b/include/all_apps/shortcut.h index 2421671..7c6d5f6 100644 --- a/include/all_apps/shortcut.h +++ b/include/all_apps/shortcut.h @@ -1,7 +1,7 @@ /* * MENU-SCREEN * - * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2009-2015 Samsung Electronics Co., Ltd All Rights Reserved * * Contact: Jin Yoon * Junkyu Han diff --git a/include/conf.h b/include/conf.h index 47cb96c..bfe45a3 100644 --- a/include/conf.h +++ b/include/conf.h @@ -1,7 +1,7 @@ /* * MENU-SCREEN * - * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2009-2015 Samsung Electronics Co., Ltd All Rights Reserved * * Contact: Jin Yoon * Junkyu Han diff --git a/include/db.h b/include/db.h index 5ec5bd9..98f3636 100644 --- a/include/db.h +++ b/include/db.h @@ -1,7 +1,7 @@ /* * MENU-SCREEN * - * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2009-2015 Samsung Electronics Co., Ltd All Rights Reserved * * Contact: Jin Yoon * Junkyu Han diff --git a/include/index.h b/include/index.h index 27ef1c0..68a1447 100644 --- a/include/index.h +++ b/include/index.h @@ -1,7 +1,7 @@ /* * MENU-SCREEN * - * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2009-2015 Samsung Electronics Co., Ltd All Rights Reserved * * Contact: Jin Yoon * Junkyu Han diff --git a/include/item.h b/include/item.h index a42d3c8..1059439 100644 --- a/include/item.h +++ b/include/item.h @@ -1,7 +1,7 @@ /* * MENU-SCREEN * - * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2009-2015 Samsung Electronics Co., Ltd All Rights Reserved * * Contact: Jin Yoon * Junkyu Han diff --git a/include/item_badge.h b/include/item_badge.h index 659b323..b510761 100644 --- a/include/item_badge.h +++ b/include/item_badge.h @@ -1,7 +1,7 @@ /* * MENU-SCREEN * - * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2009-2015 Samsung Electronics Co., Ltd All Rights Reserved * * Contact: Jin Yoon * Junkyu Han diff --git a/include/item_event.h b/include/item_event.h index d140130..605dc33 100644 --- a/include/item_event.h +++ b/include/item_event.h @@ -1,7 +1,7 @@ /* * MENU-SCREEN * - * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2009-2015 Samsung Electronics Co., Ltd All Rights Reserved * * Contact: Jin Yoon * Junkyu Han diff --git a/include/key.h b/include/key.h index 33e4e2a..d9ff320 100644 --- a/include/key.h +++ b/include/key.h @@ -1,7 +1,7 @@ /* * MENU-SCREEN * - * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2009-2015 Samsung Electronics Co., Ltd All Rights Reserved * * Contact: Jin Yoon * Junkyu Han diff --git a/include/layout.h b/include/layout.h index 4edc6b0..44d76b4 100644 --- a/include/layout.h +++ b/include/layout.h @@ -1,7 +1,7 @@ /* * MENU-SCREEN * - * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2009-2015 Samsung Electronics Co., Ltd All Rights Reserved * * Contact: Jin Yoon * Junkyu Han diff --git a/include/list.h b/include/list.h index dda4a7a..b8a0af9 100644 --- a/include/list.h +++ b/include/list.h @@ -1,7 +1,7 @@ /* * MENU-SCREEN * - * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2009-2015 Samsung Electronics Co., Ltd All Rights Reserved * * Contact: Jin Yoon * Junkyu Han diff --git a/include/mapbuf.h b/include/mapbuf.h index db20904..ae607df 100644 --- a/include/mapbuf.h +++ b/include/mapbuf.h @@ -1,7 +1,7 @@ /* * MENU-SCREEN * - * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2009-2015 Samsung Electronics Co., Ltd All Rights Reserved * * Contact: Jin Yoon * Junkyu Han diff --git a/include/menu_screen.h b/include/menu_screen.h index 06d8fc3..b133821 100644 --- a/include/menu_screen.h +++ b/include/menu_screen.h @@ -1,7 +1,7 @@ /* * MENU-SCREEN * - * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2009-2015 Samsung Electronics Co., Ltd All Rights Reserved * * Contact: Jin Yoon * Junkyu Han diff --git a/include/mouse.h b/include/mouse.h index 85d0a29..b46d295 100644 --- a/include/mouse.h +++ b/include/mouse.h @@ -1,7 +1,7 @@ /* * MENU-SCREEN * - * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2009-2015 Samsung Electronics Co., Ltd All Rights Reserved * * Contact: Jin Yoon * Junkyu Han diff --git a/include/page.h b/include/page.h index 4c4ad3a..ef81e3e 100644 --- a/include/page.h +++ b/include/page.h @@ -1,7 +1,7 @@ /* * MENU-SCREEN * - * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2009-2015 Samsung Electronics Co., Ltd All Rights Reserved * * Contact: Jin Yoon * Junkyu Han diff --git a/include/page_scroller.h b/include/page_scroller.h index da9e4f2..b700d99 100644 --- a/include/page_scroller.h +++ b/include/page_scroller.h @@ -1,7 +1,7 @@ /* * MENU-SCREEN * - * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2009-2015 Samsung Electronics Co., Ltd All Rights Reserved * * Contact: Jin Yoon * Junkyu Han diff --git a/include/pkgmgr.h b/include/pkgmgr.h index bd2aa06..9342991 100644 --- a/include/pkgmgr.h +++ b/include/pkgmgr.h @@ -1,7 +1,7 @@ /* * MENU-SCREEN * - * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2009-2015 Samsung Electronics Co., Ltd All Rights Reserved * * Contact: Jin Yoon * Junkyu Han diff --git a/include/popup.h b/include/popup.h index d871b91..85502a6 100644 --- a/include/popup.h +++ b/include/popup.h @@ -1,7 +1,7 @@ /* * MENU-SCREEN * - * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2009-2015 Samsung Electronics Co., Ltd All Rights Reserved * * Contact: Jin Yoon * Junkyu Han diff --git a/include/util.h b/include/util.h index 4ddc2b7..0dd6326 100644 --- a/include/util.h +++ b/include/util.h @@ -1,7 +1,7 @@ /* * MENU-SCREEN * - * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2009-2015 Samsung Electronics Co., Ltd All Rights Reserved * * Contact: Jin Yoon * Junkyu Han diff --git a/packaging/org.tizen.menu-screen.spec b/packaging/org.tizen.menu-screen.spec index 8dfe4c1..2bb49eb 100644 --- a/packaging/org.tizen.menu-screen.spec +++ b/packaging/org.tizen.menu-screen.spec @@ -23,7 +23,7 @@ Summary: An utility library of the menu screen Version: 1.2.5 Release: 1.1 Group: TO_BE/FILLED_IN -License: Apache +License: Apache-2.0 Source0: %{name}-%{version}.tar.gz BuildRequires: pkgconfig(ail) BuildRequires: pkgconfig(appcore-efl) diff --git a/src/all_apps/db.c b/src/all_apps/db.c index eb5485d..104d13c 100644 --- a/src/all_apps/db.c +++ b/src/all_apps/db.c @@ -1,7 +1,7 @@ /* * MENU-SCREEN * - * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2009-2015 Samsung Electronics Co., Ltd All Rights Reserved * * Contact: Jin Yoon * Junkyu Han diff --git a/src/all_apps/layout.c b/src/all_apps/layout.c index 3842193..03bc04f 100644 --- a/src/all_apps/layout.c +++ b/src/all_apps/layout.c @@ -1,7 +1,7 @@ /* * MENU-SCREEN * - * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2009-2015 Samsung Electronics Co., Ltd All Rights Reserved * * Contact: Jin Yoon * Junkyu Han diff --git a/src/all_apps/list.c b/src/all_apps/list.c index 322b65e..9b72d12 100644 --- a/src/all_apps/list.c +++ b/src/all_apps/list.c @@ -1,22 +1,22 @@ /* - * menu-screen + * MENU-SCREEN * - * copyright (c) 2009-2014 samsung electronics co., ltd all rights reserved + * Copyright (c) 2009-2015 Samsung Electronics Co., Ltd All Rights Reserved * - * contact: jin yoon - * junkyu han + * Contact: Jin Yoon + * Junkyu Han - * licensed under the apache license, version 2.0 (the "license"); - * you may not use this file except in compliance with the license. - * you may obtain a copy of the license at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/license-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * 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. + * 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. * */ diff --git a/src/all_apps/shortcut.c b/src/all_apps/shortcut.c index d92cd7a..36536d9 100644 --- a/src/all_apps/shortcut.c +++ b/src/all_apps/shortcut.c @@ -1,7 +1,7 @@ /* * MENU-SCREEN * - * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2009-2015 Samsung Electronics Co., Ltd All Rights Reserved * * Contact: Jin Yoon * Junkyu Han diff --git a/src/db.c b/src/db.c index 9efce2d..19473dd 100644 --- a/src/db.c +++ b/src/db.c @@ -1,7 +1,7 @@ /* * MENU-SCREEN * - * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2009-2015 Samsung Electronics Co., Ltd All Rights Reserved * * Contact: Jin Yoon * Junkyu Han diff --git a/src/index.c b/src/index.c index afac24b..d01b84a 100644 --- a/src/index.c +++ b/src/index.c @@ -1,7 +1,7 @@ /* * MENU-SCREEN * - * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2009-2015 Samsung Electronics Co., Ltd All Rights Reserved * * Contact: Jin Yoon * Junkyu Han diff --git a/src/item.c b/src/item.c index 9313466..c69b347 100644 --- a/src/item.c +++ b/src/item.c @@ -1,7 +1,7 @@ /* * MENU-SCREEN * - * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2009-2015 Samsung Electronics Co., Ltd All Rights Reserved * * Contact: Jin Yoon * Junkyu Han diff --git a/src/item_badge.c b/src/item_badge.c index ce4c853..94d4d38 100644 --- a/src/item_badge.c +++ b/src/item_badge.c @@ -1,7 +1,7 @@ /* * MENU-SCREEN * - * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2009-2015 Samsung Electronics Co., Ltd All Rights Reserved * * Contact: Jin Yoon * Junkyu Han diff --git a/src/item_event.c b/src/item_event.c index 01aa4f1..1210e25 100644 --- a/src/item_event.c +++ b/src/item_event.c @@ -1,7 +1,7 @@ /* * MENU-SCREEN * - * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2009-2015 Samsung Electronics Co., Ltd All Rights Reserved * * Contact: Jin Yoon * Junkyu Han diff --git a/src/key.c b/src/key.c index 15685de..f1eb244 100644 --- a/src/key.c +++ b/src/key.c @@ -1,7 +1,7 @@ /* * MENU-SCREEN * - * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2009-2015 Samsung Electronics Co., Ltd All Rights Reserved * * Contact: Jin Yoon * Junkyu Han @@ -22,8 +22,6 @@ #include #include -//#include -//#include #include "conf.h" #include "key.h" diff --git a/src/layout.c b/src/layout.c index 8fe34ad..8cdab6b 100644 --- a/src/layout.c +++ b/src/layout.c @@ -1,7 +1,7 @@ /* * MENU-SCREEN * - * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2009-2015 Samsung Electronics Co., Ltd All Rights Reserved * * Contact: Jin Yoon * Junkyu Han @@ -21,8 +21,6 @@ */ #include -//#include -//#include #include #include "menu_screen.h" diff --git a/src/list.c b/src/list.c index 853b11f..a33be59 100644 --- a/src/list.c +++ b/src/list.c @@ -1,7 +1,7 @@ /* * MENU-SCREEN * - * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2009-2015 Samsung Electronics Co., Ltd All Rights Reserved * * Contact: Jin Yoon * Junkyu Han diff --git a/src/mapbuf.c b/src/mapbuf.c index a9fb5bb..f6561a5 100644 --- a/src/mapbuf.c +++ b/src/mapbuf.c @@ -1,7 +1,7 @@ /* * MENU-SCREEN * - * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2009-2015 Samsung Electronics Co., Ltd All Rights Reserved * * Contact: Jin Yoon * Junkyu Han diff --git a/src/menu_screen.c b/src/menu_screen.c index da494dd..6da58bd 100755 --- a/src/menu_screen.c +++ b/src/menu_screen.c @@ -1,7 +1,7 @@ /* * MENU-SCREEN * - * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2009-2015 Samsung Electronics Co., Ltd All Rights Reserved * * Contact: Jin Yoon * Junkyu Han @@ -187,7 +187,7 @@ HAPI int menu_screen_get_booting_state(void) static bool _is_emulator_on(void) { int ret; - char *model; + char *model = NULL; ret = system_info_get_platform_string("tizen.org/system/model_name", &model); if (SYSTEM_INFO_ERROR_NONE != ret) { @@ -212,7 +212,6 @@ static bool _is_emulator_on(void) static menu_screen_error_e _create_canvas(char *name, char *title) { - //Ecore_X_Atom ATOM_WM_WINDOW_ROLE; char *buf; if (_is_emulator_on()) { @@ -290,15 +289,9 @@ static void _create_bg(void) { _D("Create BG"); char *buf = NULL; - Evas_Coord w; - Evas_Coord h; Evas_Object *bg; - double f, wf, hf; - static int trigger = 0; - const char *key; int width; int height; - int ret = SYSTEM_SETTINGS_ERROR_NONE; if (system_settings_get_value_string(SYSTEM_SETTINGS_KEY_WALLPAPER_HOME_SCREEN, &buf) < 0) { _E("Failed to get a wallpaper: %d\n", SYSTEM_SETTINGS_KEY_WALLPAPER_HOME_SCREEN); @@ -311,8 +304,9 @@ static void _create_bg(void) bg = evas_object_data_get(menu_screen_get_win(), "bg"); if (!bg) { Evas_Object *rect; + rect = evas_object_rectangle_add(menu_screen_get_evas()); - goto_if(!rect, ERROR); + ret_if(!rect); evas_object_data_set(menu_screen_get_win(), "rect", rect); evas_object_color_set(rect, 0, 0, 0, 255); evas_object_size_hint_min_set(rect, width, height); @@ -320,50 +314,28 @@ static void _create_bg(void) elm_win_resize_object_add(menu_screen_get_win(), rect); evas_object_show(rect); - bg = evas_object_image_add(menu_screen_get_evas()); - if (!bg) { - if (rect) { - evas_object_del(rect); - } - goto ERROR; + bg = elm_image_add(menu_screen_get_win()); + if (NULL == bg) { + free(buf); + return; } - evas_object_image_load_orientation_set(bg, EINA_TRUE); evas_object_data_set(menu_screen_get_win(), "bg", bg); } - if (trigger == 0) { - key = "/"; - trigger = 1; - } else { - key = NULL; - trigger = 0; - } + elm_image_aspect_fixed_set(bg, EINA_TRUE); + elm_image_fill_outside_set(bg, EINA_TRUE); + elm_image_preload_disabled_set(bg, EINA_FALSE); - evas_object_image_file_set(bg, buf, key); - evas_object_image_size_get(bg, &w, &h); - if (w == 0 || h == 0) { - _E("There's something wrong, width or height is ZERO"); - goto ERROR; + evas_object_size_hint_min_set(bg, width, height); + evas_object_size_hint_max_set(bg, width, height); + if (!elm_image_file_set(bg, buf, NULL)) { + _E("Failed to set image file : %s", buf); } - evas_object_image_filled_set(bg, 1); - wf = (double) width / (double) w; - hf = (double) height / (double) h; - - f = wf < hf ? hf : wf; - - w = (int) ((double) f * (double) w); - h = (int) ((double) f * (double) h); - - evas_object_image_load_size_set(bg, w, h); - evas_object_image_fill_set(bg, 0, 0, w, h); elm_win_resize_object_add(menu_screen_get_win(), bg); evas_object_show(bg); -ERROR: - if (buf) { - free(buf); - } + free(buf); } diff --git a/src/mouse.c b/src/mouse.c index 1dec1db..0348f3a 100644 --- a/src/mouse.c +++ b/src/mouse.c @@ -1,7 +1,7 @@ /* * MENU-SCREEN * - * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2009-2015 Samsung Electronics Co., Ltd All Rights Reserved * * Contact: Jin Yoon * Junkyu Han diff --git a/src/page.c b/src/page.c index e51349b..1791481 100644 --- a/src/page.c +++ b/src/page.c @@ -1,7 +1,7 @@ /* * MENU-SCREEN * - * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2009-2015 Samsung Electronics Co., Ltd All Rights Reserved * * Contact: Jin Yoon * Junkyu Han diff --git a/src/page_scroller.c b/src/page_scroller.c index ba393e8..f7c1413 100644 --- a/src/page_scroller.c +++ b/src/page_scroller.c @@ -1,7 +1,7 @@ /* * MENU-SCREEN * - * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2009-2015 Samsung Electronics Co., Ltd All Rights Reserved * * Contact: Jin Yoon * Junkyu Han diff --git a/src/pkgmgr.c b/src/pkgmgr.c index 8ffe7ed..aaafe49 100644 --- a/src/pkgmgr.c +++ b/src/pkgmgr.c @@ -1,7 +1,7 @@ /* * MENU-SCREEN * - * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2009-2015 Samsung Electronics Co., Ltd All Rights Reserved * * Contact: Jin Yoon * Junkyu Han diff --git a/src/popup.c b/src/popup.c index 1609621..6a3b3c2 100644 --- a/src/popup.c +++ b/src/popup.c @@ -1,7 +1,7 @@ /* * MENU-SCREEN * - * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2009-2015 Samsung Electronics Co., Ltd All Rights Reserved * * Contact: Jin Yoon * Junkyu Han diff --git a/src/util.c b/src/util.c index 2f518bc..4326c4f 100644 --- a/src/util.c +++ b/src/util.c @@ -1,7 +1,7 @@ /* * MENU-SCREEN * - * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2009-2015 Samsung Electronics Co., Ltd All Rights Reserved * * Contact: Jin Yoon * Junkyu Han -- 2.7.4