[EGIT] [core/efl] master 01/01: efl_ui_table: modify comparing logic

2019-11-22 Thread Wonki Kim
xartigas pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=8559b0472e0327b231d6a2d3e945c07725e46c0c

commit 8559b0472e0327b231d6a2d3e945c07725e46c0c
Author: Wonki Kim 
Date:   Fri Nov 22 12:40:17 2019 +0100

efl_ui_table: modify comparing logic

Summary:
pad.h/v are integer varaibles, and also parameters h/v are too.
so that it is not needed to compare them like they are floating pointer.

Reviewers: bu5hm4n, segfaultxavi

Reviewed By: segfaultxavi

Subscribers: segfaultxavi, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10722
---
 src/lib/elementary/efl_ui_table.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lib/elementary/efl_ui_table.c 
b/src/lib/elementary/efl_ui_table.c
index db259b0dd3..861b78ab3a 100644
--- a/src/lib/elementary/efl_ui_table.c
+++ b/src/lib/elementary/efl_ui_table.c
@@ -269,7 +269,7 @@ _efl_ui_table_efl_object_invalidate(Eo *obj, 
Efl_Ui_Table_Data *pd)
 EOLIAN static void
 _efl_ui_table_efl_gfx_arrangement_content_padding_set(Eo *obj, 
Efl_Ui_Table_Data *pd, unsigned int h, unsigned int v)
 {
-   if (EINA_DBL_EQ(pd->pad.h, h) && EINA_DBL_EQ(pd->pad.v, v))
+   if (pd->pad.h == h && pd->pad.v == v)
  return;
 
pd->pad.h = h;

-- 




[EGIT] [core/efl] master 01/01: eina_matrix: replace cosf by cos to gain more accuracy

2019-11-21 Thread Wonki Kim
jsuya pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=4a4525cb4bdc207611bca2d8b3997ddd9c7b908d

commit 4a4525cb4bdc207611bca2d8b3997ddd9c7b908d
Author: Wonki Kim 
Date:   Thu Nov 21 17:43:42 2019 +0900

eina_matrix: replace cosf by cos to gain more accuracy

Summary:
cos function is much much more accurate than cosf.
this patch replaces cosf by cos to gain more accuracy.

Reviewers: cedric, jsuya, vtorri

Subscribers: vtorri, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10695
---
 src/lib/eina/eina_matrix.c| 4 ++--
 src/tests/eina/eina_test_matrix.c | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/lib/eina/eina_matrix.c b/src/lib/eina/eina_matrix.c
index ad7cdb03ff..7c30d1e767 100644
--- a/src/lib/eina/eina_matrix.c
+++ b/src/lib/eina/eina_matrix.c
@@ -551,8 +551,8 @@ eina_matrix3_rotate(Eina_Matrix3 *m, double rad)
 *   Later we would want someone to look at this and improve accuracy.
 */
 #if 1
-   c = cosf(rad);
-   s = sinf(rad);
+   c = cos(rad);
+   s = sin(rad);
 #else
/* normalize the angle between -pi,pi */
rad = fmod(rad + M_PI, 2 * M_PI) - M_PI;
diff --git a/src/tests/eina/eina_test_matrix.c 
b/src/tests/eina/eina_test_matrix.c
index ac3afa827f..2fa860c251 100644
--- a/src/tests/eina/eina_test_matrix.c
+++ b/src/tests/eina/eina_test_matrix.c
@@ -463,8 +463,8 @@ EFL_START_TEST(eina_matrix3_operations)
fail_if (!MATRIX3_CMP(m1.xx, m1.xy, m1.xz,
  m1.yx, m1.yy, m1.yz,
  m1.zx, m1.zy, m1.zz,
- cosf(rotate_radian), -sinf(rotate_radian), 0,
- sinf(rotate_radian),  cosf(rotate_radian), 0,
+ cos(rotate_radian), -sin(rotate_radian), 0,
+ sin(rotate_radian),  cos(rotate_radian), 0,
  0, 0, 1));
 
eina_matrix3_values_set(,

-- 




[EGIT] [core/efl] master 02/02: elm_config: replace ecore_file_cp with ecore_file_mv

2019-11-06 Thread Wonki Kim
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=da5c0c63f212078c215219ca0e97c8dbc1c576de

commit da5c0c63f212078c215219ca0e97c8dbc1c576de
Author: Wonki Kim 
Date:   Mon Nov 4 01:43:34 2019 +

elm_config: replace ecore_file_cp with ecore_file_mv

ecore_file_cp can cause config data(eet file) invalid,
once multiple processes are trying to call elm_config_save.

this patch replaces it with ecore_file_mv to prevent the problem.

Reviewed-by: Cedric BAIL 
Differential Revision: https://phab.enlightenment.org/D10578
---
 src/lib/elementary/elm_config.c | 15 +++
 1 file changed, 7 insertions(+), 8 deletions(-)

diff --git a/src/lib/elementary/elm_config.c b/src/lib/elementary/elm_config.c
index 05a2b2b601..476eb15c4d 100644
--- a/src/lib/elementary/elm_config.c
+++ b/src/lib/elementary/elm_config.c
@@ -809,9 +809,11 @@ _elm_config_profile_derived_save(const char *profile, 
Elm_Config_Derived *derive
 eet_close(ef);
 if (ret)
   {
- if (!ecore_file_cp(buf, buf2))
-   ERR("Error saving Elementary's derived configuration profile 
file");
- ecore_file_unlink(buf);
+ if (!ecore_file_mv(buf, buf2))
+   {
+  ERR("Error saving Elementary's derived configuration profile 
file");
+  ecore_file_unlink(buf);
+   }
   }
 else
   {
@@ -2155,15 +2157,13 @@ _elm_config_profile_save(const char *profile)
 goto err;
  }
 
-   ret = ecore_file_cp(buf2, buf);
+   ret = ecore_file_mv(buf2, buf);
if (!ret)
  {
 ERR("Error saving Elementary's configuration profile file");
 goto err;
  }
 
-   ecore_file_unlink(buf2);
-
derived = _elm_config_derived_load(profile ? profile : _elm_profile);
if (derived)
  {
@@ -2248,14 +2248,13 @@ _elm_config_save(Elm_Config *cfg, const char *profile)
 goto err;
  }
 
-   ret = ecore_file_cp(buf2, buf);
+   ret = ecore_file_mv(buf2, buf);
if (!ret)
  {
 ERR("Error saving Elementary's configuration file");
 goto err;
  }
 
-   ecore_file_unlink(buf2);
return EINA_TRUE;
 
 err:

-- 




[EGIT] [core/efl] master 01/01: check: reset flags that used for legacy 'changed' cb

2019-11-06 Thread Wonki Kim
bu5hm4n pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=dc52516397188a111e6ce71a8cf5f2b8e3c7202c

commit dc52516397188a111e6ce71a8cf5f2b8e3c7202c
Author: Wonki Kim 
Date:   Wed Nov 6 13:46:42 2019 +0100

check: reset flags that used for legacy 'changed' cb

Summary:
in case of setting a state of check by calling a API,
the flags that used for changed cb aren't changed.
which causes that the callback not invoked when it should be.

this patch resets the flags to make it work properly.

Reviewers: bu5hm4n

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Reviewed-by: Marcel Hollerbach 
Differential Revision: https://phab.enlightenment.org/D10591
---
 src/lib/elementary/efl_ui_check.c |  3 ++
 src/tests/elementary/elm_test_check.c | 68 +++
 2 files changed, 71 insertions(+)

diff --git a/src/lib/elementary/efl_ui_check.c 
b/src/lib/elementary/efl_ui_check.c
index 15f528168a..1ac817e29f 100644
--- a/src/lib/elementary/efl_ui_check.c
+++ b/src/lib/elementary/efl_ui_check.c
@@ -319,6 +319,9 @@ _efl_ui_check_efl_ui_selectable_selected_set(Eo *obj, 
Efl_Ui_Check_Data *pd, Ein
 
pd->selected = value;
 
+   pd->legacy_changed_emitted_select = !pd->selected;
+   pd->legacy_changed_emitted_unselect = pd->selected;
+
if (!elm_widget_is_legacy(obj))
  efl_event_callback_call(obj, EFL_UI_EVENT_SELECTED_CHANGED, 
>selected);
 }
diff --git a/src/tests/elementary/elm_test_check.c 
b/src/tests/elementary/elm_test_check.c
index 4881aaa876..0cdc18fda3 100644
--- a/src/tests/elementary/elm_test_check.c
+++ b/src/tests/elementary/elm_test_check.c
@@ -6,6 +6,13 @@
 #include 
 #include "elm_suite.h"
 
+typedef struct _Check_Data
+{
+   Evas_Object *check1;
+   Evas_Object *check2;
+   int value;
+} Check_Data;
+
 EFL_START_TEST(elm_test_check_size)
 {
Evas_Object *win, *check, *box;
@@ -146,6 +153,66 @@ EFL_START_TEST(elm_atspi_role_get)
 }
 EFL_END_TEST
 
+static void
+_check_changed_cb(void *ptr, Evas_Object *obj, void *e EINA_UNUSED)
+{
+   Check_Data *data = (Check_Data*) ptr;
+
+   if (obj == data->check1) {
+  elm_check_state_set(data->check2, EINA_TRUE);
+   } else if ( obj == data->check2) {
+  elm_check_state_set(data->check1, EINA_FALSE);
+   } else {
+  ck_assert(EINA_FALSE);
+   }
+   data->value ++;
+}
+
+EFL_START_TEST(elm_test_check_api_call)
+{
+   Evas_Object *win, *check1, *check2, *box;
+   Check_Data data ={0,};
+
+   win = elm_win_util_standard_add("check", "Check");
+
+   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);
+
+   data.check1 = check1 = elm_check_add(box);
+   elm_object_text_set(check1, "TEST TEST TEST");
+   evas_object_smart_callback_add(check1, "changed", _check_changed_cb, );
+   elm_box_pack_end(box, check1);
+   evas_object_show(check1);
+
+   data.check2 = check2 = elm_check_add(box);
+   elm_object_text_set(check2, "TEST TEST TEST");
+   evas_object_smart_callback_add(check2, "changed", _check_changed_cb, );
+   elm_box_pack_end(box, check2);
+   evas_object_show(check2);
+
+   evas_object_show(win);
+
+   get_me_to_those_events(check1);
+
+   data.value = 0;
+   click_object(data.check1);
+   ecore_main_loop_iterate();
+   ck_assert_int_eq(data.value, 1);
+
+   data.value = 0;
+   click_object(data.check2);
+   ecore_main_loop_iterate();
+   ck_assert_int_eq(data.value, 1);
+
+   data.value = 0;
+   click_object(data.check1);
+   ecore_main_loop_iterate();
+   ck_assert_int_eq(data.value, 1);
+}
+EFL_END_TEST
+
 void elm_test_check(TCase *tc)
 {
tcase_add_test(tc, elm_test_check_size);
@@ -154,4 +221,5 @@ void elm_test_check(TCase *tc)
tcase_add_test(tc, elm_test_check_state);
tcase_add_loop_test(tc, elm_test_check_callbacks, 0, 2);
tcase_add_test(tc, elm_atspi_role_get);
+   tcase_add_test(tc, elm_test_check_api_call);
 }

-- 




[EGIT] [tools/exactness] master 01/01: enhance help description for command with arguments

2019-10-06 Thread Wonki Kim
jackdanielz pushed a commit to branch master.

http://git.enlightenment.org/tools/exactness.git/commit/?id=a49e1538d815d7647d29f5ffb7069a3494237407

commit a49e1538d815d7647d29f5ffb7069a3494237407
Author: Wonki Kim 
Date:   Sun Oct 6 15:09:21 2019 +0300

enhance help description for command with arguments

Summary:
there isn't a description to provide a way to run with command with 
arguments.
this patch modifies description for using sential(--)

Reviewers: JackDanielZ

Reviewed By: JackDanielZ

Differential Revision: https://phab.enlightenment.org/D9165
---
 src/bin/player.c   | 2 +-
 src/bin/recorder.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/bin/player.c b/src/bin/player.c
index 8d192b0..b1331ad 100644
--- a/src/bin/player.c
+++ b/src/bin/player.c
@@ -1089,7 +1089,7 @@ _my_evas_new(int w EINA_UNUSED, int h EINA_UNUSED)
 
 static const Ecore_Getopt optdesc = {
   "exactness_play",
-  "%prog [options] <-s|-o|-v|-t|-h> command",
+  "%prog [options] <-s|-o|-v|-t|-h> [--] command [arg1 arg2 ...]",
   PACKAGE_VERSION,
   "(C) 2017 Enlightenment",
   "BSD",
diff --git a/src/bin/recorder.c b/src/bin/recorder.c
index ada17d2..688e41b 100644
--- a/src/bin/recorder.c
+++ b/src/bin/recorder.c
@@ -351,7 +351,7 @@ _mkdir(const char *dir)
 
 static const Ecore_Getopt optdesc = {
   "exactness_record",
-  "%prog [options] <-v|-t|-h> command",
+  "%prog [options] <-v|-t|-h> [--] command [arg1 arg2 ...]",
   PACKAGE_VERSION,
   "(C) 2017 Enlightenment",
   "BSD",

-- 




[EGIT] [core/efl] master 01/01: doc: update ecore_filter_model description

2019-09-24 Thread Wonki Kim
xartigas pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=aaf8d01ba87938f07b48821d7f1b0583015f0fde

commit aaf8d01ba87938f07b48821d7f1b0583015f0fde
Author: Wonki Kim 
Date:   Tue Sep 24 17:20:43 2019 +0200

doc: update ecore_filter_model description

Summary: this patch updates single line description of 
ecore_filter_model.(T7717)

Reviewers: segfaultxavi

Reviewed By: segfaultxavi

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10103
---
 src/lib/ecore/efl_filter_model.eo | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/lib/ecore/efl_filter_model.eo 
b/src/lib/ecore/efl_filter_model.eo
index 4dafb94f51..760887a8f6 100644
--- a/src/lib/ecore/efl_filter_model.eo
+++ b/src/lib/ecore/efl_filter_model.eo
@@ -10,12 +10,13 @@ function @beta EflFilterModel {
 
 class @beta Efl.Filter_Model extends Efl.Composite_Model
 {
-   [[Efl model designed to filter its children.]]
+   [[Filtering data that @Efl.Model provides is the main feature of this class.
+ This class provides a filter function so only children that match it are 
returned.]]
methods {
   filter_set {
  [[Set a filter function that will catch children from the composited 
model.]]
  params {
-filter: EflFilterModel; [[Filter callback]]
+filter: EflFilterModel; [[Filter callback.]]
  }
   }
}

-- 




[EGIT] [core/efl] master 04/04: gesture: fix it not to lose information by dividing

2019-09-23 Thread Wonki Kim
bu5hm4n pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=f18201749c4b6571fc2c2a97fad520fff0d73059

commit f18201749c4b6571fc2c2a97fad520fff0d73059
Author: Wonki Kim 
Date:   Fri Sep 20 05:26:41 2019 +

gesture: fix it not to lose information by dividing

division of integer by integer results integer.
this patch fix the case to make a division result more precise.

Reviewed-by: Mike Blumenkrantz 
Differential Revision: https://phab.enlightenment.org/D10039
---
 src/lib/evas/gesture/efl_canvas_gesture_recognizer_zoom.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/lib/evas/gesture/efl_canvas_gesture_recognizer_zoom.c 
b/src/lib/evas/gesture/efl_canvas_gesture_recognizer_zoom.c
index 190e476312..0bd41f55b6 100644
--- a/src/lib/evas/gesture/efl_canvas_gesture_recognizer_zoom.c
+++ b/src/lib/evas/gesture/efl_canvas_gesture_recognizer_zoom.c
@@ -71,7 +71,7 @@ _zoom_compute(Efl_Canvas_Gesture_Recognizer_Zoom_Data *pd,
Evas_Coord diam = _finger_gap_length_get(xx1, yy1, xx2, yy2,
 , );
 
-   zd->radius = diam / 2;
+   zd->radius = diam / 2.0;
 
if (!pd->zoom_base)
  {
@@ -202,7 +202,7 @@ 
_efl_canvas_gesture_recognizer_zoom_efl_canvas_gesture_recognizer_recognize(Eo *
pd->zoom_st.cur.pos.y,
, );
 
-zd->radius = pd->zoom_base / 2;
+zd->radius = pd->zoom_base / 2.0;
 
 if ((efl_gesture_state_get(gesture) != EFL_GESTURE_STARTED) &&
 (efl_gesture_state_get(gesture) != EFL_GESTURE_UPDATED))

-- 




[EGIT] [core/efl] master 03/03: test: Add a logic to check a size of Check

2019-09-23 Thread Wonki Kim
bu5hm4n pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=fe8715e9f6082da8c6b6e65b8c944b80730b8d4e

commit fe8715e9f6082da8c6b6e65b8c944b80730b8d4e
Author: Wonki Kim 
Date:   Sat Sep 21 04:28:24 2019 +

test: Add a logic to check a size of Check

If I pack a check without any api calls into a box,
then it doesn't have the hint_min size which is defined on check edc.
I guess there are problems on sizing logic currently, so this patch helps 
people
to test the problem.

Reviewed-by: Marcel Hollerbach 
Differential Revision: https://phab.enlightenment.org/D10038
---
 src/bin/elementary/test_check.c   |  4 
 src/tests/elementary/elm_test_check.c | 27 +++
 2 files changed, 31 insertions(+)

diff --git a/src/bin/elementary/test_check.c b/src/bin/elementary/test_check.c
index 9633f141c2..40ca00dfbe 100644
--- a/src/bin/elementary/test_check.c
+++ b/src/bin/elementary/test_check.c
@@ -115,6 +115,10 @@ test_check(void *data EINA_UNUSED, Evas_Object *obj 
EINA_UNUSED, void *event_inf
evas_object_show(ck);
evas_object_show(ic);
 
+   ck = elm_check_add(win);
+   elm_box_pack_end(bx, ck);
+   evas_object_show(ck);
+
ck = elm_check_add(win);
elm_box_pack_end(bx, ck);
elm_object_text_set(ck, "text is visible when check state is true.");
diff --git a/src/tests/elementary/elm_test_check.c 
b/src/tests/elementary/elm_test_check.c
index 74af40f235..4881aaa876 100644
--- a/src/tests/elementary/elm_test_check.c
+++ b/src/tests/elementary/elm_test_check.c
@@ -6,6 +6,32 @@
 #include 
 #include "elm_suite.h"
 
+EFL_START_TEST(elm_test_check_size)
+{
+   Evas_Object *win, *check, *box;
+   int width, height;
+
+   win = elm_win_util_standard_add("check", "Check");
+
+   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);
+
+   check = elm_check_add(box);
+   elm_box_pack_end(box, check);
+   evas_object_show(check);
+
+   evas_object_show(win);
+
+   get_me_to_those_events(check);
+
+   evas_object_size_hint_min_get(check, , );
+   ck_assert_int_gt(width, 0);
+   ck_assert_int_gt(height, 0);
+}
+EFL_END_TEST
+
 EFL_START_TEST(elm_test_check_legacy_type_check)
 {
Evas_Object *win, *check;
@@ -122,6 +148,7 @@ EFL_END_TEST
 
 void elm_test_check(TCase *tc)
 {
+   tcase_add_test(tc, elm_test_check_size);
tcase_add_test(tc, elm_test_check_legacy_type_check);
tcase_add_test(tc, elm_test_check_onoff_text);
tcase_add_test(tc, elm_test_check_state);

-- 




[EGIT] [core/efl] master 02/02: elm_config: fix to check if eet_open fails

2019-09-18 Thread Wonki Kim
zmike pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=726b0ee9208231c22e2ca0dade26ef650d16d8b0

commit 726b0ee9208231c22e2ca0dade26ef650d16d8b0
Author: Wonki Kim 
Date:   Wed Sep 18 08:21:02 2019 -0400

elm_config: fix to check if eet_open fails

Summary: this patch adds a guard block in case of failure of eet_open().

Reviewers: bu5hm4n, zmike

Reviewed By: zmike

Subscribers: zmike, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9987
---
 src/lib/elementary/elm_config.c | 5 +
 1 file changed, 5 insertions(+)

diff --git a/src/lib/elementary/elm_config.c b/src/lib/elementary/elm_config.c
index 0e25747d0f..bbc6b9f668 100644
--- a/src/lib/elementary/elm_config.c
+++ b/src/lib/elementary/elm_config.c
@@ -1733,6 +1733,11 @@ _config_system_load(void)
 EINA_SAFETY_ON_FALSE_RETURN_VAL(eet_data_undump(ef, "config", 
embedded_config, strlen(embedded_config)-1, EINA_FALSE), NULL);
 eet_close(ef);
 ef = eet_open(tmp, EET_FILE_MODE_READ);
+if (!ef)
+  {
+ ERR("Failed to load a fallback config file.");
+ return NULL;
+  }
 cfg = eet_data_read(ef, _config_edd, "config");
 eet_close(ef);
  }

-- 




[EGIT] [core/efl] master 01/02: elm_config: fix a missing of free after using

2019-09-16 Thread Wonki Kim
zmike pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=f49535debbd06bdc64ec07907110befa21d4af9c

commit f49535debbd06bdc64ec07907110befa21d4af9c
Author: Wonki Kim 
Date:   Mon Sep 16 09:57:36 2019 -0400

elm_config: fix a missing of free after using

Summary: safed_bindings will leak by going out the function without freeing.

Reviewers: bu5hm4n, zmike

Reviewed By: zmike

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9966
---
 src/lib/elementary/elm_config.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/lib/elementary/elm_config.c b/src/lib/elementary/elm_config.c
index b55933f7c4..0e25747d0f 100644
--- a/src/lib/elementary/elm_config.c
+++ b/src/lib/elementary/elm_config.c
@@ -2319,6 +2319,7 @@ _elm_key_bindings_copy_missing_bindings(Elm_Config *cfg, 
Elm_Config *syscfg)
  {
 printf("There have been missing Key bindings in the config, config is 
now adjusted\n");
  }
+   eina_hash_free(safed_bindings);
 }
 
 static void

-- 




[EGIT] [core/efl] master 01/01: eina_list: fix to check a null argument

2019-09-15 Thread Wonki Kim
hermet pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=4c489d5a2e4696275ced1c44baae600fe7d386ba

commit 4c489d5a2e4696275ced1c44baae600fe7d386ba
Author: Wonki Kim 
Date:   Tue Aug 27 20:23:29 2019 +0900

eina_list: fix to check a null argument

Summary:
data should be checked regardless of EINA_MAGIC define,
because it is dereferenced in the following logic.

Reviewers: cedric, bu5hm4n, Hermet

Reviewed By: Hermet

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9750
---
 src/lib/eina/eina_list.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/lib/eina/eina_list.c b/src/lib/eina/eina_list.c
index 2e7e24cc45..a9857bf897 100644
--- a/src/lib/eina/eina_list.c
+++ b/src/lib/eina/eina_list.c
@@ -959,6 +959,7 @@ eina_list_move_list(Eina_List **to, Eina_List **from, 
Eina_List *data)
 {
EINA_SAFETY_ON_NULL_RETURN_VAL(to, EINA_FALSE);
EINA_SAFETY_ON_NULL_RETURN_VAL(from, EINA_FALSE);
+   EINA_SAFETY_ON_NULL_RETURN_VAL(data, EINA_FALSE);
 
 #ifdef EINA_LIST_MAGIC
if (*to) EINA_MAGIC_CHECK_LIST(*to, EINA_FALSE);

-- 




[EGIT] [core/efl] master 01/02: efl_ui_layout: set needs_size_calc flag at constructor

2019-09-15 Thread Wonki Kim
zmike pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=98b19244329725c76ba601ea66ad5161841a68b9

commit 98b19244329725c76ba601ea66ad5161841a68b9
Author: Wonki Kim 
Date:   Mon Jul 22 09:08:55 2019 -0400

efl_ui_layout: set needs_size_calc flag at constructor

Summary:
even if there is a min definition on theme for some object,
the objects don't have the min size if we do nothing after creating it.

elm_layout_sizing_eval will return with doing nothing while executing 
contructor
so that _sizing_eval in _layout_group_calculate will never be invoked 
without calling hint_set, text_set, content_set, etc.

this patch modifies a initial state of needs_size_calc flag
so that object will doing _sizing_eval after executing constructor.

Test Plan:
1. remove lines that call apis such as content_set, hint_set, text_set
  in radio test on elementary_test

2. observe that radios don't have min size

Reviewers: bu5hm4n, Hermet, zmike

Reviewed By: zmike

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9368
---
 src/lib/elementary/efl_ui_layout.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/lib/elementary/efl_ui_layout.c 
b/src/lib/elementary/efl_ui_layout.c
index 1390fc774f..4b4643c72e 100644
--- a/src/lib/elementary/efl_ui_layout.c
+++ b/src/lib/elementary/efl_ui_layout.c
@@ -2445,7 +2445,7 @@ _efl_ui_layout_base_efl_object_constructor(Eo *obj, 
Efl_Ui_Layout_Data *sd)
 }
 
 EOLIAN static Efl_Object*
-_efl_ui_layout_base_efl_object_finalize(Eo *obj, Efl_Ui_Layout_Data *pd 
EINA_UNUSED)
+_efl_ui_layout_base_efl_object_finalize(Eo *obj, Efl_Ui_Layout_Data *pd)
 {
Eo *eo, *win;
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, NULL);
@@ -2459,6 +2459,8 @@ _efl_ui_layout_base_efl_object_finalize(Eo *obj, 
Efl_Ui_Layout_Data *pd EINA_UNU
if (efl_file_get(wd->resize_obj) || efl_file_mmap_get(wd->resize_obj))
  efl_file_load(wd->resize_obj);
 
+   pd->needs_size_calc = EINA_TRUE;
+
return eo;
 }
 

-- 




[EGIT] [core/efl] master 01/01: eina_vpath: add null checking logic on vpath_resolve api

2019-09-15 Thread Wonki Kim
hermet pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=979757c8456b1d9b62d8cc1cf247f943de9c10d7

commit 979757c8456b1d9b62d8cc1cf247f943de9c10d7
Author: Wonki Kim 
Date:   Tue Aug 27 20:25:02 2019 +0900

eina_vpath: add null checking logic on vpath_resolve api

Summary:
there is a patch that add vpath_resolve() call before eina_file_open()
because `path` arg could be NULL, the patch kills some applications.
this patch add null checking logic on vpath_resolve api

Reviewers: bu5hm4n, cedric, Hermet

Reviewed By: Hermet

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9748
---
 src/lib/eina/eina_vpath.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/lib/eina/eina_vpath.c b/src/lib/eina/eina_vpath.c
index 78ae6a250d..ac2d6ca9e2 100644
--- a/src/lib/eina/eina_vpath.c
+++ b/src/lib/eina/eina_vpath.c
@@ -327,6 +327,7 @@ EAPI char *
 eina_vpath_resolve(const char* path)
 {
char buf[PATH_MAX];
+   EINA_SAFETY_ON_NULL_RETURN_VAL(path, NULL);
 
if (_eina_vpath_resolve(path, buf, sizeof(buf)) > 0)
  return strdup(buf);

-- 




[EGIT] [core/efl] master 01/01: efl_exe: Enhance class description

2019-09-15 Thread Wonki Kim
xartigas pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=bc0eeeb1ecd3e01d9b88b766677d8fa16039ea92

commit bc0eeeb1ecd3e01d9b88b766677d8fa16039ea92
Author: Wonki Kim 
Date:   Tue Sep 10 12:11:06 2019 +0200

efl_exe: Enhance class description

Summary: This patch ehnance the description of efl_exe, regarding task 
T7717.

Reviewers: segfaultxavi

Reviewed By: segfaultxavi

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9889
---
 src/lib/ecore/efl_exe.eo | 6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/lib/ecore/efl_exe.eo b/src/lib/ecore/efl_exe.eo
index 8cf8466f93..30ce703248 100644
--- a/src/lib/ecore/efl_exe.eo
+++ b/src/lib/ecore/efl_exe.eo
@@ -23,7 +23,11 @@ enum @beta Efl.Exe_Flags {
 
 class @beta Efl.Exe extends Efl.Task implements Efl.Io.Reader, Efl.Io.Writer, 
Efl.Io.Closer, Efl.Core.Command_Line
 {
-   [[Further customization of @Efl.Task, including signals and environment 
control.]] // TODO: This needs more detail
+   [[The Efl.Exe
+
+ Efl.Exe is a kind of specialized @Efl.Task which is a abstraction of 
process(task).
+ This class provides a way to execute some commands with certain executing 
flags under certain environment variables.
+ and also it can provides a way to manage signals to a process that it 
handles.]]
methods {
   signal {
  [[Send a signal to this task.]]

-- 




[EGIT] [core/efl] master 02/02: interface_scrollable: Improve gravity_set api to support pan changing

2017-02-19 Thread Wonki Kim
jpeg pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=80e3c643d8693a12b5650222c9181e71819fb8ef

commit 80e3c643d8693a12b5650222c9181e71819fb8ef
Author: Wonki Kim <wonki_@samsung.com>
Date:   Mon Feb 20 11:31:12 2017 +0900

interface_scrollable: Improve gravity_set api to support pan changing

Summary:
When you set gravity 1 on scroller, scroller sticks to the bottom
even content is changed.
however, scroller don't work like above, if size of pan is changed.

this commit uses pan_pos_max rather than w/h of content_info
because pan_pos_max is related with both content_size and pan size.

gravity_set will work properly even if both size of content and pan are
changed simultaneously.

Test Plan:
1. Select 'scroll3' in the elementary_test
2. Append enough items so that scroll bar appears (about 30 items)
3. Go to the bottom and Set gravity 1.0
4. Check that scroller sticks to the bottom once you append another item
   (it works)
5. Check that scroller sticks to to bottom once you resize window(pan)
   (it doesn't work without this patch)

Reviewers: eagleeye, jpeg, cedric, woohyun, z-wony, herdsman

Differential Revision: https://phab.enlightenment.org/D4665
---
 src/lib/elementary/elm_interface_scrollable.c | 14 --
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/src/lib/elementary/elm_interface_scrollable.c 
b/src/lib/elementary/elm_interface_scrollable.c
index a9f79d2..e931279 100644
--- a/src/lib/elementary/elm_interface_scrollable.c
+++ b/src/lib/elementary/elm_interface_scrollable.c
@@ -1844,6 +1844,7 @@ static void
 _elm_scroll_wanted_region_set(Evas_Object *obj)
 {
Evas_Coord ww, wh, wx;
+   Evas_Coord mx = 0, my = 0;
 
ELM_SCROLL_IFACE_DATA_GET_OR_RETURN(obj, sid);
 
@@ -1872,11 +1873,13 @@ _elm_scroll_wanted_region_set(Evas_Object *obj)
 wh = sid->wh;
  }
 
-   wx += (sid->content_info.w - sid->prev_cw) * sid->gravity_x;
-   sid->wy += (sid->content_info.h - sid->prev_ch) * sid->gravity_y;
+   elm_obj_pan_pos_max_get(sid->pan_obj, , );
+
+   wx += (mx - sid->prev_cw) * sid->gravity_x;
+   sid->wy += (my - sid->prev_ch) * sid->gravity_y;
 
-   sid->prev_cw = sid->content_info.w;
-   sid->prev_ch = sid->content_info.h;
+   sid->prev_cw = mx;
+   sid->prev_ch = my;
 
elm_interface_scrollable_content_region_set(obj, wx, sid->wy, ww, wh);
 }
@@ -4441,8 +,7 @@ _elm_interface_scrollable_gravity_set(Eo *obj 
EINA_UNUSED, Elm_Scrollable_Smart_
 {
sid->gravity_x = x;
sid->gravity_y = y;
-   sid->prev_cw = sid->content_info.w;
-   sid->prev_ch = sid->content_info.h;
+   elm_obj_pan_pos_max_get(sid->pan_obj, >prev_cw, >prev_ch);
 }
 
 EOLIAN static void

-- 




[EGIT] [core/efl] master 03/06: elm_scroller: keep contents layout rel even if rtl is set

2017-02-07 Thread Wonki Kim
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=990afa25c34c0dda472d6f41117c2e77861b1b75

commit 990afa25c34c0dda472d6f41117c2e77861b1b75
Author: Wonki Kim <wonki_@samsung.com>
Date:   Tue Feb 7 15:03:45 2017 -0800

elm_scroller: keep contents layout rel even if rtl is set

Summary:
Once rtl mode is set, elm_layout reverses its x-axis.
however, scroller uses elm_layout to contain both original content and
proxy image of it when loop mode is set.

In this situation, elm_layout should not reverse its x-axis when It is
used for container of proxy to support loop mode of scroller.

This commit will not apply rtl mode to contents layout (mirrored set)

Test Plan:
* Check that there is a proxy image over right edge of original content.

1. Run elementary_test
2. Open scroller
3. Switch UI_mirrored mode on
4. Test (Control with keyboard / mouse wheel control looks bad on rtl mod)
   a. go to the right edge with keyboard
   b. get over the edge

Reviewers: woohyun, z-wony, jpeg, cedric

Differential Revision: https://phab.enlightenment.org/D4568

Signed-off-by: Cedric BAIL <ced...@osg.samsung.com>
---
 src/lib/elementary/elm_scroller.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/lib/elementary/elm_scroller.c 
b/src/lib/elementary/elm_scroller.c
index 0f74ee1..bd30cb4 100644
--- a/src/lib/elementary/elm_scroller.c
+++ b/src/lib/elementary/elm_scroller.c
@@ -777,6 +777,9 @@ _loop_content_set(Evas_Object *obj, Elm_Scroller_Data *sd, 
Evas_Object *content)
 
 elm_widget_sub_object_add(obj, sd->contents);
 elm_widget_on_show_region_hook_set(sd->contents, _show_region_hook, 
obj);
+
+elm_widget_mirrored_automatic_set(sd->contents, EINA_FALSE);
+elm_widget_mirrored_set(sd->contents, EINA_FALSE);
  }
elm_object_part_content_set(sd->contents, "elm.swallow.content", content);
sd->content = content;

-- 




[EGIT] [core/efl] master 02/02: interface_scrollable: Unify basis of calculation of page_get logic

2017-01-15 Thread Wonki Kim
jpeg pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=fbad285eca8bde68de0158395b346bdac25dc3ec

commit fbad285eca8bde68de0158395b346bdac25dc3ec
Author: Wonki Kim <wonki_@samsung.com>
Date:   Mon Jan 16 14:20:04 2017 +0900

interface_scrollable: Unify basis of calculation of page_get logic

Summary:
If rtl mode is set, current_page_get api should return reversed page number.
To do that, make x position x-axis reversed before page calculating.

Also bring_in and page_show should show the reversed page in rtl mode.
This patch modify the functions to support that.

Lastly, scroller should be scrolling based on the right edge of the page.

This patch is a combination of the patches(D4559,D4560)

Test Plan:
1. Run scroller test on elementary_test
2. Turn ui mirrored mode on
3. Manipulate scroller in various ways
- It should scroll proper position when you click next or prev btn.

Reviewers: woohyun, taxi2se, z-wony, cedric

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4558
---
 src/lib/elementary/elm_interface_scrollable.c | 9 -
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/lib/elementary/elm_interface_scrollable.c 
b/src/lib/elementary/elm_interface_scrollable.c
index 4c6c169..a9f79d2 100644
--- a/src/lib/elementary/elm_interface_scrollable.c
+++ b/src/lib/elementary/elm_interface_scrollable.c
@@ -2203,6 +2203,7 @@ 
_elm_scroll_page_x_get(Elm_Scrollable_Smart_Interface_Data *sid,
   x += (abs(offset) < dx ? offset : -(dx + 1));
  }
 
+   if (sid->is_mirrored) x += w;
if (sid->pagesize_h > 0)
  {
 if (x >= 0)
@@ -2212,6 +2213,7 @@ 
_elm_scroll_page_x_get(Elm_Scrollable_Smart_Interface_Data *sid,
 x = x / (sid->pagesize_h);
 x = x * (sid->pagesize_h);
  }
+   if (sid->is_mirrored) x -= w;
if (!sid->loop_h)
  {
 if ((x + w) > cw) x = cw - w;
@@ -4319,6 +4321,9 @@ _elm_interface_scrollable_current_page_get(Eo *obj 
EINA_UNUSED, Elm_Scrollable_S
elm_interface_scrollable_content_pos_get(sid->obj, , );
if (pagenumber_h)
  {
+if (sid->is_mirrored)
+  x = _elm_scroll_x_mirrored_get(sid->obj, x);
+
 if (sid->pagesize_h > 0)
   {
  double result = (double)x / (double)sid->pagesize_h;
@@ -4384,9 +4389,10 @@ _elm_interface_scrollable_page_show(Eo *obj, 
Elm_Scrollable_Smart_Interface_Data
elm_interface_scrollable_content_viewport_geometry_get
  (sid->obj, NULL, NULL, , );
x = sid->pagesize_h * pagenumber_h;
+   x = (sid->is_mirrored ? _elm_scroll_x_mirrored_get(sid->obj, x) : x);
y = sid->pagesize_v * pagenumber_v;
 
-   sid->wx = (sid->is_mirrored ? _elm_scroll_x_mirrored_get(sid->obj, x) : x);
+   sid->wx = x;
sid->wy = y;
sid->ww = w;
sid->wh = h;
@@ -4411,6 +4417,7 @@ _elm_interface_scrollable_page_bring_in(Eo *obj, 
Elm_Scrollable_Smart_Interface_
elm_interface_scrollable_content_viewport_geometry_get
  (sid->obj, NULL, NULL, , );
x = sid->pagesize_h * pagenumber_h;
+   x = (sid->is_mirrored ? _elm_scroll_x_mirrored_get(sid->obj, x) : x);
y = sid->pagesize_v * pagenumber_v;
if (_elm_scroll_content_region_show_internal(obj, , , w, h))
  {

-- 




[EGIT] [core/efl] master 01/01: elm: Fix potential null point dereferences.

2016-07-08 Thread Wonki Kim
hermet pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=19b291586336107c0d4d4cb02c44c7bc82f7ea1b

commit 19b291586336107c0d4d4cb02c44c7bc82f7ea1b
Author: Wonki Kim <wonki_@samsung.com>
Date:   Fri Jul 8 21:28:18 2016 +0900

elm: Fix potential null point dereferences.

Summary:
If every assigning logics to enginelist is not performed some how,
system will crash because the first parameter of strcmp is null.

Test Plan: N/A

Reviewers: Hermet

Reviewed By: Hermet

Subscribers: cedric, Hermet, raster, jpeg

Differential Revision: https://phab.enlightenment.org/D4149
---
 src/lib/elementary/efl_ui_win.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/src/lib/elementary/efl_ui_win.c b/src/lib/elementary/efl_ui_win.c
index 0293ea9..ebe283e 100644
--- a/src/lib/elementary/efl_ui_win.c
+++ b/src/lib/elementary/efl_ui_win.c
@@ -4210,10 +4210,8 @@ _elm_win_finalize_internal(Eo *obj, Efl_Ui_Win_Data *sd, 
const char *name, Elm_W
 #endif
}
   }
-enginelist[p++] = NULL;
-for (i = 0; i < 30; i++)
+for (i = 0; i < p; i++)
   {
- if ((i > 0) && (!enginelist[i])) break;
  if (!strcmp(enginelist[i], ELM_SOFTWARE_X11))
tmp_sd.ee = ecore_evas_software_x11_new(NULL, 0, 0, 0, 1, 1);
  else if (!strcmp(enginelist[i], ELM_OPENGL_X11))

--