hermet pushed a commit to branch master.

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

commit b654fee78a9873d4e182be4334ed44e03f033c86
Author: ChunEon Park <her...@hermet.pe.kr>
Date:   Thu Jul 2 21:39:15 2015 +0900

    ctxpopup: remove a space in the generated code just around ';'
---
 src/lib/ctxpopup.c   | 18 ++++++++----------
 src/lib/edc_editor.c |  1 +
 src/lib/edc_parser.c |  4 ++--
 3 files changed, 11 insertions(+), 12 deletions(-)

diff --git a/src/lib/ctxpopup.c b/src/lib/ctxpopup.c
index 8f9b77b..931b6e9 100644
--- a/src/lib/ctxpopup.c
+++ b/src/lib/ctxpopup.c
@@ -33,7 +33,7 @@ ctxpopup_it_cb(void *data, Evas_Object *obj, void *event_info)
    Elm_Object_Item *it = event_info;
    const char *text = elm_object_item_text_get(it);
 
-   snprintf(ctxdata->candidate, sizeof(ctxdata->candidate), "%s%s%s",
+   snprintf(ctxdata->candidate, sizeof(ctxdata->candidate), "%s %s%s",
             ctxdata->attr->prepend_str, text, ctxdata->attr->append_str);
 
    ctxdata->changed_cb(ctxdata->data, obj, ctxdata->candidate);
@@ -84,24 +84,23 @@ slider_changed_cb(void *data, Evas_Object *obj, void 
*event_info EINA_UNUSED)
                                              "elm.swallow.slider");
         if (ctxdata->attr->type & ATTR_VALUE_INTEGER)
           {
-             snprintf(buf, sizeof(buf), "%d",
+             snprintf(buf, sizeof(buf), " %d",
                       (int) roundf(elm_slider_value_get(slider)));
           }
         else
           {
              //if the last digit number is 0 then round up.
              double val = elm_slider_value_get(slider);
-             snprintf(buf, sizeof(buf), "%0.2f", val);
+             snprintf(buf, sizeof(buf), " %0.2f", val);
              double round_down = atof(buf);
-             snprintf(buf, sizeof(buf), "%0.1f", val);
+             snprintf(buf, sizeof(buf), " %0.1f", val);
              double round_down2 = atof(buf);
              if (fabs(round_down - round_down2) < 0.0005)
-               snprintf(buf, sizeof(buf), "%0.1f", val);
+               snprintf(buf, sizeof(buf), " %0.1f", val);
              else
-               snprintf(buf, sizeof(buf), "%0.2f", val);
+               snprintf(buf, sizeof(buf), " %0.2f", val);
           }
         strcat(ctxdata->candidate, buf);
-        strcat(ctxdata->candidate, " ");
      }
    strcat(ctxdata->candidate, ctxdata->attr->append_str);
    ctxdata->animator = ecore_animator_add(changed_animator_cb, ctxdata);
@@ -207,16 +206,15 @@ toggle_changed_cb(void *data, Evas_Object *obj, void 
*event_info)
 
    if (eina_list_count(box_children) == 0) return;
 
-   snprintf(ctxdata->candidate, sizeof(ctxdata->candidate), "%s",
+   snprintf(ctxdata->candidate, sizeof(ctxdata->candidate), " %s",
             ctxdata->attr->prepend_str);
 
    EINA_LIST_FOREACH(box_children, l, layout)
      {
         toggle = elm_object_part_content_get(layout,
                                              "elm.swallow.toggle");
-        snprintf(buf, sizeof(buf), "%d", (int) elm_check_state_get(toggle));
+        snprintf(buf, sizeof(buf), " %d", (int) elm_check_state_get(toggle));
         strcat(ctxdata->candidate, buf);
-        strcat(ctxdata->candidate, " ");
      }
    strcat(ctxdata->candidate, ctxdata->attr->append_str);
    ctxdata->changed_cb(ctxdata->data, ctxdata->ctxpopup, ctxdata->candidate);
diff --git a/src/lib/edc_editor.c b/src/lib/edc_editor.c
index 660d465..85288d1 100644
--- a/src/lib/edc_editor.c
+++ b/src/lib/edc_editor.c
@@ -336,6 +336,7 @@ ctxpopup_candidate_changed_cb(void *data, Evas_Object *obj, 
void *event_info)
 
    elm_entry_cursor_pos_set(ed->en_edit, cur_pos);
 
+   edit_saved_set(ed, EINA_TRUE);
    edit_changed_set(ed, EINA_TRUE);
    evas_object_smart_callback_call(ed->enventor, SIG_CTXPOPUP_CHANGED,
                                    (void *)text);
diff --git a/src/lib/edc_parser.c b/src/lib/edc_parser.c
index e820944..bc9691a 100644
--- a/src/lib/edc_parser.c
+++ b/src/lib/edc_parser.c
@@ -5,8 +5,8 @@
 #include <Enventor.h>
 #include "enventor_private.h"
 
-const char ATTR_PREPEND_COLON[] = ": ";
-const char ATTR_PREPEND_NONE[] = " ";
+const char ATTR_PREPEND_COLON[] = ":";
+const char ATTR_PREPEND_NONE[] = "";
 const char ATTR_APPEND_SEMICOLON[] = ";";
 const char ATTR_APPEND_STATE_VAL[] = " 0.0;";
 

-- 


Reply via email to