rimmed pushed a commit to branch master.

http://git.enlightenment.org/tools/eflete.git/commit/?id=30700dabef89e4928bb4fc537ca869a7f035eb20

commit 30700dabef89e4928bb4fc537ca869a7f035eb20
Author: Vyacheslav Reutskiy <v.reuts...@samsung.com>
Date:   Mon Jul 20 09:32:09 2015 +0300

    Common: make the define for name validation regex
    
    Move this regex to common macros, because it will be reused in enother
    file.
    
    Change-Id: Id05e3cdc45bd15cace2aec16ee6985ee91750a97
---
 src/bin/common/string_common.h    | 2 ++
 src/bin/ui/wizard/wizard_common.c | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/bin/common/string_common.h b/src/bin/common/string_common.h
index abab323..fc74118 100644
--- a/src/bin/common/string_common.h
+++ b/src/bin/common/string_common.h
@@ -31,6 +31,8 @@
    free(arr); \
 }
 
+#define NAME_REGEX "^[a-zA-Z0-9_]+$"
+
 #define BANNED_SYMBOLS ":;,.'\"~!?&^%$#@()[]=+*{} |/\\№"
 #define STYLE_NAME_BANNED_SYMBOLS ":;,.'`\"~!?&^%$#@()[]=+*{} |\\№"
 #define EDITORS_BANNED_SYMBOLS ":;'\"~!?&^%$@()[]*{}|\\№"
diff --git a/src/bin/ui/wizard/wizard_common.c 
b/src/bin/ui/wizard/wizard_common.c
index 3464d14..3595cec 100644
--- a/src/bin/ui/wizard/wizard_common.c
+++ b/src/bin/ui/wizard/wizard_common.c
@@ -357,7 +357,7 @@ wizard_import_common_add(const char *layout_name)
    assert(mwin != NULL);
 
    wiew->win = mwin;
-   wiew->name_validator = elm_validator_regexp_new("^[a-zA-Z0-9_]+$", NULL);
+   wiew->name_validator = elm_validator_regexp_new(NAME_REGEX, NULL);
 
    layout = elm_layout_add(mwin);
    elm_layout_theme_set(layout, "layout", "wizard", layout_name);

-- 


Reply via email to