forked from enlightenment/enventor
template - add a new template, minimum
This commit is contained in:
parent
e84a03968a
commit
408e6fd04d
|
@ -14,7 +14,9 @@ files_DATA = basic.edc \
|
||||||
image.edj \
|
image.edj \
|
||||||
map.edc \
|
map.edc \
|
||||||
map.edj \
|
map.edj \
|
||||||
proxy.edc \
|
minimum.edc \
|
||||||
|
minimum.edj \
|
||||||
|
proxy.edc \
|
||||||
proxy.edj \
|
proxy.edj \
|
||||||
rect.edc \
|
rect.edc \
|
||||||
rect.edj \
|
rect.edj \
|
||||||
|
@ -75,5 +77,8 @@ spacer.edj: Makefile spacer.edc
|
||||||
sound.edj: Makefile sound.edc
|
sound.edj: Makefile sound.edc
|
||||||
$(EDJE_CC) $(EDJE_FLAGS) $(srcdir)/sound.edc $(builddir)/sound.edj
|
$(EDJE_CC) $(EDJE_FLAGS) $(srcdir)/sound.edc $(builddir)/sound.edj
|
||||||
|
|
||||||
|
minimum.edj: Makefile minimum.edc
|
||||||
|
$(EDJE_CC) $(EDJE_FLAGS) $(srcdir)/minimum.edc $(builddir)/minimum.edj
|
||||||
|
|
||||||
clean-local:
|
clean-local:
|
||||||
rm -f *.edj
|
rm -f *.edj
|
||||||
|
|
|
@ -1,6 +0,0 @@
|
||||||
collections {
|
|
||||||
group { name: "main";
|
|
||||||
parts {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -0,0 +1,6 @@
|
||||||
|
collections {
|
||||||
|
group { name: "main";
|
||||||
|
parts {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -1079,14 +1079,13 @@ edit_edc_read(edit_data *ed, const char *file_path)
|
||||||
|
|
||||||
ecore_animator_add(syntax_color_timer_cb, ed);
|
ecore_animator_add(syntax_color_timer_cb, ed);
|
||||||
|
|
||||||
autocomp_target_set(ed);
|
|
||||||
|
|
||||||
err:
|
err:
|
||||||
//Even any text is not inserted, line number should start with 1
|
//Even any text is not inserted, line number should start with 1
|
||||||
if (ed->line_max == 0) line_init(ed);
|
if (ed->line_max == 0) line_init(ed);
|
||||||
if (strbuf_line) eina_strbuf_free(strbuf_line);
|
if (strbuf_line) eina_strbuf_free(strbuf_line);
|
||||||
if (utf8_edit) eina_file_map_free(file, utf8_edit);
|
if (utf8_edit) eina_file_map_free(file, utf8_edit);
|
||||||
if (file) eina_file_close(file);
|
if (file) eina_file_close(file);
|
||||||
|
autocomp_target_set(ed);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
@ -79,10 +79,15 @@ list_item_selected_cb(void *data, Evas_Object *obj, void *event_info)
|
||||||
{
|
{
|
||||||
Evas_Object *layout = data;
|
Evas_Object *layout = data;
|
||||||
Elm_Object_Item *it = event_info;
|
Elm_Object_Item *it = event_info;
|
||||||
|
char *name = (char *)elm_object_item_text_get(it);
|
||||||
|
|
||||||
|
/* empty is real empty. cannot load the edj. so replace the empty to minimum
|
||||||
|
to show the preview layout. */
|
||||||
|
if (!strcmp("empty", name)) name = "minimum";
|
||||||
|
|
||||||
char buf[PATH_MAX];
|
char buf[PATH_MAX];
|
||||||
snprintf(buf, sizeof(buf), "%s/templates/%s.edj", elm_app_data_dir_get(),
|
snprintf(buf, sizeof(buf), "%s/templates/%s.edj", elm_app_data_dir_get(),
|
||||||
elm_object_item_text_get(it));
|
name);
|
||||||
|
|
||||||
elm_layout_file_set(layout, buf, "main");
|
elm_layout_file_set(layout, buf, "main");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue