|
|
|
@ -208,13 +208,11 @@ _ui_mouse_move(void *data, Evas *e, Evas_Object *obj, void *event_info) |
|
|
|
|
static void |
|
|
|
|
_ui_menu_item_add(char *icon, char *text, void (*func) (void)) |
|
|
|
|
{ |
|
|
|
|
char buf[4096]; |
|
|
|
|
Menu_Item *mi; |
|
|
|
|
|
|
|
|
|
mi = malloc(sizeof(Menu_Item)); |
|
|
|
|
snprintf(buf, 4096, "%s%s", data_dir, icon); |
|
|
|
|
mi->o_icon = evas_object_image_add(evas); |
|
|
|
|
evas_object_image_file_set(mi->o_icon, buf, NULL); |
|
|
|
|
evas_object_image_file_set(mi->o_icon, build_path(icon), NULL); |
|
|
|
|
evas_object_resize(mi->o_icon, 32, 32); |
|
|
|
|
evas_object_image_fill_set(mi->o_icon, 0, 0, 32, 32); |
|
|
|
|
mi->icon = strdup(icon); |
|
|
|
@ -227,16 +225,8 @@ _ui_menu_item_add(char *icon, char *text, void (*func) (void)) |
|
|
|
|
static void |
|
|
|
|
_ui_setup(void) |
|
|
|
|
{ |
|
|
|
|
char buf[4096]; |
|
|
|
|
Evas_Object *o; |
|
|
|
|
Evas_Coord x, y, w, h; |
|
|
|
|
char *prefix; |
|
|
|
|
|
|
|
|
|
prefix = getenv("EXPEDITE_DATA_DIR"); |
|
|
|
|
if (!prefix) |
|
|
|
|
strcpy(data_dir, PACKAGE_DATA_DIR"/data/"); |
|
|
|
|
else |
|
|
|
|
snprintf(data_dir, 4096, "%s/", prefix); |
|
|
|
|
|
|
|
|
|
o = evas_object_rectangle_add(evas); |
|
|
|
|
evas_object_move(o, 0, 0); |
|
|
|
@ -299,8 +289,7 @@ _ui_setup(void) |
|
|
|
|
|
|
|
|
|
o = evas_object_image_add(evas); |
|
|
|
|
evas_object_move(o, (win_w - 120) / 2, ((win_h - 160) / 2)); |
|
|
|
|
snprintf(buf, 4096, "%s%s", data_dir, "logo.png"); |
|
|
|
|
evas_object_image_file_set(o, buf, NULL); |
|
|
|
|
evas_object_image_file_set(o, build_path("logo.png"), NULL); |
|
|
|
|
evas_object_image_fill_set(o, 0, 0, 120, 160); |
|
|
|
|
evas_object_resize(o, 120, 160); |
|
|
|
|
evas_object_layer_set(o, -98); |
|
|
|
@ -317,16 +306,14 @@ _ui_setup(void) |
|
|
|
|
|
|
|
|
|
o = evas_object_image_add(evas); |
|
|
|
|
evas_object_move(o, 0, 0); |
|
|
|
|
snprintf(buf, 4096, "%s%s", data_dir, "icon_sel.png"); |
|
|
|
|
evas_object_image_file_set(o, buf, NULL); |
|
|
|
|
evas_object_image_file_set(o, build_path("icon_sel.png"), NULL); |
|
|
|
|
evas_object_resize(o, 56, 56); |
|
|
|
|
evas_object_image_fill_set(o, 0, 0, 56, 56); |
|
|
|
|
o_menu_icon_sel = o; |
|
|
|
|
|
|
|
|
|
o = evas_object_image_add(evas); |
|
|
|
|
evas_object_move(o, 0, 0); |
|
|
|
|
snprintf(buf, 4096, "%s%s", data_dir, "text_sel.png"); |
|
|
|
|
evas_object_image_file_set(o, buf, NULL); |
|
|
|
|
evas_object_image_file_set(o, build_path("text_sel.png"), NULL); |
|
|
|
|
evas_object_resize(o, 96, 32); |
|
|
|
|
evas_object_image_fill_set(o, 0, 0, 96, 32); |
|
|
|
|
evas_object_image_border_set(o, 8, 8, 8, 8); |
|
|
|
@ -334,8 +321,7 @@ _ui_setup(void) |
|
|
|
|
|
|
|
|
|
o = evas_object_image_add(evas); |
|
|
|
|
evas_object_move(o, 0, 0); |
|
|
|
|
snprintf(buf, 4096, "%s%s", data_dir, "icon_sel2.png"); |
|
|
|
|
evas_object_image_file_set(o, buf, NULL); |
|
|
|
|
evas_object_image_file_set(o, build_path("icon_sel2.png"), NULL); |
|
|
|
|
evas_object_resize(o, 56, 41); |
|
|
|
|
evas_object_image_fill_set(o, 0, 0, 56, 41); |
|
|
|
|
o_menu_icon_sel2 = o; |
|
|
|
|