From 2ab31127df085180d42f2a1f70e0d3992f1994ac Mon Sep 17 00:00:00 2001 From: Radek Kintop Date: Fri, 28 Apr 2017 11:54:08 +0200 Subject: [PATCH] Reset, Language and Voice Control popup views fixes Change-Id: Ie427e5f0683b7a931c53f58ac711ef14d88368d5 Signed-off-by: Radek Kintop --- include/define.h | 1 - res/settings.edc | 1 - res/view/system/reset.edc | 64 ------------------------------------ src/view/system/view_language.c | 5 +-- src/view/system/view_reset.c | 13 ++------ src/view/system/view_voice_control.c | 8 ++--- 6 files changed, 6 insertions(+), 86 deletions(-) delete mode 100644 res/view/system/reset.edc diff --git a/include/define.h b/include/define.h index 685e6a4..819e2d0 100644 --- a/include/define.h +++ b/include/define.h @@ -43,7 +43,6 @@ #define GRP_VIEW_BASE "grp.view.base" #define GRP_VIEW_CLOCK "grp.view.clock" #define GRP_VIEW_PIN "grp.view.pin" -#define GRP_VIEW_RESET "grp.view.reset" #define GRP_VIEW_NEW_NETWORK "grp.view.new_network" #define GRP_VIEW_WAKEUP_TIMER "grp.view.wakeup_timer" diff --git a/res/settings.edc b/res/settings.edc index 7a26167..8db6825 100644 --- a/res/settings.edc +++ b/res/settings.edc @@ -47,7 +47,6 @@ collections { #include "view/base.edc" #include "view/common/popup_2btns.edc" #include "view/system/clock.edc" - #include "view/system/reset.edc" #include "layout/network.edc" #include "layout/picture.edc" #include "layout/system.edc" diff --git a/res/view/system/reset.edc b/res/view/system/reset.edc deleted file mode 100644 index f7e0703..0000000 --- a/res/view/system/reset.edc +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved - * - * 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 - * - * 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. - */ - -/* Based on 2015_Tizen_TV_Core_controls_GUI_Guideline_1920x1080_v0.6_150922.pptx */ - -group -{ - name: GRP_VIEW_RESET; - parts - { - part - { - type: TEXT; - scale: 1; - description - { - state: "default" 0.0; - color: 104 104 104 255; - rel1.relative: 0.0 0.0; - rel2.relative: 1.0 0.5; - text - { - font: FONT_LIGHT; - size: 32; - align: 0.5 1.0; - text: "Are you sure you want to reset?"; - } - } - } - - part - { - type: TEXT; - scale: 1; - description - { - state: "default" 0.0; - color: 104 104 104 255; - rel1.relative: 0.0 0.5; - rel2.relative: 1.0 1.0; - text - { - font: FONT_LIGHT; - size: 32; - align: 0.5 0.0; - text: "All settings will be reset to default values."; - } - } - } - } -} diff --git a/src/view/system/view_language.c b/src/view/system/view_language.c index cc01c97..993d38d 100644 --- a/src/view/system/view_language.c +++ b/src/view/system/view_language.c @@ -103,8 +103,6 @@ static Evas_Object *_create(Evas_Object *win, void *data) return NULL; } - elm_object_part_text_set(ly, PART_POPUP_TITLE, STR_LANGUAGE_DES); - if (!_fill_popup_btns(priv, ly, LANG_TYPE_MAX, PART_POPUP_BUTTON_X, language_option, EO_BTN_LANG_ENG)) { evas_object_del(priv->base); @@ -112,8 +110,7 @@ static Evas_Object *_create(Evas_Object *win, void *data) return NULL; } - elm_object_content_set(priv->base, ly); - + elm_object_part_content_set(priv->base, "elm.swallow.content", ly); if (!viewmgr_set_view_data(VIEW_LANGUAGE, priv)) { _ERR("Set view data failed."); diff --git a/src/view/system/view_reset.c b/src/view/system/view_reset.c index d9d0a7b..c2fa7ba 100644 --- a/src/view/system/view_reset.c +++ b/src/view/system/view_reset.c @@ -64,7 +64,6 @@ static view_class _vclass = { static Evas_Object *_create(Evas_Object *win, void *data) { - Evas_Object *popup_body = NULL; reset_view_priv_data *priv = NULL; if (!win) { @@ -80,21 +79,13 @@ static Evas_Object *_create(Evas_Object *win, void *data) priv->win = win; - priv->popup = utils_add_popup(win, NULL, "Reset", NULL); + priv->popup = utils_add_popup(win, NULL, "Reset", + "Are you sure you want to reset?"); if (!priv->popup) { free(priv); return NULL; } - popup_body = utils_add_layout(priv->popup, GRP_VIEW_RESET, EINA_FALSE); - if (!popup_body) { - evas_object_del(priv->popup); - free(priv); - return NULL; - } - - elm_object_content_set(priv->popup, popup_body); - priv->reset_btn = utils_add_button(priv->popup, NULL, NULL, "Reset"); priv->cancel_btn = utils_add_button(priv->popup, NULL, NULL, "Cancel"); if (!priv->reset_btn || !priv->cancel_btn) { diff --git a/src/view/system/view_voice_control.c b/src/view/system/view_voice_control.c index ca5b68d..672fb9e 100644 --- a/src/view/system/view_voice_control.c +++ b/src/view/system/view_voice_control.c @@ -80,7 +80,8 @@ static Evas_Object *_create(Evas_Object *win, void *data) return NULL; } - priv->base = utils_add_popup(win, NULL, STR_LANGUAGE, NULL); + priv->base = utils_add_popup(win, NULL, _("IDS_ST_BODY_VOICE_CONTROL"), + NULL); if (!priv->base) { _ERR("Adding popup failed"); free(priv); @@ -95,9 +96,6 @@ static Evas_Object *_create(Evas_Object *win, void *data) return NULL; } - elm_object_translatable_part_text_set(ly, PART_POPUP_TITLE, - _("IDS_ST_HEADER_VOICE_CONTROL")); - snprintf(part_name, sizeof(part_name), PART_POPUP_BUTTON_X, BUTTON_ID_ON); priv->on_button = utils_add_button(ly, part_name, NULL, "IDS_ST_BODY_ON"); @@ -132,7 +130,7 @@ static Evas_Object *_create(Evas_Object *win, void *data) return NULL; } - elm_object_content_set(priv->base, ly); + elm_object_part_content_set(priv->base, "elm.swallow.content", ly); if (!viewmgr_set_view_data(VIEW_VOICE_CONTROL, priv)) { _ERR("Set view data failed."); -- 2.7.4