[UI] Channel layout updated 39/60639/3
authorMichal Skorupinski <m.skorupinsk@samsung.com>
Fri, 26 Feb 2016 15:42:57 +0000 (16:42 +0100)
committerMichal Skorupinski <m.skorupinsk@samsung.com>
Mon, 29 Feb 2016 15:46:27 +0000 (16:46 +0100)
Change-Id: Id82aeca4024044394b5ffe4661ce5a9f9b4db55f
Signed-off-by: Michal Skorupinski <m.skorupinsk@samsung.com>
include/define.h
include/layout/channel.h
res/layout/channel.edc
src/layout/layout_channel.c

index 47985ec..40d2af3 100644 (file)
@@ -85,6 +85,7 @@
 #define PART_SUBTEXT2 "part.subtext2"
 #define PART_BUTTON "part.button"
 #define PART_PROGRESSBAR "part.progressbar"
+#define PART_CHANNEL_COUNT "part.channel.count"
 #define PART_MENU_VALUE "part.menu.value"
 #define PART_LIVE_TV_BTN "part.live.tv.btn"
 #define PART_MORE_FAV_BTN "part.more.fav.btn"
index cc27a0c..6290a52 100644 (file)
 
 /* String for channel layout */
 #define STR_CHANNEL_TITLE "Auto Program"
-#define STR_SCAN_INIT1 "Connect TV cable to antenna / cable input socket<br>"\
-       "behind the TV to start tuning.<br>You can search all available channels."
-#define STR_SCAN_INIT2 "Press start to search and store channels."
+#define STR_SCAN_INIT1 "Connect TV cable to antenna / cable input socket<br>"      \
+       "behind the TV to start tuning.<br>You can search all available channels.<br>" \
+       "Press start to search and store channels."
+
 #define STR_SCANNING1 "Auto Program is finding channels for you.<br>"\
        "To skip current step, Press stop."
 #define STR_SCANNING2 "%lu found channel"
+
 #define STR_SCAN_FINISH "Auto Program %s.<br>%lu Channels are memorized."
+
 #define STR_START "Start"
 #define STR_STOP "Stop"
 #define STR_OK "OK"
index ca793a9..bb89001 100644 (file)
@@ -19,7 +19,7 @@ group {
        styles {
                style {
                        name, "style.subtext1";
-                       base, "font=BreezeSans:style=Light color=#747474 font_size=32 align=center";
+                       base, "font=BreezeSans:style=Light color=#747474 font_size=32 align=left";
                        tag, "br" "\n";
                }
        }
@@ -36,23 +36,6 @@ group {
                }
 
                part {
-                       name, "padding.title";
-                       type, SPACER;
-                       scale, 1;
-                       description {
-                               state, "default" 0.0;
-                               min, 0 214;
-                               rel1.to, "area";
-                               rel2 {
-                                       to, "area";
-                                       relative, 1.0 0.0;
-                               }
-                               align, 0.5 0.0;
-                               fixed, 0 1;
-                       }
-               }
-
-               part {
                        name, PART_TITLE;
                        type, TEXT;
                        scale, 1;
@@ -60,39 +43,21 @@ group {
                                state, "default" 0.0;
                                color, 77 77 77 255;
                                min, 0 36;
+                               max, -1 36;
                                rel1 {
-                                       to, "padding.title";
-                                       relative, 0.0 1.0;
+                                       relative, 0.0 0.1;
                                }
-                               rel2.to, "padding.title";
                                align, 0.5 0.0;
                                fixed, 0 1;
                                text {
                                        font, FONT_LIGHT;
-                                       align, 0.5 0.5;
+                                       align, 0.5 0.0;
                                        size, 36;
                                }
                        }
                }
 
                part {
-                       name, "padding.subtext1";
-                       type, SPACER;
-                       scale, 1;
-                       description {
-                               state, "default" 0.0;
-                               min, 0 54;
-                               rel1 {
-                                       to, PART_TITLE;
-                                       relative, 0.0 1.0;
-                               }
-                               rel2.to, PART_TITLE;
-                               align, 0.5 0.0;
-                               fixed, 0 1;
-                       }
-               }
-
-               part {
                        name, PART_SUBTEXT1;
                        type, TEXTBLOCK;
                        scale, 1;
@@ -100,60 +65,16 @@ group {
                                state, "default" 0.0;
                                min, 0 112;
                                rel1 {
-                                       to, "padding.subtext1";
-                                       relative, 0.0 1.0;
+                                       relative, 0.35 0.30;
+                               }
+                               rel2 {
+                                       relative, 0.65 0.66;
                                }
-                               rel2.to, "padding.subtext1";
-                               align, 0.5 0.0;
-                               fixed, 0 1;
                                text {
+                                       align, 0.5 0.0;
                                        style, "style.subtext1";
                                }
                        }
-                       description {
-                               state, "scanning" 0.0;
-                               inherit, "default" 0.0;
-                               min, 0 78;
-                       }
-               }
-
-               part {
-                       name, "padding.subtext2";
-                       type, SPACER;
-                       scale, 1;
-                       description {
-                               state, "default" 0.0;
-                               min, 0 48;
-                               rel1 {
-                                       to, PART_SUBTEXT1;
-                                       relative, 0.0 1.0;
-                               }
-                               rel2.to, PART_SUBTEXT1;
-                               align, 0.5 0.0;
-                               fixed, 0 1;
-                       }
-                       description {
-                               state, "scanning" 0.0;
-                               inherit, "default" 0.0;
-                               min, 0 100;
-                       }
-               }
-
-               part {
-                       name, "padding.progressbar";
-                       type, SPACER;
-                       scale, 1;
-                       description {
-                               state, "default" 0.0;
-                               min, 0 54;
-                               rel1.to, PART_SUBTEXT2;
-                               rel2 {
-                                       to, PART_SUBTEXT2;
-                                       relative, 1.0 0.0;
-                               }
-                               align, 0.5 1.0;
-                               fixed, 0 1;
-                       }
                }
 
                part {
@@ -162,16 +83,14 @@ group {
                        scale, 1;
                        description {
                                state, "default" 0.0;
-                               min, 568 4;
+                               min, 568 20;
                                rel1 {
-                                       to, "padding.progressbar";
-                                       relative, 0.5 0.0;
+                                       relative, 0.25 0.48;
                                }
                                rel2 {
-                                       to, "padding.progressbar";
-                                       relative, 0.5 0.0;
+                                       relative, 0.75 0.52;
                                }
-                               align, 0.5 1.0;
+                               align, 0.5 0.5;
                                fixed, 1 1;
                                visible, 0;
                        }
@@ -191,39 +110,24 @@ group {
                                color, 116 116 116 255;
                                min, 0 32;
                                rel1 {
-                                       to, "padding.subtext2";
-                                       relative, 0.0 1.0;
+                                       to, PART_PROGRESSBAR; 
+                                       relative, 0.0 1.1;
+                               }
+                               rel2 {
+                                       to, PART_PROGRESSBAR; 
+                                       relative, 1.0 2.0;
                                }
-                               rel2.to, "padding.subtext2";
-                               align, 0.5 0.0;
-                               fixed, 0 1;
                                text {
                                        font, FONT_LIGHT;
-                                       align, 0.5 0.5;
+                                       align, 1.0 0.0;
                                        size, 32;
                                }
-                       }
-               }
-
-               part {
-                       name, "padding.button";
-                       type, SPACER;
-                       scale, 1;
-                       description {
-                               state, "default" 0.0;
-                               min, 0 278;
-                               rel1 {
-                                       to, PART_SUBTEXT2;
-                                       relative, 0.0 1.0;
-                               }
-                               rel2.to, PART_SUBTEXT2;
-                               align, 0.5 0.0;
-                               fixed, 0 1;
+                               visible, 0;
                        }
                        description {
                                state, "scanning" 0.0;
                                inherit, "default" 0.0;
-                               min, 0 260;
+                               visible, 1;
                        }
                }
 
@@ -234,13 +138,14 @@ group {
                        description {
                                state, "default" 0.0;
                                min, 348 64;
+                               max, 348 64;
                                rel1 {
-                                       to, "padding.button";
-                                       relative, 0.5 1.0;
+
+                                       relative, 0.4 0.75;
                                }
                                rel2 {
-                                       to, "padding.button";
-                                       relative, 0.5 1.0;
+
+                                       relative, 0.6 1.0;
                                }
                                align, 0.5 0.0;
                                fixed, 1 1;
@@ -255,9 +160,8 @@ group {
                        source, SRC_ELM;
                        action, STATE_SET "default" 0.0;
                        target, PART_SUBTEXT1;
-                       target, "padding.subtext2";
+                       target, PART_SUBTEXT2;
                        target, PART_PROGRESSBAR;
-                       target, "padding.button";
                }
 
                program {
@@ -266,9 +170,8 @@ group {
                        source, SRC_ELM;
                        action, STATE_SET "scanning" 0.0;
                        target, PART_SUBTEXT1;
-                       target, "padding.subtext2";
+                       target, PART_SUBTEXT2;
                        target, PART_PROGRESSBAR;
-                       target, "padding.button";
                }
 
                program {
@@ -277,6 +180,8 @@ group {
                        source, SRC_ELM;
                        action, STATE_SET "default" 0.0;
                        target, PART_PROGRESSBAR;
+                       target, PART_SUBTEXT1;
+                       target, PART_SUBTEXT2;
                }
        }
 }
index fbcf2b4..fbd7504 100644 (file)
@@ -28,6 +28,8 @@
 
 #define STOP_BTN_TXT "Stop"
 #define CANCEL_BTN_TXT "Cancel"
+#define STR_CHANNEL_POPUP_TITLE "Channel search stop"
+#define STR_CHANNEL_POPUP_TEXT "<font='BreezeSans:style=Light' color=#686868>Are you sure to stop channel search?<br>Searched %li Channels are saved.</<font>"
 
 enum scan_state {
        STATE_INIT,
@@ -103,6 +105,8 @@ static void _mouse_move_cb(int id, void *data, Evas *e, Evas_Object *obj,
 static void _update_layout_text(struct _priv *priv, const char *emission,
                const char *subtext1, const char *subtext2, const char *btntext)
 {
+       _INFO("emmision: %s; subtext1: %s, subtext2: %s", emission, subtext1, subtext2);
+
        elm_object_signal_emit(priv->ly, emission, SRC_ELM);
        elm_object_part_text_set(priv->ly, PART_SUBTEXT1, subtext1);
        elm_object_part_text_set(priv->ly, PART_SUBTEXT2, subtext2);
@@ -113,6 +117,8 @@ static void _channel_scan_started(struct _priv *priv, long cnt)
 {
        char str[SIZE_STR];
 
+       _INFO("[%s:%s:%d]", __FILE__, __FUNCTION__, __LINE__);
+
        snprintf(str, sizeof(str), STR_SCANNING2, (long)0);
 
        _update_layout_text(priv, SIG_SCANNING, STR_SCANNING1, str, STR_STOP);
@@ -126,6 +132,8 @@ static void _channel_scan_progress(struct _priv *priv, short cnt)
        int ratio;
        char str[SIZE_STR];
 
+       _INFO("[%s:%s:%d]", __FILE__, __FUNCTION__, __LINE__);
+
        priv->scanned_cnt++;
        priv->found_cnt += cnt;
 
@@ -143,16 +151,19 @@ static void _channel_scan_progress(struct _priv *priv, short cnt)
 
 static void _channel_scan_finished(struct _priv *priv, long finish_type)
 {
+
        char *finish_str;
        char str[SIZE_STR];
 
        switch (finish_type) {
        case TVS_SCAN_SEARCH_FINISH_STOPPED:
                finish_str = STR_STOP2;
+               _INFO("[%s:%s:%d]", __FILE__, __FUNCTION__, __LINE__, "TVS_SCAN_SEARCH_FINISH_STOPPED");
                break;
 
        case TVS_SCAN_SEARCH_FINISH_COMPLETE:
                finish_str = STR_COMPLETE;
+               _INFO("[%s:%s:%d]", __FILE__, __FUNCTION__, __LINE__, "TVS_SCAN_SEARCH_FINISH_COMPLETE");
                break;
 
        default:
@@ -285,10 +296,12 @@ static void _stop_popup_create(struct _priv *priv)
 {
        Evas_Object *btn = NULL;
 
-       priv->popup = utils_add_popup(priv->base, NULL,
-                       "Channel search stop",
-                       "Are you sure to stop channel search?<br>Searched 0 Channels are saved.");
+       char str[SIZE_STR];
+
+
+       snprintf(str, sizeof(str), STR_CHANNEL_POPUP_TEXT, priv->found_cnt);
 
+       priv->popup = utils_add_popup(priv->base, NULL, STR_CHANNEL_POPUP_TITLE, str);
        btn = utils_add_button(priv->popup, "button1", NULL, CANCEL_BTN_TXT);
        inputmgr_add_callback(btn, POPUP_BTN_CANCEL, &_popup_input_handler, priv);
 
@@ -312,7 +325,7 @@ static void _channel_scan_stop(struct _priv *priv)
 static void _channel_scan_init(struct _priv *priv)
 {
        _update_layout_text(priv, SIG_SCAN_INIT, STR_SCAN_INIT1,
-                       STR_SCAN_INIT2, STR_START);
+                       NULL, STR_START);
 
        priv->cur_state = STATE_INIT;
 }