forked from enlightenment/enventor
enventor - implemented data path entry ui
This commit is contained in:
parent
9cc06885dc
commit
8e7e671cd6
|
@ -877,7 +877,7 @@ group { name: "setting_layout";
|
|||
fixed: 0 1;
|
||||
}
|
||||
}
|
||||
part { name: "preference_frame";
|
||||
part { name: "data_path_frame";
|
||||
type: RECT;
|
||||
clip_to: "clipper";
|
||||
description {
|
||||
|
@ -885,7 +885,19 @@ group { name: "setting_layout";
|
|||
rel2 {to: "fnt_path_frame"; relative: 1 1;}
|
||||
align: 0.5 0;
|
||||
visible: 0;
|
||||
min: 0 230;
|
||||
min: 0 30;
|
||||
fixed: 0 1;
|
||||
}
|
||||
}
|
||||
part { name: "preference_frame";
|
||||
type: RECT;
|
||||
clip_to: "clipper";
|
||||
description {
|
||||
rel1 {to: "data_path_frame"; relative: 0 1;}
|
||||
rel2 {to: "data_path_frame"; relative: 1 1;}
|
||||
align: 0.5 0;
|
||||
visible: 0;
|
||||
min: 0 200;
|
||||
fixed: 0 1;
|
||||
}
|
||||
}
|
||||
|
@ -1030,6 +1042,53 @@ group { name: "setting_layout";
|
|||
rel2.to: "fnt_path_frame";
|
||||
}
|
||||
}
|
||||
part { name: "data_path_icon";
|
||||
type: IMAGE;
|
||||
scale: 1;
|
||||
clip_to: "clipper";
|
||||
description {
|
||||
align: 0 0.5;
|
||||
min: 20 20;
|
||||
max: 20 20;
|
||||
fixed: 1 1;
|
||||
rel1.to: "data_path_frame";
|
||||
rel2.to: "data_path_frame";
|
||||
image.normal: "folder.png";
|
||||
}
|
||||
}
|
||||
part { name: "data_path_guide";
|
||||
type: TEXT;
|
||||
scale: 1;
|
||||
clip_to: "clipper";
|
||||
description {
|
||||
rel1 {to: "data_path_icon"; relative: 1 0; offset: 5 1;}
|
||||
rel2 {to: "data_path_icon"; relative: 1 1;}
|
||||
color: 30 30 30 255;
|
||||
align: 0 0.5;
|
||||
fixed: 1 1;
|
||||
text {
|
||||
font: FN;
|
||||
text: "Data Paths:";
|
||||
size: 12;
|
||||
align: 0 0.5;
|
||||
min: 1 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
part { name: "elm.swallow.data_path_entry";
|
||||
type: SWALLOW;
|
||||
scale: 1;
|
||||
clip_to: "clipper";
|
||||
description {
|
||||
align: 0 0;
|
||||
fixed: 1 1;
|
||||
rel1.to_x: "data_path_guide";
|
||||
rel1.to_y: "data_path_guide";
|
||||
rel1.offset: 14 0;
|
||||
rel1.relative: 1 0;
|
||||
rel2.to: "data_path_frame";
|
||||
}
|
||||
}
|
||||
part { name: "preference_icon";
|
||||
type: IMAGE;
|
||||
scale: 1;
|
||||
|
|
|
@ -12,6 +12,7 @@ struct menu_s
|
|||
Evas_Object *img_path_entry;
|
||||
Evas_Object *snd_path_entry;
|
||||
Evas_Object *fnt_path_entry;
|
||||
Evas_Object *data_path_entry;
|
||||
Evas_Object *slider_font;
|
||||
Evas_Object *toggle_stats;
|
||||
Evas_Object *toggle_linenumber;
|
||||
|
@ -200,6 +201,7 @@ setting_apply_btn_cb(void *data, Evas_Object *obj EINA_UNUSED,
|
|||
config_edc_img_path_set(cd, elm_object_text_get(md->img_path_entry));
|
||||
config_edc_snd_path_set(cd, elm_object_text_get(md->snd_path_entry));
|
||||
config_edc_fnt_path_set(cd, elm_object_text_get(md->fnt_path_entry));
|
||||
config_edc_data_path_set(cd, elm_object_text_get(md->data_path_entry));
|
||||
config_font_size_set(cd, (float) elm_slider_value_get(md->slider_font));
|
||||
config_stats_bar_set(cd, elm_check_state_get(md->toggle_stats));
|
||||
config_linenumber_set(cd, elm_check_state_get(md->toggle_linenumber));
|
||||
|
@ -240,6 +242,20 @@ fnt_path_entry_update(Evas_Object *entry, Eina_List *edc_fnt_paths)
|
|||
}
|
||||
}
|
||||
|
||||
static void
|
||||
data_path_entry_update(Evas_Object *entry, Eina_List *edc_data_paths)
|
||||
{
|
||||
elm_entry_entry_set(entry, NULL);
|
||||
|
||||
Eina_List *l;
|
||||
char *edc_data_path;
|
||||
EINA_LIST_FOREACH(edc_data_paths, l, edc_data_path)
|
||||
{
|
||||
elm_entry_entry_append(entry, edc_data_path);
|
||||
elm_entry_entry_append(entry, ";");
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
snd_path_entry_update(Evas_Object *entry, Eina_List *edc_snd_paths)
|
||||
{
|
||||
|
@ -267,6 +283,8 @@ setting_reset_btn_cb(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
|
|||
(Eina_List *)config_edc_snd_path_list_get(md->cd));
|
||||
fnt_path_entry_update(md->fnt_path_entry,
|
||||
(Eina_List *)config_edc_fnt_path_list_get(md->cd));
|
||||
data_path_entry_update(md->data_path_entry,
|
||||
(Eina_List *)config_edc_data_path_list_get(md->cd));
|
||||
|
||||
elm_slider_value_set(md->slider_font, (double) config_font_size_get(cd));
|
||||
|
||||
|
@ -324,6 +342,19 @@ setting_open(menu_data *md)
|
|||
|
||||
elm_object_part_content_set(layout, "elm.swallow.fnt_path_entry",
|
||||
fnt_path_entry);
|
||||
|
||||
//Data Path Entry
|
||||
Evas_Object *data_path_entry = elm_entry_add(layout);
|
||||
elm_object_style_set(data_path_entry, elm_app_name_get());
|
||||
elm_entry_single_line_set(data_path_entry, EINA_TRUE);
|
||||
elm_entry_scrollable_set(data_path_entry, EINA_TRUE);
|
||||
data_path_entry_update(data_path_entry,
|
||||
(Eina_List *)config_edc_data_path_list_get(md->cd));
|
||||
evas_object_show(data_path_entry);
|
||||
|
||||
elm_object_part_content_set(layout, "elm.swallow.data_path_entry",
|
||||
data_path_entry);
|
||||
|
||||
//Preference
|
||||
Evas_Object *scroller = elm_scroller_add(layout);
|
||||
elm_object_part_content_set(layout, "elm.swallow.preference", scroller);
|
||||
|
@ -496,6 +527,7 @@ setting_open(menu_data *md)
|
|||
md->img_path_entry = img_path_entry;
|
||||
md->snd_path_entry = snd_path_entry;
|
||||
md->fnt_path_entry = fnt_path_entry;
|
||||
md->data_path_entry = data_path_entry;
|
||||
md->slider_font = slider;
|
||||
md->toggle_stats = toggle_stats;
|
||||
md->toggle_linenumber = toggle_linenumber;
|
||||
|
|
Loading…
Reference in New Issue