hermet pushed a commit to branch master.

http://git.enlightenment.org/tools/enventor.git/commit/?id=4da3778f808121a7d6f2363ab94036fdc0dfaaf2

commit 4da3778f808121a7d6f2363ab94036fdc0dfaaf2
Author: Hermet Park <her...@hermet.pe.kr>
Date:   Sun Jun 5 13:09:52 2016 +0900

    removed redundant code
---
 src/bin/live_edit.c        | 11 -----------
 src/bin/text_setting.c     | 14 --------------
 src/bin/tools.c            |  5 ++---
 src/lib/enventor_object.eo |  1 -
 src/lib/enventor_private.h |  2 +-
 src/lib/enventor_smart.c   |  3 +--
 src/lib/template.c         |  6 ++----
 7 files changed, 6 insertions(+), 36 deletions(-)

diff --git a/src/bin/live_edit.c b/src/bin/live_edit.c
index 17e34c3..58ca29d 100644
--- a/src/bin/live_edit.c
+++ b/src/bin/live_edit.c
@@ -361,7 +361,6 @@ live_edit_insert(live_data *ld)
 
    //Calculate relative_to values to fix its size
    //in case of width and height are fixed
-   Eina_Bool fixed_w = elm_check_state_get(ld->fixed_w_check);
    Evas_Coord min_w = 0;
 
    if (!ld->rel_to_info.rel1_x_to && !ld->rel_to_info.rel2_x_to &&
@@ -376,7 +375,6 @@ live_edit_insert(live_data *ld)
 
      }
 
-   Eina_Bool fixed_h = elm_check_state_get(ld->fixed_h_check);
    Evas_Coord min_h = 0;
 
    if (!ld->rel_to_info.rel1_y_to && !ld->rel_to_info.rel2_y_to &&
@@ -1368,15 +1366,6 @@ rel_to_ctxpopup_cb(void *data, Evas_Object *obj, void 
*event_info EINA_UNUSED)
 }
 
 static void
-fixed_ctxpopup_dismissed_cb(void *data, Evas_Object *obj,
-                            void *event_info EINA_UNUSED)
-{
-   live_data *ld = data;
-   ld->fixed_ctxpopup = NULL;
-   evas_object_del(obj);
-}
-
-static void
 rel_to_ctxpopup_dismissed_cb(void *data, Evas_Object *obj,
                              void *event_info EINA_UNUSED)
 {
diff --git a/src/bin/text_setting.c b/src/bin/text_setting.c
index 3892550..2b7d5ab 100644
--- a/src/bin/text_setting.c
+++ b/src/bin/text_setting.c
@@ -589,20 +589,6 @@ list_create(Evas_Object *parent)
    return list;
 }
 
-static Evas_Object *
-toggle_create(Evas_Object *parent, const char *text, Eina_Bool state)
-{
-   Evas_Object *toggle = elm_check_add(parent);
-   elm_object_style_set(toggle, "toggle");
-   elm_check_state_set(toggle, state);
-   evas_object_size_hint_weight_set(toggle, EVAS_HINT_EXPAND, 0);
-   evas_object_size_hint_align_set(toggle, EVAS_HINT_FILL, 0);
-   elm_object_text_set(toggle, text);
-   evas_object_show(toggle);
-
-   return toggle;
-}
-
 static void
 font_scale_slider_changed_cb(void *data, Evas_Object *obj,
                              void *event_info EINA_UNUSED)
diff --git a/src/bin/tools.c b/src/bin/tools.c
index c237fb9..5bf3e18 100644
--- a/src/bin/tools.c
+++ b/src/bin/tools.c
@@ -541,9 +541,8 @@ tools_template_insert(void)
      }
 
    char syntax[12];
-   if (enventor_object_template_insert(base_enventor_get(),
-                                       ENVENTOR_TEMPLATE_INSERT_DEFAULT,
-                                       syntax, sizeof(syntax)))
+   if (enventor_object_template_insert(base_enventor_get(), syntax,
+                                       sizeof(syntax)))
      {
         char msg[64];
         snprintf(msg, sizeof(msg), _("Template code inserted, (%s)"), syntax);
diff --git a/src/lib/enventor_object.eo b/src/lib/enventor_object.eo
index 6e69b9c..c3b582c 100644
--- a/src/lib/enventor_object.eo
+++ b/src/lib/enventor_object.eo
@@ -218,7 +218,6 @@ class Enventor.Object (Elm.Widget, Efl.File) {
       template_insert {
          return: bool;
          params {
-            @in insert_type: Enventor_Template_Insert_Type;
             @in syntax: char *;
             @in n: size;
          }
diff --git a/src/lib/enventor_private.h b/src/lib/enventor_private.h
index bd4f7df..0a551b6 100644
--- a/src/lib/enventor_private.h
+++ b/src/lib/enventor_private.h
@@ -220,7 +220,7 @@ Edje_Part_Type view_part_type_get(view_data *vd, const char 
*part);
 Eina_Bool template_part_insert(edit_data *ed, Edje_Part_Type part_type, 
Enventor_Template_Insert_Type insert_type, Eina_Bool fixed_w, Eina_Bool 
fixed_h, char *rel1_x_to, char *rel1_y_to, char *rel2_x_to, char *rel2_y_to, 
float align_x, float align_y, int min_w, int min_h,
 float rel1_x, float rel1_y, float rel2_x, float rel2_y, const Eina_Stringshare 
*group_name, char *syntax, size_t n);
 
-Eina_Bool template_insert(edit_data *ed, Enventor_Template_Insert_Type 
insert_type, char *syntax, size_t n);
+Eina_Bool template_insert(edit_data *ed, char *syntax, size_t n);
 
 
 /* ctxpopup */
diff --git a/src/lib/enventor_smart.c b/src/lib/enventor_smart.c
index 84d1f82..2f29329 100644
--- a/src/lib/enventor_smart.c
+++ b/src/lib/enventor_smart.c
@@ -826,10 +826,9 @@ _enventor_object_live_view_get(Eo *obj EINA_UNUSED,
 
 EOLIAN static Eina_Bool
 _enventor_object_template_insert(Eo *obj EINA_UNUSED, Enventor_Object_Data *pd,
-                                 Enventor_Template_Insert_Type insert_type,
                                  char *syntax, size_t n)
 {
-   return template_insert(pd->main_it.ed, insert_type, syntax, n);
+   return template_insert(pd->main_it.ed, syntax, n);
 }
 
 EOLIAN static Eina_Bool
diff --git a/src/lib/template.c b/src/lib/template.c
index 0e6d068..93535bd 100644
--- a/src/lib/template.c
+++ b/src/lib/template.c
@@ -55,7 +55,7 @@ image_description_add(edit_data *ed)
           cursor_pos2 = cursor_pos1;
         else
           {
-             template_insert(ed, ENVENTOR_TEMPLATE_INSERT_LIVE_EDIT, NULL, 0);
+             template_insert(ed, NULL, 0);
              cursor_pos2 = elm_entry_cursor_pos_get(edit_entry);
           }
      }
@@ -405,9 +405,7 @@ template_part_insert(edit_data *ed, Edje_Part_Type 
part_type,
 }
 
 Eina_Bool
-template_insert(edit_data *ed,
-                Enventor_Template_Insert_Type insert_type,
-                char *syntax, size_t n)
+template_insert(edit_data *ed, char *syntax, size_t n)
 {
    Evas_Object *entry = edit_entry_get(ed);
    Eina_Stringshare *paragh = edit_cur_paragh_get(ed);

-- 


Reply via email to