diff --git a/data/templates/Makefile.am b/data/templates/Makefile.am index c6bdde1..b9b5534 100644 --- a/data/templates/Makefile.am +++ b/data/templates/Makefile.am @@ -14,7 +14,9 @@ files_DATA = basic.edc \ image.edj \ map.edc \ map.edj \ - proxy.edc \ + minimum.edc \ + minimum.edj \ + proxy.edc \ proxy.edj \ rect.edc \ rect.edj \ @@ -75,5 +77,8 @@ spacer.edj: Makefile spacer.edc sound.edj: Makefile sound.edc $(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: rm -f *.edj diff --git a/data/templates/empty.edc b/data/templates/empty.edc index c184f42..e69de29 100644 --- a/data/templates/empty.edc +++ b/data/templates/empty.edc @@ -1,6 +0,0 @@ -collections { - group { name: "main"; - parts { - } - } -} \ No newline at end of file diff --git a/data/templates/minimum.edc b/data/templates/minimum.edc new file mode 100644 index 0000000..c184f42 --- /dev/null +++ b/data/templates/minimum.edc @@ -0,0 +1,6 @@ +collections { + group { name: "main"; + parts { + } + } +} \ No newline at end of file diff --git a/src/bin/edc_editor.c b/src/bin/edc_editor.c index 47d5a50..8ec2990 100644 --- a/src/bin/edc_editor.c +++ b/src/bin/edc_editor.c @@ -1079,14 +1079,13 @@ edit_edc_read(edit_data *ed, const char *file_path) ecore_animator_add(syntax_color_timer_cb, ed); - autocomp_target_set(ed); - err: //Even any text is not inserted, line number should start with 1 if (ed->line_max == 0) line_init(ed); if (strbuf_line) eina_strbuf_free(strbuf_line); if (utf8_edit) eina_file_map_free(file, utf8_edit); if (file) eina_file_close(file); + autocomp_target_set(ed); } void diff --git a/src/bin/newfile.c b/src/bin/newfile.c index 528ef2e..0206f40 100644 --- a/src/bin/newfile.c +++ b/src/bin/newfile.c @@ -79,10 +79,15 @@ list_item_selected_cb(void *data, Evas_Object *obj, void *event_info) { Evas_Object *layout = data; 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]; 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"); }