rimmed pushed a commit to branch master. http://git.enlightenment.org/tools/eflete.git/commit/?id=c190ff235c79570ce94187732d96e90db1681d3c
commit c190ff235c79570ce94187732d96e90db1681d3c Author: Vyacheslav Reutskiy <v.reuts...@samsung.com> Date: Tue Apr 19 17:41:37 2016 +0300 tabs: check the project lock T3424 Change-Id: I84103887b3fb8ba8ab9f427578069b4a954b771c --- src/bin/ui/tab_home_import_edc.c | 12 ++++++++++++ src/bin/ui/tab_home_import_edj.c | 11 +++++++++++ src/bin/ui/tab_home_open.c | 15 +++++++++++++++ 3 files changed, 38 insertions(+) diff --git a/src/bin/ui/tab_home_import_edc.c b/src/bin/ui/tab_home_import_edc.c index 855a29b..c3123dd 100644 --- a/src/bin/ui/tab_home_import_edc.c +++ b/src/bin/ui/tab_home_import_edc.c @@ -422,7 +422,19 @@ _import(void *data __UNUSED__, if (ap.project) if (!project_close()) return; + buf = eina_strbuf_new(); + eina_strbuf_append_printf(buf, "%s/%s.pro", + elm_entry_entry_get(tab_edc.path), + elm_entry_entry_get(tab_edc.name)); + if (!pm_lock_check(eina_strbuf_string_get(buf))) + { + popup_want_action(_("Import EDC-file"), _("The given file is locked by another application"), + NULL, NULL, BTN_OK, NULL, NULL); + return; + } + + eina_strbuf_reset(buf); eina_strbuf_append_printf(buf, _("<font_size=16>A project folder named '%s' already exist." "Do you want to replace it?</font_size><br>" diff --git a/src/bin/ui/tab_home_import_edj.c b/src/bin/ui/tab_home_import_edj.c index 5c7e005..68a1e73 100644 --- a/src/bin/ui/tab_home_import_edj.c +++ b/src/bin/ui/tab_home_import_edj.c @@ -328,6 +328,17 @@ _import(void *data __UNUSED__, return; buf = eina_strbuf_new(); + eina_strbuf_append_printf(buf, "%s/%s.pro", + elm_entry_entry_get(tab_edj.path), + elm_entry_entry_get(tab_edj.name)); + if (!pm_lock_check(eina_strbuf_string_get(buf))) + { + popup_want_action(_("Import EDJ-file"), _("The given file is locked by another application"), + NULL, NULL, BTN_OK, NULL, NULL); + return; + } + + eina_strbuf_reset(buf); eina_strbuf_append_printf(buf, _("<font_size=16>A project folder named '%s' already exist." "Do you want to replace it?</font_size><br>" diff --git a/src/bin/ui/tab_home_open.c b/src/bin/ui/tab_home_open.c index 57ae918..400b85c 100644 --- a/src/bin/ui/tab_home_open.c +++ b/src/bin/ui/tab_home_open.c @@ -82,6 +82,13 @@ _open(void *data __UNUSED__, selected = elm_fileselector_selected_get(tab.fs); if ((!selected) || !eina_str_has_suffix(selected, ".pro")) return; + if (!pm_lock_check(selected)) + { + popup_want_action(_("Open project"), _("The given file is locked by another application"), + NULL, NULL, BTN_OK, NULL, NULL); + return; + } + ap.splash = splash_add(ap.win, _setup_open_splash, _teardown_open_splash, @@ -149,6 +156,14 @@ _open_recent(void *data, if (ap.project) if (!project_close()) return; + + if (!pm_lock_check(r->path)) + { + popup_want_action(_("Open project"), _("The given file is locked by another application"), + NULL, NULL, BTN_OK, NULL, NULL); + return; + } + ap.splash = splash_add(ap.win, _setup_open_splash, _teardown_open_splash, --