summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMinkyu Kang <mk7.kang@samsung.com>2015-12-10 00:35:27 (GMT)
committerGerrit Code Review <gerrit@review.vlan103.tizen.org>2015-12-10 00:35:27 (GMT)
commitad5bb8d28f5f05e2a0c1b41bcfc56013013f1e78 (patch)
tree2e543b541417ad759e9132515e4e457755dc94dd
parent99e22c7d4cb65273103b802d5f226cc7687ed1ee (diff)
parent8600bef0fc2b40e25d84afc9edcd452e6165b8fc (diff)
downloadair_mediahub-ad5bb8d28f5f05e2a0c1b41bcfc56013013f1e78.zip
air_mediahub-ad5bb8d28f5f05e2a0c1b41bcfc56013013f1e78.tar.gz
air_mediahub-ad5bb8d28f5f05e2a0c1b41bcfc56013013f1e78.tar.bz2
Merge "layout: set disabled state of view mode button" into tizensubmit/tizen/20151210.003706accepted/tizen/tv/20151210.025149
-rw-r--r--res/edc/widgets/button.edc13
-rw-r--r--src/layout/gallery.c27
-rw-r--r--src/layout/movie.c27
-rw-r--r--src/layout/music.c26
4 files changed, 61 insertions, 32 deletions
diff --git a/res/edc/widgets/button.edc b/res/edc/widgets/button.edc
index eb3cdcc..dbeb890 100644
--- a/res/edc/widgets/button.edc
+++ b/res/edc/widgets/button.edc
@@ -4171,6 +4171,19 @@ group {
transition: TRANSITION_FOCUS;
}
program {
+ name: "enabled";
+ signal: SIG_ELM_ENABLED;
+ source: SIG_SOURCE_ELM;
+ action: STATE_SET "default" 0.0;;
+ target: "bg";
+ target: "border_top";
+ target: "border_left";
+ target: "border_right";
+ target: "border_bottom";
+ target: "elm.text";
+ target: "part_arrow";
+ }
+ program {
name: "disabled";
signal: SIG_ELM_DISABLED;
source: SIG_SOURCE_ELM;
diff --git a/src/layout/gallery.c b/src/layout/gallery.c
index 1a77bac..7c6aad9 100644
--- a/src/layout/gallery.c
+++ b/src/layout/gallery.c
@@ -106,11 +106,18 @@ static struct listmgr_data *_create_listmgr_data(struct _priv *priv)
return data;
}
-static void _update_content_info(struct _priv *priv)
+static void _update_bottom_area(struct _priv *priv)
{
struct datamgr *dmgr;
char buf[128];
+ /* update view mode button state */
+ if (priv->media_list)
+ elm_object_disabled_set(priv->view_btn, EINA_FALSE);
+ else
+ elm_object_disabled_set(priv->view_btn, EINA_TRUE);
+
+ /* update content info */
dmgr = priv->dmgr[E_DATA_MEDIA];
if (!dmgr)
return;
@@ -135,10 +142,8 @@ static void _clear_content_list(struct _priv *priv)
static void _update_content_list(struct _priv *priv)
{
- Eina_List *list;
-
if (priv->media_list) {
- _update_content_info(priv);
+ _update_bottom_area(priv);
return;
}
@@ -149,8 +154,11 @@ static void _update_content_list(struct _priv *priv)
return;
}
- list = priv->gdata->get_item_list(priv->dmgr[E_DATA_MEDIA]);
- if (!list) {
+ priv->media_list = priv->gdata->get_item_list(priv->dmgr[E_DATA_MEDIA]);
+
+ _update_bottom_area(priv);
+
+ if (!priv->media_list) {
elm_object_part_text_set(priv->layout,
PART_NOCONTENT, TEXT_NOCONTENT);
return;
@@ -158,12 +166,9 @@ static void _update_content_list(struct _priv *priv)
priv->gdata->data = priv->dmgr[E_DATA_MEDIA];
- if (!listmgr_update_content_list(priv->listmgr, list, priv->gdata))
+ if (!listmgr_update_content_list(priv->listmgr,
+ priv->media_list, priv->gdata))
_ERR("failed to update list area");
-
- priv->media_list = list;
-
- _update_content_info(priv);
}
static void _destroy_datamgr(struct _priv *priv)
diff --git a/src/layout/movie.c b/src/layout/movie.c
index 1dbefbd..59a6249 100644
--- a/src/layout/movie.c
+++ b/src/layout/movie.c
@@ -346,11 +346,18 @@ err:
return NULL;
}
-static void _update_content_info(struct _priv *priv)
+static void _update_bottom_area(struct _priv *priv)
{
struct datamgr *dmgr;
char buf[128];
+ /* update view mode button state */
+ if (priv->media_list)
+ elm_object_disabled_set(priv->view_btn, EINA_FALSE);
+ else
+ elm_object_disabled_set(priv->view_btn, EINA_TRUE);
+
+ /* update content info */
dmgr = priv->dmgr[E_DATA_MEDIA];
if (!dmgr)
return;
@@ -375,10 +382,8 @@ static void _clear_content_list(struct _priv *priv)
static void _update_content_list(struct _priv *priv)
{
- Eina_List *list;
-
if (priv->media_list) {
- _update_content_info(priv);
+ _update_bottom_area(priv);
return;
}
@@ -389,8 +394,11 @@ static void _update_content_list(struct _priv *priv)
return;
}
- list = priv->gdata->get_item_list(priv->dmgr[E_DATA_MEDIA]);
- if (!list) {
+ priv->media_list = priv->gdata->get_item_list(priv->dmgr[E_DATA_MEDIA]);
+
+ _update_bottom_area(priv);
+
+ if (!priv->media_list) {
elm_object_part_text_set(priv->layout,
PART_NOCONTENT, TEXT_NOCONTENT);
return;
@@ -398,14 +406,11 @@ static void _update_content_list(struct _priv *priv)
priv->gdata->data = priv->dmgr[E_DATA_MEDIA];
- if (!listmgr_update_content_list(priv->listmgr, list, priv->gdata)) {
+ if (!listmgr_update_content_list(priv->listmgr,
+ priv->media_list, priv->gdata)) {
_ERR("failed to update list area");
return;
}
-
- priv->media_list = list;
-
- _update_content_info(priv);
}
static app_media *_get_recent_item(Eina_List *list)
diff --git a/src/layout/music.c b/src/layout/music.c
index 060f688..7c915d2 100644
--- a/src/layout/music.c
+++ b/src/layout/music.c
@@ -293,11 +293,18 @@ static struct datamgr *_get_datamgr(struct _priv *priv)
return dmgr;
}
-static void _update_content_info(struct _priv *priv)
+static void _update_bottom_area(struct _priv *priv)
{
struct datamgr *dmgr;
char buf[128];
+ /* update view mode button state */
+ if (priv->media_list)
+ elm_object_disabled_set(priv->view_btn, EINA_FALSE);
+ else
+ elm_object_disabled_set(priv->view_btn, EINA_TRUE);
+
+ /* update content info */
dmgr = _get_datamgr(priv);
if (!dmgr)
return;
@@ -327,11 +334,10 @@ static void _clear_content_list(struct _priv *priv)
static void _update_content_list(struct _priv *priv)
{
- Eina_List *list;
struct datamgr *dmgr;
if (priv->media_list) {
- _update_content_info(priv);
+ _update_bottom_area(priv);
return;
}
@@ -346,8 +352,11 @@ static void _update_content_list(struct _priv *priv)
if (!dmgr)
return;
- list = priv->gdata->get_item_list(dmgr);
- if (!list) {
+ priv->media_list = priv->gdata->get_item_list(dmgr);
+
+ _update_bottom_area(priv);
+
+ if (!priv->media_list) {
elm_object_part_text_set(priv->layout,
PART_NOCONTENT, TEXT_NOCONTENT);
return;
@@ -355,12 +364,9 @@ static void _update_content_list(struct _priv *priv)
priv->gdata->data = dmgr;
- if (!listmgr_update_content_list(priv->listmgr, list, priv->gdata))
+ if (!listmgr_update_content_list(priv->listmgr,
+ priv->media_list, priv->gdata))
_ERR("failed to update list area");
-
- priv->media_list = list;
-
- _update_content_info(priv);
}
static app_media *_get_playing_item(Eina_List *list)