hermet pushed a commit to branch master.

http://git.enlightenment.org/tools/enventor.git/commit/?id=818070912d2929fa1430cfa060a0b64648f8adc8

commit 818070912d2929fa1430cfa060a0b64648f8adc8
Author: ChunEon Park <her...@hermet.pe.kr>
Date:   Wed Aug 13 19:56:32 2014 +0900

    template: print exception message in case of out of collections.
---
 src/bin/template.c | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/src/bin/template.c b/src/bin/template.c
index db96e8b..6024ae4 100644
--- a/src/bin/template.c
+++ b/src/bin/template.c
@@ -29,9 +29,16 @@ template_part_first_line_get(void)
 void
 template_insert(edit_data *ed)
 {
+   const char *EXCEPT_MSG = "Can't insert template code here. Move the cursor" 
                             " inside the \"Collections,Images,Parts,Part,"
+                            "Programs\" scope.";
+
    Evas_Object *entry = edit_entry_get(ed);
    Eina_Stringshare *paragh = edit_cur_paragh_get(ed);
-   if (!paragh) return;
+   if (!paragh)
+     {
+        stats_info_msg_update(EXCEPT_MSG);
+        return;
+     }
 
    if (!strcmp(paragh, "parts"))
      {
@@ -71,7 +78,7 @@ template_insert(edit_data *ed)
 
    if (!t)
      {
-        stats_info_msg_update("Can't insert template code here. Move the 
cursor inside the \"Collections,Images,Parts,Part,Programs\" scope.");
+        stats_info_msg_update(EXCEPT_MSG);
         goto end;
      }
 

-- 


Reply via email to