View: Hide grid data when the 'appstore' menu focused 79/43879/1
authorHyojung Jo <hj903.jo@samsung.com>
Wed, 15 Jul 2015 04:12:13 +0000 (13:12 +0900)
committerHyojung Jo <hj903.jo@samsung.com>
Wed, 15 Jul 2015 04:12:13 +0000 (13:12 +0900)
Change-Id: I467919383b23b64f80bac71409f5ae0b4e6e7bac
Signed-off-by: Hyojung Jo <hj903.jo@samsung.com>
include/define.h
res/view/base.edc
src/view/view_base.c

index f9430de..0c74e61 100644 (file)
 #define SIG_ITEM_SELECTED "item_selected"
 #define SIG_SOURCE_EDC "edc"
 #define SIG_FAVORITE "favorite"
+#define SIG_VISIBLE "visible"
+#define SIG_INVISIBLE "invisible"
+
+/* Signal Source */
+#define SRC_MYAPPS "source.myapps"
 
 /* Font */
 #define FONT_TIZENSANS_REGULAR "TizenSans"
index f0ec2e2..8825ac3 100644 (file)
@@ -135,6 +135,11 @@ group {
                                        relative, 1.0 1.0;
                                }
                        }
+                       description {
+                               state, "invisible" 0.0;
+                               inherit, "default" 0.0;
+                               visible, 0;
+                       }
                }
 
                part {
@@ -175,6 +180,11 @@ group {
                                        align, 0.0 0.5;
                                }
                        }
+                       description {
+                               state, "invisible" 0.0;
+                               inherit, "default" 0.0;
+                               visible, 0;
+                       }
                }
 
                part {
@@ -205,6 +215,11 @@ group {
                                align, 1.0 1.0;
                                fixed, 1 1;
                        }
+                       description {
+                               state, "invisible" 0.0;
+                               inherit, "default" 0.0;
+                               visible, 0;
+                       }
                }
 
                part {
@@ -256,6 +271,28 @@ group {
                        }
                }
        }
+
+       programs {
+               program {
+                       name, SIG_VISIBLE;
+                       signal, SIG_VISIBLE;
+                       source, SRC_MYAPPS;
+                       action, STATE_SET "default" 0.0;
+                       target, PART_APP_COUNT;
+                       target, PART_GENGRID;
+                       target, PART_SORT;
+               }
+
+               program {
+                       name, SIG_INVISIBLE;
+                       signal, SIG_INVISIBLE;
+                       source, SRC_MYAPPS;
+                       action, STATE_SET "invisible" 0.0;
+                       target, PART_APP_COUNT;
+                       target, PART_GENGRID;
+                       target, PART_SORT;
+               }
+       }
 }
 
 group {
index 027d98e..34f6234 100644 (file)
@@ -99,11 +99,11 @@ static void _menu_focused_cb(int id, void *data, Evas_Object *obj,
 
        switch (id) {
        case MENU_MYAPPS:
-               evas_object_show(priv->grid);
+               elm_object_signal_emit(priv->base, SIG_VISIBLE, SRC_MYAPPS);
                break;
 
        case MENU_APPSTORE:
-               evas_object_hide(priv->grid);
+               elm_object_signal_emit(priv->base, SIG_INVISIBLE, SRC_MYAPPS);
                /* It will be implemented later. */
                break;
 
@@ -689,7 +689,7 @@ static void _show(void *data)
                evas_object_show(priv->base);
 
        if (!_draw_top_area(priv)) {
-               _ERR("Draw top bottom area failed.");
+               _ERR("Draw top area failed.");
                return;
        }
 
@@ -699,7 +699,7 @@ static void _show(void *data)
        }
 
        if (!_draw_bottom_area(priv))
-               _ERR("Draw top bottom area failed.");
+               _ERR("Draw bottom area failed.");
 }
 
 static void _hide(void *data)