hermet pushed a commit to branch master.

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

commit e513684d22e8221837c6897790a7bdfa019a081a
Author: ChunEon Park <her...@hermet.pe.kr>
Date:   Sat Nov 1 01:15:58 2014 +0900

    fix build warnings.
---
 src/bin/file_mgr.c         |  2 +-
 src/bin/live_edit.c        | 11 +++++------
 src/bin/main.c             | 21 ++++++++-------------
 src/bin/tools.c            | 27 +++++++++++++++++----------
 src/lib/build.c            |  5 ++---
 src/lib/edc_editor.c       |  6 +++---
 src/lib/enventor_object.eo |  1 +
 src/lib/enventor_smart.c   |  2 +-
 8 files changed, 38 insertions(+), 37 deletions(-)

diff --git a/src/bin/file_mgr.c b/src/bin/file_mgr.c
index 3834014..557e54d 100644
--- a/src/bin/file_mgr.c
+++ b/src/bin/file_mgr.c
@@ -106,7 +106,7 @@ warning_open(file_mgr_data *fmd)
 static void
 enventor_edc_modified_cb(void *data, Evas_Object *obj EINA_UNUSED, void *event)
 {
-   file_mgr_data *fmd = g_fmd;
+   file_mgr_data *fmd = data;
    Enventor_EDC_Modified *modified = event;
 
    if (modified->self_changed)
diff --git a/src/bin/live_edit.c b/src/bin/live_edit.c
index ba7c436..21967b7 100644
--- a/src/bin/live_edit.c
+++ b/src/bin/live_edit.c
@@ -7,7 +7,7 @@
 #include <Elementary_Cursor.h>
 #include <Enventor.h>
 #include "common.h"
-
+#if 0
 typedef struct menu_data_s
 {
    const char *name;
@@ -308,10 +308,9 @@ live_edit_toggle(void)
 {
    live_data *ld = g_ld;
    Eina_Bool on = !config_live_edit_get();
-#if 0
    Evas_Object *event_obj = view_obj_get(VIEW_DATA);
    if (!event_obj) return;
-
+#if 0
    if (on)
      {
         evas_object_event_callback_add(event_obj, EVAS_CALLBACK_MOUSE_UP,
@@ -323,15 +322,13 @@ live_edit_toggle(void)
                                        layout_mouse_up_cb);
         live_edit_reset(ld);
      }
-#endif
-#if 0
    enventor_object_disabled_set(ld->enventor, on);
-#endif
 
    if (on) stats_info_msg_update("Live View Edit Mode Enabled.");
    else stats_info_msg_update("Live View Edit Mode Disabled.");
 
    config_live_edit_set(on);
+#endif
 }
 
 void
@@ -376,3 +373,5 @@ live_edit_term()
    free(ld);
    g_ld = NULL;
 }
+
+#endif
diff --git a/src/bin/main.c b/src/bin/main.c
index cd676b1..c7f1eb2 100644
--- a/src/bin/main.c
+++ b/src/bin/main.c
@@ -57,13 +57,14 @@ static Eina_Bool
 template_insert_patch(app_data *ad, const char *key)
 {
    Edje_Part_Type part_type;
+#if 0
    if (config_live_edit_get())
      {
         stats_info_msg_update("Insertion of template code is disabled "
                               "while in Live Edit mode");
         return ECORE_CALLBACK_DONE;
      }
-
+#endif
    if (!strcmp(key, "a") || !strcmp(key, "A"))
      part_type = EDJE_PART_TYPE_TABLE;
    else if (!strcmp(key, "b") || !strcmp(key, "B"))
@@ -394,16 +395,6 @@ enventor_live_view_cursor_moved_cb(void *data EINA_UNUSED,
 }
 
 static void
-enventor_live_view_resize_cb(void *data EINA_UNUSED,
-                             Evas_Object *obj EINA_UNUSED,
-                             void *event_info)
-{
-   if (!config_stats_bar_get()) return;
-   Enventor_Live_View_Cursor *cursor = event_info;
-   stats_cursor_pos_update(cursor->x, cursor->y, cursor->relx, cursor->rely);
-}
-
-static void
 enventor_program_run_cb(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
                         void *event_info)
 {
@@ -526,13 +517,14 @@ dummy_swallow_toggle(app_data *ad)
 static void
 default_template_insert(app_data *ad)
 {
+#if 0
    if (config_live_edit_get())
      {
         stats_info_msg_update("Insertion of template code is disabled "
                               "while in Live Edit mode");
         return;
      }
-
+#endif
    char syntax[12];
    if (enventor_object_template_insert(ad->enventor, syntax, sizeof(syntax)))
      {
@@ -633,7 +625,9 @@ ctrl_func(app_data *ad, const char *key)
    //Live Edit
    if (!strcmp(key, "e") || !strcmp(key, "E"))
      {
+#if 0
         live_edit_toggle();
+#endif
         return ECORE_CALLBACK_DONE;
      }
 
@@ -813,7 +807,8 @@ term(app_data *ad EINA_UNUSED)
 EAPI_MAIN
 int elm_main(int argc, char **argv)
 {
-   app_data ad = {0, };
+   app_data ad;
+   memset(&ad, 0x00, sizeof(ad));
 
    if (!init(&ad, argc, argv))
      {
diff --git a/src/bin/tools.c b/src/bin/tools.c
index 48f4bed..3f3227b 100644
--- a/src/bin/tools.c
+++ b/src/bin/tools.c
@@ -1,7 +1,11 @@
-#include <Elementary.h>
-#include "common.h"
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#define ENVENTOR_BETA_API_SUPPORT 1
 
-#define TOOLBAR_ICON_SIZE 16
+#include <Enventor.h>
+#include "common.h"
 
 static void
 menu_cb(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
@@ -54,13 +58,14 @@ lines_cb(void *data, Evas_Object *obj EINA_UNUSED, void 
*event_info EINA_UNUSED)
 
 static void
 status_cb(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
-          void *event_info)
+          void *event_info EINA_UNUSED)
 {
    base_statusbar_toggle(EINA_TRUE);
 }
 
 static void
-find_cb(void *data, Evas_Object *obj EINA_UNUSED, void *event_info)
+find_cb(void *data, Evas_Object *obj EINA_UNUSED,
+        void *event_info EINA_UNUSED)
 {
    Evas_Object *enventor = data;
    if (search_is_opened()) search_close();
@@ -68,7 +73,8 @@ find_cb(void *data, Evas_Object *obj EINA_UNUSED, void 
*event_info)
 }
 
 static void
-goto_cb(void *data, Evas_Object *obj EINA_UNUSED, void *event_info)
+goto_cb(void *data, Evas_Object *obj EINA_UNUSED,
+        void *event_info EINA_UNUSED)
 {
    Evas_Object *enventor = data;
    if (goto_is_opened()) goto_close();
@@ -77,16 +83,17 @@ goto_cb(void *data, Evas_Object *obj EINA_UNUSED, void 
*event_info)
 
 static void
 console_cb(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
-           void *event_info)
+           void *event_info EINA_UNUSED)
 {
    base_console_toggle();
 }
-
+#if 0
 static void
 live_edit_cb(void *data, Evas_Object *obj EINA_UNUSED, void *event_info)
 {
    live_edit_toggle();
 }
+#endif
 
 static Evas_Object *
 tools_btn_create(Evas_Object *parent, const char *icon, const char *label,
@@ -139,12 +146,12 @@ tools_create(Evas_Object *parent, Evas_Object *enventor)
    evas_object_size_hint_weight_set(btn, 0, EVAS_HINT_EXPAND);
    evas_object_size_hint_align_set(btn, 0.0, EVAS_HINT_FILL);
    elm_box_pack_end(box, btn);
-
+/*
    btn = tools_btn_create(box, "live_edit", "LiveEdit", live_edit_cb, NULL);
    evas_object_size_hint_weight_set(btn, 0, EVAS_HINT_EXPAND);
    evas_object_size_hint_align_set(btn, 0.0, EVAS_HINT_FILL);
    elm_box_pack_end(box, btn);
-
+*/
    sp = elm_separator_add(box);
    evas_object_show(sp);
    elm_box_pack_end(box, sp);
diff --git a/src/lib/build.c b/src/lib/build.c
index 8098d2b..d0de6c8 100644
--- a/src/lib/build.c
+++ b/src/lib/build.c
@@ -173,7 +173,7 @@ build_term(void)
    eina_stringshare_del(bd->edc_path);
 
    int i;
-   for (i = 0; i < (sizeof(bd->pathes_list) / sizeof(Eina_List *)); i++)
+   for (i = 0; i < (int)(sizeof(bd->pathes_list) / sizeof(Eina_List *)); i++)
      {
         Eina_Stringshare *path;
         EINA_LIST_FREE(bd->pathes_list[i], path)
@@ -206,8 +206,7 @@ build_path_get(Enventor_Path_Type type)
 Eina_Bool
 build_path_set(Enventor_Path_Type type, const Eina_List *pathes)
 {
-   if ((type < ENVENTOR_OUT_EDJ) || (type >= ENVENTOR_PATH_TYPE_LAST))
-     return EINA_FALSE;
+   if (type >= ENVENTOR_PATH_TYPE_LAST) return EINA_FALSE;
 
    build_data *bd = g_bd;
    Eina_Stringshare *path;
diff --git a/src/lib/edc_editor.c b/src/lib/edc_editor.c
index 72817e0..cbe30be 100644
--- a/src/lib/edc_editor.c
+++ b/src/lib/edc_editor.c
@@ -334,10 +334,10 @@ preview_img_relay_show(edit_data *ed, Evas_Object 
*ctxpopup, Eina_Bool next)
         const char *colon = parser_colon_pos_get(NULL, text);
         if (!colon) goto end;
 
-        const char *select = elm_entry_selection_get(ed->en_edit);
-        if (!select) goto end;
+        const char *selection = elm_entry_selection_get(ed->en_edit);
+        if (!selection) goto end;
 
-        char *select_utf8 = elm_entry_markup_to_utf8(select);
+        char *select_utf8 = elm_entry_markup_to_utf8(selection);
         if (!select_utf8) goto end;
         int select_len = strlen(select_utf8);
         free(select_utf8);
diff --git a/src/lib/enventor_object.eo b/src/lib/enventor_object.eo
index 5b7d66f..13468d7 100644
--- a/src/lib/enventor_object.eo
+++ b/src/lib/enventor_object.eo
@@ -382,6 +382,7 @@ class Enventor.Object (Elm_Widget, Efl.File) {
       }
    }
    implements {
+      class.constructor;
       Eo.Base.constructor;
       Evas.Object_Smart.add;
       Evas.Object_Smart.del;
diff --git a/src/lib/enventor_smart.c b/src/lib/enventor_smart.c
index 445cfe6..20b91f4 100644
--- a/src/lib/enventor_smart.c
+++ b/src/lib/enventor_smart.c
@@ -107,7 +107,7 @@ build_err_noti_cb(void *data, const char *msg)
 /*****************************************************************************/
 /* Internal Eo object required routines                                      */
 /*****************************************************************************/
-static void
+EOLIAN static void
 _enventor_object_class_constructor(Eo_Class *klass)
 {
    evas_smart_legacy_type_register(MY_CLASS_NAME_LEGACY, klass);

-- 


Reply via email to