[EGIT] [core/efl] master 01/01: Evas clip: Fix rare crash in _render_pre_clipper_change
jpeg pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=100a7006b855fe4da2c2a5c1c4ec58e06b3a0bc0 commit 100a7006b855fe4da2c2a5c1c4ec58e06b3a0bc0 Author: Jean-Philippe AndreDate: Thu Jan 28 12:18:34 2016 +0900 Evas clip: Fix rare crash in _render_pre_clipper_change Use delete callback instead of direct call to clip_unset, which lets us know that clip_unset() is called during the clipper's deletion, as opposed to a simple call. We can then make sure that the previous object state does not point to invalid data anymore. Here is a scenario that could have crashed: - load and show an edje object, hide it - change its theme or style - show it again @fix --- src/lib/evas/canvas/evas_clip.c| 68 -- src/lib/evas/canvas/evas_object_main.c | 20 +++--- src/lib/evas/include/evas_private.h| 1 + 3 files changed, 71 insertions(+), 18 deletions(-) diff --git a/src/lib/evas/canvas/evas_clip.c b/src/lib/evas/canvas/evas_clip.c index 874beb8..c7767db 100644 --- a/src/lib/evas/canvas/evas_clip.c +++ b/src/lib/evas/canvas/evas_clip.c @@ -213,6 +213,8 @@ _evas_object_clip_mask_unset(Evas_Object_Protected_Data *obj) extern const char *o_rect_type; extern const char *o_image_type; +static Eina_Bool _clipper_del_cb(void *data, Eo *eo_clip, const Eo_Event_Description *desc EINA_UNUSED, void *info EINA_UNUSED); + EOLIAN void _evas_object_clip_set(Eo *eo_obj, Evas_Object_Protected_Data *obj, Evas_Object *eo_clip) { @@ -281,6 +283,8 @@ _evas_object_clip_set(Eo *eo_obj, Evas_Object_Protected_Data *obj, Evas_Object * } if (obj->cur->clipper) { +Evas_Object_Protected_Data *old_clip = obj->cur->clipper; + /* unclip */ obj->cur->clipper->clip.cache_clipees_answer = eina_list_free(obj->cur->clipper->clip.cache_clipees_answer); obj->cur->clipper->clip.clipees = eina_list_remove(obj->cur->clipper->clip.clipees, obj); @@ -320,10 +324,10 @@ _evas_object_clip_set(Eo *eo_obj, Evas_Object_Protected_Data *obj, Evas_Object * evas_object_change(eo_obj, obj); EINA_COW_STATE_WRITE_BEGIN(obj, state_write, cur) - { - state_write->clipper = NULL; - } + state_write->clipper = NULL; EINA_COW_STATE_WRITE_END(obj, state_write, cur); +if (obj->prev->clipper != old_clip) + eo_do(old_clip->object, eo_event_callback_del(EO_BASE_EVENT_DEL, _clipper_del_cb, eo_obj)); } /* image object clipper */ @@ -350,11 +354,12 @@ _evas_object_clip_set(Eo *eo_obj, Evas_Object_Protected_Data *obj, Evas_Object * clip->cur->geometry.w, clip->cur->geometry.h); */ } + EINA_COW_STATE_WRITE_BEGIN(obj, state_write, cur) - { -state_write->clipper = clip; - } + state_write->clipper = clip; EINA_COW_STATE_WRITE_END(obj, state_write, cur); + if (obj->prev->clipper != clip) + eo_do(clip->object, eo_event_callback_add(EO_BASE_EVENT_DEL, _clipper_del_cb, eo_obj)); clip->clip.cache_clipees_answer = eina_list_free(clip->clip.cache_clipees_answer); clip->clip.clipees = eina_list_append(clip->clip.clipees, obj); @@ -401,7 +406,6 @@ EOLIAN void _evas_object_clip_unset(Eo *eo_obj, Evas_Object_Protected_Data *obj) { if (!obj->cur->clipper) return; - evas_object_async_block(obj); obj->clip.cache_clipees_answer = eina_list_free(obj->clip.cache_clipees_answer); @@ -413,6 +417,8 @@ _evas_object_clip_unset(Eo *eo_obj, Evas_Object_Protected_Data *obj) } if (obj->cur->clipper) { +Evas_Object_Protected_Data *old_clip = obj->cur->clipper; + obj->cur->clipper->clip.clipees = eina_list_remove(obj->cur->clipper->clip.clipees, obj); if (!obj->cur->clipper->clip.clipees) { @@ -445,12 +451,13 @@ _evas_object_clip_unset(Eo *eo_obj, Evas_Object_Protected_Data *obj) _evas_object_clip_mask_unset(obj->cur->clipper); } evas_object_change(obj->cur->clipper->object, obj->cur->clipper); + +EINA_COW_STATE_WRITE_BEGIN(obj, state_write, cur) + state_write->clipper = NULL; +EINA_COW_STATE_WRITE_END(obj, state_write, cur); +if (obj->prev->clipper != old_clip) + eo_do(old_clip->object, eo_event_callback_del(EO_BASE_EVENT_DEL, _clipper_del_cb, eo_obj)); } - EINA_COW_STATE_WRITE_BEGIN(obj, state_write, cur) - { -state_write->clipper = NULL; - } - EINA_COW_STATE_WRITE_END(obj, state_write, cur); evas_object_change(eo_obj, obj); evas_object_clip_dirty(eo_obj, obj); @@ -470,6 +477,43 @@ _evas_object_clip_unset(Eo *eo_obj, Evas_Object_Protected_Data *obj) evas_object_clip_across_check(eo_obj, obj); } +static Eina_Bool +_clipper_del_cb(void *data, Eo *eo_clip, const Eo_Event_Description *desc EINA_UNUSED, void *info
[EGIT] [tools/eflete] master 08/23: image_editor: rename create function
rimmed pushed a commit to branch master. http://git.enlightenment.org/tools/eflete.git/commit/?id=18945a9be1152b8fbe3c4f878dd5609bb700c35c commit 18945a9be1152b8fbe3c4f878dd5609bb700c35c Author: Vitalii VorobiovDate: Tue Jan 26 15:07:47 2016 + image_editor: rename create function UTC fix included as well --- src/bin/ui/editors/image_editor.c | 21 +--- src/bin/ui/editors/image_editor.h | 9 +- src/bin/ui/tabs.c | 2 +- tests/Makefile.am | 12 +-- tests/edj_build/Makefile.am | 2 +- tests/test_image_editor/image_editor_window_add.c | 126 -- tests/test_image_editor/test_image_editor.c | 40 --- tests/test_image_editor/test_image_editor.h | 31 -- 8 files changed, 15 insertions(+), 228 deletions(-) diff --git a/src/bin/ui/editors/image_editor.c b/src/bin/ui/editors/image_editor.c index 4714a2a..fb60a82 100644 --- a/src/bin/ui/editors/image_editor.c +++ b/src/bin/ui/editors/image_editor.c @@ -504,7 +504,7 @@ _image_editor_init(Image_Editor *img_edit) } Evas_Object * -image_editor_window_add(Image_Editor_Mode mode) +image_manager_add() { Evas_Object *button; Evas_Object *ic = NULL; @@ -525,22 +525,9 @@ image_editor_window_add(Image_Editor_Mode mode) elm_scroller_policy_set(img_edit->gengrid, ELM_SCROLLER_POLICY_OFF, ELM_SCROLLER_POLICY_OFF); - if (mode == SINGLE) - { -elm_gengrid_multi_select_set(img_edit->gengrid, false); - } - else if (mode == MULTIPLE) - { -elm_gengrid_multi_select_set(img_edit->gengrid, true); -elm_gengrid_multi_select_mode_set(img_edit->gengrid, - ELM_OBJECT_MULTI_SELECT_MODE_WITH_CONTROL); - } - else if (mode == TWEENS) - { -elm_gengrid_multi_select_set(img_edit->gengrid, true); -elm_gengrid_multi_select_mode_set(img_edit->gengrid, - ELM_OBJECT_MULTI_SELECT_MODE_WITH_CONTROL); - } + elm_gengrid_multi_select_set(img_edit->gengrid, true); + elm_gengrid_multi_select_mode_set(img_edit->gengrid, + ELM_OBJECT_MULTI_SELECT_MODE_WITH_CONTROL); elm_gengrid_select_mode_set(img_edit->gengrid, ELM_OBJECT_SELECT_MODE_ALWAYS); evas_object_size_hint_weight_set(img_edit->gengrid, diff --git a/src/bin/ui/editors/image_editor.h b/src/bin/ui/editors/image_editor.h index c40e572..2b16874 100644 --- a/src/bin/ui/editors/image_editor.h +++ b/src/bin/ui/editors/image_editor.h @@ -38,16 +38,13 @@ typedef enum { } Image_Editor_Mode; /** - * Add new image editor inwin object. + * Add new image editor layout for setting into tab. * - * @param mode its enumerate: SINGLE if single-selection mode, - * MULTIPLE if multi-selection mode. - * - * @return Pointer to inwin object, which contain image grid and buttons. + * @return Pointer to layout object, which contain image grid and buttons. * * @ingroup ImageEditor */ Evas_Object * -image_editor_window_add(Image_Editor_Mode mode); +image_manager_add(void); #endif /*IMAGE_EDITOR_H*/ diff --git a/src/bin/ui/tabs.c b/src/bin/ui/tabs.c index 38f75ae..62f7f67 100644 --- a/src/bin/ui/tabs.c +++ b/src/bin/ui/tabs.c @@ -385,7 +385,7 @@ _project_opened(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *ei __UNUSED__) { - tabs.menu.content_image_editor = image_editor_window_add(MULTIPLE); + tabs.menu.content_image_editor = image_manager_add(); tabs.menu.content_sound_editor = sound_editor_window_add(); tabs.menu.content_text_editor = style_editor_window_add(); tabs.menu.content_colorclass_editor = colorclass_manager_add(); diff --git a/tests/Makefile.am b/tests/Makefile.am index 0b77365..54dd5b0 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -13,7 +13,7 @@ diff_test \ change_test \ new_history_test \ sound_editor_test \ -image_editor_test \ +image_manager_test \ logger_test \ container_test \ modal_window_test \ @@ -183,11 +183,11 @@ sound_editor_test_SOURCES = \ sound_editor_test_CFLAGS = ${FLAGS} sound_editor_test_LDADD = ${LD} -image_editor_test_SOURCES = \ -../tests/test_image_editor/test_image_editor.c \ -../tests/test_image_editor/image_editor_window_add.c -image_editor_test_CFLAGS = ${FLAGS} -image_editor_test_LDADD = ${LD} +image_manager_test_SOURCES = \ +../tests/test_image_manager/test_image_manager.c \ +../tests/test_image_manager/image_manager_add.c +image_manager_test_CFLAGS = ${FLAGS} +image_manager_test_LDADD = ${LD} logger_test_SOURCES = \ ../tests/test_logger/test_logger.c \ diff --git a/tests/edj_build/Makefile.am b/tests/edj_build/Makefile.am index 08b46f4..ac5d1b4 100644 --- a/tests/edj_build/Makefile.am +++ b/tests/edj_build/Makefile.am @@ -46,7 +46,7 @@ check: Makefile
[EGIT] [tools/eflete] master 16/23: colorclass_manager: move public structures to main_window
rimmed pushed a commit to branch master. http://git.enlightenment.org/tools/eflete.git/commit/?id=39a995dfc458d556f514a9a4b82f23fbea4de405 commit 39a995dfc458d556f514a9a4b82f23fbea4de405 Author: Vitalii VorobiovDate: Wed Jan 27 13:32:16 2016 + colorclass_manager: move public structures to main_window --- src/bin/eflete.h| 1 + src/bin/ui/editors/colorclass_manager.h | 16 src/bin/ui/main_window.h| 15 +++ 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/bin/eflete.h b/src/bin/eflete.h index 976b5ea..23d284d 100644 --- a/src/bin/eflete.h +++ b/src/bin/eflete.h @@ -59,6 +59,7 @@ typedef struct _History History; typedef struct _State State; typedef struct _Part Part; typedef struct _Shortcuts Shortcuts; +typedef struct _ColorClassData ColorClassData; #include "common_macro.h" TODO("delete it, and remake all strings to eina_stringshare or eina_strbuff") diff --git a/src/bin/ui/editors/colorclass_manager.h b/src/bin/ui/editors/colorclass_manager.h index 0a692bb..e6542a9 100644 --- a/src/bin/ui/editors/colorclass_manager.h +++ b/src/bin/ui/editors/colorclass_manager.h @@ -29,22 +29,6 @@ #include "eflete.h" -typedef struct _Colorclass_Item Colorclass_Item; -struct _Colorclass_Item -{ - Eina_Stringshare *name; - int r1, g1, b1, a1; - int r2, g2, b2, a2; - int r3, g3, b3, a3; -}; - -typedef struct _ColorClassData ColorClassData; -struct _ColorClassData -{ - Colorclass_Item *current_ccl; - Evas_Object *edje_preview; -}; - /** * Add new colorclass viewer inwin object. * diff --git a/src/bin/ui/main_window.h b/src/bin/ui/main_window.h index 9b2fdbc..bb1a10c 100644 --- a/src/bin/ui/main_window.h +++ b/src/bin/ui/main_window.h @@ -431,4 +431,19 @@ project_export_edc_group(void); Evas_Object * image_manager_add(void); +typedef struct _Colorclass_Item Colorclass_Item; +struct _Colorclass_Item +{ + Eina_Stringshare *name; + int r1, g1, b1, a1; + int r2, g2, b2, a2; + int r3, g3, b3, a3; +}; + +struct _ColorClassData +{ + Colorclass_Item *current_ccl; + Evas_Object *edje_preview; +}; + #endif /* UI_MAIN_WINDOW_H */ --
[EGIT] [tools/eflete] master 14/23: image_manager: set up name of selected image
rimmed pushed a commit to branch master. http://git.enlightenment.org/tools/eflete.git/commit/?id=24f8dc46f7f23b883a03192255e0c3bb622ddb48 commit 24f8dc46f7f23b883a03192255e0c3bb622ddb48 Author: Vitalii VorobiovDate: Tue Jan 26 16:28:55 2016 + image_manager: set up name of selected image --- src/bin/ui/property_image.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/bin/ui/property_image.c b/src/bin/ui/property_image.c index 446e6e5..138919b 100644 --- a/src/bin/ui/property_image.c +++ b/src/bin/ui/property_image.c @@ -308,6 +308,7 @@ _on_image_selected(void *data, image_name = evas_object_data_get(image, "image_name"); pd->selected_image = image_name; +elm_object_text_set(pd->name, image_name); comp = edje_edit_image_compression_type_get(ap.project->global_object, image_name); if (comp != EDJE_EDIT_IMAGE_COMP_USER) --
[EGIT] [tools/eflete] master 20/23: sound_editor: disable button '-' if sound not selected
rimmed pushed a commit to branch master. http://git.enlightenment.org/tools/eflete.git/commit/?id=2d76a4069300b66a2513f816c56a6e6019d96d7d commit 2d76a4069300b66a2513f816c56a6e6019d96d7d Author: Vyacheslav ReutskiyDate: Tue Jan 26 11:10:34 2016 +0200 sound_editor: disable button '-' if sound not selected Change-Id: I3867264d6dd3f87b2845ebcd8aff2f0c1aabe261 --- src/bin/ui/editors/sound_editor.c | 21 +++-- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/src/bin/ui/editors/sound_editor.c b/src/bin/ui/editors/sound_editor.c index b6466f8..3c2c3de 100644 --- a/src/bin/ui/editors/sound_editor.c +++ b/src/bin/ui/editors/sound_editor.c @@ -22,8 +22,6 @@ #include "modal_window.h" #include "config.h" -TODO("Rename this file to sound_manager") - #define ITEM_WIDTH 100 #define ITEM_HEIGHT 115 #define SND_EDIT_KEY "sound_editor_key" @@ -50,6 +48,7 @@ struct _Sound_Editor Evas_Object *popup; Evas_Object *popup_btn_add; Evas_Object *add_cmb; + Evas_Object *btn_del; Evas_Object *tone_entry, *frq_entry; Elm_Validator_Regexp *tone_validator, *frq_validator; Evas_Object *gengrid; @@ -144,6 +143,7 @@ _grid_sel_sample(void *data, snd_data->markup = edit->markup; snd_data->gengrid = edit->gengrid; snd_data->sound_type = SOUND_TYPE_SAMPLE; + elm_object_disabled_set(edit->btn_del, false); evas_object_smart_callback_call(ap.win, SIGNAL_SOUND_ADD, snd_data); } @@ -151,8 +151,7 @@ _grid_sel_sample(void *data, static void _grid_sel_tone(void *data, Evas_Object *obj __UNUSED__, - void *event_info __UNUSED__) -{ + void *event_info __UNUSED__) { Sound_Editor *edit = (Sound_Editor *)data; Selected_Sound_Data *snd_data = mem_calloc(1, sizeof(Selected_Sound_Data)); @@ -162,6 +161,7 @@ _grid_sel_tone(void *data, snd_data->gengrid = edit->gengrid; snd_data->sound_type = SOUND_TYPE_TONE; snd_data->tone = edit->tone; + elm_object_disabled_set(edit->btn_del, false); evas_object_smart_callback_call(ap.win, SIGNAL_SOUND_ADD, snd_data); } @@ -631,7 +631,7 @@ _search_reset_cb(void *data __UNUSED__, static void _sound_editor_main_markup_create(Sound_Editor *edit) { - Evas_Object *btn, *ic, *search; + Evas_Object *ic, *search; assert(edit != NULL); @@ -642,13 +642,14 @@ _sound_editor_main_markup_create(Sound_Editor *edit) evas_object_event_callback_add(edit->markup, EVAS_CALLBACK_DEL, _on_sound_editor_del, edit); - btn = elm_button_add(edit->markup); - evas_object_smart_callback_add(btn, "clicked", _on_delete_clicked_cb, edit); - elm_object_part_content_set(edit->markup, "swallow.btn.del", btn); + edit->btn_del = elm_button_add(edit->markup); + evas_object_smart_callback_add(edit->btn_del, "clicked", _on_delete_clicked_cb, edit); + elm_object_part_content_set(edit->markup, "swallow.btn.del", edit->btn_del); - ic = elm_icon_add(btn); + ic = elm_icon_add(edit->btn_del); elm_icon_standard_set(ic, "minus"); - elm_object_part_content_set(btn, NULL, ic); + elm_object_part_content_set(edit->btn_del, NULL, ic); + elm_object_disabled_set(edit->btn_del, true); EWE_COMBOBOX_ADD(edit->markup, edit->add_cmb); ewe_combobox_style_set(edit->add_cmb, "small"); --
[EGIT] [tools/eflete] master 22/23: sound_editor: change the signal fomr SIGNAL_SOUND_ADD to SIGNAL_SOUND_SELECT
rimmed pushed a commit to branch master. http://git.enlightenment.org/tools/eflete.git/commit/?id=75234f52b288605dd7e858dab001d43bd1fd4763 commit 75234f52b288605dd7e858dab001d43bd1fd4763 Author: Vyacheslav ReutskiyDate: Tue Jan 26 11:46:52 2016 +0200 sound_editor: change the signal fomr SIGNAL_SOUND_ADD to SIGNAL_SOUND_SELECT Correct the signal nae Change-Id: I3d7fe1548cad2ed246e8388600fdeba467f5c643 --- src/bin/common/signals.h | 2 +- src/bin/ui/editors/sound_editor.c | 4 ++-- src/bin/ui/property_sound.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/bin/common/signals.h b/src/bin/common/signals.h index abf3349..e82846e 100644 --- a/src/bin/common/signals.h +++ b/src/bin/common/signals.h @@ -336,7 +336,7 @@ typedef struct { * * @ingroup Window */ -#define SIGNAL_SOUND_ADD "SIGNAL_SOUND_ADD" +#define SIGNAL_SOUND_SELECT "SIGNAL_SOUND_SELECT" /** * emited when sound/sounds in sound editor is/are deleted. diff --git a/src/bin/ui/editors/sound_editor.c b/src/bin/ui/editors/sound_editor.c index 4efe0e3..62833c4 100644 --- a/src/bin/ui/editors/sound_editor.c +++ b/src/bin/ui/editors/sound_editor.c @@ -136,7 +136,7 @@ _grid_sel_sample(void *data, snd_data->sound_type = SOUND_TYPE_SAMPLE; elm_object_disabled_set(edit->btn_del, false); - evas_object_smart_callback_call(ap.win, SIGNAL_SOUND_ADD, snd_data); + evas_object_smart_callback_call(ap.win, SIGNAL_SOUND_SELECT, snd_data); } static void @@ -154,7 +154,7 @@ _grid_sel_tone(void *data, snd_data->tone = edit->tone; elm_object_disabled_set(edit->btn_del, false); - evas_object_smart_callback_call(ap.win, SIGNAL_SOUND_ADD, snd_data); + evas_object_smart_callback_call(ap.win, SIGNAL_SOUND_SELECT, snd_data); } static void diff --git a/src/bin/ui/property_sound.c b/src/bin/ui/property_sound.c index 9915e68..fe38b96 100644 --- a/src/bin/ui/property_sound.c +++ b/src/bin/ui/property_sound.c @@ -1025,7 +1025,7 @@ ui_property_sound_add(Evas_Object *parent) FRAME_PROPERTY_ADD(pd->box, pd->info_frame, true, _("Info"), pd->box) _sound_info_create(parent, pd); - evas_object_smart_callback_add(ap.win, SIGNAL_SOUND_ADD, _on_grid_clicked, pd); + evas_object_smart_callback_add(ap.win, SIGNAL_SOUND_SELECT, _on_grid_clicked, pd); return pd->box; } --
[EGIT] [tools/eflete] master 01/23: property_group: fix SIGSEV on filters
rimmed pushed a commit to branch master. http://git.enlightenment.org/tools/eflete.git/commit/?id=ed142e578d7848e41882ed84efd0e6ad602c9464 commit ed142e578d7848e41882ed84efd0e6ad602c9464 Author: Vitalii VorobiovDate: Mon Jan 25 18:44:54 2016 + property_group: fix SIGSEV on filters changing part filter before finding this part lead to update and then change item->title from choosen last part to None. Pretty unexpectable behaviour. --- src/bin/ui/property_group.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/bin/ui/property_group.c b/src/bin/ui/property_group.c index dd6cd2d..a2d43e9 100644 --- a/src/bin/ui/property_group.c +++ b/src/bin/ui/property_group.c @@ -2287,8 +2287,6 @@ _on_program_filter_part_change(void *data, /* making change */ Change *change = change_add(msg); eina_stringshare_del(msg); - editor_program_filter_part_set(pd->group->edit_object, change, false PROGRAM_ARGS, - isNone ? NULL : item->title); if (isNone) { @@ -2302,6 +2300,10 @@ _on_program_filter_part_change(void *data, editor_program_filter_state_set(pd->group->edit_object, change, false PROGRAM_ARGS, state->parsed_name); } + + editor_program_filter_part_set(pd->group->edit_object, change, false PROGRAM_ARGS, + isNone ? NULL : item->title); + history_change_add(pd->group->history, change); evas_object_smart_callback_call(ap.win, SIGNAL_PROPERTY_ATTRIBUTE_CHANGED, NULL); prop_program_filter_state_update(pd); @@ -2314,7 +2316,7 @@ _on_program_filter_state_change(void *data, Group_Prop_Data *pd = (Group_Prop_Data *)data; Ewe_Combobox_Item *item = ei; Eina_Bool isNone = false; - Eina_Stringshare *old_val = edje_edit_program_filter_part_get(pd->group->edit_object + Eina_Stringshare *old_val = edje_edit_program_filter_state_get(pd->group->edit_object PROGRAM_ARGS); if (((item->index != 0) && (item->title == old_val)) /*stringshares*/ || ((item->index == 0) && (old_val == NULL))) @@ -2323,6 +2325,7 @@ _on_program_filter_state_change(void *data, return; } eina_stringshare_del(old_val); + isNone = !strcmp(item->title, _("None")); Eina_Stringshare *msg = eina_stringshare_printf(_("filter state changed to \"%s\""), isNone ? NULL : item->title); --
[EGIT] [tools/eflete] master 03/23: image_editor: disable del button when no image is selected
rimmed pushed a commit to branch master. http://git.enlightenment.org/tools/eflete.git/commit/?id=ea4ba790a149a6c836a2ef8a3a746c4873649f06 commit ea4ba790a149a6c836a2ef8a3a746c4873649f06 Author: Vitalii VorobiovDate: Tue Jan 26 12:02:00 2016 + image_editor: disable del button when no image is selected @fix #45777 --- src/bin/ui/editors/image_editor.c | 19 +-- 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/src/bin/ui/editors/image_editor.c b/src/bin/ui/editors/image_editor.c index 628ca4b..487bfcd 100644 --- a/src/bin/ui/editors/image_editor.c +++ b/src/bin/ui/editors/image_editor.c @@ -58,6 +58,7 @@ struct _Image_Editor Evas_Object *win; Evas_Object *gengrid; Evas_Object *layout; + Evas_Object *del_button; Search_Data image_search_data; }; @@ -220,6 +221,11 @@ _grid_sel(void *data, const Eina_List* sel_list = elm_gengrid_selected_items_get(img_edit->gengrid); int selected_images_count = eina_list_count(sel_list); + if (selected_images_count == 0) + elm_object_disabled_set(img_edit->del_button, true); + else + elm_object_disabled_set(img_edit->del_button, false); + if (selected_images_count == 1) { item = elm_object_item_data_get(eina_list_data_get(sel_list)); @@ -554,15 +560,16 @@ image_editor_window_add(Image_Editor_Mode mode) elm_object_part_content_set(img_edit->layout, "eflete.swallow.add_btn", button); - button = elm_button_add(img_edit->layout); - evas_object_show(button); - ic = elm_icon_add(button); + img_edit->del_button = elm_button_add(img_edit->layout); + evas_object_show(img_edit->del_button); + ic = elm_icon_add(img_edit->del_button); elm_icon_standard_set(ic, "minus"); - elm_object_part_content_set(button, NULL, ic); - evas_object_smart_callback_add(button, "clicked", + elm_object_part_content_set(img_edit->del_button, NULL, ic); + evas_object_smart_callback_add(img_edit->del_button, "clicked", _on_button_delete_clicked_cb, img_edit); elm_object_part_content_set(img_edit->layout, - "eflete.swallow.del_btn", button); + "eflete.swallow.del_btn", img_edit->del_button); + elm_object_disabled_set(img_edit->del_button, true); // Search line add search_entry = _image_editor_search_field_create(img_edit->layout); --
[EGIT] [tools/eflete] master 09/23: image_editor: remove useless and no more required mods
rimmed pushed a commit to branch master. http://git.enlightenment.org/tools/eflete.git/commit/?id=0413cb81128eecc8f4f584a022a268a224716fb2 commit 0413cb81128eecc8f4f584a022a268a224716fb2 Author: Vitalii VorobiovDate: Tue Jan 26 15:34:23 2016 + image_editor: remove useless and no more required mods --- src/bin/ui/editors/image_editor.h | 6 -- 1 file changed, 6 deletions(-) diff --git a/src/bin/ui/editors/image_editor.h b/src/bin/ui/editors/image_editor.h index 2b16874..c983931 100644 --- a/src/bin/ui/editors/image_editor.h +++ b/src/bin/ui/editors/image_editor.h @@ -31,12 +31,6 @@ #define SIG_IMAGE_SELECTED "image_selected" -typedef enum { - SINGLE, - MULTIPLE, - TWEENS -} Image_Editor_Mode; - /** * Add new image editor layout for setting into tab. * --
[EGIT] [tools/eflete] master 02/23: property_macros: only programs to select in afters
rimmed pushed a commit to branch master. http://git.enlightenment.org/tools/eflete.git/commit/?id=0f3afd31c6b2bda4b927802228085a905e4ae924 commit 0f3afd31c6b2bda4b927802228085a905e4ae924 Author: Vitalii VorobiovDate: Mon Jan 25 18:45:34 2016 + property_macros: only programs to select in afters --- src/bin/ui/property_macros.h | 15 ++- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/src/bin/ui/property_macros.h b/src/bin/ui/property_macros.h index d4cb1e7..b9ce4db 100644 --- a/src/bin/ui/property_macros.h +++ b/src/bin/ui/property_macros.h @@ -1380,8 +1380,6 @@ _add_##PARAM(void *data, \ { \ EINA_LIST_FOREACH(pd->group->programs, l, program) \ { \ - if (program->name == pd->attributes.program.program) \ - continue; \ ewe_combobox_item_add(combo, program->name); \ } \ } \ @@ -1452,18 +1450,17 @@ prop_program_##PARAM##_add(Evas_Object *parent, Group_Prop_Data *pd) \ EWE_COMBOBOX_ADD(item, combo); \ ewe_combobox_text_set(combo, _("None")); \ /* fill up with part and program list */ \ - EINA_LIST_FOREACH(pd->group->parts, l, part) \ - { \ -ewe_combobox_item_add(combo, part->name); \ - } \ + if (ISNOTAFTER) \ + EINA_LIST_FOREACH(pd->group->parts, l, part) \ + { \ + ewe_combobox_item_add(combo, part->name); \ + } \ Edje_Action_Type type = edje_edit_program_action_get(pd->group->edit_object, \ pd->attributes.program.program); \ - if (type == EDJE_ACTION_TYPE_ACTION_STOP) \ + if ((type == EDJE_ACTION_TYPE_ACTION_STOP) || (!ISNOTAFTER))\ { \ EINA_LIST_FOREACH(pd->group->programs, l, program) \ { \ - if (program->name == pd->attributes.program.program) \ - continue; \ ewe_combobox_item_add(combo, program->name); \ } \ } \ --
[EGIT] [tools/eflete] master 15/23: image_manager: no need in new image selection after add
rimmed pushed a commit to branch master. http://git.enlightenment.org/tools/eflete.git/commit/?id=efc4b07e03ef5bae8aefab96315c0e303cc41726 commit efc4b07e03ef5bae8aefab96315c0e303cc41726 Author: Vitalii VorobiovDate: Wed Jan 27 11:46:26 2016 + image_manager: no need in new image selection after add --- src/bin/ui/image_manager.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/bin/ui/image_manager.c b/src/bin/ui/image_manager.c index df334b9..925bb37 100644 --- a/src/bin/ui/image_manager.c +++ b/src/bin/ui/image_manager.c @@ -275,7 +275,6 @@ _on_image_done(void *data, void *event_info) { Item *it = NULL; - Elm_Object_Item *item = NULL; const Eina_List *images, *l; const char *selected; Uns_List *image = NULL; @@ -326,10 +325,9 @@ _on_image_done(void *data, it = (Item *)mem_malloc(sizeof(Item)); it->image_name = eina_stringshare_add(file_name); it->id = edje_edit_image_id_get(ap.project->global_object, it->image_name); -item = elm_gengrid_item_append(img_mng->gengrid, gic, it, _grid_sel, img_mng); +elm_gengrid_item_append(img_mng->gengrid, gic, it, _grid_sel, img_mng); it->source = eina_stringshare_add(res->source); -elm_gengrid_item_selected_set(item, true); } return true; --
[EGIT] [tools/eflete] master 23/23: sound_editor: make property empty if sound is unselected
rimmed pushed a commit to branch master. http://git.enlightenment.org/tools/eflete.git/commit/?id=16fdfe7e969bcf8eaba4074d97c17edcbeb296ed commit 16fdfe7e969bcf8eaba4074d97c17edcbeb296ed Author: Vyacheslav ReutskiyDate: Tue Jan 26 14:35:48 2016 +0200 sound_editor: make property empty if sound is unselected Change-Id: I8b607fb28e1ab12b5cad367af8a8f71343375dca --- src/bin/common/signals.h | 9 - src/bin/ui/editors/sound_editor.c | 15 +-- src/bin/ui/property_sound.c | 28 3 files changed, 49 insertions(+), 3 deletions(-) diff --git a/src/bin/common/signals.h b/src/bin/common/signals.h index e82846e..c26a9e6 100644 --- a/src/bin/common/signals.h +++ b/src/bin/common/signals.h @@ -330,7 +330,7 @@ typedef struct { */ #define SIGNAL_SOUND_EDITOR_TAB_CLICKED "SIGNAL_SOUND_EDITOR_TAB_CLICKED" - /** +/** * emited when sound/sounds in sound editor is/are added/selected. * eventinfo - NULL * @@ -338,6 +338,13 @@ typedef struct { */ #define SIGNAL_SOUND_SELECT "SIGNAL_SOUND_SELECT" +/** + * emited when sound in sound editor ise unselected. + * eventinfo - NULL + * + * @ingroup Window + */ +#define SIGNAL_SOUND_UNSELECTED "SIGNAL_SOUND_UNSELECTED" /** * emited when sound/sounds in sound editor is/are deleted. * eventinfo - NULL diff --git a/src/bin/ui/editors/sound_editor.c b/src/bin/ui/editors/sound_editor.c index 62833c4..5b5f7e3 100644 --- a/src/bin/ui/editors/sound_editor.c +++ b/src/bin/ui/editors/sound_editor.c @@ -195,8 +195,18 @@ _gengrid_content_fill(Sound_Editor *edit) } static void -_create_gengrid(Evas_Object *parent, -Sound_Editor *editor) +_grid_sel(void *data, + Evas_Object *obj __UNUSED__, + void *event_info __UNUSED__) +{ + Sound_Editor *editor = (Sound_Editor *)data; + + elm_object_disabled_set(editor->btn_del, true); + evas_object_smart_callback_call(ap.win, SIGNAL_SOUND_UNSELECTED, NULL); +} + +static void +_create_gengrid(Evas_Object *parent, Sound_Editor *editor) { assert(parent != NULL); assert(editor != NULL); @@ -205,6 +215,7 @@ _create_gengrid(Evas_Object *parent, elm_gengrid_item_size_set(editor->gengrid, ITEM_WIDTH, ITEM_HEIGHT); elm_gengrid_group_item_size_set(editor->gengrid, ITEM_HEIGHT/5, ITEM_HEIGHT/5); elm_gengrid_align_set(editor->gengrid, 0.0, 0.0); + evas_object_smart_callback_add(editor->gengrid, "unselected", _grid_sel, editor); elm_scroller_policy_set(editor->gengrid, ELM_SCROLLER_POLICY_OFF, ELM_SCROLLER_POLICY_OFF); elm_gengrid_multi_select_set(editor->gengrid, false); diff --git a/src/bin/ui/property_sound.c b/src/bin/ui/property_sound.c index fe38b96..bf22d07 100644 --- a/src/bin/ui/property_sound.c +++ b/src/bin/ui/property_sound.c @@ -1002,6 +1002,33 @@ _on_grid_clicked(void *data, } } +static void +_sound_unselected(void *data, + Evas_Object *obj __UNUSED__, + void *event_info __UNUSED__) +{ + Evas_Object *item; + Sound_Prop_Data *pd = (Sound_Prop_Data *)data; + + item = elm_object_part_content_get(pd->snd_data.file_name, "elm.swallow.content"); + elm_object_text_set(item, _("-")); + + item = elm_object_part_content_get(pd->snd_data.duration, "elm.swallow.content"); + elm_object_text_set(item, _("-")); + + item = elm_object_part_content_get(pd->snd_data.type, "elm.swallow.content"); + elm_object_text_set(item, _("-")); + + item = elm_object_part_content_get(pd->snd_data.size, "elm.swallow.content"); + elm_object_text_set(item, _("-")); + + item = elm_object_part_content_get(pd->snd_data.tone_name, "elm.swallow.content"); + elm_object_text_set(item, _("-")); + + item = elm_object_part_content_get(pd->snd_data.duration, "swallow.content1"); + elm_object_text_set(item, _("-")); +} + Evas_Object * ui_property_sound_add(Evas_Object *parent) { @@ -1026,6 +1053,7 @@ ui_property_sound_add(Evas_Object *parent) _sound_info_create(parent, pd); evas_object_smart_callback_add(ap.win, SIGNAL_SOUND_SELECT, _on_grid_clicked, pd); + evas_object_smart_callback_add(ap.win, SIGNAL_SOUND_UNSELECTED, _sound_unselected, pd); return pd->box; } --
[EGIT] [tools/eflete] master 04/23: image_editor: unselect image property after del button is clicked
rimmed pushed a commit to branch master. http://git.enlightenment.org/tools/eflete.git/commit/?id=51196367f42a9a216e9d51b4f2b43197c8acfb82 commit 51196367f42a9a216e9d51b4f2b43197c8acfb82 Author: Vitalii VorobiovDate: Tue Jan 26 12:09:45 2016 + image_editor: unselect image property after del button is clicked --- src/bin/ui/editors/image_editor.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/bin/ui/editors/image_editor.c b/src/bin/ui/editors/image_editor.c index 487bfcd..87bf7a6 100644 --- a/src/bin/ui/editors/image_editor.c +++ b/src/bin/ui/editors/image_editor.c @@ -406,6 +406,7 @@ _on_button_delete_clicked_cb(void *data, WARN("%s", buf); } + evas_object_smart_callback_call(ap.win, SIGNAL_IMAGE_SELECTED, NULL); editor_save(ap.project->global_object); TODO("Remove this line once edje_edit_image_del would be added into Editor Modulei and saving would work properly") ap.project->changed = true; --
[EGIT] [tools/eflete] master 10/23: image_manager: rename image_editor into his new form
rimmed pushed a commit to branch master. http://git.enlightenment.org/tools/eflete.git/commit/?id=4b9de2fff5c48d814d4057e6cea01c2df3ca240f commit 4b9de2fff5c48d814d4057e6cea01c2df3ca240f Author: Vitalii VorobiovDate: Tue Jan 26 15:41:12 2016 + image_manager: rename image_editor into his new form --- po/POTFILES.in | 2 +- src/bin/Makefile.am| 2 +- .../ui/{editors/image_editor.c => image_manager.c} | 15 +--- src/bin/ui/main_window.h | 9 src/bin/ui/menu.c | 1 - src/bin/ui/shortcuts/shortcuts.c | 1 - src/bin/ui/tabs.c | 1 - .../test_image_manager/test_image_manager.h| 27 +- 8 files changed, 23 insertions(+), 35 deletions(-) diff --git a/po/POTFILES.in b/po/POTFILES.in index 1ca810d..d590961 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -15,7 +15,7 @@ src/bin/ui/editors/animator.c src/bin/ui/editors/animator_program_editor.c src/bin/ui/editors/animator_program_sequence.c src/bin/ui/editors/colorclass_manager.c -src/bin/ui/editors/image_editor.c +src/bin/ui/image_manager.c src/bin/ui/editors/sound_editor.c src/bin/ui/editors/style_editor.c src/bin/ui/live_view/elementary/live_actionslider.c diff --git a/src/bin/Makefile.am b/src/bin/Makefile.am index 965f14b..ee181fb 100644 --- a/src/bin/Makefile.am +++ b/src/bin/Makefile.am @@ -39,13 +39,13 @@ libete_a_SOURCES = \ ../../src/bin/ui/shortcuts/shortcuts.c \ ../../src/bin/ui/container/container.c \ ../../src/bin/ui/editors/style_editor.c \ -../../src/bin/ui/editors/image_editor.c \ ../../src/bin/ui/editors/sound_editor.c \ ../../src/bin/ui/editors/colorclass_manager.c \ ../../src/bin/ui/dialogs/about_window.c \ ../../src/bin/ui/dialogs/colorsel.c \ ../../src/bin/ui/modal_window/modal_window.c \ ../../src/bin/ui/project_navigator.c \ +../../src/bin/ui/image_manager.c \ ../../src/bin/ui/tabs.c \ ../../src/bin/ui/tab_home_common.c \ ../../src/bin/ui/tab_home_open.c \ diff --git a/src/bin/ui/editors/image_editor.c b/src/bin/ui/image_manager.c similarity index 97% rename from src/bin/ui/editors/image_editor.c rename to src/bin/ui/image_manager.c index fb60a82..e558f71 100644 --- a/src/bin/ui/editors/image_editor.c +++ b/src/bin/ui/image_manager.c @@ -17,15 +17,12 @@ * along with this program; If not, see www.gnu.org/licenses/lgpl.html. */ -#include "image_editor.h" #include "main_window.h" #include "project_manager.h" -TODO("Rename this file to image_manager") - #define ITEM_WIDTH 100 #define ITEM_HEIGHT 115 -#define IMG_EDIT_KEY "image_editor_key" +#define IMG_MANAGER_KEY "image_manager_key" typedef struct _Image_Editor Image_Editor; typedef struct _Search_Data Search_Data; @@ -99,8 +96,8 @@ _image_editor_del(Image_Editor *img_edit) elm_gengrid_item_class_free(gic); gic = NULL; - evas_object_data_del(img_edit->layout, IMG_EDIT_KEY); - evas_object_data_del(img_edit->gengrid, IMG_EDIT_KEY); + evas_object_data_del(img_edit->layout, IMG_MANAGER_KEY); + evas_object_data_del(img_edit->gengrid, IMG_MANAGER_KEY); //evas_object_del(img_edit->gengrid); free(img_edit); } @@ -585,8 +582,8 @@ image_manager_add() ERR("Filed initialize image editor"); abort(); } - evas_object_data_set(img_edit->gengrid, IMG_EDIT_KEY, img_edit); - evas_object_data_set(img_edit->layout, IMG_EDIT_KEY, img_edit); + evas_object_data_set(img_edit->gengrid, IMG_MANAGER_KEY, img_edit); + evas_object_data_set(img_edit->layout, IMG_MANAGER_KEY, img_edit); ui_menu_items_list_disable_set(ap.menu, MENU_ITEMS_LIST_MAIN, true); evas_object_event_callback_add(img_edit->layout, EVAS_CALLBACK_DEL, _on_image_editor_del, img_edit); @@ -596,4 +593,4 @@ image_manager_add() #undef ITEM_WIDTH #undef ITEM_HEIGHT -#undef IMG_EDIT_KEY +#undef IMG_MANAGER_KEY diff --git a/src/bin/ui/main_window.h b/src/bin/ui/main_window.h index 54a7a64..9b2fdbc 100644 --- a/src/bin/ui/main_window.h +++ b/src/bin/ui/main_window.h @@ -421,5 +421,14 @@ project_export_edc_project(void); void project_export_edc_group(void); +/** + * Add new image editor layout for setting into tab. + * + * @return Pointer to layout object, which contain image grid and buttons. + * + * @ingroup Window + */ +Evas_Object * +image_manager_add(void); #endif /* UI_MAIN_WINDOW_H */ diff --git a/src/bin/ui/menu.c b/src/bin/ui/menu.c index 274ad34..d0060e4 100644 --- a/src/bin/ui/menu.c +++ b/src/bin/ui/menu.c @@ -20,7 +20,6 @@ #include "main_window.h" #include "preference.h" #include "style_editor.h" -#include "image_editor.h" #include "sound_editor.h" #include "animator.h" #include "about_window.h" diff --git a/src/bin/ui/shortcuts/shortcuts.c b/src/bin/ui/shortcuts/shortcuts.c index b90d976..845ecfa 100644 --- a/src/bin/ui/shortcuts/shortcuts.c +++
[EGIT] [tools/eflete] master 19/23: colorclass_manager: disable OK button when entry is empty at beggining
rimmed pushed a commit to branch master. http://git.enlightenment.org/tools/eflete.git/commit/?id=f7aaf0e0a3745ecc59c4248699811b5d68e9030a commit f7aaf0e0a3745ecc59c4248699811b5d68e9030a Author: Vitalii VorobiovDate: Wed Jan 27 14:11:00 2016 + colorclass_manager: disable OK button when entry is empty at beggining --- src/bin/ui/colorclass_manager.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bin/ui/colorclass_manager.c b/src/bin/ui/colorclass_manager.c index b1d262b..53642f1 100644 --- a/src/bin/ui/colorclass_manager.c +++ b/src/bin/ui/colorclass_manager.c @@ -93,7 +93,7 @@ _on_button_add_clicked_cb(void *data __UNUSED__, btn_res = popup_want_action(_("Create a new layout"), NULL, box, edit->entry, BTN_OK|BTN_CANCEL, - NULL, NULL); + NULL, edit->entry); if (BTN_CANCEL == btn_res) goto end; --
[EGIT] [tools/eflete] master 06/23: highlight: drag corners only with left mouse button
rimmed pushed a commit to branch master. http://git.enlightenment.org/tools/eflete.git/commit/?id=3a4ee3eb1165cf22af89d86566f9d2ddff4a259b commit 3a4ee3eb1165cf22af89d86566f9d2ddff4a259b Author: Vitalii VorobiovDate: Tue Jan 26 13:20:26 2016 + highlight: drag corners only with left mouse button --- src/bin/ui/workspace/highlight.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/bin/ui/workspace/highlight.c b/src/bin/ui/workspace/highlight.c index 93f544a..d7dec63 100644 --- a/src/bin/ui/workspace/highlight.c +++ b/src/bin/ui/workspace/highlight.c @@ -215,10 +215,13 @@ static void _handler_down_cb(void *data, Evas *evas, Evas_Object *obj __UNUSED__, - void *event_info __UNUSED__) + void *event_info) { Handler *handler = (Handler *)data; + Evas_Event_Mouse_Down *event = (Evas_Event_Mouse_Down *) event_info; + if (event->button != 1) return; + assert(handler != NULL); Highlight *highlight = handler->highlight; @@ -412,10 +415,13 @@ static void _handler_up_cb(void *data, Evas *evas __UNUSED__, Evas_Object *obj __UNUSED__, - void *event_info __UNUSED__) + void *event_info) { Handler *handler = (Handler *)data; + Evas_Event_Mouse_Down *event = (Evas_Event_Mouse_Down *) event_info; + if (event->button != 1) return; + assert(handler != NULL); _handler_size_recalc(handler->highlight); --
[EGIT] [tools/eflete] master 18/23: UTC: forgotten and removed files
rimmed pushed a commit to branch master. http://git.enlightenment.org/tools/eflete.git/commit/?id=d5e035f80fd81759731c3cdbb3022b8b4f83a8a4 commit d5e035f80fd81759731c3cdbb3022b8b4f83a8a4 Author: Vitalii VorobiovDate: Wed Jan 27 13:59:34 2016 + UTC: forgotten and removed files --- tests/test_image_manager/image_manager_add.c | 82 +++ tests/test_image_manager/test_image_manager.c | 39 + 2 files changed, 121 insertions(+) diff --git a/tests/test_image_manager/image_manager_add.c b/tests/test_image_manager/image_manager_add.c new file mode 100644 index 000..34ff63d --- /dev/null +++ b/tests/test_image_manager/image_manager_add.c @@ -0,0 +1,82 @@ +/** + * Edje Theme Editor + * Copyright (C) 2013-2014 Samsung Electronics. + * + * This file is part of Edje Theme Editor. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; If not, see www.gnu.org/licenses/lgpl.html. + */ + +#include "test_image_manager.h" +#include "test_common.h" + +/** + * @addtogroup image_manager_test + * @{ + * @addtogroup image_manager_add + * @{ + * image manager + * + * @} + */ + +/** + * @addtogroup image_manager_add + * @{ + * + * image_manager_add + * image_manager_add_test_p + * + * @precondition + * @step 1 init elemantary + * @step 2 init app + * @step 3 create main window + * @step 4 load project + * + * @procedure + * @step 1 call image_manager_add + * @step 2 check returned value + * + * + * Nothing + * Not NULL Pointer returned + * + * @} + */ +EFLETE_TEST (image_manager_add_test_p) +{ + elm_init(0,0); + + app_init(); + Evas_Object *images; + ui_main_window_add(); + ap.project = setup("image_manager_add_test_p"); + + images = image_manager_add(); + ck_assert_msg(images != NULL, + "cannot create image editor window in SINGLE mode"); + + evas_object_del(images); + app_shutdown(); + teardown("image_manager_add_test_p"); + elm_shutdown(); +} +END_TEST + +/** + * @addtogroup image_manager_add + * @{ + * + * @} + * @} + */ diff --git a/tests/test_image_manager/test_image_manager.c b/tests/test_image_manager/test_image_manager.c new file mode 100644 index 000..e396165 --- /dev/null +++ b/tests/test_image_manager/test_image_manager.c @@ -0,0 +1,39 @@ +/** + * Edje Theme Editor + * Copyright (C) 2013-2014 Samsung Electronics. + * + * This file is part of Edje Theme Editor. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; If not, see www.gnu.org/licenses/lgpl.html. + */ + +#include "test_image_manager.h" + +Suite* test_suite (void) { + Suite *suite = suite_create("test_image_manager"); + TCase *tcase = tcase_create("TCase"); + tcase_add_test(tcase, image_manager_add_test_p); + suite_add_tcase(suite, tcase); + return suite; +} + +int main(void) { + int number_failed; + Suite *suite = test_suite(); + SRunner *runner = srunner_create(suite); + srunner_set_xml(runner, "test_image_manager.xml"); + srunner_run_all(runner, CK_VERBOSE); + number_failed = srunner_ntests_failed(runner); + srunner_free(runner); + return number_failed; +} --
[EGIT] [tools/eflete] master 07/23: image_editor: show image fileselector in the middle of win
rimmed pushed a commit to branch master. http://git.enlightenment.org/tools/eflete.git/commit/?id=4790ecb7cf51a7f55b20ffb3b02bd4e60722b3ed commit 4790ecb7cf51a7f55b20ffb3b02bd4e60722b3ed Author: Vitalii VorobiovDate: Tue Jan 26 13:38:27 2016 + image_editor: show image fileselector in the middle of win --- src/bin/ui/editors/image_editor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bin/ui/editors/image_editor.c b/src/bin/ui/editors/image_editor.c index 87bf7a6..4714a2a 100644 --- a/src/bin/ui/editors/image_editor.c +++ b/src/bin/ui/editors/image_editor.c @@ -324,7 +324,7 @@ _on_button_add_clicked_cb(void *data, void *event_info __UNUSED__) { popup_fileselector_image_helper(NULL, - obj, + NULL, NULL, _on_image_done, data, --
[EGIT] [tools/eflete] master 11/23: image_manager: quick rename of important functions and structures
rimmed pushed a commit to branch master. http://git.enlightenment.org/tools/eflete.git/commit/?id=8d78f85b1937c34010fd6ebbe428e9799bdc6cfb commit 8d78f85b1937c34010fd6ebbe428e9799bdc6cfb Author: Vitalii VorobiovDate: Tue Jan 26 15:47:40 2016 + image_manager: quick rename of important functions and structures --- data/themes/default/widgets/layout.edc | 6 +- src/bin/ui/image_manager.c | 188 - src/bin/ui/property_image.c| 18 ++-- 3 files changed, 106 insertions(+), 106 deletions(-) diff --git a/data/themes/default/widgets/layout.edc b/data/themes/default/widgets/layout.edc index dafa4d4..4f8e4bf 100644 --- a/data/themes/default/widgets/layout.edc +++ b/data/themes/default/widgets/layout.edc @@ -1030,7 +1030,7 @@ group { name: "elm/layout/animator/program_area"; #define BTNS_SMALL_SIZE_SET SET_SIZE(30, 22) -group { name: "elm/layout/image_editor/default"; +group { name: "elm/layout/image_manager/default"; parts { part { name: "area.edit"; type: SPACER; @@ -1134,7 +1134,7 @@ group { name: "elm/layout/image_editor/default"; } } -group { name: "elm/layout/image_editor/preview"; +group { name: "elm/layout/image_manager/preview"; parts { part { name: "eflete.swallow.image"; type: SWALLOW; @@ -1156,7 +1156,7 @@ group { name: "elm/layout/sound_editor/preview"; } } -group { name: "elm/layout/image_editor/usage_info"; +group { name: "elm/layout/image_manager/usage_info"; parts { part { name: "padding.top.left"; type: SPACER; diff --git a/src/bin/ui/image_manager.c b/src/bin/ui/image_manager.c index e558f71..0540d80 100644 --- a/src/bin/ui/image_manager.c +++ b/src/bin/ui/image_manager.c @@ -24,7 +24,7 @@ #define ITEM_HEIGHT 115 #define IMG_MANAGER_KEY "image_manager_key" -typedef struct _Image_Editor Image_Editor; +typedef struct _Image_Manager Image_Manager; typedef struct _Search_Data Search_Data; typedef struct _Item Item; typedef struct _Content_Init_Data Content_Init_Data; @@ -39,7 +39,7 @@ struct _Item struct _Content_Init_Data { - Image_Editor *image_editor; + Image_Manager *image_manager; Item *item_data; Evas_Object *image_obj; }; @@ -50,7 +50,7 @@ struct _Search_Data Elm_Object_Item *last_item_found; }; -struct _Image_Editor +struct _Image_Manager { Evas_Object *win; Evas_Object *gengrid; @@ -61,7 +61,7 @@ struct _Image_Editor static Elm_Gengrid_Item_Class *gic = NULL; -static void _image_editor_del(Image_Editor *img_edit); +static void _image_manager_del(Image_Manager *img_mng); static char * _grid_label_get(void *data, @@ -73,37 +73,37 @@ _grid_label_get(void *data, } static void -_on_image_editor_del(void * data, +_on_image_manager_del(void * data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__) { - Image_Editor *img_edit = (Image_Editor *)data; + Image_Manager *img_mng = (Image_Manager *)data; - assert(img_edit != NULL); + assert(img_mng != NULL); - _image_editor_del(img_edit); + _image_manager_del(img_mng); } static void -_image_editor_del(Image_Editor *img_edit) +_image_manager_del(Image_Manager *img_mng) { - assert(img_edit != NULL); + assert(img_mng != NULL); ui_menu_items_list_disable_set(ap.menu, MENU_ITEMS_LIST_MAIN, false); - evas_object_event_callback_del(img_edit->layout, EVAS_CALLBACK_DEL, _on_image_editor_del); + evas_object_event_callback_del(img_mng->layout, EVAS_CALLBACK_DEL, _on_image_manager_del); elm_gengrid_item_class_free(gic); gic = NULL; - evas_object_data_del(img_edit->layout, IMG_MANAGER_KEY); - evas_object_data_del(img_edit->gengrid, IMG_MANAGER_KEY); - //evas_object_del(img_edit->gengrid); - free(img_edit); + evas_object_data_del(img_mng->layout, IMG_MANAGER_KEY); + evas_object_data_del(img_mng->gengrid, IMG_MANAGER_KEY); + //evas_object_del(img_mng->gengrid); + free(img_mng); } static void -_image_editor_image_setup(Evas_Object *image, +_image_manager_image_setup(Evas_Object *image, const Item *it) { assert(image != NULL); @@ -123,14 +123,14 @@ _image_editor_image_setup(Evas_Object *image, } static inline Evas_Object * -_image_editor_image_create(Evas_Object *parent, +_image_manager_image_create(Evas_Object *parent, const Item *it) { assert(parent != NULL); assert(it != NULL); Evas_Object *image = elm_image_add(parent); - _image_editor_image_setup(image, it); + _image_manager_image_setup(image, it); return image; } @@ -152,7 +152,7 @@ _grid_content_get(void *data, if (!strcmp(part, "elm.swallow.icon")) { image_obj = elm_thumb_add(grid); -_image_editor_image_setup(image_obj, it); +_image_manager_image_setup(image_obj, it);
[EGIT] [tools/eflete] master 17/23: colorclass_manager: move manager into ui
rimmed pushed a commit to branch master. http://git.enlightenment.org/tools/eflete.git/commit/?id=a5911e5057276e38cb4e8adc22184a914a912812 commit a5911e5057276e38cb4e8adc22184a914a912812 Author: Vitalii VorobiovDate: Wed Jan 27 13:53:38 2016 + colorclass_manager: move manager into ui --- po/POTFILES.in | 2 +- src/bin/Makefile.am| 2 +- src/bin/ui/{editors => }/colorclass_manager.c | 1 - src/bin/ui/editors/colorclass_manager.h| 42 -- src/bin/ui/main_window.h | 11 ++ src/bin/ui/property_color.c| 1 - src/bin/ui/tabs.c | 1 - .../test_colorclass_manager.h | 1 - 8 files changed, 13 insertions(+), 48 deletions(-) diff --git a/po/POTFILES.in b/po/POTFILES.in index d590961..cc7d643 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -14,7 +14,7 @@ src/bin/ui/dialogs/colorsel.c src/bin/ui/editors/animator.c src/bin/ui/editors/animator_program_editor.c src/bin/ui/editors/animator_program_sequence.c -src/bin/ui/editors/colorclass_manager.c +src/bin/ui/colorclass_manager.c src/bin/ui/image_manager.c src/bin/ui/editors/sound_editor.c src/bin/ui/editors/style_editor.c diff --git a/src/bin/Makefile.am b/src/bin/Makefile.am index ee181fb..fc2e6d1 100644 --- a/src/bin/Makefile.am +++ b/src/bin/Makefile.am @@ -40,12 +40,12 @@ libete_a_SOURCES = \ ../../src/bin/ui/container/container.c \ ../../src/bin/ui/editors/style_editor.c \ ../../src/bin/ui/editors/sound_editor.c \ -../../src/bin/ui/editors/colorclass_manager.c \ ../../src/bin/ui/dialogs/about_window.c \ ../../src/bin/ui/dialogs/colorsel.c \ ../../src/bin/ui/modal_window/modal_window.c \ ../../src/bin/ui/project_navigator.c \ ../../src/bin/ui/image_manager.c \ +../../src/bin/ui/colorclass_manager.c \ ../../src/bin/ui/tabs.c \ ../../src/bin/ui/tab_home_common.c \ ../../src/bin/ui/tab_home_open.c \ diff --git a/src/bin/ui/editors/colorclass_manager.c b/src/bin/ui/colorclass_manager.c similarity index 99% rename from src/bin/ui/editors/colorclass_manager.c rename to src/bin/ui/colorclass_manager.c index b74797f..b1d262b 100644 --- a/src/bin/ui/editors/colorclass_manager.c +++ b/src/bin/ui/colorclass_manager.c @@ -20,7 +20,6 @@ #define EFL_BETA_API_SUPPORT #define EFL_EO_API_SUPPORT -#include "colorclass_manager.h" #include "main_window.h" #include "project_manager.h" diff --git a/src/bin/ui/editors/colorclass_manager.h b/src/bin/ui/editors/colorclass_manager.h deleted file mode 100644 index e6542a9..000 --- a/src/bin/ui/editors/colorclass_manager.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Edje Theme Editor - * Copyright (C) 2013-2015 Samsung Electronics. - * - * This file is part of Edje Theme Editor. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; If not, see www.gnu.org/licenses/lgpl.html. - */ - -#ifndef COLORCLASS_MANAGER_DIALOG_H -#define COLORCLASS_MANAGER_DIALOG_H - -/** - * @defgroup Colorclass_Manager Colorclass_Manager - * @ingroup Dialogs - * - * Show color classes, which uses in project. - */ - -#include "eflete.h" - -/** - * Add new colorclass viewer inwin object. - * - * @return Pointer to inwin object. - * - * @ingroup Colorclass_Manager - */ -Evas_Object * -colorclass_manager_add(); - -#endif /* COLORCLASS_MANAGER_DIALOG_H */ diff --git a/src/bin/ui/main_window.h b/src/bin/ui/main_window.h index bb1a10c..d822727 100644 --- a/src/bin/ui/main_window.h +++ b/src/bin/ui/main_window.h @@ -446,4 +446,15 @@ struct _ColorClassData Evas_Object *edje_preview; }; +/** + * Add new colorclass manager layout object. + * + * @return Pointer to layout object, which contain list of colorclasses, + * control buttons, etc. + * + * @ingroup Window + */ +Evas_Object * +colorclass_manager_add(); + #endif /* UI_MAIN_WINDOW_H */ diff --git a/src/bin/ui/property_color.c b/src/bin/ui/property_color.c index f8ba4b4..df442c5 100644 --- a/src/bin/ui/property_color.c +++ b/src/bin/ui/property_color.c @@ -21,7 +21,6 @@ #include "main_window.h" #include "colorsel.h" #include "property_macros.h" -#include "colorclass_manager.h" #include "project_manager.h" typedef struct _Color_Prop_Data Color_Prop_Data; diff --git a/src/bin/ui/tabs.c b/src/bin/ui/tabs.c index 17650f4..e27a6c3 100644 --- a/src/bin/ui/tabs.c +++ b/src/bin/ui/tabs.c @@ -27,7 +27,6 @@ #include "style_editor.h"
[EGIT] [tools/eflete] master 05/23: property_image: unset and disable usage controls when no image is selected
rimmed pushed a commit to branch master. http://git.enlightenment.org/tools/eflete.git/commit/?id=080cf18e7283747d8478aa6af5b01cc248b4f5fc commit 080cf18e7283747d8478aa6af5b01cc248b4f5fc Author: Vitalii VorobiovDate: Tue Jan 26 13:03:22 2016 + property_image: unset and disable usage controls when no image is selected --- src/bin/ui/property_image.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/bin/ui/property_image.c b/src/bin/ui/property_image.c index 95c588e..c58f0c4 100644 --- a/src/bin/ui/property_image.c +++ b/src/bin/ui/property_image.c @@ -351,6 +351,9 @@ _on_image_selected(void *data, ewe_combobox_select_item_set(pd->compression_type, 0); elm_spinner_value_set(pd->compression_quality, 0); pd->selected_image = NULL; + +elm_genlist_clear(pd->usage_genlist); +_image_info_update_usage_info(pd, 0); } } --
[EGIT] [tools/eflete] master 13/23: image_manager: remove useless code (since we won; t show this to user anymore)
rimmed pushed a commit to branch master. http://git.enlightenment.org/tools/eflete.git/commit/?id=61f6c143cfaf2112769fbbea0cc584aa8b22c69e commit 61f6c143cfaf2112769fbbea0cc584aa8b22c69e Author: Vitalii VorobiovDate: Tue Jan 26 16:24:11 2016 + image_manager: remove useless code (since we won;t show this to user anymore) --- src/bin/ui/image_manager.c | 43 +-- 1 file changed, 1 insertion(+), 42 deletions(-) diff --git a/src/bin/ui/image_manager.c b/src/bin/ui/image_manager.c index 387d34a..df334b9 100644 --- a/src/bin/ui/image_manager.c +++ b/src/bin/ui/image_manager.c @@ -358,12 +358,7 @@ _on_button_delete_clicked_cb(void *data, Elm_Object_Item *grid_item = NULL; Item *it = NULL; Eina_List *grid_list, *l, *l2; - int notdeleted = 0; - Eina_List * in_use = NULL; - char buf[BUFF_MAX]; - int symbs = 0; External_Resource *res; - State *state; assert(img_mng != NULL); assert(img_mng->gengrid != NULL); @@ -384,43 +379,7 @@ _on_button_delete_clicked_cb(void *data, ap.project->images = pm_resource_del(ap.project->images, res); } else - { - notdeleted++; - if (notdeleted < 4) -in_use = eina_list_append(in_use, res); - elm_gengrid_item_selected_set(grid_item, false); - } - } - if (notdeleted == 1) - { -res = eina_list_nth(in_use, 0); - -snprintf(buf, BUFF_MAX, _("Image is used in:")); -symbs = strlen(buf); -EINA_LIST_FOREACH(res->used_in, l, state) - { - snprintf(buf + symbs, BUFF_MAX - symbs, _("group: %spart: %sstate: \"%s\" %2.1f"), - state->part->group->name, state->part->name, state->parsed_name, state->parsed_val); - symbs += strlen(res->name); - break; TODO("remove this break after warning style remake") - } -WARN("%s", buf); - } - else if (notdeleted >1) - { -snprintf(buf, BUFF_MAX, NGETTEXT("%d image in use:", - "%d images in use:", - notdeleted), - notdeleted); -symbs = strlen(buf); -EINA_LIST_FOREACH(in_use, l, res) - { - snprintf(buf + symbs, BUFF_MAX - symbs, "%s", res->name); - symbs += strlen(res->name); - } -if (notdeleted >= 4) - snprintf(buf + symbs, BUFF_MAX - symbs, "..."); -WARN("%s", buf); + elm_gengrid_item_selected_set(grid_item, false); } evas_object_smart_callback_call(ap.win, SIGNAL_IMAGE_SELECTED, NULL); --
[EGIT] [core/efl] master 01/01: evas: Fix explicit NULL dereference
devilhorns pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=cbf2aa2bf99d54cdcc3cf68966b6630c9094a547 commit cbf2aa2bf99d54cdcc3cf68966b6630c9094a547 Author: Chris MichaelDate: Wed Jan 27 12:05:59 2016 -0500 evas: Fix explicit NULL dereference This patch fixes an Coverity issue that if 'dst' gets set to NULL (as can happen above) then this eo_do call may segfault as it is directly accessing 'dst->buffer'. @fix CID1347415 Signed-off-by: Chris Michael --- src/lib/evas/filters/evas_filter_utils.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lib/evas/filters/evas_filter_utils.c b/src/lib/evas/filters/evas_filter_utils.c index 802f09a..ec84301 100644 --- a/src/lib/evas/filters/evas_filter_utils.c +++ b/src/lib/evas/filters/evas_filter_utils.c @@ -63,7 +63,8 @@ evas_filter_buffer_scaled_get(Evas_Filter_Context *ctx, end: if (src_map) eo_do(src->buffer, ector_buffer_unmap(src_map, src_len)); - if (dst_map) eo_do(dst->buffer, ector_buffer_unmap(dst_map, dst_len)); + if ((dst) && (dst_map)) + eo_do(dst->buffer, ector_buffer_unmap(dst_map, dst_len)); DEBUG_TIME_END(); return dst; } --
[EGIT] [apps/terminology] master 01/01: oops. Always use curly braces…
billiob pushed a commit to branch master. http://git.enlightenment.org/apps/terminology.git/commit/?id=84c1c77757f179d1196e3ef7924ff892b13f9d2d commit 84c1c77757f179d1196e3ef7924ff892b13f9d2d Author: Boris FaureDate: Wed Jan 27 20:17:15 2016 +0100 oops. Always use curly braces… --- src/bin/termio.c | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/bin/termio.c b/src/bin/termio.c index f2f58d3..00207a4 100644 --- a/src/bin/termio.c +++ b/src/bin/termio.c @@ -2335,12 +2335,14 @@ termio_take_selection(Evas_Object *obj, Elm_Sel_Type type) } } else - if (sd->link.string) - { - len = strlen(sd->link.string); - s = strndup(sd->link.string, len); - } - return; + { +if (sd->link.string) + { + len = strlen(sd->link.string); + s = strndup(sd->link.string, len); + } +return; + } if (sd->pty->selection.is_box) { --
[EGIT] [apps/terminology] master 01/01: fix selections (again and again) of single-char words
billiob pushed a commit to branch master. http://git.enlightenment.org/apps/terminology.git/commit/?id=4367b4ceb69ced62b3e18fe9f0320fc702d4d0c0 commit 4367b4ceb69ced62b3e18fe9f0320fc702d4d0c0 Author: Boris FaureDate: Wed Jan 27 21:08:45 2016 +0100 fix selections (again and again) of single-char words --- src/bin/termio.c | 52 +++- src/bin/termio.h | 2 +- 2 files changed, 32 insertions(+), 22 deletions(-) diff --git a/src/bin/termio.c b/src/bin/termio.c index 00207a4..ae2f131 100644 --- a/src/bin/termio.c +++ b/src/bin/termio.c @@ -2312,7 +2312,7 @@ _take_selection_text(Termio *sd, Elm_Sel_Type type, const char *text) sd->sel_str = text; } -void +Eina_Bool termio_take_selection(Evas_Object *obj, Elm_Sel_Type type) { Termio *sd = evas_object_smart_data_get(obj); @@ -2320,7 +2320,7 @@ termio_take_selection(Evas_Object *obj, Elm_Sel_Type type) char *s = NULL; size_t len = 0; - EINA_SAFETY_ON_NULL_RETURN(sd); + EINA_SAFETY_ON_NULL_RETURN_VAL(sd, EINA_FALSE); if (sd->pty->selection.is_active) { start_x = sd->pty->selection.start.x; @@ -2341,7 +2341,7 @@ termio_take_selection(Evas_Object *obj, Elm_Sel_Type type) len = strlen(sd->link.string); s = strndup(sd->link.string, len); } -return; +return EINA_FALSE; } if (sd->pty->selection.is_box) @@ -2379,7 +2379,9 @@ termio_take_selection(Evas_Object *obj, Elm_Sel_Type type) if ((sd->win) && (len > 0)) _take_selection_text(sd, type, s); free(s); +return EINA_TRUE; } + return EINA_FALSE; } static Eina_Bool @@ -2847,7 +2849,7 @@ _trim_sel_word(Termio *sd) /* check validy of the selection */ if ((y > pty->selection.end.y) || ((y == pty->selection.end.y) && -(start >= pty->selection.end.x))) +(start > pty->selection.end.x))) { pty->selection.start.y = pty->selection.end.y; pty->selection.start.x = pty->selection.end.x; @@ -2871,7 +2873,9 @@ _trim_sel_word(Termio *sd) break; } if (end < 0) - return; + { +return; + } /* check validy of the selection */ if ((y < pty->selection.start.y) || ((y == pty->selection.start.y) && @@ -3401,7 +3405,7 @@ _selection_newline_extend_fix(Evas_Object *obj) if ((end_y > start_y) || ((end_y == start_y) && -(end_x > start_x))) +(end_x >= start_x))) { /* going down/right */ w = termpty_row_length(sd->pty, start_y); @@ -4150,7 +4154,9 @@ _smart_cb_mouse_down(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUS else _sel_line(sd, cy - sd->scroll); if (sd->pty->selection.is_active) - termio_take_selection(data, ELM_SEL_TYPE_PRIMARY); + { + termio_take_selection(data, ELM_SEL_TYPE_PRIMARY); + } sd->didclick = EINA_TRUE; } else if (ev->flags & EVAS_BUTTON_DOUBLE_CLICK) @@ -4162,7 +4168,10 @@ _smart_cb_mouse_down(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUS else _sel_word(sd, cx, cy - sd->scroll); if (sd->pty->selection.is_active) - termio_take_selection(data, ELM_SEL_TYPE_PRIMARY); + { + if (!termio_take_selection(data, ELM_SEL_TYPE_PRIMARY)) +_sel_set(sd, EINA_FALSE); + } sd->didclick = EINA_TRUE; } else @@ -4215,21 +4224,22 @@ _smart_cb_mouse_up(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED } sd->pty->selection.makesel = EINA_FALSE; -/* Only change the end position */ -if (((sd->pty->selection.start.x == sd->pty->selection.end.x) && -(sd->pty->selection.start.y == sd->pty->selection.end.y)) && -(!sd->moved)) +if (!sd->pty->selection.is_active) { - _sel_set(sd, EINA_FALSE); - sd->didclick = EINA_FALSE; - sd->pty->selection.last_click = time(NULL); - sd->pty->selection.by_line = EINA_FALSE; - sd->pty->selection.by_word = EINA_FALSE; - _smart_update_queue(data, sd); - return; + /* Only change the end position */ + if (((sd->pty->selection.start.x == sd->pty->selection.end.x) && + (sd->pty->selection.start.y == sd->pty->selection.end.y))) + { + _sel_set(sd, EINA_FALSE); + sd->didclick = EINA_FALSE; + sd->pty->selection.last_click = time(NULL); + sd->pty->selection.by_line = EINA_FALSE; + sd->pty->selection.by_word = EINA_FALSE; + _smart_update_queue(data, sd); + return; +
[EGIT] [apps/terminology] master 01/01: fix one-char selections
billiob pushed a commit to branch master. http://git.enlightenment.org/apps/terminology.git/commit/?id=98671b24936d774778ccc258f6d8fe7e6a315ab3 commit 98671b24936d774778ccc258f6d8fe7e6a315ab3 Author: Boris FaureDate: Wed Jan 27 12:49:24 2016 +0100 fix one-char selections --- src/bin/termio.c | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/bin/termio.c b/src/bin/termio.c index d75f8ab..f2f58d3 100644 --- a/src/bin/termio.c +++ b/src/bin/termio.c @@ -2334,6 +2334,13 @@ termio_take_selection(Evas_Object *obj, Elm_Sel_Type type) INT_SWAP(start_x, end_x); } } + else + if (sd->link.string) + { + len = strlen(sd->link.string); + s = strndup(sd->link.string, len); + } + return; if (sd->pty->selection.is_box) { @@ -2359,12 +2366,7 @@ termio_take_selection(Evas_Object *obj, Elm_Sel_Type type) s = eina_strbuf_string_steal(sb); eina_strbuf_free(sb); } - else if (!start_y && !end_y && !start_x && !end_x && sd->link.string) - { -len = strlen(sd->link.string); -s = strndup(sd->link.string, len); - } - else if ((start_x != end_x) || (start_y != end_y)) + else { s = termio_selection_get(obj, start_x, start_y, end_x, end_y, , EINA_TRUE); --
[EGIT] [core/efl] master 01/01: ecore_imf/scim: fix uninitiazed value issue detected by valgrind
jihoon pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=5b30f95e62c9de77a53a7b18a4ebbffb42dceadc commit 5b30f95e62c9de77a53a7b18a4ebbffb42dceadc Author: Jihoon KimDate: Wed Jan 27 18:31:26 2016 +0900 ecore_imf/scim: fix uninitiazed value issue detected by valgrind --- src/modules/ecore_imf/scim/scim_imcontext.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/modules/ecore_imf/scim/scim_imcontext.cpp b/src/modules/ecore_imf/scim/scim_imcontext.cpp index d30fa08..ba9dbe4 100644 --- a/src/modules/ecore_imf/scim/scim_imcontext.cpp +++ b/src/modules/ecore_imf/scim/scim_imcontext.cpp @@ -556,6 +556,7 @@ isf_imf_context_add(Ecore_IMF_Context *ctx) context_scim->impl->use_preedit = _on_the_spot; context_scim->impl->preedit_started = false; context_scim->impl->preedit_updating= false; + context_scim->impl->prediction_allow= false; if (!_ic_list) context_scim->next = NULL; --