Re: [E-devel] [EGIT] [core/efl] master 01/06: efl_playable: split Efl.Player interface to Efl.Playable interface
Hello, sorry for being late. 2018. 1. 17. 오전 5:15에 "Davide Andreoli" <d...@gurumeditation.it>님이 작성: 2018-01-16 14:08 GMT+01:00 Sungtaek Hong <sth253.h...@samsung.com>: > jpeg pushed a commit to branch master. > > http://git.enlightenment.org/core/efl.git/commit/?id= > 588995da317520fc92660b89b0864bb1f25abc09 > > commit 588995da317520fc92660b89b0864bb1f25abc09 > Author: Sungtaek Hong <sth253.h...@samsung.com> > Date: Tue Jan 16 20:31:15 2018 +0900 > > efl_playable: split Efl.Player interface to Efl.Playable interface > > Summary: > Efl.Player interface simply provides play functions, > but another interface which indicates Efl.Player will play is also > needed. > This seems to me higly confusing, looking at the 2 eo files didn't help either, the 2 classes description are: "Efl media player interface" and "Efl media playable interface" witch clearly state "media" so I assume audio or video, while this seems used in Animations :/ The Goal of the playable interflace was to indicate that a class can be played by player interface. So actually playable is "added", not "splitted" from player. I left the word "media" because I thought Animation was a part of media but I think I was wrong. I will change the documentation soon. Another issue I can see (not really related to this commit) is that I can see "volume" and "mute" in the Player iface, does this means that the Player iface will also provide more advanced stuff like: audio/video/subs_tracks_list, audio/video/subs_track_select, etc.. ? I think player can provide property that it supports sound, like seekable. Maybe are just that the 2 classes descriptions are wrong, but I really cannot unserstand the intent of this split/api design. -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
[EGIT] [core/efl] master 03/03: efl_ui_bg: fix ELM_BG_OPTION_CENTER bg in left top side.
jpeg pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=2b4f674a0d626d99ce59ab54c6f563643a4b3397 commit 2b4f674a0d626d99ce59ab54c6f563643a4b3397 Author: Sungtaek Hong <sth253.h...@samsung.com> Date: Thu Oct 12 15:29:39 2017 +0900 efl_ui_bg: fix ELM_BG_OPTION_CENTER bg in left top side. Summary: - setting size_hint_min logic was deleted while changed elm_bg to efl_ui_bg. - this sets size_hint_min again. @fix Test Plan: 1. Run Elementary test 2. Run Bg Option 3. Select Center radio. 4. Resize windows. 5. Observe bg images remains in center. Reviewers: jpeg, JackDanielZ Subscribers: cedric, jpeg Differential Revision: https://phab.enlightenment.org/D5281 --- src/lib/elementary/efl_ui_bg.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lib/elementary/efl_ui_bg.c b/src/lib/elementary/efl_ui_bg.c index d12b5fd10b..2af172a395 100644 --- a/src/lib/elementary/efl_ui_bg.c +++ b/src/lib/elementary/efl_ui_bg.c @@ -81,6 +81,7 @@ _efl_ui_bg_elm_layout_sizing_eval(Eo *obj, Efl_Ui_Bg_Data *sd) evas_object_image_fill_set(sd->img, fx, fy, fw, fh); + evas_object_size_hint_min_set(sd->img, mw, mh); evas_object_size_hint_max_set(sd->img, mw, mh); } --
[E-devel] Proper group name for efl ui widgets
Hello. Since we are planning to rename/move elm_widgets to efl_ui_widgets, and since widgets which inherits efl_ui_layout will have a resize_obj with new edj group, I think we finally get a chance to change edc group naming convention for new efl_ui_widgets. Current group name for default button is "elm/button/base/default", which is "elm/[klass]/[group]/[style]". This naming rule works fine with a widgets which works independently, but something bad happens when a widget has another widget as its component. For example, below two groups are used in elm_colorselector. 1. "elm/colorselector/picker/default" , 2. "elm/button/base/colorselector/left/default" The first one is elm_layout set by "elm_layout_theme_set(layout, "colorselector", "picker", [style])" and the second one is elm_button set by "elm_object_style_set(button, "colorselector/left/[style])". So the button's style is "colorselector/left/default". IMO, this is not desirable. When I change colorselector's style into "dark", the button will be first set to "elm/button/base/dark" and then "elm/button/base/colorselector/left/dark. Also, style name will be getting worse, if colorselector is used in another widgets as a component. So I want to keep the button's style as "default", which is the same with that of colorselector, and what's left we can change is "klass" and "group". I think we have 2 options: Rule 1. "klass" now refers to the class of "base" widget, and "group" is role name of component. In this case, class name of the component(eg:button) will be omitted. Rule 2. "klass" is a class name of the component, and "group" contains class name of "base" widget and role name of component. For example, elm_spinner has only 4 components: base, inc_btn, dec_btn, and text_btn. If I apply Rule 1., group names would be "spinner/base/default" "spinner/inc_btn/default" "spinner/dec_btn/default" "spinner/text_btn/default" Rule 2 would be "spinner/base/default" "button/spinner_inc_btn/default" "button/spinner_dec_btn/default" "button/spinner_text_btn/default" With these rules recursive cases works fine. If efl_ui_clock uses spinner to choose date instead of diskselector (just assumption) Rule 1. "clock/date/default" "clock/date_inc_btn" "clock/date_dec_btn" "clock/date_text_btn" Rule 2. "spinner/clock_date/default" "button/clock_date_inc_btn/default" "button/clock_date_dec_btn/default" "button/clock_date_text_btn/default" I think whether 1 or 2 is just matter of personal preference. Please share your opinion which looks better and feel free to present if there is better idea. PS. I just temporarily used separator '/' and '_' , We can talk in another thread about which separator looks good. -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
[EGIT] [core/efl] master 08/21: elm_bg: rename elm_bg to Efl.Ui.Bg
jpeg pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=ebff5e8639851ab9d80fa6ff36f20f08952c015e commit ebff5e8639851ab9d80fa6ff36f20f08952c015e Author: Sungtaek Hong <sth253.h...@samsung.com> Date: Tue Sep 26 11:46:11 2017 +0900 elm_bg: rename elm_bg to Efl.Ui.Bg Summary: elm_bg was supposed to be used only in legacy, but since we need a common object to be used as a background of widgets, it is now renamed as efl_ui_bg and supports EO APIs. Reviewers: cedric, jpeg, woohyun Differential Revision: https://phab.enlightenment.org/D5147 --- po/POTFILES.in | 2 +- src/Makefile_Elementary.am | 6 +- src/bin/elementary/test.c| 2 + src/bin/elementary/test_bg.c | 108 src/lib/elementary/{elm_bg.c => efl_ui_bg.c} | 182 +-- src/lib/elementary/efl_ui_bg.eo | 17 +++ src/lib/elementary/efl_ui_bg_eo.h| 1 + src/lib/elementary/efl_ui_bg_private.h | 69 ++ src/lib/elementary/efl_ui_win.c | 2 +- src/lib/elementary/elm_bg.eo | 101 --- src/lib/elementary/elm_bg.h | 2 +- src/lib/elementary/elm_bg_legacy.h | 72 ++- 12 files changed, 391 insertions(+), 173 deletions(-) diff --git a/po/POTFILES.in b/po/POTFILES.in index 187aaa3d07..5abceaabff 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -103,7 +103,7 @@ src/lib/elementary/elc_popup.c src/lib/elementary/elc_scrolled_entry.c src/lib/elementary/elm_access.c src/lib/elementary/elm_actionslider.c -src/lib/elementary/elm_bg.c +src/lib/elementary/efl_ui_bg.c src/lib/elementary/elm_box.c src/lib/elementary/elm_bubble.c src/lib/elementary/efl_ui_button.c diff --git a/src/Makefile_Elementary.am b/src/Makefile_Elementary.am index 269b7104dc..60b2b7fac7 100644 --- a/src/Makefile_Elementary.am +++ b/src/Makefile_Elementary.am @@ -4,7 +4,7 @@ elm_public_eolian_files = \ lib/elementary/elm_atspi_bridge.eo \ lib/elementary/elm_atspi_app_object.eo \ - lib/elementary/elm_bg.eo \ + lib/elementary/efl_ui_bg.eo \ lib/elementary/efl_ui_button.eo \ lib/elementary/elm_calendar.eo \ lib/elementary/efl_ui_check.eo \ @@ -345,7 +345,7 @@ includesub_HEADERS = \ lib/elementary/elm_atspi_app_object.h \ lib/elementary/elm_authors.h \ lib/elementary/elm_bg.h \ - lib/elementary/elm_bg_eo.h \ + lib/elementary/efl_ui_bg_eo.h \ lib/elementary/elm_bg_legacy.h \ lib/elementary/elm_box.h \ lib/elementary/elm_box_legacy.h \ @@ -569,7 +569,7 @@ lib_elementary_libelementary_la_SOURCES = \ lib/elementary/elm_actionslider.c \ lib/elementary/elm_atspi_app_object.c \ lib/elementary/elm_atspi_bridge.c \ - lib/elementary/elm_bg.c \ + lib/elementary/efl_ui_bg.c \ lib/elementary/elm_box.c \ lib/elementary/elm_bubble.c \ lib/elementary/efl_ui_button.c \ diff --git a/src/bin/elementary/test.c b/src/bin/elementary/test.c index 8220261035..6652716eb3 100644 --- a/src/bin/elementary/test.c +++ b/src/bin/elementary/test.c @@ -17,6 +17,7 @@ void test_bg_plain(void *data, Evas_Object *obj, void *event_info); void test_bg_image(void *data, Evas_Object *obj, void *event_info); void test_bg_options(void *data, Evas_Object *obj, void *event_info); void test_bg_window(void *data, Evas_Object *obj, void *event_info); +void test_bg_scale_type(void *data, Evas_Object *obj, void *event_info); void test_icon(void *data, Evas_Object *obj, void *event_info); void test_icon_transparent(void *data, Evas_Object *obj, void *event_info); void test_icon_standard(void *data, Evas_Object *obj, void *event_info); @@ -664,6 +665,7 @@ add_tests: ADD_TEST(NULL, "Window / Background", "Bg Image", test_bg_image); ADD_TEST(NULL, "Window / Background", "Bg Options", test_bg_options); ADD_TEST(NULL, "Window / Background", "Bg EOAPI (Efl.Ui.Win)", test_bg_window); + ADD_TEST(NULL, "Window / Background", "Bg EOAPI (Efl.Ui.Bg)", test_bg_scale_type); ADD_TEST(NULL, "Window / Background", "Window States", test_win_state); ADD_TEST(NULL, "Window / Background", "Window States 2", test_win_state2); ADD_TEST(NULL, "Window / Background", "Inwin", test_inwin); diff --git a/src/bin/elementary/test_bg.c b/src/bin/elementary/test_bg.c index 8402a59509..ba64598505 100644 --- a/src/bin/elementary/test_bg.c +++ b/src/bin/elementary/test_bg.c @@ -366,3 +366,111 @@ test_bg_window(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event efl_gfx_size_set(win, EINA_SIZE2D(300, 200)); } + +static void +_cb_radio_changed_scale_type(void *data,
[EGIT] [core/efl] master 01/01: efl_ui_image: add new scale type: EFL_UI_IMAGE_SCALE_TYPE_TILE
jpeg pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=40e23ca4593358574b2d9cfb62873fda7dce1c1c commit 40e23ca4593358574b2d9cfb62873fda7dce1c1c Author: Sungtaek Hong <sth253.h...@samsung.com> Date: Tue Sep 19 17:32:09 2017 +0900 efl_ui_image: add new scale type: EFL_UI_IMAGE_SCALE_TYPE_TILE Summary: Tile is common type which can be used eg: background. This is added to scale type which can be set/get by efl_ui_image_scale_type_set/get() @feature Test Plan: Run elementary test Run Image Scale Type Check radio "Tile". Reviewers: jpeg, cedric, woohyun Differential Revision: https://phab.enlightenment.org/D5119 --- src/bin/elementary/test.c | 2 + src/bin/elementary/test_image.c| 75 ++ src/lib/elementary/efl_ui_image.c | 31 ++-- src/lib/elementary/efl_ui_image.eo | 1 + 4 files changed, 97 insertions(+), 12 deletions(-) diff --git a/src/bin/elementary/test.c b/src/bin/elementary/test.c index 93282b5b02..87bd979330 100644 --- a/src/bin/elementary/test.c +++ b/src/bin/elementary/test.c @@ -272,6 +272,7 @@ void test_ui_clock(void *data, Evas_Object *obj, void *event_info); void test_popup(void *data, Evas_Object *obj, void *event_info); void test_dayselector(void *data, Evas_Object *obj, void *event_info); void test_image(void *data, Evas_Object *obj, void *event_info); +void test_image_scale_type(void *data, Evas_Object *obj, void *event_info); void test_image_swallow_align(void *data, Evas_Object *obj, void *event_info); void test_remote_image(void *data, Evas_Object *obj, void *event_info); void test_click_image(void *data, Evas_Object *obj, void *event_info); @@ -688,6 +689,7 @@ add_tests: ADD_TEST(NULL, "Images", "Photo", test_photo); ADD_TEST(NULL, "Images", "Thumb", test_thumb); ADD_TEST(NULL, "Images", "Image", test_image); + ADD_TEST(NULL, "Images", "Image Scale Type", test_image_scale_type); ADD_TEST(NULL, "Images", "Image Align", test_image_swallow_align); ADD_TEST(NULL, "Images", "Image Remote", test_remote_image); ADD_TEST(NULL, "Images", "Image Click", test_click_image); diff --git a/src/bin/elementary/test_image.c b/src/bin/elementary/test_image.c index 922a8a98fe..8f4f2e9c4b 100644 --- a/src/bin/elementary/test_image.c +++ b/src/bin/elementary/test_image.c @@ -98,6 +98,81 @@ im_align_cb(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUS printf("align %.3f %.3f\n", h, v); } +static const struct { + Efl_Ui_Image_Scale_Type scale_type; + const char *name; +} images_scale_type[] = { + { EFL_UI_IMAGE_SCALE_TYPE_NONE, "None" }, + { EFL_UI_IMAGE_SCALE_TYPE_FILL, "Fill" }, + { EFL_UI_IMAGE_SCALE_TYPE_FIT_INSIDE, "Fit Inside" }, + { EFL_UI_IMAGE_SCALE_TYPE_FIT_OUTSIDE, "Fit Outside" }, + { EFL_UI_IMAGE_SCALE_TYPE_TILE, "Tile" }, + { 0, NULL } +}; + +static void +my_im_scale_ch(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED) +{ + Evas_Object *win = data; + Evas_Object *im = evas_object_data_get(win, "im"); + Evas_Object *rdg = evas_object_data_get(win, "rdg"); + int v = elm_radio_value_get(rdg); + + efl_ui_image_scale_type_set(im, images_scale_type[v].scale_type); + fprintf(stderr, "Set %d[%s] and got %d\n", + images_scale_type[v].scale_type, images_scale_type[v].name, efl_ui_image_scale_type_get(im)); +} + +void +test_image_scale_type(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED) +{ + Evas_Object *win, *box, *im, *rd, *rdg = NULL; + int i; + + win = elm_win_util_standard_add("image test scale type", "Image Test Scale Type"); + elm_win_autodel_set(win, EINA_TRUE); + + box = elm_box_add(win); + evas_object_size_hint_weight_set(box, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + elm_win_resize_object_add(win, box); + evas_object_show(box); + + im = efl_add(EFL_UI_IMAGE_CLASS, win); + char buf[PATH_MAX]; + snprintf(buf, sizeof(buf), "%s/images/logo.png", elm_app_data_dir_get()); + elm_image_file_set(im, buf, NULL); + evas_object_size_hint_weight_set(im, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + evas_object_size_hint_align_set(im, EVAS_HINT_FILL, EVAS_HINT_FILL); + elm_box_pack_end(box, im); + evas_object_show(im); + + evas_object_data_set(win, "im", im); + + for (i = 0; images_scale_type[i].name; ++i) + { +rd = elm_radio_add(win); +evas_object_size_hint_align_set(rd, EVAS_HINT_FILL, EVAS_HINT_FILL); +evas_object_size_hint_weight_set(rd, EVAS_HINT_EXPAND, 0.0); +elm_radio_state_value_set(rd, i); +elm_object_text_
[EGIT] [core/efl] master 01/02: elm_map: keep overlays list when showing overlays
jpeg pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=40be6c958247b7f9d4380fbf5fb485e4bfac68db commit 40be6c958247b7f9d4380fbf5fb485e4bfac68db Author: Sungtaek Hong <sth253.h...@samsung.com> Date: Tue Sep 19 16:37:00 2017 +0900 elm_map: keep overlays list when showing overlays Summary: In elm_map_overlay_show and elm_map_overlays_show, it frees overlays list members. This lists are used in elm_map_overlay functions, so should remain. Test Plan: 1. Run elementary_test -> Geographic -> Map 2. Click group overlay (whose text is "3") -> bubble appears 3. Click "Show" button -> observe no more Eina Magic Check Failure appear. Reviewers: jpeg, cedric, woohyun Differential Revision: https://phab.enlightenment.org/D5191 --- src/bin/elementary/test_map.c | 22 ++ src/lib/elementary/elm_map.c | 3 ++- 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/src/bin/elementary/test_map.c b/src/bin/elementary/test_map.c index 69f03a957e..3fe55b9be7 100644 --- a/src/bin/elementary/test_map.c +++ b/src/bin/elementary/test_map.c @@ -97,6 +97,26 @@ _box_get(Evas_Object *obj, Overlay_Data *data, Elm_Map_Overlay *ovl) return bx; } +static void +_overlays_show(void *data, Evas_Object *obj EINA_UNUSED, void *ev EINA_UNUSED) +{ + Eina_List *members = elm_map_overlay_group_members_get(data); + elm_map_overlays_show(members); +} + +static Evas_Object * +_btn_get(Evas_Object *obj, Elm_Map_Overlay *ovl) +{ + Evas_Object *btn; + + btn = elm_button_add(obj); + elm_object_text_set(btn, "Show"); + evas_object_smart_callback_add(btn, "clicked", _overlays_show, ovl); + evas_object_show(btn); + + return btn; +} + static Evas_Object * _label_get(Evas_Object *obj) { @@ -956,6 +976,8 @@ _overlay_cb(void *data EINA_UNUSED, Evas_Object *map, void *ev) elm_map_overlay_bubble_content_append(bubble_img, _box_get(map, od, memb)); } +elm_map_overlay_bubble_content_append(bubble_img, + _btn_get(map, overlay)); } else { diff --git a/src/lib/elementary/elm_map.c b/src/lib/elementary/elm_map.c index bc372a1d18..9fa8d251ad 100644 --- a/src/lib/elementary/elm_map.c +++ b/src/lib/elementary/elm_map.c @@ -1423,8 +1423,9 @@ _region_max_min_get(Eina_List *overlays, double max_lon = -180, min_lon = 180; double max_lat = -90, min_lat = 90; Elm_Map_Overlay *overlay; + Eina_List *l; - EINA_LIST_FREE(overlays, overlay) + EINA_LIST_FOREACH(overlays, l, overlay) { double lon, lat; --
[EGIT] [core/efl] master 01/02: Evas filters: remove needless check for negative case.
jpeg pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=89f92af46949ea72b0346472eda8a397ef52 commit 89f92af46949ea72b0346472eda8a397ef52 Author: Sungtaek Hong <sth253.h...@samsung.com> Date: Mon Sep 4 17:47:31 2017 +0900 Evas filters: remove needless check for negative case. Summary: Becuse ox is set to 0, it cannot be negative, so negative check will be needless. Reviewers: jpeg Reviewed By: jpeg Subscribers: cedric Differential Revision: https://phab.enlightenment.org/D5155 --- src/lib/evas/filters/evas_filter_parser.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/lib/evas/filters/evas_filter_parser.c b/src/lib/evas/filters/evas_filter_parser.c index d01299c5bd..cf276b29cd 100644 --- a/src/lib/evas/filters/evas_filter_parser.c +++ b/src/lib/evas/filters/evas_filter_parser.c @@ -1686,8 +1686,9 @@ _transform_padding_update(Evas_Filter_Program *pgm EINA_UNUSED, dst = _instruction_param_getbuf(instr, "dst", NULL); EINA_SAFETY_ON_NULL_RETURN_VAL(dst, 0); - if (ox < 0) l = (-ox) * 2; - else r = ox * 2; + //if (ox < 0) l = (-ox) * 2; + //else r = ox * 2; + r = ox * 2; if (oy < 0) t = (-oy) * 2; else b = oy * 2; --
[EGIT] [core/efl] master 01/01: Cast to double before division during region/coord calculation.
jaehyun pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=5c0fc3f2f38d21ebaf4d02226579e4adf2e28aea commit 5c0fc3f2f38d21ebaf4d02226579e4adf2e28aea Author: Sungtaek Hong <sth253.h...@samsung.com> Date: Fri Aug 11 13:50:56 2017 +0900 Cast to double before division during region/coord calculation. Summary: int var devided by int is cast to double after devision. This might cause wrong calculation result. Reviewers: cedric, jpeg, Jaehyun_Cho Reviewed By: Jaehyun_Cho Differential Revision: https://phab.enlightenment.org/D5079 --- src/lib/elementary/elm_map.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/lib/elementary/elm_map.c b/src/lib/elementary/elm_map.c index b765b41f94..03dd0e0183 100644 --- a/src/lib/elementary/elm_map.c +++ b/src/lib/elementary/elm_map.c @@ -461,7 +461,7 @@ _coord_to_region_convert(Elm_Map_Data *sd, EINA_SAFETY_ON_NULL_RETURN(sd); - zoom = floor(log(size / sd->size.tile) / log(2)); + zoom = floor(log((double)size / sd->size.tile) / log(2)); if ((sd->src_tile) && (sd->src_tile->coord_to_geo)) { if (sd->src_tile->coord_to_geo @@ -489,7 +489,7 @@ _region_to_coord_convert(Elm_Map_Data *sd, EINA_SAFETY_ON_NULL_RETURN(sd); - zoom = floor(log(size / 256) / log(2)); + zoom = floor(log((double)size / 256) / log(2)); if ((sd->src_tile) && (sd->src_tile->geo_to_coord)) { if (sd->src_tile->geo_to_coord @@ -1120,15 +1120,15 @@ _zoom_do(Elm_Map_Data *sd, double sx, sy; if (vw > ow) sx = 0.5; -else sx = (double)(vx + (double)(vw / 2)) / ow; +else sx = (vx + ((double)vw / 2)) / ow; if (vh > oh) sy = 0.5; -else sy = (double)(vy + (double)(vh / 2)) / oh; +else sy = (vy + ((double)vh / 2)) / oh; if (sx > 1.0) sx = 1.0; if (sy > 1.0) sy = 1.0; -x = ceil((sx * sd->size.w) - (vw / 2)); -y = ceil((sy * sd->size.h) - (vh / 2)); +x = ceil((sx * sd->size.w) - ((double)vw / 2)); +y = ceil((sy * sd->size.h) - ((double)vh / 2)); if (x < 0) x = 0; else if (x > (sd->size.w - vw)) x = sd->size.w - vw; --
[EGIT] [core/efl] master 02/02: edje_cc: fix wrong comment about lazEDC norequired.
jpeg pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=a5fc50c186b38aa3e0e8d37586201000a51eebfa commit a5fc50c186b38aa3e0e8d37586201000a51eebfa Author: Sungtaek Hong <sth253.h...@samsung.com> Date: Tue Jul 25 14:44:39 2017 +0900 edje_cc: fix wrong comment about lazEDC norequired. Summary: - norequired; stands for required: 0 Reviewers: conr2d, jpeg Reviewed By: jpeg Subscribers: cedric Differential Revision: https://phab.enlightenment.org/D5036 --- src/bin/edje/edje_cc_handlers.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bin/edje/edje_cc_handlers.c b/src/bin/edje/edje_cc_handlers.c index dadf02c723..89e09abce8 100644 --- a/src/bin/edje/edje_cc_handlers.c +++ b/src/bin/edje/edje_cc_handlers.c @@ -1154,7 +1154,7 @@ New_Statement_Handler statement_handlers_short[] = render; -> no_render: 0; norender; -> no_render: 1; required; -> required: 1; - norequired; -> norequired: 0; + norequired; -> required: 0; scale; -> scale: 1; noscale; -> scale: 0; desc { --
[EGIT] [core/efl] master 03/03: edje_signal: reduce member count when deleted edje_signal_callback is found
jpeg pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=d545929845925997e8a8a4f0e4a43d7662e2a457 commit d545929845925997e8a8a4f0e4a43d7662e2a457 Author: Sungtaek Hong <sth253.h...@samsung.com> Date: Mon Jul 17 15:05:19 2017 +0900 edje_signal: reduce member count when deleted edje_signal_callback is found Summary: - when deleted callback is found _edje_signal_callback_move_last() is called in order to pack match array. - during _edje_signal_callback_move_last() index skips when another deleted callback is found, but does not reduce members_count. - this duplicates a remaining callback and calls the callback twice. Test Plan: 1. add multiple edje_signal_callback by edje_object_signal_callback_add() which have the same source, signal, func but different data. 2. delete first and last callback by edje_object_signal_callback_del/edje_object_signal_callback_del_full. 3. emit edje_signal. 4. observe one callback is called twice. Reviewers: SanghyeonLee, conr2d, jpeg Subscribers: cedric, jpeg Differential Revision: https://phab.enlightenment.org/D4985 --- src/Makefile_Edje.am | 2 + src/lib/edje/edje_signal.c | 5 +++ .../edje/data/test_signal_callback_del_full.edc| 24 src/tests/edje/edje_test_edje.c| 44 ++ 4 files changed, 75 insertions(+) diff --git a/src/Makefile_Edje.am b/src/Makefile_Edje.am index b982d1a739..4ca20e570b 100644 --- a/src/Makefile_Edje.am +++ b/src/Makefile_Edje.am @@ -286,6 +286,7 @@ tests/edje/data/test_table.edc \ tests/edje/data/test_combine_keywords.edc \ tests/edje/data/test_messages.edc \ tests/edje/data/test_signals.edc \ +tests/edje/data/test_signal_callback_del_full.edc \ tests/edje/data/filter.lua @@ -328,6 +329,7 @@ EDJE_TEST_FILES = tests/edje/data/test_layout.edj \ tests/edje/data/test_combine_keywords.edj \ tests/edje/data/test_messages.edj \ tests/edje/data/test_signals.edj \ + tests/edje/data/test_signal_callback_del_full.edj \ $(NULL) CLEANFILES += $(EDJE_TEST_FILES) diff --git a/src/lib/edje/edje_signal.c b/src/lib/edje/edje_signal.c index 12f22ef791..0e381c17a6 100644 --- a/src/lib/edje/edje_signal.c +++ b/src/lib/edje/edje_signal.c @@ -363,6 +363,11 @@ _edje_signal_callback_move_last(Edje_Signal_Callback_Group *gp, gp->custom_data[i] = gp->custom_data[j]; return; } +else + { + _edje_signal_callback_unset(gp, j); + m->matches_count--; + } } } diff --git a/src/tests/edje/data/test_signal_callback_del_full.edc b/src/tests/edje/data/test_signal_callback_del_full.edc new file mode 100644 index 00..af9acc1b45 --- /dev/null +++ b/src/tests/edje/data/test_signal_callback_del_full.edc @@ -0,0 +1,24 @@ +// compile: edje_cc test_signal_callback_del_full.edc +collections { + group { + name: "test"; + + parts { + part { +name: "event"; +type: RECT; +description { + state: "default" 0.0; + rel1 { + relative: 0.0 0.0; + offset: 0 0; + } + rel2 { + relative: 1.0 1.0; + offset: -1 -1; + } +} + } + } + } +} diff --git a/src/tests/edje/edje_test_edje.c b/src/tests/edje/edje_test_edje.c index af88fa8d84..f7b017566f 100644 --- a/src/tests/edje/edje_test_edje.c +++ b/src/tests/edje/edje_test_edje.c @@ -900,6 +900,49 @@ START_TEST(edje_test_signals) } END_TEST +static int _signal_count; + +static void +_signal_callback_count_cb(void *data, Evas_Object *obj EINA_UNUSED, + const char *emission EINA_UNUSED, const char *source EINA_UNUSED) +{ + int *_data = data; + _signal_count += *_data; +} + +START_TEST(edje_test_signal_callback_del_full) +{ + Evas *evas; + Evas_Object *obj; + int data[4] = { 1, 2, 4, 8 }; + + evas = EDJE_TEST_INIT_EVAS(); + + obj = efl_add(EDJE_OBJECT_CLASS, evas, + efl_file_set(efl_added, + test_layout_get("test_signal_callback_del_full.edj"), "test"), + efl_gfx_size_set(efl_added, 320, 240), + efl_gfx_visible_set(efl_added, 1)); + + edje_object_signal_callback_add(obj, "some_signal", "event", _signal_callback_count_cb, [0]); + edje_object_signal_callback_add(obj, "some_signal", "event", _signal_callback_count_cb, [1]); + edje_object_signal_callback_add(obj, "some_signal", "event", _si
[EGIT] [core/efl] master 02/03: elm_entry: use layout text/content aliases when text_set/get content_set/get/unset
jpeg pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=82a955be902ba4afd4cb0f0fbbaf46c1f2208155 commit 82a955be902ba4afd4cb0f0fbbaf46c1f2208155 Author: Sungtaek Hong <sth253.h...@samsung.com> Date: Thu Jun 29 19:32:19 2017 +0900 elm_entry: use layout text/content aliases when text_set/get content_set/get/unset Summary: - elm_entry has elm.guide text part and it can be set by "guide". - However when using text_aliases_get, this cannot be found. - Add elm_obj_elm_layout_part_aliasing_eval() internal APIs to make entry use proper aliases. Test Plan: 1. Run elementary test 2. Observe search entry has guide text with "guide" part. 3. Run Entry 8. 4. Observe "elm.guide" part also works. 5. Observe "icon" and "end" part works. Reviewers: id213sin, herdsman, jpeg Reviewed By: jpeg Subscribers: conr2d, cedric, jpeg Differential Revision: https://phab.enlightenment.org/D4962 --- src/lib/elementary/elm_entry.c | 44 ++--- src/lib/elementary/elm_entry.eo | 1 + src/lib/elementary/elm_layout.c | 31 ++--- src/lib/elementary/elm_widget.h | 5 + 4 files changed, 45 insertions(+), 36 deletions(-) diff --git a/src/lib/elementary/elm_entry.c b/src/lib/elementary/elm_entry.c index 0be4d08248..2adc9f1230 100644 --- a/src/lib/elementary/elm_entry.c +++ b/src/lib/elementary/elm_entry.c @@ -74,6 +74,13 @@ static const Evas_Smart_Cb_Description _smart_callbacks[] = { }; #undef ELM_PRIV_ENTRY_SIGNALS +static const Elm_Layout_Part_Alias_Description _text_aliases[] = +{ + {"default", "elm.text"}, + {"guide", "elm.guide"}, + {NULL, NULL} +}; + static const Elm_Layout_Part_Alias_Description _content_aliases[] = { {"icon", "elm.swallow.icon"}, @@ -3116,7 +3123,7 @@ _elm_entry_content_set(Eo *obj, Elm_Entry_Data *_pd EINA_UNUSED, const char *par if (!part || !strcmp(part, "icon") || !strcmp(part, "elm.swallow.icon")) elm_entry_icon_visible_set(obj, EINA_TRUE); - if (!part || !strcmp(part, "end") || !strcmp(part, "elm.swallow.end")) + if (part && (!strcmp(part, "end") || !strcmp(part, "elm.swallow.end"))) elm_entry_end_visible_set(obj, EINA_TRUE); return EINA_TRUE; @@ -3134,7 +3141,7 @@ _elm_entry_content_unset(Eo *obj, Elm_Entry_Data *_pd EINA_UNUSED, const char *p if (!part || !strcmp(part, "icon") || !strcmp(part, "elm.swallow.icon")) elm_entry_icon_visible_set(obj, EINA_FALSE); - if (!part || !strcmp(part, "end") || !strcmp(part, "elm.swallow.end")) + if (part && (!strcmp(part, "end") || !strcmp(part, "elm.swallow.end"))) elm_entry_end_visible_set(obj, EINA_FALSE); return ret; @@ -3200,12 +3207,12 @@ _elm_entry_text_set(Eo *obj, Elm_Entry_Data *sd, const char *part, const char *e int len = 0; if (!entry) entry = ""; - if (part && strcmp(part, "elm.text")) + if (!_elm_layout_part_aliasing_eval(obj, , EINA_TRUE)) + return EINA_FALSE; + + if (strcmp(part, "elm.text")) { -if (!strcmp(part, "guide")) - edje_object_part_text_set(sd->entry_edje, "elm.guide", entry); -else - edje_object_part_text_set(sd->entry_edje, part, entry); +edje_object_part_text_set(sd->entry_edje, part, entry); return EINA_TRUE; } @@ -3250,20 +3257,11 @@ _elm_entry_text_get(Eo *obj, Elm_Entry_Data *sd, const char *item) { const char *text; - if (item) - { -if (!strcmp(item, "default") || strcmp(item, "elm.text")) goto proceed; -else if (!strcmp(item, "guide")) - { - return edje_object_part_text_get(sd->entry_edje, "elm.guide"); - } -else - { - return edje_object_part_text_get(sd->entry_edje, item); - } - } + if (!_elm_layout_part_aliasing_eval(obj, , EINA_TRUE)) + return NULL; -proceed: + if (strcmp(item, "elm.text")) + return edje_object_part_text_get(sd->entry_edje, item); text = edje_object_part_text_get(sd->entry_edje, "elm.text"); if (!text) @@ -3990,6 +3988,12 @@ _elm_entry_efl_canvas_group_group_member_add(Eo *obj, Elm_Entry_Data *sd, Evas_O evas_object_raise(sd->hit_rect); } +EOLIAN static const Elm_Layout_Part_Alias_Description* +_elm_entry_elm_layout_text_aliases_get(Eo *obj EINA_UNUSED, Elm_Entry_Data *_sd EINA_UNUSED) +{ + return _text_aliases; +} + EOLIAN static const Elm_Layout_Part_Alias_Des
[EGIT] [core/efl] master 01/01: Efl.Observable: Free an iterator after use in observers_update()
conr2d pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=1ae77d0925eec52eb9961ff321147faca7b83e40 commit 1ae77d0925eec52eb9961ff321147faca7b83e40 Author: Sungtaek Hong <sth253.h...@samsung.com> Date: Fri Jun 30 13:29:44 2017 +0900 Efl.Observable: Free an iterator after use in observers_update() Summary: - In _efl_observable_observers_update() iterator is allocated but not freed. - This frees the iterator. @fix Reviewers: conr2d, jpeg Reviewed By: jpeg Subscribers: cedric, jpeg Differential Revision: https://phab.enlightenment.org/D4994 --- src/lib/efl/interfaces/efl_observer.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/lib/efl/interfaces/efl_observer.c b/src/lib/efl/interfaces/efl_observer.c index 2d4a20bbc6..c7efc30b2c 100644 --- a/src/lib/efl/interfaces/efl_observer.c +++ b/src/lib/efl/interfaces/efl_observer.c @@ -180,6 +180,8 @@ _efl_observable_observers_update(Eo *obj, Efl_Observable_Data *pd EINA_UNUSED, c { efl_observer_update(o, obj, key, data); } + + eina_iterator_free(it); } typedef struct --
[EGIT] [core/efl] master 01/02: elm_panel: set hidden property when panel is close/open
jpeg pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=9dd997f389328b8d031da7bec4c0e2074f6aae99 commit 9dd997f389328b8d031da7bec4c0e2074f6aae99 Author: Sungtaek Hong <sth253.h...@samsung.com> Date: Thu Jun 8 16:00:20 2017 +0900 elm_panel: set hidden property when panel is close/open Summary: - elm_panel has a property named hidden which stores open/close status. - This is updated when: 1. bring_in animation is done(anim_stop_cb). 2. mouse_up on panel. 3. API is called. (elm_panel_toggle, elm_panel_hidden_set) - In case 3, API changes hidden, and starts bring_in animation which will call anim_stop_cb() which will update hidden again. - If bring_in animation is canceled (eg: sizing_eval), anim_stop_cb will be called and calculate hidden status which will not guarantee updated hidden state by APIs. Test Plan: 1. Call any APIs which will call elm_layout_sizing_eval(panel) right after calling elm_panel_toggle()/elm_panel_hidden_set(). 2. Delete content of panel during "toggled" cb. Reviewers: jpeg, eunue, cedric Subscribers: conr2d, cedric, jpeg Differential Revision: https://phab.enlightenment.org/D4704 Signed-off-by: Jean-Philippe Andre <jp.an...@samsung.com> --- src/bin/elementary/test_panel.c | 27 src/lib/elementary/elm_panel.c | 316 ++-- 2 files changed, 137 insertions(+), 206 deletions(-) diff --git a/src/bin/elementary/test_panel.c b/src/bin/elementary/test_panel.c index 9c8d4eb2c8..41bffedfcc 100644 --- a/src/bin/elementary/test_panel.c +++ b/src/bin/elementary/test_panel.c @@ -281,6 +281,27 @@ _clicked_cb(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUS } static void +_toggled_cb(void *data, Evas_Object *obj, void *event_info EINA_UNUSED) +{ + Evas_Object *list; + int i; + + if (!elm_check_state_get(data)) return; + + list = elm_object_content_get(obj); + evas_object_del(list); + + list = elm_list_add(obj); + evas_object_size_hint_weight_set(list, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + evas_object_size_hint_align_set(list, EVAS_HINT_FILL, EVAS_HINT_FILL); + for (i = 0; i < 7; i++) + elm_list_item_append(list, "panel list item", NULL, NULL, NULL, NULL); + elm_object_content_set(obj, list); + + printf("Panel toggled:%s\n", elm_panel_hidden_get(obj) ? "hidden" : "visible"); +} + +static void _changed_cb(void *data EINA_UNUSED, Evas_Object *obj, void *event_info EINA_UNUSED) { elm_config_scroll_thumbscroll_enabled_set(elm_check_state_get(obj)); @@ -322,6 +343,11 @@ test_panel2(void *data EINA_UNUSED, evas_object_smart_callback_add(check, "changed", _changed_cb, NULL); + check = elm_check_add(box); + elm_object_text_set(check, "Reset content on toggle"); + evas_object_show(check); + elm_box_pack_end(box, check); + // toggle button button = elm_button_add(box); evas_object_size_hint_weight_set(button, EVAS_HINT_EXPAND, 0); @@ -365,5 +391,6 @@ test_panel2(void *data EINA_UNUSED, elm_list_item_append(list, "panel list item", NULL, NULL, NULL, NULL); elm_object_content_set(panel, list); + evas_object_smart_callback_add(panel, "toggled", _toggled_cb, check); evas_object_smart_callback_add(button, "clicked", _clicked_cb, panel); } diff --git a/src/lib/elementary/elm_panel.c b/src/lib/elementary/elm_panel.c index c79b46086b..b48df12301 100644 --- a/src/lib/elementary/elm_panel.c +++ b/src/lib/elementary/elm_panel.c @@ -219,7 +219,6 @@ EOLIAN static Elm_Theme_Apply _elm_panel_elm_widget_theme_apply(Eo *obj, Elm_Panel_Data *sd) { const char *str; - int w, h; Evas_Coord minw = 0, minh = 0; Elm_Theme_Apply int_ret = ELM_THEME_APPLY_FAILED; @@ -237,9 +236,6 @@ _elm_panel_elm_widget_theme_apply(Eo *obj, Elm_Panel_Data *sd) elm_widget_theme_object_set(obj, sd->scr_edje, "scroller", "panel", elm_widget_style_get(obj)); _scrollable_layout_theme_set(obj, sd); -evas_object_geometry_get(obj, NULL, NULL, , ); -if (!sd->hidden) _drawer_open(obj, w, h, EINA_FALSE); -else _drawer_close(obj, w, h, EINA_FALSE); handler_size = edje_object_data_get(sd->scr_edje, "handler_size"); if (handler_size) sd->handler_size = (int) (elm_object_scale_get(obj)) * (atoi(handler_size)); @@ -516,131 +512,56 @@ static Eina_Bool _state_sync(Evas_Object *obj) { ELM_PANEL_DATA_GET(obj, sd); - Evas_Object *ao; - Evas_Coord pos, panel_size, w, h; - Eina_Bool open = EINA_FALSE, horizontal = EINA_FALSE; + Evas_Coord pos, panel_size, w, h, threshold; + Eina_Bool horizontal = EINA_FALSE, reverse = EINA_FALSE; +
[EGIT] [core/efl] master 01/01: edje_cc: add short state handler for part.description.clip_to
conr2d pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=aaefd66d0c6425bea182a2549075b8de7376782d commit aaefd66d0c6425bea182a2549075b8de7376782d Author: Sungtaek Hong <sth253.h...@samsung.com> Date: Tue Apr 18 16:48:04 2017 +0900 edje_cc: add short state handler for part.description.clip_to Summary: part.clip_to statement has short handler named "part.clip" while part.description.clip_to does not. Its short handler name should be "part.description.clip" in order to have same experience with "part.clip". Reviewers: cedric, Hermet, jpeg, conr2d Reviewed By: conr2d Subscribers: conr2d Differential Revision: https://phab.enlightenment.org/D4789 --- src/bin/edje/edje_cc_handlers.c | 4 1 file changed, 4 insertions(+) diff --git a/src/bin/edje/edje_cc_handlers.c b/src/bin/edje/edje_cc_handlers.c index 91c08c2..6c34035 100644 --- a/src/bin/edje/edje_cc_handlers.c +++ b/src/bin/edje/edje_cc_handlers.c @@ -1078,6 +1078,9 @@ New_Statement_Handler statement_handlers[] = pointer -> pointer_mode alt_font -> use_alternate_font_metrics clip -> clip_to + desc { +clip -> clip_to + } } } } @@ -1102,6 +1105,7 @@ New_Statement_Handler statement_handlers_short[] = {"collections.group.parts.part.pointer", st_collections_group_parts_part_pointer_mode}, {"collections.group.parts.part.alt_font", st_collections_group_parts_part_use_alternate_font_metrics}, {"collections.group.parts.part.clip", st_collections_group_parts_part_clip_to_id}, + {"collections.group.parts.part.description.clip", st_collections_group_parts_part_description_clip_to_id}, }; /** @edcsubsection{lazedc_shorthand, --
[EGIT] [core/efl] master 03/13: elm_index: skip level check when only 0 level is active
cedric pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=8ac66d9dc09e911fe3dfe0eafca2121fb2c74a15 commit 8ac66d9dc09e911fe3dfe0eafca2121fb2c74a15 Author: Sungtaek Hong <sth253.h...@samsung.com> Date: Tue Feb 7 13:29:57 2017 -0800 elm_index: skip level check when only 0 level is active Summary: - In mouse move callback, index tries to calculate current level. - This is not needed when level 1 is not active. and blocks index item change. Test Plan: 1) Run elementary test -> any vertical index. 2) Click on index item and drag to outside of index. 3) Observe index item is now changed as mouse movement. Reviewers: cedric, Hermet, jpeg, eunue Reviewed By: cedric Subscribers: conr2d Differential Revision: https://phab.enlightenment.org/D4643 Signed-off-by: Cedric BAIL <ced...@osg.samsung.com> --- src/lib/elementary/elm_index.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/elementary/elm_index.c b/src/lib/elementary/elm_index.c index a407ba8..c1b0e05 100644 --- a/src/lib/elementary/elm_index.c +++ b/src/lib/elementary/elm_index.c @@ -909,7 +909,7 @@ _on_mouse_move(void *data, (wd->resize_obj, "elm.dragable.pointer", (!edje_object_mirrored_get(wd->resize_obj)) ? x : (x - w), y); - if (sd->orientation == EFL_ORIENT_VERTICAL) + if ((sd->orientation == EFL_ORIENT_VERTICAL) && (sd->event_rect[1])) { if (adx > minw) { --
[EGIT] [core/efl] master 04/13: elm_panel: set scrollable panel unfocusable when closed.
cedric pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=f4d5d57e17496098eeb9427a5b196d26963d5c78 commit f4d5d57e17496098eeb9427a5b196d26963d5c78 Author: Sungtaek Hong <sth253.h...@samsung.com> Date: Tue Feb 7 13:31:03 2017 -0800 elm_panel: set scrollable panel unfocusable when closed. Summary: - When scrollable panel is closed by elm_panel_hidden_set(), elm_panel_toggle() APIs, it shows animation with scroller bringin effect. - During this animation, panel is still focusable, and may stop closing when content gets focused. - scrollable panel is now set unfocusable when closed by APIs above, and set focusable when opened after bringin animation. Test Plan: 1) Set panel scrollable and opened. 2) Set another object focused and deleted it when panel is closing. 3) Observe panel is closed. Reviewers: cedric, jpeg, woohyun Subscribers: conr2d, cedric, jpeg Differential Revision: https://phab.enlightenment.org/D4641 Signed-off-by: Cedric BAIL <ced...@osg.samsung.com> --- src/lib/elementary/elm_panel.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lib/elementary/elm_panel.c b/src/lib/elementary/elm_panel.c index 30e4773..7b118be 100644 --- a/src/lib/elementary/elm_panel.c +++ b/src/lib/elementary/elm_panel.c @@ -409,6 +409,7 @@ _drawer_close(Evas_Object *obj, Evas_Coord w, Evas_Coord h, Eina_Bool anim) int x = 0, y = 0; Eina_Bool horizontal = EINA_FALSE; + elm_widget_tree_unfocusable_set(obj, EINA_TRUE); switch (sd->orient) { case ELM_PANEL_ORIENT_TOP: --
[EGIT] [core/efl] master 03/06: elm_index: apply mirrored layout for index box
jpeg pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=a3ac1515919f791e6d16738768f358db7624594b commit a3ac1515919f791e6d16738768f358db7624594b Author: Sungtaek Hong <sth253.h...@samsung.com> Date: Mon Jan 2 15:19:51 2017 +0900 elm_index: apply mirrored layout for index box Summary: - When mirrored is set, horizontal box packs item reversely, from right to left. However, index box packs index item the same as before, from left to right. This commit changes index box custom layout to sync with other box. Test Plan: - enable mirrored UI, or use elm_config_mirrored_set(EINA_TRUE); run elementary_test, "Index Horizontal". - Observe index item packs in a same direction with box contents. Reviewers: cedric, Hermet, jpeg Subscribers: conr2d Differential Revision: https://phab.enlightenment.org/D4512 --- src/lib/elementary/elm_index.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/lib/elementary/elm_index.c b/src/lib/elementary/elm_index.c index 428a513..76b6be4 100644 --- a/src/lib/elementary/elm_index.c +++ b/src/lib/elementary/elm_index.c @@ -58,7 +58,7 @@ _box_custom_layout(Evas_Object *o, Evas_Object_Box_Data *priv, void *data) { - Elm_Index_Data *sd = data; + ELM_INDEX_DATA_GET(data, sd); Eina_Bool horizontal; if (sd->orientation == EFL_ORIENT_HORIZONTAL) @@ -66,7 +66,7 @@ _box_custom_layout(Evas_Object *o, else horizontal = EINA_FALSE; - _els_box_layout(o, priv, horizontal, EINA_TRUE, EINA_FALSE); + _els_box_layout(o, priv, horizontal, EINA_TRUE, elm_widget_mirrored_get(data)); } static void @@ -469,7 +469,7 @@ _elm_index_elm_widget_theme_apply(Eo *obj, Elm_Index_Data *sd) { sd->bx[1] = evas_object_box_add(evas_object_evas_get(obj)); evas_object_box_layout_set - (sd->bx[1], _box_custom_layout, sd, NULL); + (sd->bx[1], _box_custom_layout, obj, NULL); elm_widget_sub_object_add(obj, sd->bx[1]); } elm_layout_content_set(obj, "elm.swallow.index.1", sd->bx[1]); @@ -1096,7 +1096,7 @@ _elm_index_efl_canvas_group_group_add(Eo *obj, Elm_Index_Data *priv) } priv->bx[0] = evas_object_box_add(evas_object_evas_get(obj)); - evas_object_box_layout_set(priv->bx[0], _box_custom_layout, priv, NULL); + evas_object_box_layout_set(priv->bx[0], _box_custom_layout, obj, NULL); elm_layout_content_set(obj, "elm.swallow.index.0", priv->bx[0]); evas_object_show(priv->bx[0]); @@ -1107,7 +1107,7 @@ _elm_index_efl_canvas_group_group_add(Eo *obj, Elm_Index_Data *priv) { priv->bx[1] = evas_object_box_add(evas_object_evas_get(obj)); evas_object_box_layout_set - (priv->bx[1], _box_custom_layout, priv, NULL); + (priv->bx[1], _box_custom_layout, obj, NULL); elm_widget_sub_object_add(obj, priv->bx[1]); elm_layout_content_set(obj, "elm.swallow.index.1", priv->bx[1]); evas_object_show(priv->bx[1]); --
[EGIT] [core/efl] master 06/06: elm_naviframe: resize previous view before item pop transition.
jpeg pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=5a9c6d393aeda99d2691953dc978ec8b5f905fa7 commit 5a9c6d393aeda99d2691953dc978ec8b5f905fa7 Author: Sungtaek Hong <sth253.h...@samsung.com> Date: Mon Jan 2 15:41:20 2017 +0900 elm_naviframe: resize previous view before item pop transition. Summary: - In commit rEFL9f5e9ec7ca120242a92ac97fb20016263c152d8e previous view is raised after item pop transition so that current view's pop animation can be shown. - But, previous view has to be in it's proper size during transition because some of animation might show previous view. Reviewers: Jaehyun_Cho Subscribers: cedric, conr2d, jpeg Differential Revision: https://phab.enlightenment.org/D4535 --- src/lib/elementary/elc_naviframe.c | 13 - 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/lib/elementary/elc_naviframe.c b/src/lib/elementary/elc_naviframe.c index c8bce97..0cf45b5 100644 --- a/src/lib/elementary/elc_naviframe.c +++ b/src/lib/elementary/elc_naviframe.c @@ -1132,15 +1132,16 @@ _on_item_pop_finished(void *data, const char *source EINA_UNUSED) { Elm_Naviframe_Item_Data *it = data; - Elm_Naviframe_Item_Data *prev_it = NULL; + Elm_Object_Item *eo_prev_it = NULL; ELM_NAVIFRAME_DATA_GET(WIDGET(it), sd); - if (sd->stack && sd->stack->last) + eo_prev_it = elm_naviframe_top_item_get(WIDGET(it)); + if (eo_prev_it) { -prev_it = EINA_INLIST_CONTAINER_GET - (sd->stack->last, Elm_Naviframe_Item_Data); -_resize_object_reset(WIDGET(it), prev_it); +ELM_NAVIFRAME_ITEM_DATA_GET(eo_prev_it, prev_it); + +evas_object_raise(VIEW(prev_it)); } if (sd->preserve) @@ -1813,6 +1814,8 @@ _elm_naviframe_item_pop(Eo *obj, Elm_Naviframe_Data *sd) evas_object_freeze_events_set(VIEW(prev_it), EINA_TRUE); } +elm_widget_resize_object_set(obj, VIEW(prev_it), EINA_FALSE); + /* these 2 signals MUST take place simultaneously */ elm_object_signal_emit(VIEW(it), "elm,state,cur,popped", "elm"); elm_object_signal_emit(VIEW(prev_it), "elm,state,prev,popped", "elm"); --
[EGIT] [core/efl] master 01/01: efreet_desktop: fix potential error in efreet_desktop_cache_create
hermet pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=3f0963f7b020bd83da348615e7582ebef1a4a5d0 commit 3f0963f7b020bd83da348615e7582ebef1a4a5d0 Author: Sungtaek Hong <sth253.h...@samsung.com> Date: Thu Dec 8 13:26:55 2016 +0900 efreet_desktop: fix potential error in efreet_desktop_cache_create Summary: - old_file_ids is freed but not set as NULL. If it goes to error code, old_file_ids will be freed again. Reviewers: jpeg, cedric, Hermet Reviewed By: Hermet Subscribers: conr2d Differential Revision: https://phab.enlightenment.org/D4467 --- src/bin/efreet/efreet_desktop_cache_create.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/bin/efreet/efreet_desktop_cache_create.c b/src/bin/efreet/efreet_desktop_cache_create.c index c6b1877..fe4a476 100644 --- a/src/bin/efreet/efreet_desktop_cache_create.c +++ b/src/bin/efreet/efreet_desktop_cache_create.c @@ -504,6 +504,7 @@ main(int argc, char **argv) { eina_hash_free(old_file_ids->hash); free(old_file_ids); +old_file_ids = NULL; } eina_hash_free(file_ids); --
[EGIT] [core/efl] master 01/01: emile_image: fix possible segmentation fault in AGRY88
hermet pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=44716502fce64a73d17eb443c51dadbd2c6dcfae commit 44716502fce64a73d17eb443c51dadbd2c6dcfae Author: Sungtaek Hong <sth253.h...@samsung.com> Date: Wed Dec 7 13:42:46 2016 +0900 emile_image: fix possible segmentation fault in AGRY88 Summary: - ptrag is set NULL and is allocated only when prop is rotated. but *ptrag = 0xFF00 | ptr[0]; without checking rotation. Reviewers: jpeg, cedric, Hermet Reviewed By: Hermet Subscribers: conr2d Differential Revision: https://phab.enlightenment.org/D4463 --- src/lib/emile/emile_image.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lib/emile/emile_image.c b/src/lib/emile/emile_image.c index 59af9b4..e04df4c 100644 --- a/src/lib/emile/emile_image.c +++ b/src/lib/emile/emile_image.c @@ -1860,10 +1860,11 @@ _emile_jpeg_data(Emile_Image *image, else { ptr2 = pixels; +ptrag = pixels; ptrg = pixels; } - if (!ptr2 && !ptrg) + if (!ptr2 && !ptrag && !ptrg) { *error = EMILE_IMAGE_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; goto on_error; --
[EGIT] [core/efl] master 01/02: elm_map: add copyright_cb for osm tile source.
jpeg pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=32635ad7bdc5410cfa2b57b686846fd7fedcbf43 commit 32635ad7bdc5410cfa2b57b686846fd7fedcbf43 Author: Sungtaek Hong <sth253.h...@samsung.com> Date: Tue Dec 6 14:17:31 2016 +0900 elm_map: add copyright_cb for osm tile source. Summary: - According to Copyright and license in Openstreetmap (https://www.openstreetmap.org/copyright/en) credit has to be in the corner of map. - Add copyright_cb which returns an object to show copyright. Test Plan: 1. Excecute elementary_test->map 2. Right click->source->set any tile source 3. Observe copyright is added. Reviewers: cedric, Hermet, jpeg Subscribers: conr2d Differential Revision: https://phab.enlightenment.org/D4449 --- src/lib/elementary/elm_map.c | 64 +++ src/lib/elementary/elm_widget_map.h | 3 ++ src/modules/elementary/test_map/mod.c | 6 3 files changed, 67 insertions(+), 6 deletions(-) diff --git a/src/lib/elementary/elm_map.c b/src/lib/elementary/elm_map.c index 1f88385..647ea0e 100644 --- a/src/lib/elementary/elm_map.c +++ b/src/lib/elementary/elm_map.c @@ -264,14 +264,27 @@ _scale_cb(const Evas_Object *obj EINA_UNUSED, return _osm_scale_meter[zoom] * cos(lat * ELM_PI / 180.0); } +static Evas_Object * +_osm_copyright_cb(Evas_Object *obj) +{ + Evas_Object *label; + + label = elm_label_add(obj); + elm_object_text_set(label, "
[EGIT] [core/efl] master 01/01: evas: remove unnecessary check for clip coords.
hermet pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=57c4d83b2e0de0a1a9e939f7762c1961e47cf74c commit 57c4d83b2e0de0a1a9e939f7762c1961e47cf74c Author: Sungtaek Hong <sth253.h...@samsung.com> Date: Wed Sep 21 17:40:53 2016 +0900 evas: remove unnecessary check for clip coords. Summary: (dst_clip_w <= 0 || dst_clip_h <= 0) is already checked. Reviewers: jpeg, cedric, Hermet Reviewed By: Hermet Subscribers: conr2d Differential Revision: https://phab.enlightenment.org/D4303 --- src/lib/evas/common/evas_scale_sample.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/lib/evas/common/evas_scale_sample.c b/src/lib/evas/common/evas_scale_sample.c index 008e43d..71a805e 100644 --- a/src/lib/evas/common/evas_scale_sample.c +++ b/src/lib/evas/common/evas_scale_sample.c @@ -553,7 +553,6 @@ scale_rgba_in_to_out_clip_sample_internal(RGBA_Image *src, RGBA_Image *dst, } if (dst_region_w <= 0) return EINA_FALSE; if (src_region_w <= 0) return EINA_FALSE; - if (dst_clip_w <= 0) return EINA_FALSE; if (dst_clip_x >= dst_w) return EINA_FALSE; if (dst_clip_x < dst_region_x) { @@ -582,7 +581,6 @@ scale_rgba_in_to_out_clip_sample_internal(RGBA_Image *src, RGBA_Image *dst, } if (dst_region_h <= 0) return EINA_FALSE; if (src_region_h <= 0) return EINA_FALSE; - if (dst_clip_h <= 0) return EINA_FALSE; if (dst_clip_y >= dst_h) return EINA_FALSE; if (dst_clip_y < dst_region_y) { --
[EGIT] [core/efl] master 01/02: elm_progressbar: show status when unit_format_func is set
cedric pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=03882d558824f657f5c5a54fcd2d632eafeafd87 commit 03882d558824f657f5c5a54fcd2d632eafeafd87 Author: Sungtaek Hong <sth253.h...@samsung.com> Date: Tue Sep 20 16:07:18 2016 -0700 elm_progressbar: show status when unit_format_func is set Summary: - elm,state,units,visible signal is emitted only when unit is set, but not when unit_format_func is set. - Since default unit has been set, this signal is emitted but signal will not be emitted after unit is set to NULL. Test Plan: 1. Create a progressbar. 2. elm_progressbar_unit_format_set(obj, NULL); 3. set unit_format_func by elm_progressbar_unit_format_function_set() and observe elm.text.status part visible. Reviewers: Hermet, jpeg, cedric Reviewed By: cedric Subscribers: D-TAU, eunue, conr2d, cedric, jpeg Differential Revision: https://phab.enlightenment.org/D4210 Signed-off-by: Cedric BAIL <ced...@osg.samsung.com> --- src/lib/elementary/elm_progressbar.c | 21 ++--- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/src/lib/elementary/elm_progressbar.c b/src/lib/elementary/elm_progressbar.c index e8d4bea..57f33bb 100644 --- a/src/lib/elementary/elm_progressbar.c +++ b/src/lib/elementary/elm_progressbar.c @@ -211,7 +211,7 @@ _elm_progressbar_elm_widget_theme_apply(Eo *obj, Elm_Progressbar_Data *sd) if (sd->pulse_state) elm_layout_signal_emit(obj, "elm,state,pulse,start", "elm"); - if ((sd->units) && (!sd->pulse)) + if (((sd->units) || (sd->unit_format_func)) && (!sd->pulse)) elm_layout_signal_emit(obj, "elm,state,units,visible", "elm"); if (_is_horizontal(sd->orientation)) @@ -439,19 +439,13 @@ _elm_progressbar_efl_ui_progress_progress_value_get(Eo *obj EINA_UNUSED, Elm_Pro EOLIAN static void _elm_progressbar_efl_ui_progress_unit_format_set(Eo *obj, Elm_Progressbar_Data *sd, const char *units) { + const char *sig; ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd); eina_stringshare_replace(>units, units); - if (units) - { -elm_layout_signal_emit(obj, "elm,state,units,visible", "elm"); -edje_object_message_signal_process(wd->resize_obj); - } - else - { -elm_layout_signal_emit(obj, "elm,state,units,hidden", "elm"); -edje_object_message_signal_process(wd->resize_obj); - } + sig = (units) ? "elm,state,units,visible" : "elm,state,units,hidden"; + elm_layout_signal_emit(obj, sig, "elm"); + edje_object_message_signal_process(wd->resize_obj); _units_set(obj); elm_layout_sizing_eval(obj); @@ -572,10 +566,15 @@ elm_progressbar_unit_format_get(const Elm_Progressbar *obj) EAPI void elm_progressbar_unit_format_function_set(Elm_Progressbar *obj, progressbar_func_type func, progressbar_freefunc_type free_func) { + const char *sig; ELM_PROGRESSBAR_DATA_GET(obj, sd); + ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd); sd->unit_format_func = func; sd->unit_format_free = free_func; + sig = (func) ? "elm,state,units,visible" : "elm,state,units,hidden"; + elm_layout_signal_emit(obj, "elm,state,units,visible", "elm"); + edje_object_message_signal_process(wd->resize_obj); _units_set(obj); elm_layout_sizing_eval(obj); --
[EGIT] [core/efl] master 01/04: eet: set alpha_texture for ETC1+Alpha
cedric pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=b437bfb3feee9db3b523a8d3c8deb3bc20b1aaa8 commit b437bfb3feee9db3b523a8d3c8deb3bc20b1aaa8 Author: Sungtaek Hong <sth253.h...@samsung.com> Date: Tue Sep 20 14:20:48 2016 -0700 eet: set alpha_texture for ETC1+Alpha Summary: alpha_texture need to be set EINA_TRUE to support ETC1+Alpha @fix Test Plan: Create an EDC file with png image with Alpha. compress image with ETC1 and ETC2. Observe Alpha is properly applied in both case. Reviewers: jpeg, Hermet, cedric Reviewed By: cedric Subscribers: conr2d Differential Revision: https://phab.enlightenment.org/D4307 Signed-off-by: Cedric BAIL <ced...@osg.samsung.com> --- src/lib/eet/eet_image.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lib/eet/eet_image.c b/src/lib/eet/eet_image.c index 38a0bdc..1da7985 100644 --- a/src/lib/eet/eet_image.c +++ b/src/lib/eet/eet_image.c @@ -855,6 +855,7 @@ eet_data_image_etc1_compressed_convert(int *size, etc_block_size = 8; num_planes = 2; // RGB and Alpha header[5] = 3; +alpha_texture = EINA_TRUE; codec = "ETC1+Alpha"; break; default: abort(); --
[EGIT] [core/efl] master 01/02: elm_map: fix wrong check of source search
jpeg pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=2de14b985c7694a70f7395f11eb2fd738fe4f379 commit 2de14b985c7694a70f7395f11eb2fd738fe4f379 Author: Sungtaek Hong <sth253.h...@samsung.com> Date: Fri Aug 5 15:36:41 2016 +0900 elm_map: fix wrong check of source search Summary: When map source is set by elm_map_source_set(), it foreaches enlisted sources, and should return when the source cannot be found. @fix Test Plan: Call elm_map_source_set(map, [any type], [Wrong source name]); Observe ERR("source name (%s) is not found", source_name) message. Reviewers: Hermet, cedric, jpeg Reviewed By: jpeg Subscribers: conr2d Differential Revision: https://phab.enlightenment.org/D4212 --- src/lib/elementary/elm_map.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib/elementary/elm_map.c b/src/lib/elementary/elm_map.c index 346d49e..7c6fc88 100644 --- a/src/lib/elementary/elm_map.c +++ b/src/lib/elementary/elm_map.c @@ -3390,7 +3390,7 @@ _source_tile_set(Elm_Map_Data *sd, break; } } - if (!sd->src_tile) + if (!l) { ERR("source name (%s) is not found", source_name); return; @@ -3431,7 +3431,7 @@ _source_route_set(Elm_Map_Data *sd, break; } } - if (!sd->src_route) + if (!l) { ERR("source name (%s) is not found", source_name); return; @@ -3458,7 +3458,7 @@ _source_name_set(Elm_Map_Data *sd, break; } } - if (!sd->src_name) + if (!l) { ERR("source name (%s) is not found", source_name); return; --
[EGIT] [core/efl] master 02/03: elm_conform: set data pointer to obj from NULL.
jpeg pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=d40d469bceee46cda6d8eddd56d13bc119473c20 commit d40d469bceee46cda6d8eddd56d13bc119473c20 Author: Sungtaek Hong <sth253.h...@samsung.com> Date: Mon Jul 25 17:12:49 2016 +0900 elm_conform: set data pointer to obj from NULL. Summary: - In the callback for ELM_PLUG_EVENT_IMAGE_DELETED, it tries to get elm_conform's data from NULL. @fix Reviewers: Hermet, woohyun, cedric, jpeg Reviewed By: jpeg Subscribers: cedric, jpeg Differential Revision: https://phab.enlightenment.org/D4177 --- src/lib/elementary/elm_conform.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/elementary/elm_conform.c b/src/lib/elementary/elm_conform.c index a2d487f..29b8b25 100644 --- a/src/lib/elementary/elm_conform.c +++ b/src/lib/elementary/elm_conform.c @@ -409,7 +409,7 @@ _create_portrait_indicator(Evas_Object *obj) elm_widget_sub_object_add(obj, port_indicator); eo_event_callback_add - (port_indicator, ELM_PLUG_EVENT_IMAGE_DELETED, _port_indicator_disconnected, NULL); + (port_indicator, ELM_PLUG_EVENT_IMAGE_DELETED, _port_indicator_disconnected, obj); evas_object_size_hint_min_set(port_indicator, -1, 0); evas_object_size_hint_max_set(port_indicator, -1, 0); @@ -451,7 +451,7 @@ _create_landscape_indicator(Evas_Object *obj) elm_widget_sub_object_add(obj, land_indicator); eo_event_callback_add - (land_indicator, ELM_PLUG_EVENT_IMAGE_DELETED, _land_indicator_disconnected, NULL); + (land_indicator, ELM_PLUG_EVENT_IMAGE_DELETED, _land_indicator_disconnected, obj); evas_object_size_hint_min_set(land_indicator, -1, 0); evas_object_size_hint_max_set(land_indicator, -1, 0); return land_indicator; --
[EGIT] [core/efl] master 03/04: elm_colorselector: selected item is updated when color is changed.
cedric pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=cebbf43881f599e3a1492dfce43730a55c960626 commit cebbf43881f599e3a1492dfce43730a55c960626 Author: Sungtaek Hong <sth253.h...@samsung.com> Date: Wed Jul 13 16:06:58 2016 -0700 elm_colorselector: selected item is updated when color is changed. Summary: - Previously, mode change, color change updated sd->selected, but did not send signals to edje of the item. - Also, mode change in colorselector set sd->selected to the first item even when palette is visible in previous mode. - Now, when mode is changed, sd->selected is set NULL and send unselected signal if palette is invisible, and keep sd->selected if palette is visible. - sd->selected is set NULL when color is changed in picker and color bars because previous selected item is not current color of colorselector Test Plan: 1. 1) launch elementary_test colorselector. 2)Select any item and check the item is selected when palette is visible. 3) Change mode to Palette, Both, All, and check selected item is not changed. (Previously, selected item is changed to the first item of the palette, but previous item was seen as selected.) 2. 1) launch elementary_test colorselector. 2) Select any item and check the item is selected when palette is visible. 3) Change mode to Components, Picker. 4) Change mode to Palette, and check none of items is selected. (Previously, selected item is changed to the first item of the palette, but previous item was seen as selected.) 3. 1) launch elementary_test colorselector. 2) Select any item and check the item is selected when palette is visible. 3) Change mode to All. 4) Click arrows in Picker and color bars. 5) Observe selected item is not unselected when color is not changed, and selected item is unselected when color is changed. 4. 1) launch elementary_test colorselector. 2) Select any item and check the item is selected when palette is visible. 3) Press direction key and check selected item is changed. (Previously, selected item's edje is not updated.) Reviewers: woohyun, Hermet, jpeg, cedric Subscribers: cedric, jpeg Differential Revision: https://phab.enlightenment.org/D4156 Signed-off-by: Cedric BAIL <ced...@osg.samsung.com> --- src/lib/elementary/elm_colorselector.c | 68 +++--- 1 file changed, 47 insertions(+), 21 deletions(-) diff --git a/src/lib/elementary/elm_colorselector.c b/src/lib/elementary/elm_colorselector.c index ea64859..df972a7 100644 --- a/src/lib/elementary/elm_colorselector.c +++ b/src/lib/elementary/elm_colorselector.c @@ -584,13 +584,14 @@ _colors_set(Evas_Object *obj, int r, int g, int b, -int a) +int a, +Eina_Bool mode_change) { double x, y; ELM_COLORSELECTOR_DATA_GET(obj, sd); - if ((sd->r == r) && (sd->g == g) && (sd->b == b) && (sd->a == a)) + if ((sd->r == r) && (sd->g == g) && (sd->b == b) && (sd->a == a) && !mode_change) return; sd->r = r; @@ -631,7 +632,20 @@ _colors_set(Evas_Object *obj, } if ((sd->mode == ELM_COLORSELECTOR_ALL) || (sd->mode == ELM_COLORSELECTOR_PICKER)) _color_picker_init(sd); - eo_event_callback_call(obj, ELM_COLORSELECTOR_EVENT_CHANGED, NULL); + if (!mode_change) + eo_event_callback_call(obj, ELM_COLORSELECTOR_EVENT_CHANGED, NULL); +} + +static void +_unselect_selected_item(Elm_Colorselector_Data *sd) +{ + Eo *eo_temp_item; + + if (sd->selected) + { +eo_temp_item = eina_list_data_get(sd->selected); +elm_obj_color_item_selected_set(eo_temp_item, EINA_FALSE); + } } static void @@ -641,6 +655,7 @@ _spinner_changed_cb(void *data, const Eo_Event *event) Evas_Object *parent; int i, v; + _unselect_selected_item(sd); for (i = 0; i < 4 && sd->spinners[i] != event->object; i++); parent = evas_object_data_get(event->object, "parent"); @@ -650,16 +665,16 @@ _spinner_changed_cb(void *data, const Eo_Event *event) switch (i) { case 0: - _colors_set(parent, v, sd->g, sd->b, sd->a); + _colors_set(parent, v, sd->g, sd->b, sd->a, EINA_FALSE); break; case 1: - _colors_set(parent, sd->r, v, sd->b, sd->a); + _colors_set(parent, sd->r, v, sd->b, sd->a, EINA_FALSE); break; case 2: - _colors_set(parent, sd->r, sd->g, v, sd->a); + _colors_set(parent, sd->r, sd->g, v, sd->a, EINA_FALSE); b
[EGIT] [core/efl] master 05/11: elm_index: include horizontal index to omit calculation
cedric pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=26e3bcdcdf48b1386a338408c9174cc039109e2e commit 26e3bcdcdf48b1386a338408c9174cc039109e2e Author: Sungtaek Hong <sth253.h...@samsung.com> Date: Thu Jun 23 10:10:26 2016 -0700 elm_index: include horizontal index to omit calculation Summary: - when index is set to horizontal by elm_index_horizontal_set() there is no logic about omit calculation. However, when omit is enabled/disabled by elm_index_omit_enabled_set(), horizontal index is ignored by if (sd->orientation == EFL_ORIENT_HORIZONTAL) return; - This can cause inconsistency when order of calling those APIs is changed. And also, that "horizontal index cannot be omitted" is not documented and does not make sense. - This commit enables omit for horizontal index, but further change is needed because current logic of getting min_w for dummy edje object is not accurate when text is set. Reviewers: cedric, jpeg, Hermet, conr2d Reviewed By: conr2d Subscribers: eunue, conr2d, cedric, jpeg Differential Revision: https://phab.enlightenment.org/D4052 Signed-off-by: Cedric BAIL <ced...@osg.samsung.com> --- src/lib/elementary/elm_index.c | 28 +++- 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/src/lib/elementary/elm_index.c b/src/lib/elementary/elm_index.c index cfdd9b3..ecdb7bf 100644 --- a/src/lib/elementary/elm_index.c +++ b/src/lib/elementary/elm_index.c @@ -219,7 +219,7 @@ _index_box_auto_fill(Evas_Object *obj, Eina_Bool rtl; Elm_Object_Item *eo_item; Elm_Index_Item_Data *head = NULL, *last_it = NULL; - Evas_Coord mw, mh, ih; + Evas_Coord mw, mh, iw, ih; Evas_Object *o; Elm_Index_Omit *om; const char *style = elm_widget_style_get(obj); @@ -229,7 +229,7 @@ _index_box_auto_fill(Evas_Object *obj, if (sd->level_active[level]) return; ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd); - evas_object_geometry_get(wd->resize_obj, NULL, NULL, NULL, ); + evas_object_geometry_get(wd->resize_obj, NULL, NULL, , ); rtl = elm_widget_mirrored_get(obj); @@ -247,10 +247,24 @@ _index_box_auto_fill(Evas_Object *obj, if (sd->omit_enabled) { o = edje_object_add(evas_object_evas_get(obj)); -elm_widget_theme_object_set - (obj, o, "index", "item/vertical", style); +if (sd->orientation == EFL_ORIENT_HORIZONTAL) + { + elm_widget_theme_object_set +(obj, o, "index", "item/horizontal", style); + + edje_object_size_min_restricted_calc(o, , NULL, 0, 0); + if (mw != 0) +max_num_of_items = iw / mw; + } +else + { + elm_widget_theme_object_set +(obj, o, "index", "item/vertical", style); -edje_object_size_min_restricted_calc(o, NULL, , 0, 0); + edje_object_size_min_restricted_calc(o, NULL, , 0, 0); + if (mh != 0) +max_num_of_items = ih / mh; + } evas_object_del(o); @@ -260,8 +274,6 @@ _index_box_auto_fill(Evas_Object *obj, if (it->level == level && it->priority == sd->show_group) num_of_items++; } -if (mh != 0) - max_num_of_items = ih / mh; if (sd->group_num) max_num_of_items -= (sd->group_num + sd->default_num - 1); @@ -1654,8 +1666,6 @@ _elm_index_delay_change_time_get(Eo *obj EINA_UNUSED, Elm_Index_Data *sd) EOLIAN static void _elm_index_omit_enabled_set(Eo *obj, Elm_Index_Data *sd, Eina_Bool enabled) { - if (sd->orientation == EFL_ORIENT_HORIZONTAL) return; - enabled = !!enabled; if (sd->omit_enabled == enabled) return; sd->omit_enabled = enabled; --
[EGIT] [core/efl] master 05/06: elmentary: trigger selected event when mouse is up in index.
cedric pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=0023efb420ea7cb66354b19628ce561ee937c4d1 commit 0023efb420ea7cb66354b19628ce561ee937c4d1 Author: Sungtaek Hong <sth253.h...@samsung.com> Date: Wed Jun 8 14:06:33 2016 -0700 elmentary: trigger selected event when mouse is up in index. Summary: - selected callback should be called when the user releases a mouse button and selects an item. Reviewers: cedric, jpeg, Hermet, woohyun Subscribers: conr2d, cedric, jpeg Differential Revision: https://phab.enlightenment.org/D4022 Signed-off-by: Cedric BAIL <ced...@osg.samsung.com> --- src/lib/elementary/elm_index.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/lib/elementary/elm_index.c b/src/lib/elementary/elm_index.c index 1344bd2..f7a4ab2 100644 --- a/src/lib/elementary/elm_index.c +++ b/src/lib/elementary/elm_index.c @@ -857,6 +857,8 @@ _on_mouse_up(void *data, { eo_event_callback_call (data, EVAS_CLICKABLE_INTERFACE_EVENT_CLICKED, eo_item); +eo_event_callback_call + (data, EVAS_SELECTABLE_INTERFACE_EVENT_SELECTED, eo_item); eo_id_item = eo_item; ELM_INDEX_ITEM_DATA_GET(eo_id_item, id_item); if (id_item->func) --
[EGIT] [core/efl] master 04/07: elementary: initialize single_direction as none for elm_map.
cedric pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=4a6111920683281e8a8703c87a745037561a9828 commit 4a6111920683281e8a8703c87a745037561a9828 Author: Sungtaek Hong <sth253.h...@samsung.com> Date: Tue May 31 14:38:45 2016 -0700 elementary: initialize single_direction as none for elm_map. Summary: - elm_map has a scrollbale interface and it is set as ELM_SCROLLER_SINGLE_DIRECTION_SOFT by default. - elm_map can be rotated by gesture or by an API elm_map_rotate_set, so this single direction makes scroll unnatural. Reviewers: Hermet, cedric Subscribers: conr2d, jpeg Differential Revision: https://phab.enlightenment.org/D3986 Signed-off-by: Cedric BAIL <ced...@osg.samsung.com> --- src/lib/elementary/elm_map.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lib/elementary/elm_map.c b/src/lib/elementary/elm_map.c index 8146ad0..708154e 100644 --- a/src/lib/elementary/elm_map.c +++ b/src/lib/elementary/elm_map.c @@ -4069,6 +4069,7 @@ _elm_map_evas_object_smart_add(Eo *obj, Elm_Map_Data *priv) elm_interface_scrollable_objects_set(obj, edje, priv->hit_rect); elm_interface_scrollable_wheel_disabled_set(obj, EINA_TRUE); elm_interface_scrollable_bounce_allow_set(obj, _elm_config->thumbscroll_bounce_enable, _elm_config->thumbscroll_bounce_enable); + elm_interface_scrollable_single_direction_set(obj, ELM_SCROLLER_SINGLE_DIRECTION_NONE); evas_object_event_callback_add(obj, EVAS_CALLBACK_CHANGED_SIZE_HINTS, _changed_size_hints_cb, obj); --