#define SIZE_TINY 16
#define CONTACT_PHOTO_SIZE 128
-#define CONTACT_HALF_PHOTO 64
#define LIST_CONTACT_HEIGHT 170
#define GROUP_HEIGHT 30
#define NOTIFICATION_BAR_HEIGHT 0
#endif
+#define CALL_TEXT_OFFSET 32
+#define CALL_PHOTO_SIZE 180
+
#include "default.edc"
#define SIZE_TINY 8
#define CONTACT_PHOTO_SIZE 64
-#define CONTACT_HALF_PHOTO 32
#define LIST_CONTACT_HEIGHT 90
#define GROUP_HEIGHT 20
#define NOTIFICATION_BAR_HEIGHT 0
#endif
+#define CALL_TEXT_OFFSET 16
+#define CALL_PHOTO_SIZE 90
+
#include "default.edc"
}
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: "elm.swallow.photo";
+ relative: 0.0 0.0;
+ offset: -1 -1;
+ }
+ rel2 {
+ to: "elm.swallow.photo";
+ relative: 1.0 1.0;
+ offset: 0 0;
+ }
+ }
+ }
+
+ 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: "elm.swallow.photo";
+ relative: 0.0 0.0;
+ offset: 0 0;
+ }
+ rel2 {
+ to: "elm.swallow.photo";
+ relative: 1.0 1.0;
+ offset: -1 -1;
+ }
+ }
+ }
+
+ part {
+ name: "elm.swallow.photo";
+ type: SWALLOW;
+ mouse_events: 0;
+ description {
+ state: "default" 0.0;
+ min: CALL_PHOTO_SIZE CALL_PHOTO_SIZE;
+ max: CALL_PHOTO_SIZE CALL_PHOTO_SIZE;
+ rel1.offset: BORDER_PADDING SEPARATOR_HEIGHT;
+ rel2 {
+ relative: 0.0 0.0;
+ offset: (CALL_PHOTO_SIZE + BORDER_PADDING) (SEPARATOR_HEIGHT + CALL_PHOTO_SIZE);
+ }
+ }
+ }
+
+ part {
name: "elm.text.name";
type: TEXT;
mouse_events: 0;
state: "default" 0.0;
color: 255 255 255 255;
color_class: "action";
- rel1.offset: BORDER_PADDING SEPARATOR_HEIGHT;
+ rel1 {
+ to: "elm.swallow.photo";
+ relative: 1.0 0.0;
+ offset: ITEM_PADDING 0;
+ }
rel2 {
relative: 1.0 0.0;
- offset: -BORDER_PADDING ACTION_HEIGHT;
+ offset: 0 (SEPARATOR_HEIGHT + CONTACT_PHOTO_SIZE);
}
text {
text: "Gustavo Barbieri";
image: "ico_merge.png" COMP;
image: "ico_swap.png" COMP;
image: "ico_contacts.png" COMP;
- image: "ico_multiparty.png" COMP;
+ image: "ico_arrow_right.png" COMP;
}
parts {
state: "default" 0.0; \
color: 255 255 255 255; \
color_class: "action"; \
- min: 80 80; \
- max: 80 80; \
+ min: LIST_ICON_SIZE LIST_ICON_SIZE; \
+ max: LIST_ICON_SIZE LIST_ICON_SIZE; \
rel1 { \
to: "call."##id; \
relative: 1.0 0.0; \
- offset: -80 (BORDER_PADDING - 1); \
+ offset: (-LIST_ICON_SIZE - BORDER_PADDING) 0; \
} \
rel2 { \
to: "call."##id; \
- relative: 1.0 0.0; \
- offset: -1 141; \
+ relative: 1.0 1.0; \
+ offset: (-BORDER_PADDING -1) -1; \
} \
- image.normal: "ico_multiparty.png"; \
+ image.normal: "ico_arrow_right.png"; \
} \
description { \
state: "pressed" 0.0; \
description { \
state: "multiparty" 0.0; \
inherit: "default" 0.0; \
- rel2.offset: (-80 - ITEM_PADDING) (ACTION_HEIGHT - 1); \
+ rel2.offset: (-BORDER_PADDING - ITEM_PADDING -LIST_ICON_SIZE - 1) (ACTION_HEIGHT - 1); \
} \
} \
part { \
state: "default" 0.0; \
color: 255 255 255 255; \
color_class: "action"; \
- rel1.to: "area."##id".name"; \
- rel2.to: "area."##id".name"; \
+ rel1 { \
+ to: "elm.swallow.img."##id; \
+ relative: 1.0 0.0; \
+ offset: ITEM_PADDING 0; \
+ } \
+ rel2 { \
+ to: "area."##id".name"; \
+ relative: 1.0 1.0; \
+ offset: -1 -CALL_TEXT_OFFSET; \
+ } \
text { \
text: "Gustavo Barbieri"; \
font: FONT_NORMAL; \
size: SIZE_HUGE; \
- size_range: SIZE_TINY SIZE_HUGE; \
+ size_range: SIZE_MEDIUM SIZE_HUGE; \
fit: 1 1; \
- align: 0.0 0.5; \
+ max: 0 1; \
+ align: 0.0 1.0; \
ellipsis: 0.0; \
} \
} \
fixed: 1 1; \
align: 0.0 0.0; \
rel1 { \
- to: "area."##id".name"; \
- relative: 0.0 1.0; \
- offset: 0 -20; \
+ to_x: "elm.swallow.img."##id; \
+ to_y: "elm.text."##id".name"; \
+ relative: 1.0 1.0; \
+ offset: ITEM_PADDING -SEPARATOR_HEIGHT; \
} \
rel2 { \
- to: "area."##id".name"; \
- relative: 0.0 1.0; \
- offset: 0 -1; \
+ to: "elm.swallow.img."##id; \
+ relative: 1.0 1.0; \
+ offset: ITEM_PADDING -1; \
} \
text { \
text: "calling..."; \
} \
} \
\
+ part { \
+ name: "elm.swallow.border."##id; \
+ type: RECT; \
+ scale: 1; \
+ mouse_events: 0; \
+ clip_to: "call."##id; \
+ description { \
+ state: "default" 0.0; \
+ color: 255 255 255 255; \
+ color_class: "action"; \
+ rel1 { \
+ to: "elm.swallow.img."##id; \
+ relative: 0.0 0.0; \
+ offset: -1 -1; \
+ } \
+ rel2 { \
+ to: "elm.swallow.img."##id; \
+ relative: 1.0 1.0; \
+ offset: 0 0; \
+ } \
+ } \
+ } \
+ \
+ part { \
+ name: "elm.swallow.img.bg".#id; \
+ type: RECT; \
+ scale: 1; \
+ mouse_events: 0; \
+ clip_to: "call."##id; \
+ description { \
+ state: "default" 0.0; \
+ color: 255 255 255 255; \
+ color_class: "dark"; \
+ rel1 { \
+ to: "elm.swallow.img."##id; \
+ relative: 0.0 0.0; \
+ offset: 0 0; \
+ } \
+ rel2 { \
+ to: "elm.swallow.img."##id; \
+ relative: 1.0 1.0; \
+ offset: -1 -1; \
+ } \
+ } \
+ } \
+ \
+ part { \
+ name: "elm.swallow.img."##id; \
+ type: SWALLOW; \
+ scale: 1; \
+ clip_to: "call."##id; \
+ mouse_events: 0; \
+ description { \
+ state: "default" 0.0; \
+ visible: 1; \
+ min: CALL_PHOTO_SIZE CALL_PHOTO_SIZE; \
+ max: CALL_PHOTO_SIZE CALL_PHOTO_SIZE; \
+ rel1 { \
+ to: "area."##id."name"; \
+ relative: 0.0 0.0; \
+ offset: 0 ITEM_PADDING; \
+ } \
+ rel2 { \
+ to: "area."##id."name"; \
+ relative: 0.0 0.0; \
+ offset: CALL_PHOTO_SIZE (CALL_PHOTO_SIZE + ITEM_PADDING); \
+ } \
+ } \
+ \
+ } \
+ \
+ \
programs { \
program { \
signal: "mouse,clicked,1"; \
transition: ACCELERATE 0.1; \
target: "elm.text."##id".name"; \
} \
+ \
}
CALL("1", 0);
state: "default" 0.0;
color: 255 255 255 255;
color_class: "action";
- align: 0.0 0.5;
- rel1.offset: BORDER_PADDING 0;
- rel2 {
+ rel1 {
+ to: "elm.swallow.waiting.photo";
relative: 1.0 0.0;
- offset: (-BORDER_PADDING - 1) (ACTION_HEIGHT - 1);
+ offset: ITEM_PADDING 0;
+ }
+ rel2 {
+ to: "notification.bar";
+ relative: 1.0 1.0;
+ offset: -BORDER_PADDING ACTION_HEIGHT;
}
text {
text: "Someone";
}
part {
+ name: "waiting.img.border";
+ type: RECT;
+ scale: 1;
+ mouse_events: 0;
+ clip_to: "clipper.waiting-visible";
+ description {
+ state: "default" 0.0;
+ color: 255 255 255 255;
+ color_class: "action";
+ rel1 {
+ to: "elm.swallow.waiting.photo";
+ relative: 0.0 0.0;
+ offset: -1 -1;
+ }
+ rel2 {
+ to: "elm.swallow.waiting.photo";
+ relative: 1.0 1.0;
+ offset: 0 0;
+ }
+ }
+ }
+
+ part {
+ name: "waiting.img.bg";
+ type: RECT;
+ scale: 1;
+ mouse_events: 0;
+ clip_to: "clipper.waiting-visible";
+ description {
+ state: "default" 0.0;
+ color: 255 255 255 255;
+ color_class: "dark";
+ rel1 {
+ to: "elm.swallow.waiting.photo";
+ relative: 0.0 0.0;
+ offset: 0 0;
+ }
+ rel2 {
+ to: "elm.swallow.waiting.photo";
+ relative: 1.0 1.0;
+ offset: -1 -1;
+ }
+ }
+ }
+
+ part {
+ name: "elm.swallow.waiting.photo";
+ type: SWALLOW;
+ scale: 1;
+ clip_to: "clipper.waiting-visible";
+ mouse_events: 0;
+ description {
+ state: "default" 0.0;
+ min: CALL_PHOTO_SIZE CALL_PHOTO_SIZE;
+ max: CALL_PHOTO_SIZE CALL_PHOTO_SIZE;
+ rel1 {
+ to: "notification.bar";
+ relative: 0.0 1.0;
+ offset: BORDER_PADDING ITEM_PADDING;
+ }
+ rel2 {
+ to: "notification.bar";
+ relative: 0.0 1.0;
+ offset: (CALL_PHOTO_SIZE + BORDER_PADDING) (CALL_PHOTO_SIZE + ITEM_PADDING);
+ }
+ }
+ }
+
+ part {
name: "label.waiting";
type: TEXT;
mouse_events: 0;
}
}
}
+
+group {
+
+ name: "elm/icon/multiparty/default";
+
+ images{
+ image: "ico_multiparty.png" COMP;
+ }
+
+ parts {
+ part {
+ name : "base";
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ aspect: 1.0 1.0;
+ color_class: "action";
+ aspect_preference: BOTH;
+ image.normal: "ico_multiparty.png";
+ }
+ }
+ }
+}
description {
state: "default" 0.0;
aspect: 1.0 1.0;
+ color_class: "action";
aspect_preference: BOTH;
image.normal: "ico_person.png";
}
Contact_Info *info;
if (!s)
- return NULL;;
+ return NULL;
info = gui_contact_search(s, NULL);
if (info)
return phone_format(s);
}
+static Evas_Object *_call_photo_get(const OFono_Call *call, Evas_Object *parent)
+{
+ const char *s = ofono_call_line_id_get(call);
+ Contact_Info *info;
+
+ if (!s)
+ return NULL;
+
+ info = gui_contact_search(s, NULL);
+ if (info)
+ return picture_icon_get(parent, contact_info_picture_get(info));
+ return NULL;
+}
+
static char *_call_name_get(const Callscreen *ctx __UNUSED__,
const OFono_Call *call)
{
}
}
+static void _call_photo_set(Callscreen *ctx, unsigned int id,
+ Evas_Object *photo)
+{
+ char buf[128];
+
+ if (!photo) {
+ photo = elm_icon_add(ctx->self);
+ elm_icon_standard_set(photo, "no-picture");
+ }
+
+ snprintf(buf, sizeof(buf), "elm.swallow.img.%u", id);
+ elm_object_part_content_set(ctx->self, buf, photo);
+}
+
static void _call_show(Callscreen *ctx, unsigned int id, const OFono_Call *c)
{
char *contact = _call_name_get(ctx, c);
const char *type = _call_type_get(c);
const char *status = _call_state_str(ofono_call_state_get(c));
+ Evas_Object *photo;
+
+ if (ofono_call_multiparty_get(c)) {
+ photo = elm_icon_add(ctx->self);
+ elm_icon_standard_set(photo, "multiparty");
+ } else
+ photo = _call_photo_get(c, ctx->self);
_call_text_set(ctx, id, "name", contact);
_call_text_set(ctx, id, "phone.type", type);
_call_text_set(ctx, id, "status", status);
_call_text_set(ctx, id, "elapsed", "");
-
+ _call_photo_set(ctx, id, photo);
free(contact);
}
elm_object_signal_emit(o, "hide,waiting", "call");
} else {
char *name = _call_name_get(ctx, c);
+ Evas_Object *photo = _call_photo_get(c, o);
+ if (!photo) {
+ photo = elm_icon_add(o);
+ elm_icon_standard_set(photo, "no-picture");
+ }
+ elm_object_part_content_set(o, "elm.swallow.waiting.photo",
+ photo);
elm_object_part_text_set(o, "elm.text.waiting", name);
elm_object_signal_emit(o, "show,waiting", "call");
free(name);
static void _call_screen_show(Call_Screen *cs)
{
Call *c = cs->call;
+ Evas_Object *icon = NULL;
INF("Show line_id=%s, name=%s, type=%s",
c->line_id, c->name, c->type);
else
elm_object_part_text_set(cs->layout, "elm.text.name",
c->name);
+ icon = elm_icon_add(cs->layout);
+
+ if (strcmp("", c->img) != 0) {
+#ifdef HAVE_TIZEN
+ elm_icon_file_set(icon, c->img, NULL);
+#else
+ elm_image_file_set(icon, c->img, NULL);
+#endif
+ } else
+ elm_icon_standard_set(icon, "no-picture");
elm_object_part_text_set(cs->layout, "elm.text.state", "Incoming...");
elm_object_part_text_set(cs->layout, "elm.text.phone.type", c->type);
+ elm_object_part_content_set(cs->layout, "elm.swallow.photo", icon);
elm_object_signal_emit(cs->layout, "show,activecall", "gui");
evas_object_show(cs->win);
#ifdef HAVE_TIZEN
if (!picture || *picture == '\0')
elm_icon_standard_set(icon, "no-picture");
else {
+#ifdef HAVE_TIZEN
+ elm_icon_file_set(icon, picture, NULL);
+#else
char path[PATH_MAX];
const char *prefix;
prefix = efreet_config_home_get();
snprintf(path, sizeof(path), "%s/%s/%s", prefix, PACKAGE_NAME,
picture);
elm_image_file_set(icon, path, NULL);
+#endif
}
return icon;
}