Fix compilation warnings for enventor library.

This commit is contained in:
Mykyta Biliavskyi 2015-09-15 17:39:51 +00:00
parent abe5ef0aa6
commit c8fdf43e9a
5 changed files with 13 additions and 12 deletions

View File

@ -91,7 +91,7 @@ slider_changed_cb(void *data, Evas_Object *obj, void *event_info EINA_UNUSED)
else
{
//if the last digit number is 0 then round up.
double val = elm_slider_value_get(slider);
val = elm_slider_value_get(slider);
snprintf(buf, sizeof(buf), " %0.2f", val);
double round_down = atof(buf);
snprintf(buf, sizeof(buf), " %0.1f", val);
@ -196,7 +196,8 @@ entry_changed_cb(void *data, Evas_Object *obj, void *event_info EINA_UNUSED)
}
static void
toggle_changed_cb(void *data, Evas_Object *obj, void *event_info)
toggle_changed_cb(void *data, Evas_Object *obj EINA_UNUSED,
void *event_info EINA_UNUSED)
{
ctxpopup_data *ctxdata = data;
Evas_Object *box = elm_object_content_get(ctxdata->ctxpopup);

View File

@ -663,13 +663,13 @@ void
edit_text_insert(edit_data *ed, const char *text)
{
const char *selection = elm_entry_selection_get(ed->en_edit);
selection = elm_entry_markup_to_utf8(selection);
if (!selection)
char *selection_utf8 = elm_entry_markup_to_utf8(selection);
if (!selection_utf8)
{
elm_entry_entry_set(ed->en_edit, text);
return;
}
int lenght = strlen(selection);
int lenght = strlen(selection_utf8);
int pos_from = elm_entry_cursor_pos_get(ed->en_edit) - lenght;
Evas_Object *tb = elm_entry_textblock_get(ed->en_edit);
@ -688,7 +688,7 @@ edit_text_insert(edit_data *ed, const char *text)
Evas_Textblock_Cursor *c_2 = evas_object_textblock_cursor_new(tb);
evas_textblock_cursor_pos_set(c_2, pos_from + lenght);
/* delete replaced text, and make diff into redoundo module */
redoundo_text_push(ed->rd, selection, pos_from, lenght, EINA_FALSE);
redoundo_text_push(ed->rd, selection_utf8, pos_from, lenght, EINA_FALSE);
evas_textblock_cursor_range_delete(c_1, c_2);
evas_textblock_cursor_free(c_1);
@ -696,7 +696,7 @@ edit_text_insert(edit_data *ed, const char *text)
evas_textblock_cursor_pos_set(cur, old_pos);
elm_entry_calc_force(ed->en_edit);
free(selection);
free(selection_utf8);
}
static void

View File

@ -106,8 +106,6 @@ view_images_monitor_set(view_data *vd)
Eina_List *imgs = edje_edit_images_list_get(vd->layout);
Eina_List *paths = build_path_get(ENVENTOR_PATH_TYPE_IMAGE);
Eina_List *imgs_pathes = NULL;
//List up new image pathes and add monitors
EINA_LIST_FOREACH(imgs, l, img)
{

View File

@ -54,10 +54,11 @@ static const Evas_Smart_Cb_Description _smart_callbacks[] = {
/* Internal method implementation */
/*****************************************************************************/
static Eina_Bool
key_up_cb(void *data, int type EINA_UNUSED, void *ev)
key_up_cb(void *data, int type EINA_UNUSED, void *ev EINA_UNUSED)
{
Enventor_Object_Data *pd = data;
pd->key_down = EINA_FALSE;
return ECORE_CALLBACK_DONE;
}
static Eina_Bool
@ -67,10 +68,10 @@ key_down_cb(void *data, int type EINA_UNUSED, void *ev)
Ecore_Event_Key *event = ev;
Eina_Bool ret;
eo_do_ret(pd->obj, ret, enventor_obj_focus_get());
ret = enventor_object_focus_get(pd->obj);
if (!ret) return ECORE_CALLBACK_PASS_ON;
if (pd->key_down) return;
if (pd->key_down) return ECORE_CALLBACK_PASS_ON;
pd->key_down = EINA_TRUE;
if (autocomp_event_dispatch(event->key)) return ECORE_CALLBACK_DONE;

View File

@ -186,6 +186,7 @@ template_part_insert(edit_data *ed, Edje_Part_Type part_type,
case EDJE_PART_TYPE_MESH_NODE:
case EDJE_PART_TYPE_LIGHT:
case EDJE_PART_TYPE_CAMERA:
case EDJE_PART_TYPE_SNAPSHOT:
break;
}