hermet pushed a commit to branch master.

http://git.enlightenment.org/tools/enventor.git/commit/?id=917844352434b0f65bf1c709c2008c58dc724c93

commit 917844352434b0f65bf1c709c2008c58dc724c93
Author: ChunEon Park <[email protected]>
Date:   Sat Feb 22 15:24:53 2014 +0900

    search - start to implement search/relace
---
 src/bin/Makefile.am     | 1 +
 src/bin/main.c          | 6 ++++++
 src/bin/search.c        | 9 +++++++++
 src/include/Makefile.am | 3 ++-
 src/include/common.h    | 1 +
 5 files changed, 19 insertions(+), 1 deletion(-)

diff --git a/src/bin/Makefile.am b/src/bin/Makefile.am
index 16d09b2..9c09b02 100644
--- a/src/bin/Makefile.am
+++ b/src/bin/Makefile.am
@@ -27,6 +27,7 @@ enventor_SOURCES = \
        edj_mgr.c \
        build.c \
        hotkeys.c \
+       search.c \
        globals.c
 
 enventor_LDADD = @ENVENTOR_LIBS@
diff --git a/src/bin/main.c b/src/bin/main.c
index 50f21f0..021e3ea 100644
--- a/src/bin/main.c
+++ b/src/bin/main.c
@@ -162,6 +162,12 @@ ctrl_func(app_data *ad, const char *key)
    //Go to Begin/End
    if (!strcmp(key, "Home") || !strcmp(key, "End"))
      return ECORE_CALLBACK_PASS_ON;
+   //Find/Replace
+   if (!strcmp(key, "f") || !strcmp(key, "F"))
+     {
+        search_edit_word(ad->ed, "RECT");
+        return ECORE_CALLBACK_DONE;
+     }
    //Template Code
    if (!strcmp(key, "t") || !strcmp(key, "T"))
      {
diff --git a/src/bin/search.c b/src/bin/search.c
new file mode 100644
index 0000000..c465349
--- /dev/null
+++ b/src/bin/search.c
@@ -0,0 +1,9 @@
+#include <Elementary.h>
+#include "common.h"
+
+void
+search_edit_word(edit_data *ed, const char *word)
+{
+printf("search word - %s\n", word);
+fflush(stdout);
+}
diff --git a/src/include/Makefile.am b/src/include/Makefile.am
index 3cab40d..b449b61 100644
--- a/src/include/Makefile.am
+++ b/src/include/Makefile.am
@@ -18,4 +18,5 @@ EXTRA_DIST = common.h \
        indent.h \
        syntax_helper.h \
        template_code.h \
-       hotkeys.h
+       hotkeys.h \
+       search.h
diff --git a/src/include/common.h b/src/include/common.h
index 921e2c2..a530df2 100644
--- a/src/include/common.h
+++ b/src/include/common.h
@@ -26,5 +26,6 @@ typedef struct indent_s indent_data;
 #include "build.h"
 #include "hotkeys.h"
 #include "base_gui.h"
+#include "search.h"
 
 #endif

-- 


Reply via email to