And now we have a contact bar separator like the iphone's.
data/themes/images/person.png
THEME_INCLUDES = \
-data/themes/includes/button.edc \
data/themes/includes/call.edc \
data/themes/includes/colors.edc \
data/themes/includes/contacts-bg.edc \
#define CONTACT_PHOTO_SIZE 128
#define CONTACT_HALF_PHOTO 64
-#define LIST_CONTACT_HEIGHT (CONTACT_PHOTO_SIZE + 60)
+#define LIST_CONTACT_HEIGHT 170
+
+#define GROUP_HEIGHT 30
#include "default.edc"
#define SIZE_SMALL 10
#define SIZE_TINY 8
-#define CONTACT_PHOTO_SIZE 128
-#define CONTACT_HALF_PHOTO 64
-#define LIST_CONTACT_HEIGHT (CONTACT_PHOTO_SIZE + 30)
+#define CONTACT_PHOTO_SIZE 64
+#define CONTACT_HALF_PHOTO 32
+#define LIST_CONTACT_HEIGHT 90
+
+#define GROUP_HEIGHT 20
#include "default.edc"
#include "includes/history.edc"
#include "includes/history-bg.edc"
#include "includes/scroller.edc"
-#include "includes/button.edc"
}
+++ /dev/null
-group {
- name: "elm/button/base/contacts-btn";
-
- parts {
- part {
- name: "bg";
- type: RECT;
- scale: 1;
- description {
- state: "default" 0.0;
- color: 255 255 255 0;
- color_class: "action";
- }
- description {
- state: "pressed" 0.0;
- inherit: "default" 0.0;
- color: 255 255 255 255;
- }
- }
-
- part {
- name: "elm.text.phone";
- type: TEXT;
- mouse_events: 0;
- description {
- state: "default" 0.0;
- color: 255 255 255 255;
- color_class: "action";
- rel2 {
- relative: 1.0 0.5;
- }
- text {
- font: FONT_NORMAL;
- size: SIZE_MEDIUM;
- size_range: SIZE_TINY SIZE_HUGE;
- fit: 1 1;
- align: 0.5 0.5;
- ellipsis: 1.0;
- }
- }
- description {
- state: "pressed" 0.0;
- inherit: "default" 0.0;
- color: 16 16 16 255;
- }
- }
-
- part {
- name: "elm.text.type";
- type: TEXT;
- mouse_events: 0;
- description {
- state: "default" 0.0;
- color: 255 255 255 128;
- color_class: "action";
- rel1 {
- to: "elm.text.phone";
- relative: 0.0 1.0;
- }
- rel2 {
- relative: 1.0 1.0;
- offset: 0 0;
- }
- text {
- font: FONT_NORMAL;
- size: SIZE_MEDIUM;
- size_range: SIZE_TINY SIZE_HUGE;
- fit: 1 1;
- align: 0.5 0.5;
- ellipsis: 0.0;
- }
- }
- description {
- state: "pressed" 0.0;
- inherit: "default" 0.0;
- color: 16 16 16 255;
- }
- }
- }
-
- programs {
-
- program {
- signal: "mouse,clicked,1";
- source: "bg";
- action: SIGNAL_EMIT "elm,action,click" "";
- }
-
- program {
- signal: "mouse,down,1";
- source: "bg";
- transition: ACCELERATE 0.3;
- action: STATE_SET "pressed" 0.0;
- target: "bg";
- target: "elm.text.phone";
- target: "elm.text.type";
- }
-
- program {
- signal: "mouse,up,1";
- source: "bg";
- transition: DECELERATE 0.3;
- action: STATE_SET "default" 0.0;
- target: "bg";
- target: "elm.text.phone";
- target: "elm.text.type";
- }
- }
-}
visible: 1;
rel1 {
relative: 0.0 0.0;
- offset: 0 BORDER_PADDING;
+ offset: 0 0;
}
}
description {
}
part {
+ name: "img.border";
+ type: RECT;
+ scale: 1;
+ mouse_events: 0;
+ description {
+ state: "default" 0.0;
+ color: 255 255 255 255;
+ color_class: "action";
+ rel1 {
+ to: "swallow.photo";
+ relative: 0.0 0.0;
+ offset: -1 -1;
+ }
+ rel2 {
+ to: "swallow.photo";
+ relative: 1.0 1.0;
+ offset: 0 0;
+ }
+ }
+ description {
+ state: "selected" 0.0;
+ inherit: "default" 0.0;
+ color_class: "bg";
+ }
+ }
+
+ part {
+ name: "img.bg";
+ type: RECT;
+ scale: 1;
+ mouse_events: 0;
+ description {
+ state: "default" 0.0;
+ color: 255 255 255 255;
+ color_class: "dark";
+ rel1 {
+ to: "swallow.photo";
+ relative: 0.0 0.0;
+ offset: 0 0;
+ }
+ rel2 {
+ to: "swallow.photo";
+ relative: 1.0 1.0;
+ offset: -1 -1;
+ }
+ }
+ description {
+ state: "selected" 0.0;
+ inherit: "default" 0.0;
+ color_class: "bg";
+ }
+ }
+
+ part {
name: "swallow.photo";
type: SWALLOW;
scale: 1;
state: "default" 0.0;
min: CONTACT_PHOTO_SIZE CONTACT_PHOTO_SIZE;
max: CONTACT_PHOTO_SIZE CONTACT_PHOTO_SIZE;
+ align: 0.0 0.5;
+ fixed: 1 1;
rel1 {
relative: 0.0 0.0;
- offset: BORDER_PADDING ITEM_PADDING;
+ offset: BORDER_PADDING 0;
}
rel2 {
- relative: 0.0 0.0;
- offset: (BORDER_PADDING+CONTACT_PHOTO_SIZE) (CONTACT_PHOTO_SIZE+ITEM_PADDING);
+ relative: 0.0 1.0;
+ offset: BORDER_PADDING -1;
}
}
}
- part {
+ part {
name: "text.contacts.name";
type: TEXT;
scale: 1;
}
rel2 {
to_y: "swallow.photo";
- relative: 1.0 1.0;
- offset: -BORDER_PADDING -CONTACT_HALF_PHOTO;
+ relative: 1.0 0.7;
+ offset: (-BORDER_PADDING -1) -1;
}
text {
font: FONT_NORMAL;
- size: SIZE_HUGE;
- size_range: SIZE_TINY SIZE_HUGE;
- fit: 1 1;
- align: 0.0 0.5;
+ size: SIZE_LARGE;
+ align: 0.0 0.0;
ellipsis: 0.0;
}
}
}
}
- part {
+ part {
name: "text.contacts.last";
type: TEXT;
scale: 1;
mouse_events: 0;
description {
state: "default" 0.0;
- color: 255 255 255 128;
- color_class: "action";
+ color: 255 255 255 255;
+ color_class: "light";
rel1 {
- to: "text.contacts.name";
- relative: 0.0 1.0;
- offset: 0 ITEM_PADDING;
+ to: "swallow.photo";
+ relative: 1.0 0.7;
+ offset: ITEM_PADDING 0;
}
rel2 {
- to_x: "text.contacts.name";
to_y: "swallow.photo";
relative: 1.0 1.0;
- offset: 0 -1;
+ offset: (-BORDER_PADDING -1) -1;
}
- text {
+ text {
font: FONT_NORMAL;
size: SIZE_MEDIUM;
- size_range: SIZE_SMALL SIZE_MEDIUM;
- fit: 1 1;
align: 0.0 0.5;
ellipsis: 0.0;
- }
+ }
}
description {
state: "selected" 0.0;
inherit: "default" 0.0;
color_class: "bg";
}
- }
+ }
programs {
target: "bg";
target: "text.contacts.name";
target: "text.contacts.last";
+ target: "img.border";
}
program {
target: "bg";
target: "text.contacts.name";
target: "text.contacts.last";
+ target: "img.border";
+ }
+ }
+ }
+}
+
+group {
+ name: "elm/genlist/item/group_contacts/default";
+
+ data {
+ item: "texts" "text.group";
+ }
+
+ parts {
+ part {
+ name: "bg";
+ type: RECT;
+ scale: 1;
+ mouse_events: 0;
+ description {
+ state: "default" 0.0;
+ color: 255 255 255 255;
+ color_class: "action";
+ min: (BORDER_PADDING + CONTACT_PHOTO_SIZE) GROUP_HEIGHT;
+ max: (BORDER_PADDING + CONTACT_PHOTO_SIZE) GROUP_HEIGHT;
+ align: 0.0 0.5;
+ }
+ }
+
+ part {
+ name: "text.group";
+ type: TEXT;
+ mouse_events: 0;
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ color: 255 255 255 255;
+ color_class: "bg";
+ rel2 {
+ to: "bg";
+ offset: -ITEM_PADDING -1;
+ }
+ text {
+ font: FONT_BOLD;
+ size: SIZE_SMALL;
+ fit: 1 1;
+ align: 1.0 0.5;
+ ellipsis: 0.0;
+ }
}
}
}
parts {
part {
+ name: "img.border";
+ type: RECT;
+ scale: 1;
+ mouse_events: 0;
+ description {
+ state: "default" 0.0;
+ color: 255 255 255 255;
+ color_class: "action";
+ rel1 {
+ to: "swallow.photo";
+ relative: 0.0 0.0;
+ offset: -1 -1;
+ }
+ rel2 {
+ to: "swallow.photo";
+ relative: 1.0 1.0;
+ offset: 0 0;
+ }
+ }
+ description {
+ state: "selected" 0.0;
+ inherit: "default" 0.0;
+ color_class: "bg";
+ }
+ }
+
+ part {
+ name: "img.bg";
+ type: RECT;
+ scale: 1;
+ mouse_events: 0;
+ description {
+ state: "default" 0.0;
+ color: 255 255 255 255;
+ color_class: "dark";
+ rel1 {
+ to: "swallow.photo";
+ relative: 0.0 0.0;
+ offset: 0 0;
+ }
+ rel2 {
+ to: "swallow.photo";
+ relative: 1.0 1.0;
+ offset: -1 -1;
+ }
+ }
+ description {
+ state: "selected" 0.0;
+ inherit: "default" 0.0;
+ color_class: "bg";
+ }
+ }
+
+ part {
name: "swallow.photo";
type: SWALLOW;
scale: 1;
rel1 {
to: "swallow.photo";
relative: 1.0 0.0;
- offset: ITEM_PADDING 0;
+ offset: ITEM_PADDING ITEM_PADDING;
}
rel2 {
to_y: "swallow.photo";
- relative: 1.0 1.0;
- offset: -BORDER_PADDING -CONTACT_HALF_PHOTO;
+ relative: 1.0 0.5;
+ offset: -BORDER_PADDING -ITEM_PADDING;
}
text {
font: FONT_NORMAL;
size: SIZE_HUGE;
- size_range: SIZE_LARGE SIZE_HUGE;
- fit: 1 1;
+ fit: 0 0;
align: 0.0 0.5;
ellipsis: 0.0;
- }
+ }
}
}
state: "default" 0.0;
color: 255 255 255 128;
color_class: "action";
- rel1 {
+ rel1 {
to: "text.name";
relative: 0.0 1.0;
- offset: 0 ITEM_PADDING;
+ offset: 0 ITEM_PADDING;
}
- rel2 {
+ rel2 {
to_x: "text.name";
to_y: "swallow.photo";
relative: 1.0 1.0;
- offset: 0 -1;
+ offset: 0 ITEM_PADDING;
}
text {
font: FONT_NORMAL;
size: SIZE_MEDIUM;
- size_range: SIZE_SMALL SIZE_MEDIUM;
- fit: 1 1;
- align: 0.0 0.5;
+ fit: 0 1;
+ align: 0.0 0.0;
ellipsis: 0.0;
}
}
}
-#define SEPARATOR(id, rely, offy, relto) \
- part { \
- name: "separator.dark."##id; \
- type: RECT; \
- mouse_events: 0; \
- description { \
- state: "default" 0.0; \
- color: 255 255 255 255; \
- color_class: "dark"; \
- rel1 { \
- relative: 0.0 rely; \
- offset: 0 offy; \
- to_y: relto; \
- } \
- rel2 { \
- relative: 1.0 rely; \
- offset: -1 (offy + SEPARATOR_HEIGHT / 2); \
- to_y: relto; \
- } \
- } \
- } \
- part { \
- name: "separator.bg."##id; \
- type: RECT; \
- mouse_events: 0; \
- description { \
- state: "default" 0.0; \
- color: 255 255 255 255; \
- color_class: "bg"; \
- rel1 { \
- relative: 0.0 rely; \
- offset: 0 (offy + SEPARATOR_HEIGHT / 2); \
- to_y: relto; \
- } \
- rel2 { \
- relative: 1.0 rely; \
- offset: -1 (offy + SEPARATOR_HEIGHT); \
- to_y: relto; \
- } \
- } \
- }
-
- SEPARATOR("btn", 0.0, -SEPARATOR_HEIGHT, "bg.buttons");
-#undef SEPARATOR
part {
name: "box.phones";
state: "default" 0.0;
box {
layout: "vertical_homogeneous";
- padding: 0 ITEM_PADDING;
}
rel1 {
to_y: "swallow.photo";
relative: 0.0 1.0;
- offset: BORDER_PADDING (ITEM_PADDING+ACTION_HEIGHT);
+ offset: 0 (ITEM_PADDING+ACTION_HEIGHT);
}
rel2 {
to_y: "bg.buttons";
relative: 1.0 0.0;
- offset: (-BORDER_PADDING-1) (-SEPARATOR_HEIGHT - 1);
+ offset: -1 0;
}
}
}
}
group {
+
name: "elm/icon/no-picture/default";
images{
}
}
}
+group {
+
+ name: "elm/button/base/contacts";
+
+ parts {
+ part {
+ name: "bg";
+ type: RECT;
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ color: 255 255 255 0;
+ color_class: "action";
+ }
+ description {
+ state: "pressed" 0.0;
+ inherit: "default" 0.0;
+ color: 255 255 255 255;
+ }
+ }
+
+ part {
+ name: "elm.text.phone";
+ type: TEXT;
+ mouse_events: 0;
+ description {
+ state: "default" 0.0;
+ color: 255 255 255 255;
+ color_class: "action";
+ rel1 {
+ offset: BORDER_PADDING 0;
+ }
+ rel2 {
+ to_y: "elm.text.type";
+ relative: 1.0 0.0;
+ offset: (-BORDER_PADDING -1) ITEM_PADDING;
+ }
+ text {
+ font: FONT_NORMAL;
+ size: SIZE_HUGE;
+ size_range: SIZE_SMALL SIZE_HUGE;
+ fit: 1 1;
+ align: 0.5 0.5;
+ ellipsis: 1.0;
+ }
+ }
+ description {
+ state: "pressed" 0.0;
+ inherit: "default" 0.0;
+ color: 16 16 16 255;
+ }
+ }
+
+ part {
+ name: "elm.text.type";
+ type: TEXT;
+ mouse_events: 0;
+ description {
+ state: "default" 0.0;
+ color: 255 255 255 128;
+ color_class: "action";
+ align: 0.5 1.0;
+ fixed: 1 1;
+ rel1 {
+ relative: 0.0 1.0;
+ offset: BORDER_PADDING (-ITEM_PADDING - 1);
+ }
+ rel2 {
+ relative: 1.0 1.0;
+ offset: (-BORDER_PADDING -1) (-ITEM_PADDING - 1);
+ }
+ text {
+ font: FONT_NORMAL;
+ size: SIZE_MEDIUM;
+ min: 0 1;
+ align: 0.5 1.0;
+ ellipsis: 0.0;
+ }
+ }
+ description {
+ state: "pressed" 0.0;
+ inherit: "default" 0.0;
+ color: 16 16 16 255;
+ }
+ }
+
+#define SEPARATOR(id, rely, offy, relto) \
+ part { \
+ name: "separator.dark."##id; \
+ type: RECT; \
+ mouse_events: 0; \
+ description { \
+ state: "default" 0.0; \
+ color: 255 255 255 255; \
+ color_class: "dark"; \
+ rel1 { \
+ relative: 0.0 rely; \
+ offset: 0 offy; \
+ to_y: relto; \
+ } \
+ rel2 { \
+ relative: 1.0 rely; \
+ offset: -1 (offy + SEPARATOR_HEIGHT / 2); \
+ to_y: relto; \
+ } \
+ } \
+ } \
+ part { \
+ name: "separator.bg."##id; \
+ type: RECT; \
+ mouse_events: 0; \
+ description { \
+ state: "default" 0.0; \
+ color: 255 255 255 255; \
+ color_class: "bg"; \
+ rel1 { \
+ relative: 0.0 rely; \
+ offset: 0 (offy + SEPARATOR_HEIGHT / 2); \
+ to_y: relto; \
+ } \
+ rel2 { \
+ relative: 1.0 rely; \
+ offset: -1 (offy + SEPARATOR_HEIGHT); \
+ to_y: relto; \
+ } \
+ } \
+ }
+
+ SEPARATOR("bottom", 1.0, -SEPARATOR_HEIGHT, "");
+#undef SEPARATOR
+ }
+
+ programs {
+
+ program {
+ signal: "mouse,clicked,1";
+ source: "bg";
+ action: SIGNAL_EMIT "elm,action,click" "";
+ }
+
+ program {
+ signal: "mouse,down,1";
+ source: "bg";
+ transition: ACCELERATE 0.3;
+ action: STATE_SET "pressed" 0.0;
+ target: "bg";
+ target: "elm.text.phone";
+ target: "elm.text.type";
+ }
+
+ program {
+ signal: "mouse,up,1";
+ source: "bg";
+ transition: DECELERATE 0.3;
+ action: STATE_SET "default" 0.0;
+ target: "bg";
+ target: "elm.text.phone";
+ target: "elm.text.type";
+ }
+ }
+}
state: "default" 0.0;
color: 255 255 255 255;
color_class: "action";
- min: WIDTH ACTION_HEIGHT;
+ min: (WIDTH - BORDER_PADDING*2) ACTION_HEIGHT;
+ rel1 {
+ offset: BORDER_PADDING 0;
+ }
rel2 {
relative: 1.0 0.0;
- offset: -1.0 (ACTION_HEIGHT - 1);
+ offset: (-BORDER_PADDING -1) (ACTION_HEIGHT - 1);
}
text {
text: "+1 (12) 3456-7890";
description {
state: "default" 0.0;
color: 255 255 255 255;
- color_class: "action";
+ color_class: "light";
visible: 0;
- max: (WIDTH/2) SIZE_MEDIUM;
+ fixed: 1 1;
rel1 {
to: "elm.text.display";
relative: 0.0 1.0;
- offset: (-WIDTH/2 + BORDER_PADDING) 0;
+ offset: 0 0;
}
rel2 {
to: "elm.text.display";
- relative: 1.0 1.0;
- offset: 0 SIZE_MEDIUM;
+ relative: 0.5 1.0;
+ offset: -ITEM_PADDING -1;
}
text {
- font: FONT_NORMAL;
- size: SIZE_MEDIUM;
- size_range: SIZE_TINY SIZE_HUGE;
- fit: 1 1;
- align: 0.0 0.0;
+ font: FONT_BOLD;
+ size: SIZE_SMALL;
+ align: 1.0 0.0;
ellipsis: 0.0;
+ min: 0 1;
}
}
description {
}
part {
- name: "elm.text.phone.type";
+ name: "text.separator";
type: TEXT;
mouse_events: 0;
scale: 1;
description {
state: "default" 0.0;
color: 255 255 255 255;
- color_class: "action";
+ color_class: "light";
visible: 0;
- max: (WIDTH/2) SIZE_MEDIUM;
+ fixed: 1 1;
rel1 {
to: "elm.text.contact";
relative: 1.0 0.0;
offset: 0 0;
}
rel2 {
- to: "elm.text.contact";
+ to: "elm.text.phone.type";
+ relative: 0.0 1.0;
+ offset: -1 -1;
+ }
+ text {
+ font: FONT_BOLD;
+ size: SIZE_SMALL;
+ align: 0.5 0.0;
+ min: 0 1;
+ text: "-";
+ }
+ }
+ description {
+ state: "show" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
+ }
+ }
+
+ part {
+ name: "elm.text.phone.type";
+ type: TEXT;
+ mouse_events: 0;
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ color: 255 255 255 255;
+ color_class: "light";
+ visible: 0;
+ fixed: 1 1;
+ rel1 {
+ to: "elm.text.display";
+ relative: 0.5 1.0;
+ offset: ITEM_PADDING 0;
+ }
+ rel2 {
+ to: "elm.text.display";
relative: 1.0 1.0;
- offset: (WIDTH/2 - BORDER_PADDING) 0;
+ offset: -1 -1;
}
text {
- font: FONT_NORMAL;
- size: SIZE_MEDIUM;
- size_range: SIZE_TINY SIZE_HUGE;
- fit: 1 1;
- align: 1.0 0.0;
+ font: FONT_BOLD;
+ size: SIZE_SMALL;
+ align: 0.0 0.0;
ellipsis: 0.0;
+ min: 0 1;
}
}
description {
action: STATE_SET "show" 0.0;
target: "elm.text.contact";
target: "elm.text.phone.type";
+ target: "text.separator";
}
program {
action: STATE_SET "default" 0.0;
target: "elm.text.contact";
target: "elm.text.phone.type";
+ target: "text.separator";
}
}
}
char *path;
Eet_Data_Descriptor *edd;
Eet_Data_Descriptor *edd_list;
- Elm_Genlist_Item_Class *itc;
+ Elm_Genlist_Item_Class *itc, *group;
Evas_Object *genlist, *layout, *details;
Contacts_List *c_list;
} Contacts;
_contacts_info_free(c_info);
free(contacts->c_list);
elm_genlist_item_class_free(contacts->itc);
+ elm_genlist_item_class_free(contacts->group);
free(contacts->path);
free(contacts);
eet_shutdown();
btn = elm_button_add(details);
EINA_SAFETY_ON_NULL_RETURN(btn);
- elm_object_style_set(btn, "contacts-btn");
+ elm_object_style_set(btn, "contacts");
phone = phone_format(c_info->mobile);
elm_object_part_text_set(btn, "elm.text.type", "Mobile");
elm_object_part_text_set(btn, "elm.text.phone", phone);
btn = elm_button_add(details);
EINA_SAFETY_ON_NULL_RETURN(btn);
- elm_object_style_set(btn, "contacts-btn");
+ elm_object_style_set(btn, "contacts");
phone = phone_format(c_info->home);
elm_object_part_text_set(btn, "elm.text.type", "Home");
elm_object_part_text_set(btn, "elm.text.phone", phone);
btn = elm_button_add(details);
EINA_SAFETY_ON_NULL_RETURN(btn);
- elm_object_style_set(btn, "contacts-btn");
+ elm_object_style_set(btn, "contacts");
phone = phone_format(c_info->work);
elm_object_part_text_set(btn, "elm.text.type", "Work");
elm_object_part_text_set(btn, "elm.text.phone", phone);
Contact_Info *c_info;
Eina_List *l;
Eet_File *efile;
-
+ Elm_Object_Item *it = NULL;
+ char group;
efile = eet_open(contacts->path, EET_FILE_MODE_READ);
if (efile) {
EINA_SAFETY_ON_NULL_RETURN(contacts->c_list);
contacts->c_list->list = eina_list_sort(contacts->c_list->list, 0,
_sort_by_name_cb);
-
+ group = '\0';
EINA_LIST_FOREACH(contacts->c_list->list, l, c_info) {
if (!c_info)
continue;
- elm_genlist_item_append(contacts->genlist,contacts->itc, c_info,
- NULL,ELM_GENLIST_ITEM_NONE,
- _on_item_click, contacts);
+ if (group != c_info->name[0]) {
+ group = c_info->name[0];
+ it = elm_genlist_item_append(contacts->genlist,
+ contacts->group,
+ c_info, NULL,
+ ELM_GENLIST_ITEM_GROUP,
+ NULL,
+ NULL);
+ elm_genlist_item_select_mode_set(it, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
+ }
+ elm_genlist_item_append(contacts->genlist,contacts->itc,
+ c_info, it,
+ ELM_GENLIST_ITEM_NONE,
+ _on_item_click, contacts);
}
}
return NULL;
}
+static char *_group_label_get(void *data, Evas_Object *obj __UNUSED__,
+ const char *part __UNUSED__)
+{
+ Contact_Info *c_info = data;
+ char buf[2];
+ snprintf(buf, sizeof(buf), "%c", c_info->name[0]);
+ return strdup(buf);
+}
+
static Evas_Object *_item_content_get(void *data,
Evas_Object *obj,
}
photo = picture_icon_get(obj, c_info->picture);
+
return photo;
}
char base_dir[PATH_MAX], *path;
Contacts *contacts;
Evas_Object *obj, *genlist, *details;
- Elm_Genlist_Item_Class *itc;
+ Elm_Genlist_Item_Class *itc, *group;
eet_init();
contacts = calloc(1, sizeof(Contacts));
itc->func.content_get = _item_content_get;
itc->func.state_get = NULL;
itc->func.del = NULL;
+
+ group = elm_genlist_item_class_new();
+ EINA_SAFETY_ON_NULL_GOTO(group, err_group);
+ group->item_style = "group_contacts";
+ group->func.text_get = _group_label_get;
+ group->func.content_get = NULL;
+ group->func.state_get = NULL;
+ group->func.del = NULL;
+ contacts->group = group;
contacts->genlist = genlist;
contacts->itc = itc;
contacts->layout = obj;
eet_data_descriptor_free(contacts->edd_list);
free(path);
err_path:
+ elm_genlist_item_class_free(group);
+err_group:
elm_genlist_item_class_free(itc);
err_genlist:
free(obj);