}
part {
- name: "elm.text.contact";
+ name: "elm.text.contact-and-type";
type: TEXT;
mouse_events: 0;
scale: 1;
}
rel2 {
to: "elm.text.display";
- relative: 0.5 1.0;
- offset: -ITEM_PADDING -1;
- }
- text {
- font: FONT_BOLD;
- size: SIZE_SMALL;
- align: 1.0 0.0;
- ellipsis: 0.0;
- min: 0 1;
- }
- }
- description {
- state: "show" 0.0;
- inherit: "default" 0.0;
- visible: 1;
- }
- }
-
- part {
- name: "text.separator";
- 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.contact";
- relative: 1.0 0.0;
- offset: 0 0;
- }
- rel2 {
- 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: -1 -1;
}
text {
font: FONT_BOLD;
size: SIZE_SMALL;
- align: 0.0 0.0;
- ellipsis: 0.0;
+ align: 0.5 0.0;
min: 0 1;
}
}
max: WIDTH WIDTH; /* keep it tight centered */
rel1 {
relative: 0.0 1.0;
- to_y: "elm.text.contact";
+ to_y: "elm.text.contact-and-type";
}
rel2 {
relative: 1.0 0.0;
} \
}
- SEPARATOR("number", 1.0, 0, "elm.text.contact");
+ SEPARATOR("number", 1.0, 0, "elm.text.contact-and-type");
SEPARATOR("actions", 0.0, -SEPARATOR_HEIGHT, "bg.actions");
#undef SEPARATOR
signal: "show,contact";
source: "keypad";
action: STATE_SET "show" 0.0;
- target: "elm.text.contact";
- target: "elm.text.phone.type";
- target: "text.separator";
+ target: "elm.text.contact-and-type";
}
program {
signal: "hide,contact";
source: "keypad";
action: STATE_SET "default" 0.0;
- target: "elm.text.contact";
- target: "elm.text.phone.type";
- target: "text.separator";
+ target: "elm.text.contact-and-type";
}
}
}
const char *type;
if (!s) {
elm_object_part_text_set(ctx->self, "elm.text.display", "");
+ elm_object_part_text_set(ctx->self, "elm.text.contact-and-type",
+ "");
+ elm_object_part_text_set(ctx->self, "elm.text.contact", "");
+ elm_object_part_text_set(ctx->self, "elm.text.phone.type", "");
elm_object_signal_emit(ctx->self, "disable,save", "keypad");
elm_object_signal_emit(ctx->self, "disable,backspace",
"keypad");
Contact_Info *info = gui_contact_search(number, &type);
if (info) {
- elm_object_part_text_set(ctx->self, "elm.text.contact", contact_info_full_name_get(info));
+ const char *name = contact_info_full_name_get(info);
+ char buf[1024];
+
+ snprintf(buf, sizeof(buf), "%s - %s", name, type);
+
+ elm_object_part_text_set(ctx->self, "elm.text.contact-and-type",
+ buf);
+ elm_object_part_text_set(ctx->self, "elm.text.contact", name);
elm_object_part_text_set(ctx->self, "elm.text.phone.type", type);
elm_object_signal_emit(ctx->self, "show,contact", "keypad");
- } else
+ } else {
elm_object_signal_emit(ctx->self, "hide,contact", "keypad");
+ elm_object_part_text_set(ctx->self, "elm.text.contact-and-type",
+ "");
+ elm_object_part_text_set(ctx->self, "elm.text.contact", "");
+ elm_object_part_text_set(ctx->self, "elm.text.phone.type", "");
+ }
elm_object_part_text_set(ctx->self, "elm.text.display", s);
free(s);
_on_clicked, ctx);
elm_object_part_text_set(obj, "elm.text.display", "");
+ elm_object_part_text_set(ctx->self, "elm.text.contact-and-type", "");
+ elm_object_part_text_set(ctx->self, "elm.text.contact", "");
+ elm_object_part_text_set(ctx->self, "elm.text.phone.type", "");
elm_object_signal_emit(obj, "hide,contact", "keypad");
elm_object_signal_emit(obj, "disable,save", "keypad");
elm_object_signal_emit(obj, "disable,backspace", "keypad");