hermet pushed a commit to branch master.

http://git.enlightenment.org/tools/enventor.git/commit/?id=8e0efde5b13925ff46ae1beec12897241ba43fed

commit 8e0efde5b13925ff46ae1beec12897241ba43fed
Author: ChunEon Park <her...@hermet.pe.kr>
Date:   Thu Feb 19 13:01:47 2015 +0900

    bin/live_edit: toggle live edit
    
    don't activate search/goto with the live edit.
---
 src/bin/main.c  | 2 ++
 src/bin/tools.c | 9 +++++++++
 2 files changed, 11 insertions(+)

diff --git a/src/bin/main.c b/src/bin/main.c
index 84cc8a4..de7d4fc 100644
--- a/src/bin/main.c
+++ b/src/bin/main.c
@@ -662,12 +662,14 @@ ctrl_func(app_data *ad, const char *key)
    //Find/Replace
    if (!strcmp(key, "f") || !strcmp(key, "F"))
      {
+        live_edit_cancel();
         search_open(ad->enventor);
         return ECORE_CALLBACK_DONE;
      }
    //Goto Line
    if (!strcmp(key, "l") || !strcmp(key, "L"))
      {
+        live_edit_cancel();
         goto_open(ad->enventor);
         return ECORE_CALLBACK_DONE;
      }
diff --git a/src/bin/tools.c b/src/bin/tools.c
index 39f774f..fa40172 100644
--- a/src/bin/tools.c
+++ b/src/bin/tools.c
@@ -9,12 +9,17 @@ menu_cb(void *data, Evas_Object *obj EINA_UNUSED, void 
*event_info EINA_UNUSED)
 {
    Evas_Object *enventor = data;
 
+   if (live_edit_get()) live_edit_cancel();
+
    if (search_is_opened() || goto_is_opened())
      {
         goto_close();
         search_close();
         enventor_object_focus_set(enventor, EINA_TRUE);
      }
+
+   enventor_object_focus_set(enventor, EINA_TRUE);
+
    menu_toggle();
 }
 
@@ -65,6 +70,7 @@ find_cb(void *data, Evas_Object *obj EINA_UNUSED,
         void *event_info EINA_UNUSED)
 {
    Evas_Object *enventor = data;
+   live_edit_cancel();
    if (search_is_opened()) search_close();
    else search_open(enventor);
 }
@@ -74,6 +80,7 @@ goto_cb(void *data, Evas_Object *obj EINA_UNUSED,
         void *event_info EINA_UNUSED)
 {
    Evas_Object *enventor = data;
+   live_edit_cancel();
    if (goto_is_opened()) goto_close();
    else goto_open(enventor);
 }
@@ -88,6 +95,8 @@ console_cb(void *data EINA_UNUSED, Evas_Object *obj 
EINA_UNUSED,
 static void
 live_edit_cb(void *data, Evas_Object *obj EINA_UNUSED, void *event_info)
 {
+   if (search_is_opened()) search_close();
+   if (goto_is_opened()) goto_close();
    live_edit_toggle();
 }
 

-- 


Reply via email to