Reset, Language and Voice Control popup views fixes 07/127707/4
authorRadek Kintop <r.kintop@samsung.com>
Fri, 28 Apr 2017 09:54:08 +0000 (11:54 +0200)
committerRadek Kintop <r.kintop@samsung.com>
Fri, 28 Apr 2017 12:05:44 +0000 (14:05 +0200)
Change-Id: Ie427e5f0683b7a931c53f58ac711ef14d88368d5
Signed-off-by: Radek Kintop <r.kintop@samsung.com>
include/define.h
res/settings.edc
res/view/system/reset.edc [deleted file]
src/view/system/view_language.c
src/view/system/view_reset.c
src/view/system/view_voice_control.c

index 685e6a4..819e2d0 100644 (file)
@@ -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"
 
index 7a26167..8db6825 100644 (file)
@@ -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 (file)
index f7e0703..0000000
+++ /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.";
-                               }
-                       }
-               }
-       }
-}
index cc01c97..993d38d 100644 (file)
@@ -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.");
index d9d0a7b..c2fa7ba 100644 (file)
@@ -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) {
index ca5b68d..672fb9e 100644 (file)
@@ -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.");