Commit 35e061c5 authored by Ludovic Fauvet's avatar Ludovic Fauvet

Modularize the edje hack introduced in the previous commit

parent bf777335
...@@ -68,7 +68,7 @@ ...@@ -68,7 +68,7 @@
#define IMAGESPATH "images" #define IMAGESPATH "images"
#define VIDEOPLAYEREDJ get_resource_path( EDJPATH "/video_player.edj") #define VIDEOPLAYEREDJ get_resource_path( EDJPATH "/video_player.edj")
#define AUDIOPLAYERMINIEDJ get_resource_path( EDJPATH "/audio_player_mini.edj") #define AUDIOPLAYERMINIEDJ get_resource_path( EDJPATH "/audio_player_mini.edj")
#define NOCONTENTEDJ get_resource_path( EDJPATH "/no_content.edj") #define BASICTEXTEDJ get_resource_path( EDJPATH "/basic_text.edj")
#define RES_DIR "/opt/usr/apps/" PACKAGE "/res/" #define RES_DIR "/opt/usr/apps/" PACKAGE "/res/"
#define ICON_DIR RES_DIR "/images/" #define ICON_DIR RES_DIR "/images/"
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
collections { collections {
base_scale: 1.8; base_scale: 1.8;
group { group {
name: "no_content"; name: "basic_text";
parts { parts {
part{ part{
name: "hub_background"; name: "hub_background";
...@@ -34,16 +34,13 @@ collections { ...@@ -34,16 +34,13 @@ collections {
} }
} }
part { part {
name: "swallow.title"; name: "swallow.main";
type: TEXT; type: SWALLOW;
description { description {
color: 120 120 120 255; state: "default" 0.0;
visible: 1; aspect: 1.0 1.0;
text { rel1 {relative: 0.5 0.5; }
text: "No content to display"; rel2 {relative: 0.5 0.5; }
size: 28;
ellipsis: 0;
}
} }
} }
} //parts } //parts
......
...@@ -82,10 +82,14 @@ list_view_common_setup(list_view* p_list_view, list_sys* p_list_sys, interface* ...@@ -82,10 +82,14 @@ list_view_common_setup(list_view* p_list_view, list_sys* p_list_sys, interface*
/* Empty list */ /* Empty list */
p_list_sys->p_empty = elm_layout_add(p_list_sys->p_container); p_list_sys->p_empty = elm_layout_add(p_list_sys->p_container);
elm_layout_file_set(p_list_sys->p_empty, NOCONTENTEDJ, "no_content"); elm_layout_file_set(p_list_sys->p_empty, BASICTEXTEDJ, "basic_text");
evas_object_size_hint_weight_set(p_list_sys->p_empty, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); evas_object_size_hint_weight_set(p_list_sys->p_empty, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(p_list_sys->p_empty, EVAS_HINT_FILL, EVAS_HINT_FILL); evas_object_size_hint_align_set(p_list_sys->p_empty, EVAS_HINT_FILL, EVAS_HINT_FILL);
Evas_Object *label = elm_label_add(p_list_sys->p_empty);
elm_object_text_set(label, "No content to display");
elm_object_part_content_set(p_list_sys->p_empty, "swallow.main", label);
/* Create genlist (if required) */ /* Create genlist (if required) */
if (opts & LIST_CREATE_LIST) if (opts & LIST_CREATE_LIST)
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment