[EGIT] [core/efl] master 01/01: ector: remove unused value

2017-10-09 Thread Thiep Ha
thiep pushed a commit to branch master.

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

commit 8116112f783d2e5223ff48624bb16bc142d09d2c
Author: Thiep Ha <thie...@gmail.com>
Date:   Tue Oct 10 13:19:03 2017 +0900

ector: remove unused value

The stored value of v_last is overwritten in another place,
its stored valued is not used.
---
 src/static_libs/freetype/sw_ft_raster.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/src/static_libs/freetype/sw_ft_raster.c 
b/src/static_libs/freetype/sw_ft_raster.c
index b2d96aaf2f..8bb0561c66 100644
--- a/src/static_libs/freetype/sw_ft_raster.c
+++ b/src/static_libs/freetype/sw_ft_raster.c
@@ -1272,8 +1272,6 @@ typedef struct  SW_FT_Outline_Funcs_
   /* for closure  */
   v_start.x = ( v_start.x + v_last.x ) / 2;
   v_start.y = ( v_start.y + v_last.y ) / 2;
-
-  v_last = v_start;
 }
 point--;
 tags--;

-- 




[EGIT] [core/efl] master 01/01: eina_promise: remove shadowed declaration warning

2017-09-05 Thread Thiep Ha
thiep pushed a commit to branch master.

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

commit aced128e855a85b6eb7561dae040bb2f6b9c6f3f
Author: Thiep Ha <thie...@gmail.com>
Date:   Tue Sep 5 15:56:00 2017 +0900

eina_promise: remove shadowed declaration warning
---
 src/lib/eina/eina_promise.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/src/lib/eina/eina_promise.c b/src/lib/eina/eina_promise.c
index e1b891865a..1cbc9f274f 100644
--- a/src/lib/eina/eina_promise.c
+++ b/src/lib/eina/eina_promise.c
@@ -1227,7 +1227,6 @@ eina_promise_all_array(Eina_Future *array[])
 
for (i = 0; i < ctx->base.futures_len; i++)
  {
-Eina_Bool r;
 Eina_Value v;
 
 //Stub values...

-- 




[EGIT] [core/efl] master 02/05: textpath: do not process line if failed to allocate segment

2017-09-04 Thread Thiep Ha
thiep pushed a commit to branch master.

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

commit 967e94dc6b76eac5002e662042760a0d6f76f8ef
Author: Thiep Ha <thie...@gmail.com>
Date:   Tue Sep 5 12:02:01 2017 +0900

textpath: do not process line if failed to allocate segment
---
 src/lib/elementary/efl_ui_textpath.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/lib/elementary/efl_ui_textpath.c 
b/src/lib/elementary/efl_ui_textpath.c
index ec0a6a56c7..2931995336 100644
--- a/src/lib/elementary/efl_ui_textpath.c
+++ b/src/lib/elementary/efl_ui_textpath.c
@@ -380,6 +380,7 @@ _path_data_get(Eo *obj, Efl_Ui_Textpath_Data *pd, Eina_Bool 
set_min)
ERR("Failed to allocate segment");
px0 = px1;
py0 = py1;
+   continue;
 }
   seg->type = EFL_GFX_PATH_COMMAND_TYPE_LINE_TO;
   seg->line.start.x = px0;

-- 




[EGIT] [core/efl] master 04/05: textpath: correct map point number

2017-09-04 Thread Thiep Ha
thiep pushed a commit to branch master.

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

commit 6a8cf155a30426f140ee4a4988828a7fbf29e69f
Author: Thiep Ha <thie...@gmail.com>
Date:   Tue Sep 5 14:19:59 2017 +0900

textpath: correct map point number

The last map point is not counted if seg is too small.
Test: change start angle to 3, the last segment is missed.
---
 src/bin/elementary/test_ui_textpath.c | 2 +-
 src/lib/elementary/efl_ui_textpath.c  | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/bin/elementary/test_ui_textpath.c 
b/src/bin/elementary/test_ui_textpath.c
index 5860ff5a5c..88e8de4ee7 100644
--- a/src/bin/elementary/test_ui_textpath.c
+++ b/src/bin/elementary/test_ui_textpath.c
@@ -102,7 +102,7 @@ test_ui_textpath(void *data EINA_UNUSED, Evas_Object *obj 
EINA_UNUSED, void *eve
efl_text_set(txtpath, "This text follows the path which you defined. This 
is a long text designed to make it ellipsis.");
 
efl_ui_textpath_circle_set(txtpath, CX, CY, CR, 0, 
EFL_UI_TEXTPATH_DIRECTION_CCW);
-  efl_gfx_visible_set(txtpath, EINA_TRUE);
+   efl_gfx_visible_set(txtpath, EINA_TRUE);
path_type = 0;
 
hbox = elm_box_add(win);
diff --git a/src/lib/elementary/efl_ui_textpath.c 
b/src/lib/elementary/efl_ui_textpath.c
index 0ed45e8500..c5ff22a5e0 100644
--- a/src/lib/elementary/efl_ui_textpath.c
+++ b/src/lib/elementary/efl_ui_textpath.c
@@ -213,6 +213,7 @@ _map_point_calc(Efl_Ui_Textpath_Data *pd)
 else if (seg->type == EFL_GFX_PATH_COMMAND_TYPE_CUBIC_TO)
   {
  int no = pd->slice_no * seg->length / (double)pd->total_length;
+ if (no == 0) no = 1;
  map_no += no;
   }
  }

-- 




[EGIT] [core/efl] master 05/05: focus_manager: remove unused parameter warning

2017-09-04 Thread Thiep Ha
thiep pushed a commit to branch master.

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

commit 60aa0f2389019cd9f25952325c89e22ea3d8c63f
Author: Thiep Ha <thie...@gmail.com>
Date:   Tue Sep 5 14:44:21 2017 +0900

focus_manager: remove unused parameter warning
---
 src/lib/elementary/efl_ui_focus_manager_sub.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lib/elementary/efl_ui_focus_manager_sub.c 
b/src/lib/elementary/efl_ui_focus_manager_sub.c
index eb197bad2f..86fdcea6b2 100644
--- a/src/lib/elementary/efl_ui_focus_manager_sub.c
+++ b/src/lib/elementary/efl_ui_focus_manager_sub.c
@@ -36,7 +36,7 @@ _register(Efl_Ui_Focus_Manager *obj, Efl_Ui_Focus_Manager 
*par_m, Efl_Ui_Focus_O
 }
 
 static void
-_unregister(Efl_Ui_Focus_Manager *obj, Efl_Ui_Focus_Manager *par_m, 
Efl_Ui_Focus_Object *node)
+_unregister(Efl_Ui_Focus_Manager *obj EINA_UNUSED, Efl_Ui_Focus_Manager 
*par_m, Efl_Ui_Focus_Object *node)
 {
efl_ui_focus_manager_calc_unregister(par_m, node);
 }

-- 




[EGIT] [core/efl] master 01/05: textpath: correct data gets from path

2017-09-04 Thread Thiep Ha
thiep pushed a commit to branch master.

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

commit b55cb4feb1c35a0a6b31ac1ccbadc76432f581bc
Author: Thiep Ha <thie...@gmail.com>
Date:   Tue Sep 5 11:55:07 2017 +0900

textpath: correct data gets from path

values of px0, py0 should be stored from previous command.
---
 src/lib/elementary/efl_ui_textpath.c | 10 ++
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/src/lib/elementary/efl_ui_textpath.c 
b/src/lib/elementary/efl_ui_textpath.c
index eb82a45435..ec0a6a56c7 100644
--- a/src/lib/elementary/efl_ui_textpath.c
+++ b/src/lib/elementary/efl_ui_textpath.c
@@ -311,11 +311,10 @@ _path_data_get(Eo *obj, Efl_Ui_Textpath_Data *pd, 
Eina_Bool set_min)
  {
 int pos = -1;
 Eina_Rectangle *rect = eina_rectangle_new(0, 0, 0, 0);
+double px0 = 0.0, py0 = 0.0, ctrl_x0, ctrl_y0, ctrl_x1, ctrl_y1, px1, 
py1;
 
 while (*cmd != EFL_GFX_PATH_COMMAND_TYPE_END)
   {
- double px0 = 0.0, py0 = 0.0, ctrl_x0, ctrl_y0, ctrl_x1, ctrl_y1, 
px1, py1;
-
  if (*cmd == EFL_GFX_PATH_COMMAND_TYPE_MOVE_TO)
{
   pos++;
@@ -327,6 +326,7 @@ _path_data_get(Eo *obj, Efl_Ui_Textpath_Data *pd, Eina_Bool 
set_min)
{
   Eina_Bezier bz;
   double bx, by, bw, bh;
+  Eina_Rectangle *brect;
 
   pos++;
   ctrl_x0 = points[pos] + x;
@@ -361,12 +361,14 @@ _path_data_get(Eo *obj, Efl_Ui_Textpath_Data *pd, 
Eina_Bool set_min)
   py0 = py1;
 
   eina_bezier_bounds_get(, , , , );
-  Eina_Rectangle *brect = eina_rectangle_new(bx, by, bw, bh);
+  brect = eina_rectangle_new(bx, by, bw, bh);
   eina_rectangle_union(rect, brect);
   eina_rectangle_free(brect);
}
  else if (*cmd == EFL_GFX_PATH_COMMAND_TYPE_LINE_TO)
{
+  Eina_Rectangle *lrect;
+
   pos++;
   px1 = points[pos] + x;
   pos++;
@@ -388,7 +390,7 @@ _path_data_get(Eo *obj, Efl_Ui_Textpath_Data *pd, Eina_Bool 
set_min)
   pd->segments = eina_inlist_append(pd->segments, 
EINA_INLIST_GET(seg));
   pd->total_length += seg->length;
 
-  Eina_Rectangle *lrect = eina_rectangle_new(px0, py0, px1 - 
px0, py1 - py0);
+  lrect = eina_rectangle_new(px0, py0, px1 - px0, py1 - py0);
   eina_rectangle_union(rect, lrect);
   eina_rectangle_free(lrect);
}

-- 




[EGIT] [core/efl] master 03/05: textpath: remove legacy api support

2017-09-04 Thread Thiep Ha
thiep pushed a commit to branch master.

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

commit 54d1cc38a125e786311d103babd6dd366eea5656
Author: Thiep Ha <thie...@gmail.com>
Date:   Tue Sep 5 12:07:38 2017 +0900

textpath: remove legacy api support
---
 src/lib/elementary/efl_ui_textpath.c  | 8 
 src/lib/elementary/efl_ui_textpath.eo | 2 --
 2 files changed, 10 deletions(-)

diff --git a/src/lib/elementary/efl_ui_textpath.c 
b/src/lib/elementary/efl_ui_textpath.c
index 2931995336..0ed45e8500 100644
--- a/src/lib/elementary/efl_ui_textpath.c
+++ b/src/lib/elementary/efl_ui_textpath.c
@@ -13,9 +13,7 @@
 
 
 #define MY_CLASS EFL_UI_TEXTPATH_CLASS
-
 #define MY_CLASS_NAME "Efl.Ui.Textpath"
-#define MY_CLASS_NAME_LEGACY "elm_textpath"
 
 #define SLICE_DEFAULT_NO 99
 
@@ -500,12 +498,6 @@ _efl_ui_textpath_efl_canvas_group_group_add(Eo *obj, 
Efl_Ui_Textpath_Data *priv)
efl_event_callback_add(obj, EFL_GFX_PATH_EVENT_CHANGED, _path_changed_cb, 
obj);
 }
 
-EOLIAN static void
-_efl_ui_textpath_class_constructor(Efl_Class *klass)
-{
-   evas_smart_legacy_type_register(MY_CLASS_NAME_LEGACY, klass);
-}
-
 EOLIAN static Efl_Object *
 _efl_ui_textpath_efl_object_constructor(Eo *obj, Efl_Ui_Textpath_Data *pd)
 {
diff --git a/src/lib/elementary/efl_ui_textpath.eo 
b/src/lib/elementary/efl_ui_textpath.eo
index a48a4bce1c..9c8faf9344 100644
--- a/src/lib/elementary/efl_ui_textpath.eo
+++ b/src/lib/elementary/efl_ui_textpath.eo
@@ -7,7 +7,6 @@ enum Efl.Ui.Textpath.Direction {
 class Efl.Ui.Textpath (Efl.Ui.Layout, Efl.Object, Efl.Text, Efl.Gfx.Path)
 {
[[Efl Ui Textpath class]]
-   legacy_prefix: elm_textpath;
methods {
   circle_set {
  [[Set a circle with given center, radius, and start angle.]]
@@ -47,7 +46,6 @@ class Efl.Ui.Textpath (Efl.Ui.Layout, Efl.Object, Efl.Text, 
Efl.Gfx.Path)
   }
}
implements {
-  class.constructor;
   Efl.Object.constructor;
   Efl.Object.destructor;
   Efl.Canvas.Group.group_calculate;

-- 




[EGIT] [core/efl] master 01/01: Introduce text on path widget

2017-08-29 Thread Thiep Ha
thiep pushed a commit to branch master.

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

commit b0d185ac127297f5dd73cb8b58966fd0256611d7
Author: Thiep Ha <thie...@gmail.com>
Date:   Tue Aug 29 19:04:15 2017 +0900

Introduce text on path widget

Text on path (textpath) allows application to make text follow a path.
The path can be a efl_gfx_path or a circle.

Thank hermet for initializing this work.

@feature
---
 data/elementary/themes/Makefile.am |   1 +
 data/elementary/themes/default.edc |   2 +
 data/elementary/themes/edc/elm/textpath.edc|  24 +
 src/Makefile_Elementary.am |   4 +
 src/bin/elementary/test.c  |   2 +
 src/bin/elementary/test_ui_textpath.c  | 183 ++
 src/lib/elementary/Elementary.h|   1 +
 src/lib/elementary/efl_ui_textpath.c   | 673 +
 src/lib/elementary/efl_ui_textpath.eo  |  59 ++
 .../elementary/efl_ui_textpath_internal_part.eo|   8 +
 10 files changed, 957 insertions(+)

diff --git a/data/elementary/themes/Makefile.am 
b/data/elementary/themes/Makefile.am
index d7632d7641..ab354a0e9c 100644
--- a/data/elementary/themes/Makefile.am
+++ b/data/elementary/themes/Makefile.am
@@ -146,6 +146,7 @@ elementary/themes/edc/elm/separator.edc \
 elementary/themes/edc/elm/slider.edc \
 elementary/themes/edc/elm/slideshow.edc \
 elementary/themes/edc/elm/spinner.edc \
+elementary/themes/edc/elm/textpath.edc \
 elementary/themes/edc/elm/thumb.edc \
 elementary/themes/edc/elm/toolbar.edc \
 elementary/themes/edc/elm/tooltip.edc \
diff --git a/data/elementary/themes/default.edc 
b/data/elementary/themes/default.edc
index 936df6b321..2a28c4a647 100644
--- a/data/elementary/themes/default.edc
+++ b/data/elementary/themes/default.edc
@@ -74,6 +74,8 @@ collections {
 #include "edc/elm/cursor.edc"
 #include "edc/elm/code.edc"
 #include "edc/elm/ews.edc"
+#include "edc/elm/textpath.edc"
+
 
 // desktop in general
 #include "edc/wallpaper.edc"
diff --git a/data/elementary/themes/edc/elm/textpath.edc 
b/data/elementary/themes/edc/elm/textpath.edc
new file mode 100644
index 00..17c2baa4f9
--- /dev/null
+++ b/data/elementary/themes/edc/elm/textpath.edc
@@ -0,0 +1,24 @@
+group { name: "elm/textpath/base/default";
+   styles {
+  style { name: "textpath_style";
+ base: "font="FN" font_size=16 text_class=tb_plain wrap=none 
align=left color=# style=shadow,bottom shadow_color=#0080";
+ tag: "br" "\n";
+ tag: "b" "+ font="FNBD" text_class=tb_light";
+ ENABLED_TEXTBLOCK_TAGS
+  }
+   }
+   parts {
+  part { name: "elm.text";
+ type: TEXTBLOCK;
+ scale: 1;
+ description { state: "default" 0.0;
+align: 0.0 0.0;
+text {
+   style: "textpath_style";
+   min: 0 1;
+   align: 0.0 0.5;
+}
+ }
+  }
+   }
+}
diff --git a/src/Makefile_Elementary.am b/src/Makefile_Elementary.am
index a99b24d37e..ad50ab466b 100644
--- a/src/Makefile_Elementary.am
+++ b/src/Makefile_Elementary.am
@@ -133,6 +133,8 @@ elm_public_eolian_files = \
lib/elementary/efl_ui_focus_manager_root_focus.eo \
lib/elementary/efl_ui_focus_object.eo \
lib/elementary/efl_ui_focus_user.eo \
+   lib/elementary/efl_ui_textpath.eo \
+   lib/elementary/efl_ui_textpath_internal_part.eo \
$(NULL)
 
 # Private classes (not exposed or shipped)
@@ -690,6 +692,7 @@ lib_elementary_libelementary_la_SOURCES = \
lib/elementary/efl_ui_focus_manager_sub.c \
lib/elementary/efl_ui_focus_object.c \
lib/elementary/efl_ui_focus_manager_root_focus.c \
+   lib/elementary/efl_ui_textpath.c \
$(NULL)
 
 
@@ -860,6 +863,7 @@ bin/elementary/test_transit_bezier.c \
 bin/elementary/test_ui_box.c \
 bin/elementary/test_ui_clock.c \
 bin/elementary/test_ui_grid.c \
+bin/elementary/test_ui_textpath.c \
 bin/elementary/test_video.c \
 bin/elementary/test_weather.c \
 bin/elementary/test_web.c \
diff --git a/src/bin/elementary/test.c b/src/bin/elementary/test.c
index 85b7b58318..4e8f76e539 100644
--- a/src/bin/elementary/test.c
+++ b/src/bin/elementary/test.c
@@ -316,6 +316,7 @@ void test_gfx_filters(void *data, Evas_Object *obj, void 
*event_info);
 void test_evas_snapshot(void *data, Evas_Object *obj, void *event_info);
 void test_evas_map(void *data, Edje_Object *obj, void *event_info);
 void test_efl_gfx_map(void *data, Edje_Object *obj, void *event_info);
+void test_ui_textpath(void *data, Edje_Object *obj, void *event_info);
 
 Evas_Object *win, *tbx; // TODO: refactoring
 void *tt;
@@ -970,6 +971,7 @@ add_tests:
ADD_

[EGIT] [core/efl] master 01/02: ui.box: Add handling for weight + align

2017-08-16 Thread Thiep Ha
thiep pushed a commit to branch master.

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

commit 5ab5d823fa34dc94b3c4a179c24bb624ecc8e686
Author: Thiep Ha <thie...@gmail.com>
Date:   Thu Aug 17 07:56:23 2017 +0900

ui.box: Add handling for weight + align

Issue: If the item has weight and non-filled align, item is not resized.
This patch fixes this issue.
Test: elementary_test -> ui.box -> Equal weight. Buttons Btn1, BtnA, B, C
do not resize when resize the window.

ref T5487
---
 src/lib/elementary/efl_ui_box_layout.c | 10 --
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/src/lib/elementary/efl_ui_box_layout.c 
b/src/lib/elementary/efl_ui_box_layout.c
index aa0e5e5c69..0fa88bcd0f 100644
--- a/src/lib/elementary/efl_ui_box_layout.c
+++ b/src/lib/elementary/efl_ui_box_layout.c
@@ -218,7 +218,10 @@ _efl_ui_box_custom_layout(Efl_Ui_Box *ui_box, 
Evas_Object_Box_Data *bd)
   }
 else
   {
- w = item->want[0] - item->pad[0] - item->pad[1];
+ if (horiz && item->weight[0] > 0)
+   w = cw - item->pad[0] - item->pad[1];
+ else
+   w = item->want[0] - item->pad[0] - item->pad[1];
  x = cx + ((cw - w) * item->align[0]) + item->pad[0];
   }
 
@@ -242,7 +245,10 @@ _efl_ui_box_custom_layout(Efl_Ui_Box *ui_box, 
Evas_Object_Box_Data *bd)
   }
 else
   {
- h = item->want[1] - item->pad[2] - item->pad[3];
+ if (!horiz && item->weight[1] > 0)
+   h = ch - item->pad[2] - item->pad[3];
+ else
+   h = item->want[1] - item->pad[2] - item->pad[3];
  y = cy + ((ch - h) * item->align[1]) + item->pad[2];
   }
 

-- 




[EGIT] [core/efl] master 02/02: ui.box: add aspect ratio support

2017-08-16 Thread Thiep Ha
thiep pushed a commit to branch master.

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

commit 7d5e5f749e2ee94c98536f16fcf5c80ed30f04fa
Author: Thiep Ha <thie...@gmail.com>
Date:   Thu Aug 17 09:53:30 2017 +0900

ui.box: add aspect ratio support

Adding support for aspect ratio.

ref T5487
---
 src/bin/elementary/test_ui_box.c   |   2 +
 src/lib/elementary/efl_ui_box_layout.c | 220 ++---
 2 files changed, 180 insertions(+), 42 deletions(-)

diff --git a/src/bin/elementary/test_ui_box.c b/src/bin/elementary/test_ui_box.c
index 517450fd93..fdf768e9e8 100644
--- a/src/bin/elementary/test_ui_box.c
+++ b/src/bin/elementary/test_ui_box.c
@@ -506,6 +506,7 @@ test_ui_box(void *data EINA_UNUSED, Evas_Object *obj 
EINA_UNUSED, void *event_in
objects[i++] = o = elm_button_add(win);
elm_object_text_set(o, "Min size");
efl_gfx_size_hint_align_set(o, 0.5, 1.0);
+   efl_gfx_size_hint_aspect_set(o, EFL_GFX_SIZE_HINT_ASPECT_BOTH, 1, 1);
efl_pack(bx, o);
efl_gfx_visible_set(o, 1);
 
@@ -531,6 +532,7 @@ test_ui_box(void *data EINA_UNUSED, Evas_Object *obj 
EINA_UNUSED, void *event_in
 
objects[i++] = o = elm_button_add(win);
elm_object_text_set(o, "BtnA");
+   efl_gfx_size_hint_aspect_set(o, EFL_GFX_SIZE_HINT_ASPECT_BOTH, 1, 2);
efl_pack(bx, o);
efl_gfx_visible_set(o, 1);
 
diff --git a/src/lib/elementary/efl_ui_box_layout.c 
b/src/lib/elementary/efl_ui_box_layout.c
index 0fa88bcd0f..8d3e1ccd83 100644
--- a/src/lib/elementary/efl_ui_box_layout.c
+++ b/src/lib/elementary/efl_ui_box_layout.c
@@ -15,6 +15,8 @@ struct _Item_Calc
int max[2];
int pad[4];
int want[2];
+   Efl_Gfx_Size_Hint_Aspect aspect_type;
+   int aspect[2];
int id;
 };
 
@@ -78,6 +80,53 @@ _efl_ui_box_custom_layout(Efl_Ui_Box *ui_box, 
Evas_Object_Box_Data *bd)
 efl_gfx_size_hint_margin_get(o, >pad[0], >pad[1], 
>pad[2], >pad[3]);
 efl_gfx_size_hint_max_get(o, >max[0], >max[1]);
 efl_gfx_size_hint_combined_min_get(o, >want[0], >want[1]);
+efl_gfx_size_hint_aspect_get(o, >aspect_type, >aspect[0], 
>aspect[1]);
+
+if (item->aspect[0] <= 0 || item->aspect[1] <= 0)
+  {
+ if (item->aspect_type >= EFL_GFX_SIZE_HINT_ASPECT_HORIZONTAL)
+   ERR("Invalid aspect parameter for obj: %p", item->obj);
+ item->aspect[0] = item->aspect[1] = 0;
+ item->aspect_type = EFL_GFX_SIZE_HINT_ASPECT_NONE;
+  }
+
+if (item->aspect_type >= EFL_GFX_SIZE_HINT_ASPECT_HORIZONTAL)
+  {
+ double w, h;
+
+ w = item->want[0];
+ h = w * item->aspect[1] / item->aspect[0];
+ if (h < item->want[1])
+   {
+  h = item->want[1];
+  w = h * item->aspect[0] / item->aspect[1];
+   }
+
+ if (horiz)
+   {
+  if ((item->align[1] < 0) && (h < boxh))
+{
+   double w1, h1;
+   h1 = item->max[1] > 0 ? MIN(boxh, item->max[1]) : boxh;
+   h1 = MAX(h, h1);
+   w1 = h1 * item->aspect[0] / item->aspect[1];
+   w = item->max[0] > 0 ? MIN(w1, item->max[0]) : w1;
+}
+   }
+ else
+   {
+  if ((item->align[0] < 0) && (w < boxw))
+{
+   double w1, h1;
+   w1 = item->max[0] > 0 ? MIN(boxw, item->max[0]) : boxw;
+   w1 = MAX(w, w1);
+   h1 = w1 * item->aspect[1] / item->aspect[0];
+   h = item->max[1] > 0 ? MIN(h1, item->max[1]) : h1;
+}
+   }
+ item->want[0] = w;
+ item->want[1] = h;
+  }
 
 if (item->weight[0] < 0) item->weight[0] = 0;
 if (item->weight[1] < 0) item->weight[1] = 0;
@@ -90,8 +139,8 @@ _efl_ui_box_custom_layout(Efl_Ui_Box *ui_box, 
Evas_Object_Box_Data *bd)
 if (item->want[0] < 0) item->want[0] = 0;
 if (item->want[1] < 0) item->want[1] = 0;
 
-if (item->max[0] <= 0) item->max[0] = INT_MAX;
-if (item->max[1] <= 0) item->max[1] = INT_MAX;
+if (item->max[0] < 0) item->max[0] = INT_MAX;
+if (item->max[1] < 0) item->max[1] = INT_MAX;
 if (item->max[0] < item->want[0]) item->max[0] = item->want[0];
 if (item->max[1] < item->want[1]) item->max[1] = item->want[1];
 
@@ -198,58 +247,145 @@ _efl_ui_box_custom_layout(Efl_Ui_Box *u

[EGIT] [core/efl] master 01/01: common3d: correct converting number to float

2017-08-10 Thread Thiep Ha
thiep pushed a commit to branch master.

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

commit 92c26078c779343df12e8bf0f6b2ccc6ef645cb9
Author: Thiep Ha <thie...@gmail.com>
Date:   Fri Aug 11 14:17:58 2017 +0900

common3d: correct converting number to float
---
 src/lib/evas/common3d/primitives/solids_of_revolution/cone.c | 2 +-
 src/lib/evas/common3d/primitives/solids_of_revolution/cylinder.c | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/lib/evas/common3d/primitives/solids_of_revolution/cone.c 
b/src/lib/evas/common3d/primitives/solids_of_revolution/cone.c
index 1a27630c21..a2852bb374 100644
--- a/src/lib/evas/common3d/primitives/solids_of_revolution/cone.c
+++ b/src/lib/evas/common3d/primitives/solids_of_revolution/cone.c
@@ -53,7 +53,7 @@ _set_default_cone(Evas_Canvas3D_Mesh *mesh,
  tangents[num].z = 0.0;
 
  tex_coord[num].x = i / (float)(vccount - 1) * tex_scale.x;
- tex_coord[num].y = (float)((j + 1) / 2) * tex_scale.y / 2.0;
+ tex_coord[num].y = ((j + 1) / 2.0) * tex_scale.y / 2.0;
   }
  }
 
diff --git a/src/lib/evas/common3d/primitives/solids_of_revolution/cylinder.c 
b/src/lib/evas/common3d/primitives/solids_of_revolution/cylinder.c
index 5b6e593783..fc0d3d1d92 100644
--- a/src/lib/evas/common3d/primitives/solids_of_revolution/cylinder.c
+++ b/src/lib/evas/common3d/primitives/solids_of_revolution/cylinder.c
@@ -26,7 +26,7 @@ _set_default_cylinder(Evas_Canvas3D_Mesh *mesh,
   {
  num = i + j * vccount;
 
- vertices[num].z = -0.5 + (float)(j / 3);
+ vertices[num].z = -0.5 + j / 3.0;
  if ((j == 0) || (j == 5))
{
   vertices[num].x = vertices[num].y = 0.0;
@@ -46,7 +46,7 @@ _set_default_cylinder(Evas_Canvas3D_Mesh *mesh,
  else
{
   normals[num].x = normals[num].y = 0.0;
-  normals[num].z = -1.0 + (float)(j / 2);
+  normals[num].z = -1.0 + j / 2.0;
}
 
  tangents[num].x = cosfi;
@@ -54,7 +54,7 @@ _set_default_cylinder(Evas_Canvas3D_Mesh *mesh,
  tangents[num].z = 0.0;
 
  tex_coord[num].x = i / (float)(vccount - 1) * tex_scale.x;
- tex_coord[num].y = (float)((j + 1) / 2) * tex_scale.y / 3.0;
+ tex_coord[num].y = ((j + 1) / 2.0) * tex_scale.y / 3.0;
   }
  }
 

-- 




[EGIT] [core/efl] master 01/01: elm config: add more NULL check

2017-06-13 Thread Thiep Ha
thiep pushed a commit to branch master.

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

commit 5f2e4b9197cb96184c8e8acde10b5d8da8ac8662
Author: Thiep Ha <thie...@gmail.com>
Date:   Wed Jun 14 10:40:27 2017 +0900

elm config: add more NULL check

Add NULL check when we cannot allocate memory.
---
 src/lib/elementary/elm_config.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/lib/elementary/elm_config.c b/src/lib/elementary/elm_config.c
index 1d24f17346..f6bc5a8ee6 100644
--- a/src/lib/elementary/elm_config.c
+++ b/src/lib/elementary/elm_config.c
@@ -1023,6 +1023,7 @@ _elm_config_font_overlay_set(const char*text_class,
 
/* the text class doesn't exist */
efd = calloc(1, sizeof(Elm_Font_Overlay));
+   if (!efd) return;
efd->text_class = eina_stringshare_add(text_class);
efd->font = eina_stringshare_add(font);
efd->size = size;
@@ -1287,6 +1288,7 @@ _elm_config_color_set(const char *palette_name,
   continue;
 
 color = calloc(1, sizeof(Elm_Color_RGBA));
+if (!color) continue;
 color->r = r;
 color->g = g;
 color->b = b;
@@ -3753,7 +3755,7 @@ _translation_init(void)
 * en_/C where translating only parts of the interface make some
 * sense).
 */
-   if (msg_locale)
+   if (msg_locale && cur_dom)
  _elm_config->translate = !(strcmp (cur_dom, "messages") &&
!*trans_comment && strncmp (msg_locale, "en_", 3) &&
strcmp (msg_locale, "C"));

-- 




[EGIT] [core/efl] master 01/01: map: add more checking on input and memory allocation

2017-06-08 Thread Thiep Ha
thiep pushed a commit to branch master.

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

commit b1d287bbf2f1b7edd4404db93a9365d33a08835c
Author: Thiep Ha <thie...@gmail.com>
Date:   Thu Jun 8 19:22:46 2017 +0900

map: add more checking on input and memory allocation

More checking on input parameter and memory allocation
when set number of map points.
Thanks jp.
---
 src/lib/evas/canvas/efl_gfx_map.c | 26 --
 src/lib/evas/canvas/evas_map.c|  2 +-
 2 files changed, 21 insertions(+), 7 deletions(-)

diff --git a/src/lib/evas/canvas/efl_gfx_map.c 
b/src/lib/evas/canvas/efl_gfx_map.c
index 8577ebfbf3..60672c7224 100644
--- a/src/lib/evas/canvas/efl_gfx_map.c
+++ b/src/lib/evas/canvas/efl_gfx_map.c
@@ -175,8 +175,7 @@ _efl_gfx_map_efl_object_destructor(Eo *eo_obj, 
Efl_Gfx_Map_Data *pd)
if (pd->cow)
  {
 _map_ops_clean(eo_obj, pd);
-if (pd->cow->points)
-  free(pd->cow->points);
+free(pd->cow->points);
 eina_cow_free(gfx_map_cow, (const Eina_Cow_Data **) >cow);
  }
efl_destructor(efl_super(eo_obj, MY_CLASS));
@@ -528,7 +527,7 @@ _efl_gfx_map_map_point_count_set(Eo *eo_obj EINA_UNUSED, 
Efl_Gfx_Map_Data *pd, i
 {
Gfx_Map *mcow;
 
-   if (count % 4 != 0)
+   if ((count <= 0) || (count % 4 != 0))
  {
 ERR("Map point count (%d) should be multiples of 4", count);
 return;
@@ -536,11 +535,26 @@ _efl_gfx_map_map_point_count_set(Eo *eo_obj EINA_UNUSED, 
Efl_Gfx_Map_Data *pd, i
if (pd->cow->count == count) return;
 
mcow = MAPCOW_BEGIN(pd);
-   mcow->count = count;
if (mcow->points == NULL)
- mcow->points = calloc(1, count * sizeof(Gfx_Map_Point));
+ {
+mcow->points = calloc(1, count * sizeof(Gfx_Map_Point));
+if (mcow->points)
+  mcow->count = count;
+else
+  ERR("Failed to allocate memory with calloc");
+ }
else
- mcow->points = realloc(mcow->points, count * sizeof(Gfx_Map_Point));
+ {
+Gfx_Map_Point *ps = realloc(mcow->points, count * 
sizeof(Gfx_Map_Point));
+if (ps)
+  {
+ mcow->points = ps;
+ mcow->count = count;
+ memset(mcow->points, 0, count * sizeof(Gfx_Map_Point));
+  }
+else
+  ERR("Failed to allocate memory with realloc");
+ }
MAPCOW_END(mcow, pd);
 }
 
diff --git a/src/lib/evas/canvas/evas_map.c b/src/lib/evas/canvas/evas_map.c
index 8ccd4ec418..5dd5fc1d29 100644
--- a/src/lib/evas/canvas/evas_map.c
+++ b/src/lib/evas/canvas/evas_map.c
@@ -649,7 +649,7 @@ evas_object_map_get(const Evas_Object *eo_obj)
 EAPI Evas_Map *
 evas_map_new(int count)
 {
-   if (count % 4 != 0)
+   if ((count <= 0) || (count % 4 != 0))
  {
 ERR("map point count (%i) should be multiples of 4!", count);
 return NULL;

-- 




[EGIT] [core/efl] master 02/02: efl.gfx.map: support for map points as multiples of 4

2017-06-08 Thread Thiep Ha
thiep pushed a commit to branch master.

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

commit 829b9aacde72650b303502d2e2ffa632a226c5f1
Author: Thiep Ha <thie...@gmail.com>
Date:   Thu Jun 8 15:32:09 2017 +0900

efl.gfx.map: support for map points as multiples of 4

This patch adds support for map with more than 4 points.
However, we only support points with multiples of 4.
This also adds efl_gfx_map_point_count_set/get APIs to
set number of points.

@feature
---
 src/Makefile_Elementary.am|   1 +
 src/bin/elementary/test.c |   2 +
 src/bin/elementary/test_efl_gfx_map.c |  69 +++
 src/lib/evas/canvas/efl_gfx_map.c | 100 +++---
 src/lib/evas/canvas/efl_gfx_map.eo|  10 
 5 files changed, 161 insertions(+), 21 deletions(-)

diff --git a/src/Makefile_Elementary.am b/src/Makefile_Elementary.am
index cde70880d3..7103ae95fd 100644
--- a/src/Makefile_Elementary.am
+++ b/src/Makefile_Elementary.am
@@ -777,6 +777,7 @@ bin/elementary/test_entry_anchor2.c \
 bin/elementary/test_events.c \
 bin/elementary/test_evas_mask.c \
 bin/elementary/test_evas_map.c \
+bin/elementary/test_efl_gfx_map.c \
 bin/elementary/test_evas_snapshot.c \
 bin/elementary/test_external.c \
 bin/elementary/test_fileselector_button.c \
diff --git a/src/bin/elementary/test.c b/src/bin/elementary/test.c
index 554cdb2cd7..477cc58663 100644
--- a/src/bin/elementary/test.c
+++ b/src/bin/elementary/test.c
@@ -312,6 +312,7 @@ void test_evas_mask(void *data, Edje_Object *obj, void 
*event_info);
 void test_gfx_filters(void *data, Evas_Object *obj, void *event_info);
 void test_evas_snapshot(void *data, Evas_Object *obj, void *event_info);
 void test_evas_map(void *data, Edje_Object *obj, void *event_info);
+void test_efl_gfx_map(void *data, Edje_Object *obj, void *event_info);
 
 Evas_Object *win, *tbx; // TODO: refactoring
 void *tt;
@@ -1032,6 +1033,7 @@ add_tests:
ADD_TEST(NULL, "Evas", "Gfx Filters", test_gfx_filters);
ADD_TEST(NULL, "Evas", "Snapshot", test_evas_snapshot);
ADD_TEST(NULL, "Evas", "Map", test_evas_map);
+   ADD_TEST(NULL, "Evas", "Gfx Map", test_efl_gfx_map);
 
//--//
ADD_TEST(NULL, "Widgets Disable/Enable", "Box", test_box_disable);
diff --git a/src/bin/elementary/test_efl_gfx_map.c 
b/src/bin/elementary/test_efl_gfx_map.c
new file mode 100644
index 00..dc7084331f
--- /dev/null
+++ b/src/bin/elementary/test_efl_gfx_map.c
@@ -0,0 +1,69 @@
+#ifdef HAVE_CONFIG_H
+# include "elementary_config.h"
+#endif
+#include 
+
+static void
+_map_set(Evas_Object *obj)
+{
+   efl_gfx_map_reset(obj);
+   efl_gfx_map_point_count_set(obj, 8);
+   //1st rect
+   efl_gfx_map_coord_absolute_set(obj, 0, 100, 0, 0);
+   efl_gfx_map_coord_absolute_set(obj, 1, 200, 0, 0);
+   efl_gfx_map_coord_absolute_set(obj, 2, 200, 100, 0);
+   efl_gfx_map_coord_absolute_set(obj, 3, 100, 100, 0);
+   //2nd rect
+   efl_gfx_map_coord_absolute_set(obj, 4, 200, 0, 0);
+   efl_gfx_map_coord_absolute_set(obj, 5, 100, 200, 0);
+   efl_gfx_map_coord_absolute_set(obj, 6, 100, 300, 0);
+   efl_gfx_map_coord_absolute_set(obj, 7, 200, 100, 0);
+
+   //uv: 1st rect: uv: [0-1]
+   efl_gfx_map_uv_set(obj, 0, 0, 0);
+   efl_gfx_map_uv_set(obj, 1, 0.5, 0);
+   efl_gfx_map_uv_set(obj, 2, 0.5, 1);
+   efl_gfx_map_uv_set(obj, 3, 0, 1);
+   //uv: 2nd rect
+   efl_gfx_map_uv_set(obj, 4, 0.5, 0);
+   efl_gfx_map_uv_set(obj, 5, 1, 0);
+   efl_gfx_map_uv_set(obj, 6, 1, 1);
+   efl_gfx_map_uv_set(obj, 7, 0.5, 1);
+}
+
+static void
+_image_resize_cb(void *data EINA_UNUSED, Evas *e EINA_UNUSED, Evas_Object 
*obj, void *event_info EINA_UNUSED)
+{
+   _map_set(obj);
+}
+
+void
+test_efl_gfx_map(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
+  void *event_info EINA_UNUSED)
+{
+   const Evas_Coord W = 300, H = 300;
+   Evas_Object *win, *img;
+   char buf[PATH_MAX];
+
+   win = efl_add(EFL_UI_WIN_CLASS, NULL,
+ efl_text_set(efl_added, "Efl Gfx Map"),
+ efl_ui_win_autodel_set(efl_added, EINA_TRUE));
+
+   /* image with a min size */
+   snprintf(buf, sizeof(buf), "%s/images/rock_02.jpg", elm_app_data_dir_get());
+   img = efl_add(EFL_UI_IMAGE_CLASS, win,
+ efl_gfx_size_hint_align_set(efl_added, 
EFL_GFX_SIZE_HINT_FILL, EFL_GFX_SIZE_HINT_FILL),
+ efl_gfx_size_hint_weight_set(efl_added, 
EFL_GFX_SIZE_HINT_EXPAND, EFL_GFX_SIZE_HINT_EXPAND),
+ efl_gfx_size_hint_min_set(efl_added, 64, 64),
+ efl_file_set(efl_added, buf, NULL),
+ efl_gfx_visible_set(efl_added, EINA_TRUE));
+   efl_ui_image_scale_type_set(img, EFL_UI_IMAGE_SCALE_TYPE_FILL);
+   evas_object_event_callback_add(img, EVAS_CALLBACK_RESIZE,
+   

[EGIT] [core/efl] master 01/02: evas_map: support map with number of points as multiples of 4

2017-06-08 Thread Thiep Ha
thiep pushed a commit to branch master.

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

commit 4f77bb2f5af465eff7ebe0d7fa98347a2a624d2b
Author: Thiep Ha <thie...@gmail.com>
Date:   Thu Jun 8 15:11:21 2017 +0900

evas_map: support map with number of points as multiples of 4

Currently, in evas map, we only support map with 4 points.
This patch adds support for map with number of points as
multiples of 4.

@feature
---
 src/Makefile_Elementary.am |  1 +
 src/bin/elementary/test.c  |  2 +
 src/bin/elementary/test_evas_map.c | 77 ++
 src/lib/evas/canvas/evas_map.c |  4 +-
 src/modules/evas/engines/gl_common/evas_gl_image.c | 16 +++--
 .../evas/engines/software_generic/evas_engine.c|  8 +--
 6 files changed, 97 insertions(+), 11 deletions(-)

diff --git a/src/Makefile_Elementary.am b/src/Makefile_Elementary.am
index d4a17ea8ad..cde70880d3 100644
--- a/src/Makefile_Elementary.am
+++ b/src/Makefile_Elementary.am
@@ -776,6 +776,7 @@ bin/elementary/test_entry_anchor.c \
 bin/elementary/test_entry_anchor2.c \
 bin/elementary/test_events.c \
 bin/elementary/test_evas_mask.c \
+bin/elementary/test_evas_map.c \
 bin/elementary/test_evas_snapshot.c \
 bin/elementary/test_external.c \
 bin/elementary/test_fileselector_button.c \
diff --git a/src/bin/elementary/test.c b/src/bin/elementary/test.c
index 49869bf525..554cdb2cd7 100644
--- a/src/bin/elementary/test.c
+++ b/src/bin/elementary/test.c
@@ -311,6 +311,7 @@ void test_efl_ui_text_label(void *data, Evas_Object *obj, 
void *event_info);
 void test_evas_mask(void *data, Edje_Object *obj, void *event_info);
 void test_gfx_filters(void *data, Evas_Object *obj, void *event_info);
 void test_evas_snapshot(void *data, Evas_Object *obj, void *event_info);
+void test_evas_map(void *data, Edje_Object *obj, void *event_info);
 
 Evas_Object *win, *tbx; // TODO: refactoring
 void *tt;
@@ -1030,6 +1031,7 @@ add_tests:
ADD_TEST(NULL, "Evas", "Masking", test_evas_mask);
ADD_TEST(NULL, "Evas", "Gfx Filters", test_gfx_filters);
ADD_TEST(NULL, "Evas", "Snapshot", test_evas_snapshot);
+   ADD_TEST(NULL, "Evas", "Map", test_evas_map);
 
//--//
ADD_TEST(NULL, "Widgets Disable/Enable", "Box", test_box_disable);
diff --git a/src/bin/elementary/test_evas_map.c 
b/src/bin/elementary/test_evas_map.c
new file mode 100644
index 00..48f29e2227
--- /dev/null
+++ b/src/bin/elementary/test_evas_map.c
@@ -0,0 +1,77 @@
+#ifdef HAVE_CONFIG_H
+# include "elementary_config.h"
+#endif
+#include 
+
+static void
+_map_set(Evas_Object *obj, Evas_Coord w, Evas_Coord h)
+{
+   Evas_Map *map;
+
+   map = evas_map_new(8);
+   //1st rect
+   evas_map_point_coord_set(map, 0, 100, 0, 0);
+   evas_map_point_coord_set(map, 1, 200, 0, 0);
+   evas_map_point_coord_set(map, 2, 200, 100, 0);
+   evas_map_point_coord_set(map, 3, 100, 100, 0);
+   //2nd rect
+   evas_map_point_coord_set(map, 4, 200, 0, 0);
+   evas_map_point_coord_set(map, 5, 100, 200, 0);
+   evas_map_point_coord_set(map, 6, 100, 300, 0);
+   evas_map_point_coord_set(map, 7, 200, 100, 0);
+
+   //uv: 1st rect
+   evas_map_point_image_uv_set(map, 0, 0, 0);
+   evas_map_point_image_uv_set(map, 1, w / 2, 0);
+   evas_map_point_image_uv_set(map, 2, w / 2, h);
+   evas_map_point_image_uv_set(map, 3, 0, h);
+   //uv: 2nd rect
+   evas_map_point_image_uv_set(map, 4, w / 2, 0);
+   evas_map_point_image_uv_set(map, 5, w, 0);
+   evas_map_point_image_uv_set(map, 6, w, h);
+   evas_map_point_image_uv_set(map, 7, w / 2, h);
+
+   evas_object_map_enable_set(obj, EINA_TRUE);
+   evas_object_map_set(obj, map);
+   evas_map_free(map);
+}
+
+static void
+_image_resize_cb(void *data EINA_UNUSED, Evas *e EINA_UNUSED, Evas_Object 
*obj, void *event_info EINA_UNUSED)
+{
+   Evas_Coord w, h;
+
+   efl_gfx_geometry_get(obj, NULL, NULL, , );
+   _map_set(obj, w, h);
+}
+
+void
+test_evas_map(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
+  void *event_info EINA_UNUSED)
+{
+   const Evas_Coord W = 300, H = 300;
+   Evas_Object *win, *img;
+   char buf[PATH_MAX];
+
+   win = efl_add(EFL_UI_WIN_CLASS, NULL,
+ efl_text_set(efl_added, "Evas Map"),
+ efl_ui_win_autodel_set(efl_added, EINA_TRUE));
+
+   /* image with a min size */
+   snprintf(buf, sizeof(buf), "%s/images/rock_02.jpg", elm_app_data_dir_get());
+   img = efl_add(EFL_UI_IMAGE_CLASS, win,
+ efl_gfx_size_hint_align_set(efl_added, 
EFL_GFX_SIZE_HINT_FILL, EFL_GFX_SIZE_HINT_FILL),
+ efl_gfx_size_hint_weight_set(efl_added, 
EFL_GFX_SIZE_HINT_EXPAND, EFL_GFX_SIZE_HINT_EXPAND),
+ efl_gfx_size_hint_min_set(efl_added, 64, 64),
+  

[EGIT] [core/efl] master 01/01: edje_calc: remove redundant checking

2016-12-14 Thread Thiep Ha
thiep pushed a commit to branch master.

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

commit a94f30f1dc139a48fc9107d8dd060970854b7218
Author: Thiep Ha <thie...@gmail.com>
Date:   Wed Dec 14 17:59:40 2016 +0900

edje_calc: remove redundant checking

We check amin > ZERO && amax > ZERO, so no need to do it them again.
---
 src/lib/edje/edje_calc.c | 69 ++--
 1 file changed, 32 insertions(+), 37 deletions(-)

diff --git a/src/lib/edje/edje_calc.c b/src/lib/edje/edje_calc.c
index 251dad5..d355fde 100644
--- a/src/lib/edje/edje_calc.c
+++ b/src/lib/edje/edje_calc.c
@@ -1235,23 +1235,23 @@ _edje_part_recalc_single_aspect(Edje *ed,
case EDJE_ASPECT_PREFER_NONE:
  /* keep both dimensions in check */
  /* adjust for min aspect (width / height) */
- if ((amin > ZERO) && (aspect < amin))
+ if (aspect < amin)
{
   new_h = DIV(params->eval.w, amin);
   new_w = MUL(amin, params->eval.h);
}
  /* adjust for max aspect (width / height) */
- if ((amax > ZERO) && (aspect > amax))
+ if (aspect > amax)
{
   new_h = DIV(params->eval.w, amax);
   new_w = MUL(amax, params->eval.h);
}
- if ((amax > ZERO) && (new_w < params->eval.w))
+ if (new_w < params->eval.w)
{
   new_w = params->eval.w;
   new_h = DIV(params->eval.w, amax);
}
- if ((amax > ZERO) && (new_h < params->eval.h))
+ if (new_h < params->eval.h)
{
   new_w = MUL(amax, params->eval.h);
   new_h = params->eval.h;
@@ -1262,10 +1262,10 @@ _edje_part_recalc_single_aspect(Edje *ed,
case  EDJE_ASPECT_PREFER_VERTICAL:
  /* keep both dimensions in check */
  /* adjust for max aspect (width / height) */
- if ((amax > ZERO) && (aspect > amax))
+ if (aspect > amax)
new_w = MUL(amax, params->eval.h);
  /* adjust for min aspect (width / height) */
- if ((amin > ZERO) && (aspect < amin))
+ if (aspect < amin)
new_w = MUL(amin, params->eval.h);
  break;
 
@@ -1273,10 +1273,10 @@ _edje_part_recalc_single_aspect(Edje *ed,
case EDJE_ASPECT_PREFER_HORIZONTAL:
  /* keep both dimensions in check */
  /* adjust for max aspect (width / height) */
- if ((amax > ZERO) && (aspect > amax))
+ if (aspect > amax)
new_h = DIV(params->eval.w, amax);
  /* adjust for min aspect (width / height) */
- if ((amin > ZERO) && (aspect < amin))
+ if (aspect < amin)
new_h = DIV(params->eval.w, amin);
  break;
 
@@ -1284,13 +1284,13 @@ _edje_part_recalc_single_aspect(Edje *ed,
case EDJE_ASPECT_PREFER_BOTH:
  /* keep both dimensions in check */
  /* adjust for max aspect (width / height) */
- if ((amax > ZERO) && (aspect > amax))
+ if (aspect > amax)
{
   new_w = MUL(amax, params->eval.h);
   new_h = DIV(params->eval.w, amax);
}
  /* adjust for min aspect (width / height) */
- if ((amin > ZERO) && (aspect < amin))
+ if (aspect < amin)
{
   new_w = MUL(amin, params->eval.h);
   new_h = DIV(params->eval.w, amin);
@@ -1301,8 +1301,7 @@ _edje_part_recalc_single_aspect(Edje *ed,
  break;
   }
 
-if (!((amin > ZERO) && (amax > ZERO) &&
-  (apref == EDJE_ASPECT_PREFER_NONE)))
+if (apref != EDJE_ASPECT_PREFER_NONE)
   {
  if ((*maxw >= 0) && (new_w > FROM_INT(*maxw)))
new_w = FROM_INT(*maxw);
@@ -1318,38 +1317,34 @@ _edje_part_recalc_single_aspect(Edje *ed,
 /* do real adjustment */
 if (apref == EDJE_ASPECT_PREFER_BOTH)
   {
- if (amin == ZERO) amin = amax;
- if (amin != ZERO)
+ /* fix h and vary w */
+ if (new_w > params->eval.w)
{
-  /* fix h and vary w */
+  // params->w = new_w;
+  // EXCEEDS BOUNDS in W
+  new_h = DIV(params->eval.w, amin);
+  new_w = params->eval.w;
+  if (new_h > 

[EGIT] [core/efl] master 02/02: text/entry: add more key controls for os x

2016-09-23 Thread Thiep Ha
thiep pushed a commit to branch master.

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

commit cc7dbde8403965081ec5b5db17b1e3ef5b236f90
Author: Thiep Ha <thie...@gmail.com>
Date:   Fri Sep 23 17:51:37 2016 +0900

text/entry: add more key controls for os x

In OS X, cmd-c,v, ... keys are used instead of ctrl-c,v...,
this patch adapts these key handlings.
---
 src/lib/edje/edje_entry.c  | 39 ++
 .../elementary/efl_ui_internal_text_interactive.c  | 22 
 src/lib/elementary/efl_ui_text.c   |  4 +++
 src/lib/elementary/elm_code_widget.c   |  4 +++
 4 files changed, 69 insertions(+)

diff --git a/src/lib/edje/edje_entry.c b/src/lib/edje/edje_entry.c
index abf6638..495843a 100644
--- a/src/lib/edje/edje_entry.c
+++ b/src/lib/edje/edje_entry.c
@@ -1679,6 +1679,9 @@ _edje_key_down_cb(void *data, Evas *e EINA_UNUSED, 
Evas_Object *obj EINA_UNUSED,
Edje_Real_Part *rp = ed->focused_part;
Entry *en;
Eina_Bool control, alt, shift;
+#if defined(__APPLE__) && defined(__MACH__)
+   Eina_Bool super, altgr;
+#endif
Eina_Bool multiline;
Eina_Bool cursor_changed;
int old_cur_pos;
@@ -1712,6 +1715,10 @@ _edje_key_down_cb(void *data, Evas *e EINA_UNUSED, 
Evas_Object *obj EINA_UNUSED,
 
old_cur_pos = evas_textblock_cursor_pos_get(en->cursor);
 
+#if defined(__APPLE__) && defined(__MACH__)
+   super = evas_key_modifier_is_set(ev->modifiers, "Super");
+   altgr = evas_key_modifier_is_set(ev->modifiers, "AltGr");
+#endif
control = evas_key_modifier_is_set(ev->modifiers, "Control");
alt = evas_key_modifier_is_set(ev->modifiers, "Alt");
shift = evas_key_modifier_is_set(ev->modifiers, "Shift");
@@ -1824,8 +1831,12 @@ _edje_key_down_cb(void *data, Evas *e EINA_UNUSED, 
Evas_Object *obj EINA_UNUSED,
   }
 if (evas_textblock_cursor_char_prev(en->cursor))
   ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;
+#if defined(__APPLE__) && defined(__MACH__)
+if (altgr) evas_textblock_cursor_word_start(en->cursor);
+#else
 /* If control is pressed, go to the start of the word */
 if (control) evas_textblock_cursor_word_start(en->cursor);
+#endif
 if (en->select_allow)
   {
  if (shift) _sel_extend(ed, en->cursor, rp->object, en);
@@ -1861,7 +1872,11 @@ _edje_key_down_cb(void *data, Evas *e EINA_UNUSED, 
Evas_Object *obj EINA_UNUSED,
}
   }
 /* If control is pressed, go to the end of the word */
+#if defined(__APPLE__) && defined(__MACH__)
+if (altgr) evas_textblock_cursor_word_end(en->cursor);
+#else
 if (control) evas_textblock_cursor_word_end(en->cursor);
+#endif
 if (evas_textblock_cursor_char_next(en->cursor))
   ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;
 if (en->select_allow)
@@ -1990,14 +2005,22 @@ _edje_key_down_cb(void *data, Evas *e EINA_UNUSED, 
Evas_Object *obj EINA_UNUSED,
 _edje_emit(ed, "cursor,changed,manual", rp->part->name);
 ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;
  }
+#if defined(__APPLE__) && defined(__MACH__)
+   else if ((super) && (!shift) && (!strcmp(ev->keyname, "v")))
+#else
else if ((control) && (!shift) && (!strcmp(ev->keyname, "v")))
+#endif
  {
 _compose_seq_reset(en);
 _edje_emit(ed, "entry,paste,request", rp->part->name);
 _edje_emit(ed, "entry,paste,request,3", rp->part->name);
 ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;
  }
+#if defined(__APPLE__) && defined(__MACH__)
+   else if ((super) && (!strcmp(ev->keyname, "a")))
+#else
else if ((control) && (!strcmp(ev->keyname, "a")))
+#endif
  {
 _compose_seq_reset(en);
 if (shift)
@@ -2011,19 +2034,31 @@ _edje_key_down_cb(void *data, Evas *e EINA_UNUSED, 
Evas_Object *obj EINA_UNUSED,
  ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;
   }
  }
+#if defined(__APPLE__) && defined(__MACH__)
+   else if ((super) && (((!shift) && !strcmp(ev->keyname, "c")) || 
!strcmp(ev->key, "Insert")))
+#else
else if ((control) && (((!shift) && !strcmp(ev->keyname, "c")) || 
!strcmp(ev->key, "Insert")))
+#endif
  {
 _compose_seq_reset(en);
 _edje_emit(ed, "entry,copy,notify", rp->part->name);
 ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;
  }
+#if defined(__APPLE__) && defined(__MACH__)
+   else if ((super) && (!shift) && ((!strcmp(ev->keyname, "x") || 

[EGIT] [core/efl] master 01/02: ecore_cocoa: quit application with key

2016-09-23 Thread Thiep Ha
thiep pushed a commit to branch master.

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

commit db8b0020ecc761a6729049ceed1d9f68f528dbbb
Author: Thiep Ha <thie...@gmail.com>
Date:   Fri Sep 23 17:49:34 2016 +0900

ecore_cocoa: quit application with key

In OS X, cmd-q is used to quit application,
this patch adds that feature.
---
 src/lib/ecore_cocoa/ecore_cocoa.m | 12 
 1 file changed, 12 insertions(+)

diff --git a/src/lib/ecore_cocoa/ecore_cocoa.m 
b/src/lib/ecore_cocoa/ecore_cocoa.m
index ee1188d..2cf1739 100644
--- a/src/lib/ecore_cocoa/ecore_cocoa.m
+++ b/src/lib/ecore_cocoa/ecore_cocoa.m
@@ -202,6 +202,18 @@ _ecore_cocoa_feed_events(void *anEvent)
   case NSKeyDown:
 {
Ecore_Event_Key *ev;
+   NSUInteger flags = [event modifierFlags];
+
+   if (flags & NSCommandKeyMask)
+ {
+NSString *keychar = [event charactersIgnoringModifiers];
+if ([keychar characterAtIndex:0] == 'q')
+  {
+ [NSApp performSelector:@selector(terminate:)
+withObject:nil afterDelay:0.0];
+ return EINA_TRUE;
+  }
+ }
 
ev = _ecore_cocoa_event_key(event, NSKeyDown, time);
if (ev == NULL) return EINA_TRUE;

-- 




[EGIT] [core/efl] master 02/02: elm_config: add null check before usage

2016-09-21 Thread Thiep Ha
thiep pushed a commit to branch master.

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

commit 3689a803dbfe1297e706d2fbfde239d641652de1
Author: Thiep Ha <thie...@gmail.com>
Date:   Wed Sep 21 16:54:09 2016 +0900

elm_config: add null check before usage
---
 src/lib/elementary/elm_config.c | 7 ---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/lib/elementary/elm_config.c b/src/lib/elementary/elm_config.c
index af8394b..0fe52b8 100644
--- a/src/lib/elementary/elm_config.c
+++ b/src/lib/elementary/elm_config.c
@@ -3772,9 +3772,10 @@ _translation_init(void)
 * en_/C where translating only parts of the interface make some
 * sense).
 */
-   _elm_config->translate = !(strcmp (cur_dom, "messages") &&
- !*trans_comment && strncmp (msg_locale, "en_", 3) &&
- strcmp (msg_locale, "C"));
+   if (msg_locale)
+ _elm_config->translate = !(strcmp (cur_dom, "messages") &&
+   !*trans_comment && strncmp (msg_locale, "en_", 3) &&
+   strcmp (msg_locale, "C"));
/* Get RTL orientation from system */
if (_elm_config->translate)
  {

-- 




[EGIT] [core/efl] master 01/02: elm_atspi: remove redundant null checking

2016-09-21 Thread Thiep Ha
thiep pushed a commit to branch master.

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

commit 401706351d38cbfd6fa7e677af387400a888932a
Author: Thiep Ha <thie...@gmail.com>
Date:   Wed Sep 21 16:49:12 2016 +0900

elm_atspi: remove redundant null checking

The type is always _ADDED or _REMOVED, therefore atspi_desc
is always "add" or "remove"; no need to have null checking for it.
---
 src/lib/elementary/elm_atspi_bridge.c | 6 --
 1 file changed, 6 deletions(-)

diff --git a/src/lib/elementary/elm_atspi_bridge.c 
b/src/lib/elementary/elm_atspi_bridge.c
index fbb08a3..c6c1b77 100644
--- a/src/lib/elementary/elm_atspi_bridge.c
+++ b/src/lib/elementary/elm_atspi_bridge.c
@@ -3968,12 +3968,6 @@ _children_changed_signal_send(void *data, const 
Efl_Event *event)
 break;
 }
 
-   if (!atspi_desc)
- {
-efl_event_callback_stop(event->object);
-return;
- }
-
_bridge_signal_send(data, event->object, ATSPI_DBUS_INTERFACE_EVENT_OBJECT,

&_event_obj_signals[ATSPI_OBJECT_EVENT_CHILDREN_CHANGED], atspi_desc,
idx, 0, "(so)", 
eldbus_connection_unique_name_get(pd->a11y_bus), ev_data->child);

-- 




[EGIT] [core/efl] master 01/01: elm video: correct api

2016-08-15 Thread Thiep Ha
thiep pushed a commit to branch master.

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

commit fb1591064003951cab75665cc6e20355e3878030
Author: Thiep Ha <thie...@gmail.com>
Date:   Tue Aug 16 12:36:26 2016 +0900

elm video: correct api

The elm_videfl_add should be elm_video_add.
It was changed by commit e65aae994e72c1d3f8ac6b5360d3772f177b77ef.
This commit brings it back.
---
 src/bin/elementary/test_video.c  | 2 +-
 src/lib/elementary/efl_ui_video.c| 2 +-
 src/lib/elementary/efl_ui_video_legacy.h | 4 ++--
 src/lib/elementary/elm_removed.h | 2 +-
 src/tests/elementary/elm_test_video.c| 2 +-
 5 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/bin/elementary/test_video.c b/src/bin/elementary/test_video.c
index 60718ed..0dfca3e 100644
--- a/src/bin/elementary/test_video.c
+++ b/src/bin/elementary/test_video.c
@@ -30,7 +30,7 @@ test_video(void *data EINA_UNUSED, Evas_Object *obj 
EINA_UNUSED, void *event_inf
elm_win_resize_object_add(win, bg);
evas_object_show(bg);
 
-   video = elm_videfl_add(win);
+   video = elm_video_add(win);
evas_object_size_hint_weight_set(video, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_show(video);
 
diff --git a/src/lib/elementary/efl_ui_video.c 
b/src/lib/elementary/efl_ui_video.c
index 5acfb94..eb88146 100644
--- a/src/lib/elementary/efl_ui_video.c
+++ b/src/lib/elementary/efl_ui_video.c
@@ -272,7 +272,7 @@ _efl_ui_video_efl_canvas_group_group_del(Eo *obj, 
Efl_Ui_Video_Data *sd)
 }
 
 EAPI Evas_Object *
-elm_videfl_add(Evas_Object *parent)
+elm_video_add(Evas_Object *parent)
 {
EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
Evas_Object *obj = efl_add(MY_CLASS, parent);
diff --git a/src/lib/elementary/efl_ui_video_legacy.h 
b/src/lib/elementary/efl_ui_video_legacy.h
index e56e620..0cc087b 100644
--- a/src/lib/elementary/efl_ui_video_legacy.h
+++ b/src/lib/elementary/efl_ui_video_legacy.h
@@ -24,7 +24,7 @@ EAPI Evas_Object *elm_player_add(Evas_Object *parent);
  *
  * @ingroup Elm_Video
  */
-EAPI Evas_Object *elm_videfl_add(Evas_Object *parent);
+EAPI Evas_Object *elm_video_add(Evas_Object *parent);
 
 /**
  *
@@ -35,7 +35,7 @@ EAPI Evas_Object *elm_videfl_add(Evas_Object *parent);
  * This function will explicitly define a file or URI as a source
  * for the video of the Elm_Video object.
  *
- * @see elm_videfl_add()
+ * @see elm_video_add()
  * @see elm_player_add()
  *
  * @ingroup Elm_Video
diff --git a/src/lib/elementary/elm_removed.h b/src/lib/elementary/elm_removed.h
index 31dea66..2d0e0c2 100644
--- a/src/lib/elementary/elm_removed.h
+++ b/src/lib/elementary/elm_removed.h
@@ -3576,7 +3576,7 @@ EINA_DEPRECATED EAPI Eina_Bool
elm_toolbar_item_cursor_engine
  * the player itself.
  *
  * @see elm_player_add()
- * @see elm_videfl_add()
+ * @see elm_video_add()
  * @deprecated use elm_object_part_content_set() instead
  *
  */
diff --git a/src/tests/elementary/elm_test_video.c 
b/src/tests/elementary/elm_test_video.c
index 09944ee..f3b7fea 100644
--- a/src/tests/elementary/elm_test_video.c
+++ b/src/tests/elementary/elm_test_video.c
@@ -15,7 +15,7 @@ START_TEST (elm_atspi_role_get)
elm_init(1, NULL);
win = elm_win_add(NULL, "video", ELM_WIN_BASIC);
 
-   video = elm_videfl_add(win);
+   video = elm_video_add(win);
role = elm_interface_atspi_accessible_role_get(video);
 
ck_assert(role == ELM_ATSPI_ROLE_ANIMATION);

-- 




[EGIT] [core/efl] master 01/01: elementary: change cursor types for cocoa

2016-07-21 Thread Thiep Ha
thiep pushed a commit to branch master.

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

commit b72214ab039cc408c87aeeae131540879471c0ac
Author: Thiep Ha <thie...@gmail.com>
Date:   Fri Jul 22 13:27:22 2016 +0900

elementary: change cursor types for cocoa

Map more cursor types for cocoa.
Fix T3352
---
 src/lib/elementary/els_cursor.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/lib/elementary/els_cursor.c b/src/lib/elementary/els_cursor.c
index a7e9c19..a2d6b7a 100644
--- a/src/lib/elementary/els_cursor.c
+++ b/src/lib/elementary/els_cursor.c
@@ -71,7 +71,7 @@ static struct _Cursor_Id _cursors[] =
CURSOR(ELM_CURSOR_DRAFT_SMALL, DRAFT_SMALL, 
ECORE_COCOA_CURSOR_DEFAULT),
CURSOR(ELM_CURSOR_DRAPED_BOX , DRAPED_BOX , 
ECORE_COCOA_CURSOR_DEFAULT),
CURSOR(ELM_CURSOR_EXCHANGE   , EXCHANGE   , 
ECORE_COCOA_CURSOR_DEFAULT),
-   CURSOR(ELM_CURSOR_FLEUR  , FLEUR  , 
ECORE_COCOA_CURSOR_DEFAULT),
+   CURSOR(ELM_CURSOR_FLEUR  , FLEUR  , 
ECORE_COCOA_CURSOR_CLOSED_HAND),
CURSOR(ELM_CURSOR_GOBBLER, GOBBLER, 
ECORE_COCOA_CURSOR_DEFAULT),
CURSOR(ELM_CURSOR_GUMBY  , GUMBY  , 
ECORE_COCOA_CURSOR_DEFAULT),
CURSOR(ELM_CURSOR_HAND1  , HAND1  , 
ECORE_COCOA_CURSOR_POINTING_HAND),
@@ -114,8 +114,8 @@ static struct _Cursor_Id _cursors[] =
CURSOR(ELM_CURSOR_TOP_LEFT_ARROW , TOP_LEFT_ARROW , 
ECORE_COCOA_CURSOR_DEFAULT),
CURSOR(ELM_CURSOR_TOP_LEFT_CORNER, TOP_LEFT_CORNER, 
ECORE_COCOA_CURSOR_DEFAULT),
CURSOR(ELM_CURSOR_TOP_RIGHT_CORNER   , TOP_RIGHT_CORNER   , 
ECORE_COCOA_CURSOR_DEFAULT),
-   CURSOR(ELM_CURSOR_TOP_SIDE   , TOP_SIDE   , 
ECORE_COCOA_CURSOR_DEFAULT),
-   CURSOR(ELM_CURSOR_TOP_TEE, TOP_TEE, 
ECORE_COCOA_CURSOR_DEFAULT),
+   CURSOR(ELM_CURSOR_TOP_SIDE   , TOP_SIDE   , 
ECORE_COCOA_CURSOR_RESIZE_UP),
+   CURSOR(ELM_CURSOR_TOP_TEE, TOP_TEE, 
ECORE_COCOA_CURSOR_RESIZE_UP),
CURSOR(ELM_CURSOR_TREK   , TREK   , 
ECORE_COCOA_CURSOR_DEFAULT),
CURSOR(ELM_CURSOR_UL_ANGLE   , UL_ANGLE   , 
ECORE_COCOA_CURSOR_DEFAULT),
CURSOR(ELM_CURSOR_UMBRELLA   , UMBRELLA   , 
ECORE_COCOA_CURSOR_DEFAULT),

-- 




[EGIT] [tools/enventor] master 01/01: correct returned value of focus_get function.

2016-07-21 Thread Thiep Ha
thiep pushed a commit to branch master.

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

commit 5d1cec3e7b73c2228ae762e3c81b937bdc3d966c
Author: Thiep Ha <haminhth...@gmail.com>
Date:   Fri Jul 22 11:46:23 2016 +0900

correct returned value of focus_get function.

Function eventor_object_focus_get needs to return
Eina_Bool value.
---
 src/lib/enventor_smart.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lib/enventor_smart.c b/src/lib/enventor_smart.c
index 47427b1..83747e2 100644
--- a/src/lib/enventor_smart.c
+++ b/src/lib/enventor_smart.c
@@ -672,7 +672,7 @@ _enventor_object_focus_set(Eo *obj EINA_UNUSED,
 EOLIAN static Eina_Bool
 _enventor_object_focus_get(Eo *obj EINA_UNUSED, Enventor_Object_Data *pd)
 {
-   if (!pd->focused_it) return;
+   if (!pd->focused_it) return EINA_FALSE;
return edit_focus_get(pd->focused_it->ed);
 }
 

-- 




Re: [E-devel] [EGIT] [core/efl] master 02/08: elm dnd/wl: add types' notify handler

2016-05-11 Thread Thiep Ha
Hello

> On May 11, 2016, at 8:14 AM, Thiep Ha <thie...@gmail.com> wrote:
> 
> Hello,
> 
>>> On May 11, 2016, at 3:08 AM, Mike Blumenkrantz 
>>> <michael.blumenkra...@gmail.com> wrote:
>>> 
>>> On Tue, May 3, 2016 at 4:29 AM Thiep Ha <thie...@gmail.com> wrote:
>>> 
>>> thiep pushed a commit to branch master.
>>> 
>>> 
>>> http://git.enlightenment.org/core/efl.git/commit/?id=8a46f78c7d5637cc4a58bdad16c7e747acf2bda4
>>> 
>>> commit 8a46f78c7d5637cc4a58bdad16c7e747acf2bda4
>>> Author: Thiep Ha <thie...@gmail.com>
>>> Date:   Tue May 3 09:30:39 2016 +
>>> 
>>>   elm dnd/wl: add types' notify handler
>>> 
>>>   This patch adds notify handlers for types.
>>>   It provides different ways to handle different data types.
>>> ---
>>> src/lib/elementary/elm_cnp.c | 388
>>> ++-
>>> 1 file changed, 347 insertions(+), 41 deletions(-)
>>> 
>>> diff --git a/src/lib/elementary/elm_cnp.c b/src/lib/elementary/elm_cnp.c
>>> index 8288b5e..61dac7d 100644
>>> --- a/src/lib/elementary/elm_cnp.c
>>> +++ b/src/lib/elementary/elm_cnp.c
>>> @@ -257,6 +257,13 @@ typedef Eina_Bool (*Wl_Converter_Fn_Cb) (char
>>> *target, Wl_Cnp_Selection *sel
>>> static Eina_Bool _wl_targets_converter(char *target, Wl_Cnp_Selection
>>> *sel, void *data, int size, void **data_ret, int *size_ret);
>>> static Eina_Bool _wl_general_converter(char *target, Wl_Cnp_Selection
>>> *sel, void *data, int size, void **data_ret, int *size_ret);
>>> static Eina_Bool _wl_text_converter(char *target, Wl_Cnp_Selection *sel,
>>> void *data, int size, void **data_ret, int *size_ret);
>>> +
>>> +typedef Eina_Bool   (*Wl_Data_Preparer_Cb)   (Wl_Cnp_Selection *sel,
>>> Elm_Selection_Data *ddata, Ecore_Wl2_Event_Selection_Data_Ready *ev,
>>> Tmp_Info **tmp_info);
>>> +static Eina_Bool _wl_data_preparer_markup(Wl_Cnp_Selection *sel,
>>> Elm_Selection_Data *ddata, Ecore_Wl2_Event_Selection_Data_Ready *ev,
>>> Tmp_Info **tmp_info);
>>> +static Eina_Bool _wl_data_preparer_uri(Wl_Cnp_Selection *sel,
>>> Elm_Selection_Data *ddata, Ecore_Wl2_Event_Selection_Data_Ready *ev,
>>> Tmp_Info **tmp_info);
>>> +static Eina_Bool _wl_data_preparer_vcard(Wl_Cnp_Selection *sel,
>>> Elm_Selection_Data *ddata, Ecore_Wl2_Event_Selection_Data_Ready *ev,
>>> Tmp_Info **tmp_info);
>>> +static Eina_Bool _wl_data_preparer_image(Wl_Cnp_Selection *sel,
>>> Elm_Selection_Data *ddata, Ecore_Wl2_Event_Selection_Data_Ready *ev,
>>> Tmp_Info **tmp_info);
>>> +static Eina_Bool _wl_data_preparer_text(Wl_Cnp_Selection *sel,
>>> Elm_Selection_Data *ddata, Ecore_Wl2_Event_Selection_Data_Ready *ev,
>>> Tmp_Info **tmp_info);
>>> #endif
>>> 
>>> struct _Cnp_Atom
>>> @@ -272,6 +279,7 @@ struct _Cnp_Atom
>>> #endif
>>> #ifdef HAVE_ELEMENTARY_WL2
>>>   Wl_Converter_Fn_Cb   wl_converter;
>>> +   Wl_Data_Preparer_Cb  wl_data_preparer;
>>> #endif
>>> 
>>>   void*_term;
>>> @@ -476,6 +484,7 @@ static Cnp_Atom _atoms[CNP_N_ATOMS] = {
>>> #endif
>>> #ifdef HAVE_ELEMENTARY_WL2
>>>.wl_converter = _wl_general_converter,
>>> +.wl_data_preparer = _wl_data_preparer_markup,
>>> #endif
>>>   },
>>>   ARRAYINIT(CNP_ATOM_text_urilist) {
>>> @@ -487,6 +496,7 @@ static Cnp_Atom _atoms[CNP_N_ATOMS] = {
>>> #endif
>>> #ifdef HAVE_ELEMENTARY_WL2
>>>.wl_converter = _wl_general_converter,
>>> +.wl_data_preparer = _wl_data_preparer_uri,
>>> #endif
>>>   },
>>>   ARRAYINIT(CNP_ATOM_text_x_vcard) {
>>> @@ -496,6 +506,9 @@ static Cnp_Atom _atoms[CNP_N_ATOMS] = {
>>>.x_converter = _x11_vcard_send,
>>>.x_data_preparer = _x11_data_preparer_vcard,
>>> #endif
>>> +#ifdef HAVE_ELEMENTARY_WL2
>>> +.wl_data_preparer = _wl_data_preparer_vcard,
>>> +#endif
>>>   },
>>>   ARRAYINIT(CNP_ATOM_image_png) {
>>>.name = "image/png",
>>> @@ -504,6 +517,9 @@ static Cnp_Atom _atoms[CNP_N_ATOMS] = {
>>>.x_converter = _x11_image_converter,
>>>.x_data_preparer = _x11_data_preparer_image,
>>> #endif
>>> +#ifdef HAVE_ELEMENTARY_WL2
>>> +.wl_data_preparer = _wl_data_preparer_image,
>>&

[EGIT] [core/efl] master 01/01: elm cnp: simplify data preparer

2016-05-11 Thread Thiep Ha
thiep pushed a commit to branch master.

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

commit e7805d97b68c67d1aabf0521fa510e3848ce98ce
Author: Thiep Ha <thie...@gmail.com>
Date:   Wed May 11 17:54:45 2016 +0900

elm cnp: simplify data preparer

Use eina_strbuf to simplify the data preparer for uri.
This helps remove the complex for loop and also
reduce the memory allocated for uri array.
This also removes redundant checking.
---
 src/lib/elementary/elm_cnp.c | 141 +++
 1 file changed, 35 insertions(+), 106 deletions(-)

diff --git a/src/lib/elementary/elm_cnp.c b/src/lib/elementary/elm_cnp.c
index 17f46f8..3610891 100644
--- a/src/lib/elementary/elm_cnp.c
+++ b/src/lib/elementary/elm_cnp.c
@@ -1077,14 +1077,15 @@ _x11_data_preparer_uri(Ecore_X_Event_Selection_Notify 
*notify,
 {
Ecore_X_Selection_Data *data;
Ecore_X_Selection_Data_Files *files;
-   char *p, *s, *stripstr = NULL;
+   char *p, *stripstr = NULL;
 
data = notify->data;
cnp_debug("data->format is %d %p %p\n", data->format, notify, data);
if (data->content == ECORE_X_SELECTION_CONTENT_FILES)
  {
-int i, len = 0;
-Efreet_Uri **uri;
+Efreet_Uri *uri;
+Eina_Strbuf *strbuf;
+int i;
 
 cnp_debug("got a files list\n");
 files = notify->data;
@@ -1098,62 +1099,27 @@ _x11_data_preparer_uri(Ecore_X_Event_Selection_Notify 
*notify,
 stripstr = p = strdup(files->files[0]);
  */
 
-uri = calloc(1, sizeof(*uri) * files->num_files);
-if (!uri) return EINA_FALSE;
+strbuf = eina_strbuf_new();
+if (!strbuf)
+  return EINA_FALSE;
 
 for (i = 0; i < files->num_files ; i++)
   {
- uri[i] = efreet_uri_decode(files->files[i]);
- if (!uri[i])
+ uri = efreet_uri_decode(files->files[i]);
+ if (uri)
{
-  /* Is there any reason why we care of URI without scheme? */
-  if (files->files[i][0] != '/') continue;
-  len += strlen(files->files[i]) + 1;
+  eina_strbuf_append(strbuf, uri->path);
+  efreet_uri_free(uri);
}
  else
{
-  if (strcmp(uri[i]->protocol, "file"))
-{
-   efreet_uri_free(uri[i]);
-   uri[i] = NULL;
-   continue;
-}
-  len += strlen(uri[i]->path) + 1;
-   }
-  }
-p = NULL;
-if (len > 0)
-  {
- s = stripstr = malloc(len + 1);
- for (i = 0; i < files->num_files ; i++)
-   {
-  if (uri[i])
-p = (char *)uri[i]->path;
-  else
-p = files->files[i];
-
-  if (s)
-{
-   len = strlen(p);
-   strcpy(s, p);
-   if (i < (files->num_files - 1))
- {
-s[len] = '\n';
-s[len + 1] = 0;
-s += len + 1;
- }
-   else
- {
-s[len] = 0;
-s += len;
- }
-}
-
-  if (uri[i])
-efreet_uri_free(uri[i]);
+  eina_strbuf_append(strbuf, files->files[i]);
}
+ if (i < (files->num_files - 1))
+   eina_strbuf_append(strbuf, "\n");
   }
-free(uri);
+stripstr = eina_strbuf_string_steal(strbuf);
+eina_strbuf_free(strbuf);
  }
else
  {
@@ -1171,9 +1137,8 @@ _x11_data_preparer_uri(Ecore_X_Event_Selection_Notify 
*notify,
 else
   {
  free(p);
- stripstr = (char *)eina_memdup((unsigned char *)uri->path, 
strlen(uri->path), EINA_TRUE);
+ stripstr = strdup(uri->path);
  efreet_uri_free(uri);
- if (!stripstr) return EINA_FALSE;
   }
  }
 
@@ -2726,7 +2691,7 @@ _wl_data_preparer_uri(Wl_Cnp_Selection *sel, 
Elm_Selection_Data *ddata, Ecore_Wl
 {
cnp_debug("In\n");
 
-   char *p, *s, *stripstr = NULL;
+   char *p, *stripstr = NULL;
char *data = ev->data;
Dropable *drop;
const char *type = NULL;
@@ -2738,67 +2703,33 @@ _wl_data_preparer_uri(Wl_Cnp_Selection *sel, 
Elm_Selection_Data *ddata, Ecore_Wl
  {
 int num_files = 0;
 char **files = NULL;
-int i, len = 0;
-Efreet_Uri **uri;
+Efreet_Uri *uri;

[EGIT] [core/efl] master 01/01: elm win: change to use legacy api for cocoa engine

2016-05-10 Thread Thiep Ha
thiep pushed a commit to branch master.

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

commit 3e2e5b6111206f0abb1999e3944532b905e78a27
Author: Thiep Ha <thiep...@samsung.com>
Date:   Wed May 11 11:06:42 2016 +0900

elm win: change to use legacy api for cocoa engine

Some APIs are move from eo to legacy as in ab3058d3,
but not all api calls are changed. This causes build break
in mac with cocoa backend.
This patch fixes it.

@fix
---
 src/lib/elementary/elm_win.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lib/elementary/elm_win.c b/src/lib/elementary/elm_win.c
index a9d592b..ef6f28c 100644
--- a/src/lib/elementary/elm_win.c
+++ b/src/lib/elementary/elm_win.c
@@ -5629,7 +5629,7 @@ _elm_win_window_id_get(Eo *obj EINA_UNUSED, Elm_Win_Data 
*sd)
 if (sd->parent)
   {
  Ecore_Cocoa_Window *pwin;
- pwin = elm_obj_win_cocoa_window_get(sd->parent);
+ pwin = elm_win_cocoa_window_get(sd->parent);
  return (Ecore_Window)pwin;
   }
 #endif

-- 




Re: [E-devel] [EGIT] [core/efl] master 06/08: ecore wayland: add selection type

2016-05-10 Thread Thiep Ha

> On May 11, 2016, at 2:46 AM, Mike Blumenkrantz 
> <michael.blumenkra...@gmail.com> wrote:
> 
>> On Tue, May 3, 2016 at 4:28 AM Thiep Ha <thie...@gmail.com> wrote:
>> 
>> thiep pushed a commit to branch master.
>> 
>> 
>> http://git.enlightenment.org/core/efl.git/commit/?id=aa0ace21d7d1aa014fd3a5e743d8787ee35622aa
>> 
>> commit aa0ace21d7d1aa014fd3a5e743d8787ee35622aa
>> Author: Thiep Ha <thie...@gmail.com>
>> Date:   Tue May 3 10:42:31 2016 +
>> 
>>ecore wayland: add selection type
>> 
>>We have copy & paste and drag & drop selection types, but we cannot
>>distinguish between these two types when requesters receive data
>>from data ready event.
>>This patch adds a new enum to help selection requesters distinguish
>>between two selection types and have suitable actions for each type.
>> ---
> I would greatly appreciate it if, in future commits to ecore-wl2, you could
> use "ecore-wl2" as the prefix instead of "ecore wayland"; ecore-wayland is
> a separate (and dead) component, so it's unlikely anyone will read commits
> with the wrong prefixing.
I will use ecore-wl2 in commit message from next time. Thanks.

> --
> Mobile security can be enabling, not merely restricting. Employees who
> bring their own devices (BYOD) to work are irked by the imposition of MDM
> restrictions. Mobile Device Manager Plus allows you to control only the
> apps on BYO-devices by containerizing them, leaving personal data untouched!
> https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
> ___
> enlightenment-devel mailing list
> enlightenment-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

--
Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] [EGIT] [core/efl] master 02/08: elm dnd/wl: add types' notify handler

2016-05-10 Thread Thiep Ha
Hello,

> On May 11, 2016, at 3:08 AM, Mike Blumenkrantz 
> <michael.blumenkra...@gmail.com> wrote:
> 
>> On Tue, May 3, 2016 at 4:29 AM Thiep Ha <thie...@gmail.com> wrote:
>> 
>> thiep pushed a commit to branch master.
>> 
>> 
>> http://git.enlightenment.org/core/efl.git/commit/?id=8a46f78c7d5637cc4a58bdad16c7e747acf2bda4
>> 
>> commit 8a46f78c7d5637cc4a58bdad16c7e747acf2bda4
>> Author: Thiep Ha <thie...@gmail.com>
>> Date:   Tue May 3 09:30:39 2016 +
>> 
>>elm dnd/wl: add types' notify handler
>> 
>>This patch adds notify handlers for types.
>>It provides different ways to handle different data types.
>> ---
>> src/lib/elementary/elm_cnp.c | 388
>> ++-
>> 1 file changed, 347 insertions(+), 41 deletions(-)
>> 
>> diff --git a/src/lib/elementary/elm_cnp.c b/src/lib/elementary/elm_cnp.c
>> index 8288b5e..61dac7d 100644
>> --- a/src/lib/elementary/elm_cnp.c
>> +++ b/src/lib/elementary/elm_cnp.c
>> @@ -257,6 +257,13 @@ typedef Eina_Bool (*Wl_Converter_Fn_Cb) (char
>> *target, Wl_Cnp_Selection *sel
>> static Eina_Bool _wl_targets_converter(char *target, Wl_Cnp_Selection
>> *sel, void *data, int size, void **data_ret, int *size_ret);
>> static Eina_Bool _wl_general_converter(char *target, Wl_Cnp_Selection
>> *sel, void *data, int size, void **data_ret, int *size_ret);
>> static Eina_Bool _wl_text_converter(char *target, Wl_Cnp_Selection *sel,
>> void *data, int size, void **data_ret, int *size_ret);
>> +
>> +typedef Eina_Bool   (*Wl_Data_Preparer_Cb)   (Wl_Cnp_Selection *sel,
>> Elm_Selection_Data *ddata, Ecore_Wl2_Event_Selection_Data_Ready *ev,
>> Tmp_Info **tmp_info);
>> +static Eina_Bool _wl_data_preparer_markup(Wl_Cnp_Selection *sel,
>> Elm_Selection_Data *ddata, Ecore_Wl2_Event_Selection_Data_Ready *ev,
>> Tmp_Info **tmp_info);
>> +static Eina_Bool _wl_data_preparer_uri(Wl_Cnp_Selection *sel,
>> Elm_Selection_Data *ddata, Ecore_Wl2_Event_Selection_Data_Ready *ev,
>> Tmp_Info **tmp_info);
>> +static Eina_Bool _wl_data_preparer_vcard(Wl_Cnp_Selection *sel,
>> Elm_Selection_Data *ddata, Ecore_Wl2_Event_Selection_Data_Ready *ev,
>> Tmp_Info **tmp_info);
>> +static Eina_Bool _wl_data_preparer_image(Wl_Cnp_Selection *sel,
>> Elm_Selection_Data *ddata, Ecore_Wl2_Event_Selection_Data_Ready *ev,
>> Tmp_Info **tmp_info);
>> +static Eina_Bool _wl_data_preparer_text(Wl_Cnp_Selection *sel,
>> Elm_Selection_Data *ddata, Ecore_Wl2_Event_Selection_Data_Ready *ev,
>> Tmp_Info **tmp_info);
>> #endif
>> 
>> struct _Cnp_Atom
>> @@ -272,6 +279,7 @@ struct _Cnp_Atom
>> #endif
>> #ifdef HAVE_ELEMENTARY_WL2
>>Wl_Converter_Fn_Cb   wl_converter;
>> +   Wl_Data_Preparer_Cb  wl_data_preparer;
>> #endif
>> 
>>void*_term;
>> @@ -476,6 +484,7 @@ static Cnp_Atom _atoms[CNP_N_ATOMS] = {
>> #endif
>> #ifdef HAVE_ELEMENTARY_WL2
>> .wl_converter = _wl_general_converter,
>> +.wl_data_preparer = _wl_data_preparer_markup,
>> #endif
>>},
>>ARRAYINIT(CNP_ATOM_text_urilist) {
>> @@ -487,6 +496,7 @@ static Cnp_Atom _atoms[CNP_N_ATOMS] = {
>> #endif
>> #ifdef HAVE_ELEMENTARY_WL2
>> .wl_converter = _wl_general_converter,
>> +.wl_data_preparer = _wl_data_preparer_uri,
>> #endif
>>},
>>ARRAYINIT(CNP_ATOM_text_x_vcard) {
>> @@ -496,6 +506,9 @@ static Cnp_Atom _atoms[CNP_N_ATOMS] = {
>> .x_converter = _x11_vcard_send,
>> .x_data_preparer = _x11_data_preparer_vcard,
>> #endif
>> +#ifdef HAVE_ELEMENTARY_WL2
>> +.wl_data_preparer = _wl_data_preparer_vcard,
>> +#endif
>>},
>>ARRAYINIT(CNP_ATOM_image_png) {
>> .name = "image/png",
>> @@ -504,6 +517,9 @@ static Cnp_Atom _atoms[CNP_N_ATOMS] = {
>> .x_converter = _x11_image_converter,
>> .x_data_preparer = _x11_data_preparer_image,
>> #endif
>> +#ifdef HAVE_ELEMENTARY_WL2
>> +.wl_data_preparer = _wl_data_preparer_image,
>> +#endif
>>},
>>ARRAYINIT(CNP_ATOM_image_jpeg) {
>> .name = "image/jpeg",
>> @@ -512,6 +528,9 @@ static Cnp_Atom _atoms[CNP_N_ATOMS] = {
>> .x_converter = _x11_image_converter,
>> .x_data_preparer = _x11_data_preparer_image,
>> #endif
>> +#ifdef HAVE_ELEMENTARY_WL2
>> +.wl_data_preparer = _wl_data_preparer_image,
>> +#endif
>>},
>>ARRAYINIT(

Re: [E-devel] [EGIT] [core/efl] master 02/08: elm dnd/wl: add types' notify handler

2016-05-10 Thread Thiep Ha


--
Thiep Ha

> On May 11, 2016, at 3:08 AM, Mike Blumenkrantz 
> <michael.blumenkra...@gmail.com> wrote:
> 
>> On Tue, May 3, 2016 at 4:29 AM Thiep Ha <thie...@gmail.com> wrote:
>> 
>> thiep pushed a commit to branch master.
>> 
>> 
>> http://git.enlightenment.org/core/efl.git/commit/?id=8a46f78c7d5637cc4a58bdad16c7e747acf2bda4
>> 
>> commit 8a46f78c7d5637cc4a58bdad16c7e747acf2bda4
>> Author: Thiep Ha <thie...@gmail.com>
>> Date:   Tue May 3 09:30:39 2016 +
>> 
>>elm dnd/wl: add types' notify handler
>> 
>>This patch adds notify handlers for types.
>>It provides different ways to handle different data types.
>> ---
>> src/lib/elementary/elm_cnp.c | 388
>> ++-
>> 1 file changed, 347 insertions(+), 41 deletions(-)
>> 
>> diff --git a/src/lib/elementary/elm_cnp.c b/src/lib/elementary/elm_cnp.c
>> index 8288b5e..61dac7d 100644
>> --- a/src/lib/elementary/elm_cnp.c
>> +++ b/src/lib/elementary/elm_cnp.c
>> @@ -257,6 +257,13 @@ typedef Eina_Bool (*Wl_Converter_Fn_Cb) (char
>> *target, Wl_Cnp_Selection *sel
>> static Eina_Bool _wl_targets_converter(char *target, Wl_Cnp_Selection
>> *sel, void *data, int size, void **data_ret, int *size_ret);
>> static Eina_Bool _wl_general_converter(char *target, Wl_Cnp_Selection
>> *sel, void *data, int size, void **data_ret, int *size_ret);
>> static Eina_Bool _wl_text_converter(char *target, Wl_Cnp_Selection *sel,
>> void *data, int size, void **data_ret, int *size_ret);
>> +
>> +typedef Eina_Bool   (*Wl_Data_Preparer_Cb)   (Wl_Cnp_Selection *sel,
>> Elm_Selection_Data *ddata, Ecore_Wl2_Event_Selection_Data_Ready *ev,
>> Tmp_Info **tmp_info);
>> +static Eina_Bool _wl_data_preparer_markup(Wl_Cnp_Selection *sel,
>> Elm_Selection_Data *ddata, Ecore_Wl2_Event_Selection_Data_Ready *ev,
>> Tmp_Info **tmp_info);
>> +static Eina_Bool _wl_data_preparer_uri(Wl_Cnp_Selection *sel,
>> Elm_Selection_Data *ddata, Ecore_Wl2_Event_Selection_Data_Ready *ev,
>> Tmp_Info **tmp_info);
>> +static Eina_Bool _wl_data_preparer_vcard(Wl_Cnp_Selection *sel,
>> Elm_Selection_Data *ddata, Ecore_Wl2_Event_Selection_Data_Ready *ev,
>> Tmp_Info **tmp_info);
>> +static Eina_Bool _wl_data_preparer_image(Wl_Cnp_Selection *sel,
>> Elm_Selection_Data *ddata, Ecore_Wl2_Event_Selection_Data_Ready *ev,
>> Tmp_Info **tmp_info);
>> +static Eina_Bool _wl_data_preparer_text(Wl_Cnp_Selection *sel,
>> Elm_Selection_Data *ddata, Ecore_Wl2_Event_Selection_Data_Ready *ev,
>> Tmp_Info **tmp_info);
>> #endif
>> 
>> struct _Cnp_Atom
>> @@ -272,6 +279,7 @@ struct _Cnp_Atom
>> #endif
>> #ifdef HAVE_ELEMENTARY_WL2
>>Wl_Converter_Fn_Cb   wl_converter;
>> +   Wl_Data_Preparer_Cb  wl_data_preparer;
>> #endif
>> 
>>void*_term;
>> @@ -476,6 +484,7 @@ static Cnp_Atom _atoms[CNP_N_ATOMS] = {
>> #endif
>> #ifdef HAVE_ELEMENTARY_WL2
>> .wl_converter = _wl_general_converter,
>> +.wl_data_preparer = _wl_data_preparer_markup,
>> #endif
>>},
>>ARRAYINIT(CNP_ATOM_text_urilist) {
>> @@ -487,6 +496,7 @@ static Cnp_Atom _atoms[CNP_N_ATOMS] = {
>> #endif
>> #ifdef HAVE_ELEMENTARY_WL2
>> .wl_converter = _wl_general_converter,
>> +.wl_data_preparer = _wl_data_preparer_uri,
>> #endif
>>},
>>ARRAYINIT(CNP_ATOM_text_x_vcard) {
>> @@ -496,6 +506,9 @@ static Cnp_Atom _atoms[CNP_N_ATOMS] = {
>> .x_converter = _x11_vcard_send,
>> .x_data_preparer = _x11_data_preparer_vcard,
>> #endif
>> +#ifdef HAVE_ELEMENTARY_WL2
>> +.wl_data_preparer = _wl_data_preparer_vcard,
>> +#endif
>>},
>>ARRAYINIT(CNP_ATOM_image_png) {
>> .name = "image/png",
>> @@ -504,6 +517,9 @@ static Cnp_Atom _atoms[CNP_N_ATOMS] = {
>> .x_converter = _x11_image_converter,
>> .x_data_preparer = _x11_data_preparer_image,
>> #endif
>> +#ifdef HAVE_ELEMENTARY_WL2
>> +.wl_data_preparer = _wl_data_preparer_image,
>> +#endif
>>},
>>ARRAYINIT(CNP_ATOM_image_jpeg) {
>> .name = "image/jpeg",
>> @@ -512,6 +528,9 @@ static Cnp_Atom _atoms[CNP_N_ATOMS] = {
>> .x_converter = _x11_image_converter,
>> .x_data_preparer = _x11_data_preparer_image,
>> #endif
>> +#ifdef HAVE_ELEMENTARY_WL2
>> +.wl_data_preparer = _wl_data_preparer_image,
>> +#endif
>>},
>>ARRAYINIT(

Re: [E-devel] [EGIT] [core/efl] master 01/02: elm test dnd: fix multiple items dnd

2016-05-10 Thread Thiep Ha
It is changed as in commit
http://git.enlightenment.org/core/efl.git/commit/?id=780b96442720af0e77d7e4da3209d88921e1b647
Thank you for your suggestion.

> On May 9, 2016, at 10:58 PM, Mike Blumenkrantz 
> <michael.blumenkra...@gmail.com> wrote:
> 
>> On Mon, May 9, 2016 at 4:59 AM Thiep Ha <thie...@gmail.com> wrote:
>> 
>> thiep pushed a commit to branch master.
>> 
>> 
>> http://git.enlightenment.org/core/efl.git/commit/?id=07507864ca7e383b2dbf5600f8a4d58cb687e142
>> 
>> commit 07507864ca7e383b2dbf5600f8a4d58cb687e142
>> Author: Thiep Ha <thie...@gmail.com>
>> Date:   Mon May 9 17:10:01 2016 +0900
>> 
>>elm test dnd: fix multiple items dnd
>> 
>>When we do dnd with multiple items in genlist, gengrid in dnd test,
>>the items are correctly transfered.
>>It is caused by incorrect sent data.
>>This patch fixes by adding new line separation between items' data.
>> ---
>> src/bin/elementary/test_dnd.c | 8 ++--
>> 1 file changed, 6 insertions(+), 2 deletions(-)
>> 
>> diff --git a/src/bin/elementary/test_dnd.c b/src/bin/elementary/test_dnd.c
>> index 40c2c61..faeee2e 100644
>> --- a/src/bin/elementary/test_dnd.c
>> +++ b/src/bin/elementary/test_dnd.c
>> @@ -65,6 +65,7 @@ _drag_data_build(Eina_List **items)
>> Elm_Object_Item *it;
>> const char *t;
>> unsigned int len = 0;
>> +int i = 0;
>> 
>> EINA_LIST_FOREACH(*items, l, it)
>>   {
>> @@ -73,17 +74,20 @@ _drag_data_build(Eina_List **items)
>>len += strlen(t);
>>   }
>> 
>> -drag_data = malloc(len + eina_list_count(*items) * (FILESEP_LEN +
>> 1) + 1);
>> +drag_data = malloc(len + eina_list_count(*items) * (FILESEP_LEN +
>> 1));
>> strcpy((char *) drag_data, "");
>> 
>> -/* drag data in form: file://URI1\nfile://URI2\n */
>> +/* drag data in form: file://URI1\nfile://URI2 */
>> EINA_LIST_FOREACH(*items, l, it)
>>   {
>>  t = (char *)elm_object_item_data_get(it);
>>  if (t)
>>{
>> +  if (i > 0)
>> +strcat((char *) drag_data, "\n");
>>   strcat((char *) drag_data, FILESEP);
>>   strcat((char *) drag_data, t);
>> +  i++;
>>}
>>   }
>>  }
>> 
>> --
> I would strongly prefer if you could change this to use eina_strbuf. I can
> almost guarantee that continued use of strcat will result in even more
> coverity issues.
> --
> Find and fix application performance issues faster with Applications Manager
> Applications Manager provides deep performance insights into multiple tiers of
> your business applications. It resolves application problems quickly and
> reduces your MTTR. Get your free trial!
> https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
> ___
> enlightenment-devel mailing list
> enlightenment-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
--
Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


[EGIT] [core/efl] master 01/01: elm test dnd: replace strcat with eina_strbuf

2016-05-10 Thread Thiep Ha
thiep pushed a commit to branch master.

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

commit 780b96442720af0e77d7e4da3209d88921e1b647
Author: Thiep Ha <thie...@gmail.com>
Date:   Tue May 10 15:13:27 2016 +0900

elm test dnd: replace strcat with eina_strbuf

replace strcat with eina_strbuf.
---
 src/bin/elementary/test_dnd.c | 21 -
 1 file changed, 8 insertions(+), 13 deletions(-)

diff --git a/src/bin/elementary/test_dnd.c b/src/bin/elementary/test_dnd.c
index faeee2e..3b44c2b 100644
--- a/src/bin/elementary/test_dnd.c
+++ b/src/bin/elementary/test_dnd.c
@@ -61,21 +61,14 @@ _drag_data_build(Eina_List **items)
const char *drag_data = NULL;
if (*items)
  {
+Eina_Strbuf *str;
 Eina_List *l;
 Elm_Object_Item *it;
 const char *t;
-unsigned int len = 0;
 int i = 0;
 
-EINA_LIST_FOREACH(*items, l, it)
-  {
- t = (char *)elm_object_item_data_get(it);
- if (t)
-   len += strlen(t);
-  }
-
-drag_data = malloc(len + eina_list_count(*items) * (FILESEP_LEN + 1));
-strcpy((char *) drag_data, "");
+str = eina_strbuf_new();
+if (!str) return NULL;
 
 /* drag data in form: file://URI1\nfile://URI2 */
 EINA_LIST_FOREACH(*items, l, it)
@@ -84,12 +77,14 @@ _drag_data_build(Eina_List **items)
  if (t)
{
   if (i > 0)
-strcat((char *) drag_data, "\n");
-  strcat((char *) drag_data, FILESEP);
-  strcat((char *) drag_data, t);
+eina_strbuf_append(str, "\n");
+  eina_strbuf_append(str, FILESEP);
+  eina_strbuf_append(str, t);
   i++;
}
   }
+drag_data = eina_strbuf_string_steal(str);
+eina_strbuf_free(str);
  }
return drag_data;
 }

-- 




[EGIT] [core/efl] master 02/02: elm entry: add more control for dnd

2016-05-09 Thread Thiep Ha
thiep pushed a commit to branch master.

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

commit b39d869b7a6fc80a33ec6ec531efab68097e7c7a
Author: Thiep Ha <thie...@gmail.com>
Date:   Mon May 9 17:28:02 2016 +0900

elm entry: add more control for dnd

Adding dnd's enter, leave, position callbacks to let users know
when drag item is entered, leaved; move cursor to follow
drag item's position.
---
 src/lib/elementary/elm_entry.c | 114 -
 1 file changed, 77 insertions(+), 37 deletions(-)

diff --git a/src/lib/elementary/elm_entry.c b/src/lib/elementary/elm_entry.c
index d193a53..f26e803 100644
--- a/src/lib/elementary/elm_entry.c
+++ b/src/lib/elementary/elm_entry.c
@@ -698,8 +698,48 @@ _selection_data_cb(void *data EINA_UNUSED,
return EINA_TRUE;
 }
 
+static void
+_dnd_enter_cb(void *data EINA_UNUSED,
+  Evas_Object *obj)
+{
+   elm_object_focus_set(obj, EINA_TRUE);
+}
+
+static void
+_dnd_leave_cb(void *data EINA_UNUSED,
+  Evas_Object *obj)
+{
+   if (_elm_config->desktop_entry)
+ elm_object_focus_set(obj, EINA_FALSE);
+}
+
+static void
+_dnd_pos_cb(void *data EINA_UNUSED,
+Evas_Object *obj,
+Evas_Coord x,
+Evas_Coord y,
+Elm_Xdnd_Action action EINA_UNUSED)
+{
+   int pos;
+   Evas_Coord ox, oy, ex, ey;
+
+   ELM_ENTRY_DATA_GET(obj, sd);
+
+   evas_object_geometry_get(obj, , , NULL, NULL);
+   evas_object_geometry_get(sd->entry_edje, , , NULL, NULL);
+   x = x + ox - ex;
+   y = y + oy - ey;
+
+   edje_object_part_text_cursor_coord_set
+  (sd->entry_edje, "elm.text", EDJE_CURSOR_USER, x, y);
+   pos = edje_object_part_text_cursor_pos_get
+  (sd->entry_edje, "elm.text", EDJE_CURSOR_USER);
+   edje_object_part_text_cursor_pos_set(sd->entry_edje, "elm.text",
+EDJE_CURSOR_MAIN, pos);
+}
+
 static Eina_Bool
-_drag_drop_cb(void *data EINA_UNUSED,
+_dnd_drop_cb(void *data EINA_UNUSED,
   Evas_Object *obj,
   Elm_Selection_Data *drop)
 {
@@ -732,10 +772,10 @@ EOLIAN static Eina_Bool
 _elm_entry_elm_widget_disable(Eo *obj, Elm_Entry_Data *sd)
 {
elm_drop_target_del(obj, sd->drop_format,
-   NULL, NULL,
-   NULL, NULL,
-   NULL, NULL,
-   _drag_drop_cb, NULL);
+   _dnd_enter_cb, NULL,
+   _dnd_leave_cb, NULL,
+   _dnd_pos_cb, NULL,
+   _dnd_drop_cb, NULL);
if (elm_object_disabled_get(obj))
  {
 edje_object_signal_emit(sd->entry_edje, "elm,state,disabled", "elm");
@@ -757,10 +797,10 @@ _elm_entry_elm_widget_disable(Eo *obj, Elm_Entry_Data *sd)
 sd->disabled = EINA_FALSE;
 sd->drop_format = _get_drop_format(obj);
 elm_drop_target_add(obj, sd->drop_format,
-NULL, NULL,
-NULL, NULL,
-NULL, NULL,
-_drag_drop_cb, NULL);
+_dnd_enter_cb, NULL,
+_dnd_leave_cb, NULL,
+_dnd_pos_cb, NULL,
+_dnd_drop_cb, NULL);
  }
 
return EINA_TRUE;
@@ -3479,10 +3519,10 @@ _elm_entry_evas_object_smart_add(Eo *obj, 
Elm_Entry_Data *priv)
 
priv->drop_format = ELM_SEL_FORMAT_MARKUP | ELM_SEL_FORMAT_IMAGE;
elm_drop_target_add(obj, priv->drop_format,
-   NULL, NULL,
-   NULL, NULL,
-   NULL, NULL,
-   _drag_drop_cb, NULL);
+   _dnd_enter_cb, NULL,
+   _dnd_leave_cb, NULL,
+   _dnd_pos_cb, NULL,
+   _dnd_drop_cb, NULL);
 
if (!elm_layout_theme_set(obj, "entry", "base", elm_widget_style_get(obj)))
  CRI("Failed to set layout!");
@@ -3898,10 +3938,10 @@ _elm_entry_password_set(Eo *obj, Elm_Entry_Data *sd, 
Eina_Bool password)
sd->password = password;
 
elm_drop_target_del(obj, sd->drop_format,
-   NULL, NULL,
-   NULL, NULL,
-   NULL, NULL,
-   _drag_drop_cb, NULL);
+   _dnd_enter_cb, NULL,
+   _dnd_leave_cb, NULL,
+   _dnd_pos_cb, NULL,
+   _dnd_drop_cb, NULL);
if (password)
  {
 sd->single_line = EINA_TRUE;
@@ -3914,10 +3954,10 @@ _elm_entry_password_set(Eo *obj, Elm_Entry_Data *sd, 
Eina_Bool password)
  {
 sd->drop_format = _get_drop_format(obj);
 elm_drop_target_add(obj, sd->drop_format,
-NULL,

Re: [E-devel] Committer access

2015-10-28 Thread Thiep Ha
Thank you, my friends :)

--
Thiep Ha

> On Oct 28, 2015, at 5:07 PM, Jean-Philippe André <j...@videolan.org> wrote:
> 
> +1 of course :)
> 
>> On 28 October 2015 at 01:31, Daniel Juyung Seo <seojuyu...@gmail.com> wrote:
>> 
>> +1 here.
>> 
>> He has been contributing to EFL for a very long time and he's verified
>> by many people :)
>> 
>> Daniel Juyung Seo (SeoZ)
>> 
>> 
>> On Tue, Oct 27, 2015 at 6:39 PM, Amitesh Singh <singh.amit...@gmail.com>
>> wrote:
>>> +1
>>> 
>>> Best of Luck!
>>>> On Oct 27, 2015 1:41 PM, "Kim Shinwoo" <kimcinoo@gmail.com> wrote:
>>>> 
>>>> +1 :-)
>>>> 2015. 10. 27. 오후 4:18에 "Daniel Hirt" <daniel.h...@samsung.com>님이 작성:
>>>> 
>>>>> +1
>>>>> Best of luck buddy ;)
>>>>> 
>>>>>> On 10/27/2015 08:16 AM, Cedric BAIL wrote:
>>>>>> Hello,
>>>>>> 
>>>>>> I would like to promote Thiep to become a committer. He has been
>>>>>> contributing for a long time and in many area doesn't really any
>>>> review.
>>>>> In
>>>>>> fact he started doing valuable review recently and I think he is
>> ready
>>>> to
>>>>>> be a committer. So if nobody object I will give access next week.
>>>>>> 
>>>>>> Cedric
>> --
>>>>>> ___
>>>>>> enlightenment-devel mailing list
>>>>>> enlightenment-devel@lists.sourceforge.net
>>>>>> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
>> --
>>>>> ___
>>>>> enlightenment-devel mailing list
>>>>> enlightenment-devel@lists.sourceforge.net
>>>>> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
>> --
>>>> ___
>>>> enlightenment-devel mailing list
>>>> enlightenment-devel@lists.sourceforge.net
>>>> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
>> --
>>> ___
>>> enlightenment-devel mailing list
>>> enlightenment-devel@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
>> 
>> 
>> --
>> ___
>> enlightenment-devel mailing list
>> enlightenment-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
> 
> 
> 
> -- 
> Jean-Philippe André
> --
> ___
> enlightenment-devel mailing list
> enlightenment-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

--
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] Make unit tests for new EAPI's mandatory

2015-04-01 Thread Thiep Ha
Hello,

I totally agree with this idea. It can take more time to write test cases,
but we will get more benefit from it.

Regards,
Thiep Ha

On Wed, Apr 1, 2015 at 10:54 PM, Tom Hacohen tom.haco...@samsung.com
wrote:

 On 01/04/15 14:33, Jonathan Aquilina wrote:
 
 
  I think before anything gets merged they should be accompanied by unit
  tests.

 Yes, that's what Stefan is talking about. I've already had this policy
 with Eo, Eolian and everything Text for a few years, and to some extent
 Eina too. It works great there.

 --
 Tom.

 
  ---
  Regards,
  Jonathan Aquilina
  Founder Eagle Eye T
 
  On 2015-04-01 15:26, Tom Hacohen wrote:
 
  On 01/04/15 13:58, Jonathan Aquilina wrote:
 
  I couldn't agree more, I am not an E developer, but would eventually
 like to become one. Unit testing not only for the new API features, but for
 any feature of E unit tests should be applied. I think if someone comes up
 with a use case even if its a corner case a test case should be written for
 it.
 
  Yes, that's what we talked about at dev day. We aspire to have 100%
  coverage, at least for things that can be feasibly tested. With
  exactness, we plan to also have high coverage with pixel perfect
  regression tests. We plan on having full code coverage in both. However,
  it's going to be a losing battle if for every line we cover, 3 more we
  don't are going to be added.
 
  It's like we've done with warnings. It was annoying to fix them until we
  added the no new warnings rule.
 
  --
  Tom.
 
 
 --
  Dive into the World of Parallel Programming The Go Parallel Website,
 sponsored
  by Intel and developed in partnership with Slashdot Media, is your hub
 for all
  things parallel software development, from weekly thought leadership
 blogs to
  news, videos, case studies, tutorials and more. Take a look and join the
  conversation now. http://goparallel.sourceforge.net/ [1]
  ___
  enlightenment-devel mailing list
  enlightenment-devel@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/enlightenment-devel [2]
 
 
  Links:
  --
  [1] http://goparallel.sourceforge.net/
  [2] https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
 
 --
  Dive into the World of Parallel Programming The Go Parallel Website,
 sponsored
  by Intel and developed in partnership with Slashdot Media, is your hub
 for all
  things parallel software development, from weekly thought leadership
 blogs to
  news, videos, case studies, tutorials and more. Take a look and join the
  conversation now. http://goparallel.sourceforge.net/
  ___
  enlightenment-devel mailing list
  enlightenment-devel@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
 




 --
 Dive into the World of Parallel Programming The Go Parallel Website,
 sponsored
 by Intel and developed in partnership with Slashdot Media, is your hub for
 all
 things parallel software development, from weekly thought leadership blogs
 to
 news, videos, case studies, tutorials and more. Take a look and join the
 conversation now. http://goparallel.sourceforge.net/
 ___
 enlightenment-devel mailing list
 enlightenment-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

--
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] Erigo v1.0.0 is out!

2015-04-01 Thread Thiep Ha
Hello,

Nice job. A milestone for Erigo.

Regards,
Thiep Ha

On Wed, Apr 1, 2015 at 12:02 AM, Yakov Goldberg yako...@samsung.com wrote:

 Hello,

 We are happy to announce Erigo v1.0.0 release!

 We improved stability and added more widgets.
 Now widget's inheritance tree (classes and properties) is taken from
 Eolian and can be managed with black list.
 Configuration/installation options and paths were fixed, so developers who
 are interested to package Erigo, please pay attention.

 Here is summary about current release:

 Erigo 1.0.0
 ===

 Changes since 0.9.1
 ---
 Features:
 * Now all classes and functions are fetched from Eolian.
   Functions can be filtered out with black list.
 * Add infrastructure to support warning message's popup windows.
   Add popup message for Save dialog.
 * Add memo bubble for properties which require to press Enter to
 apply
   changes.
 * Add support for widgets: Fileselector, Fileselector Entry,
   Fileselector Button, Slider, Progressbar, Panes, Conformant.
 * Split Factory to sections.

 Internals:
 * Wider usage of Eolian API to generate function names.
 * Check if Property implements GET method and it is possible
   to fetch default values.

 Fixes:
* Configuration and installation options:
  For configuration and installation use:
  $ cmake ..

  In order to install into custom path:
  $ cmake -DCMAKE_INSTALL_PREFIX=/install_path ..

  For configuration of Debug version and to run Erigo from build path:
  $ cmake -DCMAKE_INSTALL_PREFIX=/install_path -DCMAKE_BUILD_TYPE=debug
 ..

* Fix showing properties and classes in Property View.
* Fix leaks and internal's memory management

 We always happy to get feedback and ideas.

 Download:https://git.enlightenment.org/tools/erigo.git
 Wiki:https://phab.enlightenment.org/w/projects/gui_builder/
 Videos:
 https://www.youtube.com/playlist?list=PLal8LrkIgqzHrmHm0IBDT6s_Y7uVctR6r

 Regards,
  Erigo team.



 --
 Dive into the World of Parallel Programming The Go Parallel Website,
 sponsored
 by Intel and developed in partnership with Slashdot Media, is your hub for
 all
 things parallel software development, from weekly thought leadership blogs
 to
 news, videos, case studies, tutorials and more. Take a look and join the
 conversation now. http://goparallel.sourceforge.net/
 ___
 enlightenment-devel mailing list
 enlightenment-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

--
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] [EGIT] [admin/devs] master 01/01: probie: welcome new probie, thiep

2015-03-24 Thread Thiep Ha
Thanks.
Lets rock it.

--
Thiep Ha

 On Mar 24, 2015, at 4:48 PM, Daniel Juyung Seo seojuyu...@gmail.com wrote:
 
 Congratulations Thiep!
 Thiep is actually one of the best candidates of getting commit access.
 Rock EFL more, Thiep!
 
 Thanks.
 
 Daniel Juyung Seo (SeoZ)
 
 
 On Tue, Mar 24, 2015 at 2:36 PM, ChunEon Park chuneon.p...@samsung.com
 wrote:
 
 hermet pushed a commit to branch master.
 
 
 http://git.enlightenment.org/admin/devs.git/commit/?id=c25e712d61a21033957e89c4f6f32702631959c2
 
 commit c25e712d61a21033957e89c4f6f32702631959c2
 Author: ChunEon Park chuneon.p...@samsung.com
 Date:   Tue Mar 24 14:36:12 2015 +0900
 
probie: welcome new probie, thiep
 ---
 probies/thiep/id_rsa.pub | 1 +
 probies/thiep/info.txt   | 8 
 2 files changed, 9 insertions(+)
 
 diff --git a/probies/thiep/id_rsa.pub b/probies/thiep/id_rsa.pub
 new file mode 100755
 index 000..b1aa051
 --- /dev/null
 +++ b/probies/thiep/id_rsa.pub
 @@ -0,0 +1 @@
 +ssh-rsa
 B3NzaC1yc2EDAQABAAABAQDOK3B3Lfx5ERk6C3qEZliLb2RVNDsCEqUIRRXnp7eA9wcHxQ+cCw0B17ULzyHeN+aH2LPc9U/GmxjD8+iZ+U9rRC/0M6DN89TSa7b9DoMsZsXqtEdXSBn8M+VdUawp4kH7VRd+KtDB4OEWOm957Lf1+DB6FNL2dp3WzzUGWpdzM7W53aUJbtVpgbp2D8tANlYq1bnFJ63QMddAe260paeGhorrC3vGnbnXqc2OjZYm2zUzgnEN6xJ3o4l34Ix6GjOfrpd9fOZVskShgDMkasK+Icyw60wY5j0mLa2ZxmC4cKieSi8Sq3T4AjXzvWKQCZZNGm/WwNqlZIhgzeKIPoQ1
 thiep...@samsung.com
 diff --git a/probies/thiep/info.txt b/probies/thiep/info.txt
 new file mode 100755
 index 000..07c9869
 --- /dev/null
 +++ b/probies/thiep/info.txt
 @@ -0,0 +1,8 @@
 +Login:thiep
 +IRC Nick: thiep
 +Name: Thiep Ha
 +Location: Suwon, Korea
 +E-Mail:   thie...@gmail.com; thiep...@samsung.com
 +Contributing: efl, elementary
 +Group:Libraries
 +Platform: Ubuntu
 
 --
 --
 Dive into the World of Parallel Programming The Go Parallel Website, sponsored
 by Intel and developed in partnership with Slashdot Media, is your hub for all
 things parallel software development, from weekly thought leadership blogs to
 news, videos, case studies, tutorials and more. Take a look and join the 
 conversation now. http://goparallel.sourceforge.net/
 ___
 enlightenment-devel mailing list
 enlightenment-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

--
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


[EGIT] [core/efl] master 01/01: edje: free allocated memory in epp

2014-12-17 Thread Thiep Ha
hermet pushed a commit to branch master.

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

commit 6d0b834a76c3301bf4c4b29752f902dbe8a8525e
Author: Thiep Ha thiep...@samsung.com
Date:   Thu Dec 18 09:05:50 2014 +0900

edje: free allocated memory in epp

Summary: fname variable's memory is allocated but not freed.

Reviewers: cedric, seoz, woohyun, Hermet

Reviewed By: Hermet

Differential Revision: https://phab.enlightenment.org/D1785
---
 src/bin/edje/epp/cpplib.c | 22 ++
 1 file changed, 18 insertions(+), 4 deletions(-)

diff --git a/src/bin/edje/epp/cpplib.c b/src/bin/edje/epp/cpplib.c
index 632ffe2..3cfc3a8 100644
--- a/src/bin/edje/epp/cpplib.c
+++ b/src/bin/edje/epp/cpplib.c
@@ -3325,13 +3325,19 @@ do_include(cpp_reader * pfile, struct directive 
*keyword,
strncpy(fname, (const char *)fbeg, flen);
fname[flen] = 0;
if (redundant_include_p(pfile, fname))
-  return 0;
+  {
+ free(fname);
+ return 0;
+  }
if (importing)
   f = lookup_import(pfile, fname, NULL);
else
   f = open_include_file(pfile, fname, NULL);
if (f == -2)
-  return 0;/* Already included this file */
+  {
+ free(fname);
+ return 0; /* Already included this file */
+  }
  }
else
  {
@@ -3380,13 +3386,19 @@ do_include(cpp_reader * pfile, struct directive 
*keyword,
  * of redundant include files: #import, #pragma once, and
  * redundant_include_p.  It would be nice if they were unified.  */
 if (redundant_include_p(pfile, fname))
-   return 0;
+   {
+  free(fname);
+  return 0;
+   }
 if (importing)
f = lookup_import(pfile, fname, searchptr);
 else
f = open_include_file(pfile, fname, searchptr);
 if (f == -2)
-   return 0;   /* Already included this file */
+   {
+  free(fname);
+  return 0;/* Already included this file */
+   }
 #ifdef EACCES
 else if (f == -1  errno == EACCES)
cpp_warning(pfile, Header file %s exists, but is not readable,
@@ -3467,6 +3479,7 @@ do_include(cpp_reader * pfile, struct directive *keyword,
 if (!strcmp(ptr-fname, fname))
   {
  close(f);
+  free(fname);
  return 0; /* This file was once'd. */
   }
  }
@@ -3524,6 +3537,7 @@ do_include(cpp_reader * pfile, struct directive *keyword,
if (angle_brackets)
   pfile-system_include_depth--;
  }
+   free(fname);
return 0;
 }
 

-- 




[EGIT] [core/efl] master 01/01: edje: fix memory leak in epp

2014-12-17 Thread Thiep Ha
hermet pushed a commit to branch master.

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

commit c27b511b28d24ad07cb28cf84e56c475b83603e4
Author: Thiep Ha thiep...@samsung.com
Date:   Thu Dec 18 09:17:03 2014 +0900

edje: fix memory leak in epp

Summary:
Variable include_defaults can be allocated and
go out of scope without freeing it.

Reviewers: cedric, seoz, woohyun, Hermet

Reviewed By: Hermet

Differential Revision: https://phab.enlightenment.org/D1784
---
 src/bin/edje/epp/cpplib.c | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/bin/edje/epp/cpplib.c b/src/bin/edje/epp/cpplib.c
index 0659000..10ab5d8 100644
--- a/src/bin/edje/epp/cpplib.c
+++ b/src/bin/edje/epp/cpplib.c
@@ -5686,6 +5686,7 @@ push_parse_file(cpp_reader * pfile, const char *fname)
char   *p;
int f;
cpp_buffer *fp;
+   char   *epath = 0;
 
/* The code looks at the defaults through this pointer, rather than through
 * the constant structure above.  This pointer gets changed if an 
environment
@@ -5833,8 +5834,6 @@ push_parse_file(cpp_reader * pfile, const char *fname)
 
{   /* read the appropriate environment variable 
and if it exists
 * replace include_defaults with the listed 
path. */
-  char   *epath = 0;
-
   switch ((opts-objc  1) + opts-cplusplus)
{
case 0:
@@ -6008,6 +6007,7 @@ push_parse_file(cpp_reader * pfile, const char *fname)
 if (fd  0)
   {
  cpp_perror_with_name(pfile, pend-arg);
+  if (epath) free(include_defaults);
  return FATAL_EXIT_CODE;
   }
 cpp_push_buffer(pfile, NULL, 0);
@@ -6153,6 +6153,7 @@ push_parse_file(cpp_reader * pfile, const char *fname)
   {
  cpp_perror_with_name(pfile, pend-arg);
   if (f) close(f);
+  if (epath) free(include_defaults);
  return FATAL_EXIT_CODE;
   }
 cpp_push_buffer(pfile, NULL, 0);
@@ -6173,6 +6174,7 @@ push_parse_file(cpp_reader * pfile, const char *fname)
 
if (finclude(pfile, f, fname, 0, NULL))
   output_line_command(pfile, 0, same_file);
+   if (epath) free(include_defaults);
return SUCCESS_EXIT_CODE;
 }
 

-- 




[EGIT] [core/efl] master 01/01: textblock: correct text position for RTL text with margins

2014-11-26 Thread Thiep Ha
herdsman pushed a commit to branch master.

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

commit e9a40835f21cfd4a46da388158aca6b0cda650a7
Author: Thiep Ha thiep...@samsung.com
Date:   Wed Nov 26 10:18:49 2014 +0200

textblock: correct text position for RTL text with margins

Summary:
If a RTL textblock has right margin, text is wrongly placed
(right margin is moved to left).
This patch fixes this issue.
Test cases are also added to test text position with margins.

@fix

Reviewers: tasn, herdsman

Subscribers: woohyun, cedric

Differential Revision: https://phab.enlightenment.org/D1691
---
 src/lib/evas/canvas/evas_object_textblock.c |  4 ++--
 src/tests/evas/evas_test_textblock.c| 33 +
 2 files changed, 35 insertions(+), 2 deletions(-)

diff --git a/src/lib/evas/canvas/evas_object_textblock.c 
b/src/lib/evas/canvas/evas_object_textblock.c
index 9ae9f09..9b9a9ee 100644
--- a/src/lib/evas/canvas/evas_object_textblock.c
+++ b/src/lib/evas/canvas/evas_object_textblock.c
@@ -3397,8 +3397,8 @@ loop_advance:
 /* c-o-style_pad.r is already included in the line width, so it's
  * not used in this calculation. . */
 c-ln-x = c-marginl + c-o-style_pad.l +
-   ((c-w - c-ln-w -
- c-o-style_pad.l - c-marginl) * _layout_line_align_get(c));
+   ((c-w - c-ln-w - c-o-style_pad.l -
+ c-marginl - c-marginr) * _layout_line_align_get(c));
  }
else
  {
diff --git a/src/tests/evas/evas_test_textblock.c 
b/src/tests/evas/evas_test_textblock.c
index 928bbd3..1c071bd 100644
--- a/src/tests/evas/evas_test_textblock.c
+++ b/src/tests/evas/evas_test_textblock.c
@@ -1954,6 +1954,39 @@ START_TEST(evas_textblock_various)
evas_textblock_cursor_pos_set(cur, 0);
evas_textblock_cursor_char_delete(cur);
 
+   /* Check margins' position */
+ {
+Evas_Coord nw, nh, lx, lw;
+
+evas_object_textblock_text_markup_set(tb, This is a test);
+evas_object_textblock_size_native_get(tb, nw, nh);
+evas_object_resize(tb, nw, nh);
+evas_object_textblock_line_number_geometry_get(tb, 0, lx, NULL, lw, 
NULL);
+ck_assert_int_eq(lx, 0);
+ck_assert_int_eq(lx + lw, nw);
+
+evas_object_textblock_text_markup_set(tb, left_margin=10 
right_margin=5This is a test/);
+evas_object_textblock_size_native_get(tb, nw, nh);
+evas_object_resize(tb, nw, nh);
+evas_object_textblock_line_number_geometry_get(tb, 0, lx, NULL, lw, 
NULL);
+ck_assert_int_eq(lx, 10);
+ck_assert_int_eq(lx + lw + 5, nw);
+
+evas_object_textblock_text_markup_set(tb, עוד פסקה);
+evas_object_textblock_size_native_get(tb, nw, nh);
+evas_object_resize(tb, nw, nh);
+evas_object_textblock_line_number_geometry_get(tb, 0, lx, NULL, lw, 
NULL);
+ck_assert_int_eq(lx, 0);
+ck_assert_int_eq(lx + lw, nw);
+
+evas_object_textblock_text_markup_set(tb, left_margin=10 
right_margin=5עוד פסקה/);
+evas_object_textblock_size_native_get(tb, nw, nh);
+evas_object_resize(tb, nw, nh);
+evas_object_textblock_line_number_geometry_get(tb, 0, lx, NULL, lw, 
NULL);
+ck_assert_int_eq(lx, 10);
+ck_assert_int_eq(lx + lw + 5, nw);
+ }
+
/* Super big one line item. */
  {
 #define CNT 1

-- 




[EGIT] [core/efl] efl-1.12 01/01: textblock: correct text position for RTL text with margins

2014-11-26 Thread Thiep Ha
herdsman pushed a commit to branch efl-1.12.

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

commit 0dc58467a44333e67ffe24b5a9cacb6757c459b0
Author: Thiep Ha thiep...@samsung.com
Date:   Wed Nov 26 10:18:49 2014 +0200

textblock: correct text position for RTL text with margins

Summary:
If a RTL textblock has right margin, text is wrongly placed
(right margin is moved to left).
This patch fixes this issue.
Test cases are also added to test text position with margins.

@fix

Reviewers: tasn, herdsman

Subscribers: woohyun, cedric

Differential Revision: https://phab.enlightenment.org/D1691
---
 src/lib/evas/canvas/evas_object_textblock.c |  4 ++--
 src/tests/evas/evas_test_textblock.c| 33 +
 2 files changed, 35 insertions(+), 2 deletions(-)

diff --git a/src/lib/evas/canvas/evas_object_textblock.c 
b/src/lib/evas/canvas/evas_object_textblock.c
index 2534f20..52a5954 100644
--- a/src/lib/evas/canvas/evas_object_textblock.c
+++ b/src/lib/evas/canvas/evas_object_textblock.c
@@ -3397,8 +3397,8 @@ loop_advance:
 /* c-o-style_pad.r is already included in the line width, so it's
  * not used in this calculation. . */
 c-ln-x = c-marginl + c-o-style_pad.l +
-   ((c-w - c-ln-w -
- c-o-style_pad.l - c-marginl) * _layout_line_align_get(c));
+   ((c-w - c-ln-w - c-o-style_pad.l -
+ c-marginl - c-marginr) * _layout_line_align_get(c));
  }
else
  {
diff --git a/src/tests/evas/evas_test_textblock.c 
b/src/tests/evas/evas_test_textblock.c
index 928bbd3..1c071bd 100644
--- a/src/tests/evas/evas_test_textblock.c
+++ b/src/tests/evas/evas_test_textblock.c
@@ -1954,6 +1954,39 @@ START_TEST(evas_textblock_various)
evas_textblock_cursor_pos_set(cur, 0);
evas_textblock_cursor_char_delete(cur);
 
+   /* Check margins' position */
+ {
+Evas_Coord nw, nh, lx, lw;
+
+evas_object_textblock_text_markup_set(tb, This is a test);
+evas_object_textblock_size_native_get(tb, nw, nh);
+evas_object_resize(tb, nw, nh);
+evas_object_textblock_line_number_geometry_get(tb, 0, lx, NULL, lw, 
NULL);
+ck_assert_int_eq(lx, 0);
+ck_assert_int_eq(lx + lw, nw);
+
+evas_object_textblock_text_markup_set(tb, left_margin=10 
right_margin=5This is a test/);
+evas_object_textblock_size_native_get(tb, nw, nh);
+evas_object_resize(tb, nw, nh);
+evas_object_textblock_line_number_geometry_get(tb, 0, lx, NULL, lw, 
NULL);
+ck_assert_int_eq(lx, 10);
+ck_assert_int_eq(lx + lw + 5, nw);
+
+evas_object_textblock_text_markup_set(tb, עוד פסקה);
+evas_object_textblock_size_native_get(tb, nw, nh);
+evas_object_resize(tb, nw, nh);
+evas_object_textblock_line_number_geometry_get(tb, 0, lx, NULL, lw, 
NULL);
+ck_assert_int_eq(lx, 0);
+ck_assert_int_eq(lx + lw, nw);
+
+evas_object_textblock_text_markup_set(tb, left_margin=10 
right_margin=5עוד פסקה/);
+evas_object_textblock_size_native_get(tb, nw, nh);
+evas_object_resize(tb, nw, nh);
+evas_object_textblock_line_number_geometry_get(tb, 0, lx, NULL, lw, 
NULL);
+ck_assert_int_eq(lx, 10);
+ck_assert_int_eq(lx + lw + 5, nw);
+ }
+
/* Super big one line item. */
  {
 #define CNT 1

-- 




[EGIT] [core/efl] master 01/01: edje entry: improve selection performance

2014-11-26 Thread Thiep Ha
tasn pushed a commit to branch master.

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

commit c30303d7e8dd92763298156d9bcaee2b1b1d5d86
Author: Thiep Ha thie...@gmail.com
Date:   Wed Nov 26 11:29:08 2014 +

edje entry: improve selection performance

Summary:
The selection performance is slow if we select large chunk of text.
This is caused by many rectangles created and deleted.
This patch provides a way to improve it by combine selection rectangles
of line in middle into one rectangles (i.e, if we have N lines,
the selection rectangle for lines 2 to N-1 will be combined into one.)

@feature

Reviewers: raster, cedric, tasn

Subscribers: herdsman, woohyun, cedric

Differential Revision: https://phab.enlightenment.org/D1508
---
 src/lib/edje/edje_entry.c   |  73 ++-
 src/lib/evas/Evas_Common.h  |  11 ++
 src/lib/evas/canvas/evas_object_textblock.c | 186 +-
 src/tests/evas/evas_test_textblock.c| 197 
 4 files changed, 430 insertions(+), 37 deletions(-)

diff --git a/src/lib/edje/edje_entry.c b/src/lib/edje/edje_entry.c
index f2a97cc..5d7097f 100644
--- a/src/lib/edje/edje_entry.c
+++ b/src/lib/edje/edje_entry.c
@@ -620,30 +620,29 @@ _sel_clear(Edje *ed, Evas_Textblock_Cursor *c 
EINA_UNUSED, Evas_Object *o EINA_U
 static void
 _sel_update(Edje *ed, Evas_Textblock_Cursor *c EINA_UNUSED, Evas_Object *o, 
Entry *en)
 {
-   Eina_List *range = NULL, *l;
-   Sel *sel;
-   Evas_Coord x, y, w, h;
+   Evas_Coord x, y;
Evas_Object *smart, *clip;
 
smart = evas_object_smart_parent_get(o);
clip = evas_object_clip_get(o);
-   if (en-sel_start)
- range = evas_textblock_cursor_range_geometry_get(en-sel_start, 
en-sel_end);
-   else
- return;
-   if (eina_list_count(range) != eina_list_count(en-sel))
+   if (!en-sel_start)
+  return;
+
+   evas_object_geometry_get(o, x, y, NULL, NULL);
+   if (en-have_selection)
  {
-while (en-sel)
-  {
- sel = en-sel-data;
- if (sel-obj_bg) evas_object_del(sel-obj_bg);
- if (sel-obj_fg) evas_object_del(sel-obj_fg);
- free(sel);
- en-sel = eina_list_remove_list(en-sel, en-sel);
-  }
-if (en-have_selection)
+Eina_Iterator *range = NULL;
+Eina_List *l;
+Sel *sel;
+Evas_Textblock_Rectangle *r;
+
+range = evas_textblock_cursor_range_simple_geometry_get(en-sel_start,
+en-sel_end);
+
+l = en-sel;
+EINA_ITERATOR_FOREACH(range, r)
   {
- for (l = range; l; l = eina_list_next(l))
+ if (!l)
{
   Evas_Object *ob;
 
@@ -669,17 +668,13 @@ _sel_update(Edje *ed, Evas_Textblock_Cursor *c 
EINA_UNUSED, Evas_Object *o, Entr
   sel-obj_fg = ob;
   _edje_subobj_register(ed, sel-obj_fg);
}
-  }
- }
-   x = y = w = h = -1;
-   evas_object_geometry_get(o, x, y, w, h);
-   if (en-have_selection)
- {
-EINA_LIST_FOREACH(en-sel, l, sel)
-  {
- Evas_Textblock_Rectangle *r;
+ else
+   {
+  sel = eina_list_data_get(l);
+  l = l-next;
+   }
+ *((sel-rect)) = *r;
 
- r = range-data;
  if (sel-obj_bg)
{
   evas_object_move(sel-obj_bg, x + r-x, y + r-y);
@@ -690,17 +685,23 @@ _sel_update(Edje *ed, Evas_Textblock_Cursor *c 
EINA_UNUSED, Evas_Object *o, Entr
   evas_object_move(sel-obj_fg, x + r-x, y + r-y);
   evas_object_resize(sel-obj_fg, r-w, r-h);
}
- *((sel-rect)) = *r;
- range = eina_list_remove_list(range, range);
  free(r);
   }
- }
-   else
- {
-while (range)
+eina_iterator_free(range);
+
+/* delete redundant selection rects */
+while (l)
   {
- free(range-data);
- range = eina_list_remove_list(range, range);
+ Eina_List *temp = l-next;
+ sel = eina_list_data_get(l);
+ if (sel)
+   {
+  if (sel-obj_bg) evas_object_del(sel-obj_bg);
+  if (sel-obj_fg) evas_object_del(sel-obj_fg);
+  free(sel);
+   }
+ en-sel = eina_list_remove_list(en-sel, l);
+ l = temp;
   }
  }
 }
diff --git a/src/lib/evas/Evas_Common.h b/src/lib/evas/Evas_Common.h
index 94acba2..a09cb20 100644
--- a/src/lib/evas/Evas_Common.h
+++ b/src/lib/evas/Evas_Common.h
@@ -3981,6 +3981,17 @@ EAPI int  
evas_textblock_cursor_line_coord_s
 EAPI Eina_List

[EGIT] [core/elementary] master 01/01: entry/test: make scrollable entries visible

2014-10-29 Thread Thiep Ha
tasn pushed a commit to branch master.

http://git.enlightenment.org/core/elementary.git/commit/?id=9d06e52ac0d0f71c1d57cd6ea17b4304db6a73d9

commit 9d06e52ac0d0f71c1d57cd6ea17b4304db6a73d9
Author: Thiep Ha thie...@gmail.com
Date:   Wed Oct 29 08:37:10 2014 +

entry/test: make scrollable entries visible

Summary:
Two scrollable entries' size is too small to view.
This patch expands window size to have suitable size for entries.

@fix

Reviewers: Hermet, seoz, woohyun, tasn

Reviewed By: tasn

Differential Revision: https://phab.enlightenment.org/D1597
---
 src/bin/test_entry.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/bin/test_entry.c b/src/bin/test_entry.c
index 9f08ed4..025e7c7 100644
--- a/src/bin/test_entry.c
+++ b/src/bin/test_entry.c
@@ -620,7 +620,7 @@ test_entry_scrolled(void *data EINA_UNUSED, Evas_Object 
*obj EINA_UNUSED, void *
evas_object_show(bx3);
 
elm_object_focus_set(win, EINA_TRUE);
-   evas_object_resize(win, 320, 300);
+   evas_object_resize(win, 320, 500);
evas_object_show(win);
 }
 

-- 




[EGIT] [core/elementary] elementary-1.11 01/01: entry/test: make scrollable entries visible

2014-10-29 Thread Thiep Ha
tasn pushed a commit to branch elementary-1.11.

http://git.enlightenment.org/core/elementary.git/commit/?id=ae33a1b98eb116d1999ba86cc2d73937e2b4bd09

commit ae33a1b98eb116d1999ba86cc2d73937e2b4bd09
Author: Thiep Ha thie...@gmail.com
Date:   Wed Oct 29 08:37:10 2014 +

entry/test: make scrollable entries visible

Summary:
Two scrollable entries' size is too small to view.
This patch expands window size to have suitable size for entries.

@fix

Reviewers: Hermet, seoz, woohyun, tasn

Reviewed By: tasn

Differential Revision: https://phab.enlightenment.org/D1597
---
 src/bin/test_entry.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/bin/test_entry.c b/src/bin/test_entry.c
index 9f08ed4..025e7c7 100644
--- a/src/bin/test_entry.c
+++ b/src/bin/test_entry.c
@@ -620,7 +620,7 @@ test_entry_scrolled(void *data EINA_UNUSED, Evas_Object 
*obj EINA_UNUSED, void *
evas_object_show(bx3);
 
elm_object_focus_set(win, EINA_TRUE);
-   evas_object_resize(win, 320, 300);
+   evas_object_resize(win, 320, 500);
evas_object_show(win);
 }
 

-- 




Re: [E-devel] Enlightenment running error with wayland

2014-10-21 Thread Thiep Ha
Hello,

Is X running on another VT?
There is no X running on other VTs.

What are the permissions on your /dev/dri/card0 ?? Is your user a member
of the 'video' group ?? Is your EFL and Enlightenment up-to-date with
git head ?
I did not add user to video group to have rw permission of /dev/dri/card0.
After rebuilding all libs with today git head and fix other permission
issues I can run Enlightenment now :)

Thank you for your helps.

Cheers,
Thiep Ha



On Tue, Oct 21, 2014 at 12:14 AM, Chris Michael devilho...@comcast.net
wrote:

 The problem seems to be coming from here:

  [31mERR [0mevas-drm [31m [0mmodules/evas/engines/drm/evas_drm.c:366 [0m
 Cannot flip crtc for connector 18: Device or resource busy

 What are the permissions on your /dev/dri/card0 ?? Is your user a member
 of the 'video' group ?? Is your EFL and Enlightenment up-to-date with
 git head ?

 Cheers,
 dh


 On 10/20/2014 11:05 AM, Thiep Ha wrote:
  Dear all,
 
  I try to run Enlightenment with wayland only on Arch Linux but nothing is
  shown.
  The elementary_test works well in weston. The wayland and mesa are
 packages
  provided from Arch (v 1.6).
 
  I built EFL with options:
   --enable-egl \
  --with-opengl=es \
  --enable-wayland \
  --enable-drm \
  --enable-systemd \
  --disable-c++11
 
  and Enlightenment is built with:
   --enable-wayland-clients \
  --enable-wl-drm \
  --enable-wayland-only \
  --disable-shot \
  --disable-xkbswitch \
  --disable-conf-randr \
  --disable-everything
  The running variables: E_WL_FORCE=drm; ELM_DISPLAY=wl; ELM_ACCEL=none
 
  The log from Enlightenment is like below:
 
  ESTART: 0.0 [0.0] - Begin Startup
  ESTART: 0.4 [0.4] - Signal Trap
  ESTART: 0.5 [0.1] - Signal Trap Done
  ESTART: 0.02294 [0.02289] - Eina Init
  ESTART: 0.04244 [0.01950] - Eina Init Done
  ESTART: 0.04245 [0.2] - Determine Prefix
  ESTART: 0.04309 [0.00064] - Determine Prefix Done
  ESTART: 0.04314 [0.5] - Environment Variables
  ESTART: 0.04315 [0.2] - Environment Variables Done
  ESTART: 0.04316 [0.1] - Parse Arguments
  ESTART: 0.04317 [0.1] - Parse Arguments Done
  ESTART: 0.04317 [0.0] - Eet Init
  ESTART: 0.08996 [0.04679] - Eet Init Done
  ESTART: 0.08998 [0.2] - Ecore Init
  ESTART: 0.12185 [0.03187] - Ecore Init Done
  ESTART: 0.12189 [0.3] - EIO Init
  ESTART: 0.12196 [0.7] - EIO Init Done
  ESTART: 0.12197 [0.1] - Ecore Event Handlers
  ESTART: 0.12197 [0.1] - Ecore Event Handlers Done
  ESTART: 0.12198 [0.1] - Ecore_File Init
  ESTART: 0.13997 [0.01799] - Ecore_File Init Done
  ESTART: 0.13998 [0.1] - Ecore_Con Init
  ESTART: 0.13999 [0.1] - Ecore_Con Init Done
  ESTART: 0.14000 [0.1] - Ecore_Ipc Init
  ESTART: 0.14001 [0.2] - Ecore_Ipc Init Done
  ESTART: 0.14005 [0.4] - Ecore_Evas Init
  ESTART: 0.21014 [0.07009] - Ecore_Evas Init Done
  ESTART: 0.21016 [0.2] - Elementary Init
  ESTART: 0.47363 [0.26347] - Elementary Init Done
  ESTART: 0.47366 [0.3] - Emotion Init
  ESTART: 0.52361 [0.04995] - Emotion Init Done
  ESTART: 0.52364 [0.3] - Ecore_Evas Engine Check
  ESTART: 0.52365 [0.1] - Ecore_Evas Engine Check Done
  ESTART: 0.52366 [0.1] - Edje Init
  ESTART: 0.52367 [0.1] - Edje Init Done
  ESTART: 0.52367 [0.1] - E Intl Init
  ESTART: 0.53091 [0.00723] - E Intl Init Done
  ESTART: 0.53093 [0.2] - E_Alert Init
  ESTART: 0.53448 [0.00356] - E_Alert Init Done
  ESTART: 0.53451 [0.3] - E_Configure Init
  ESTART: 0.53461 [0.00010] - E_Configure Init Done
  ESTART: 0.53462 [0.1] - E Directories Init
  ESTART: 0.58976 [0.05514] - E Directories Init Done
  ESTART: 0.58978 [0.2] - E_Filereg Init
  ESTART: 0.60109 [0.01131] - E_Filereg Init Done
  ESTART: 0.60112 [0.3] - E_Config Init
  ESTART: 0.63409 [0.03296] - E_Config Init Done
  ESTART: 0.63411 [0.2] - E_Env Init
  ESTART: 0.63411 [0.1] - E_Env Init Done
  ESTART: 0.63413 [0.2] - E Paths Init
  ESTART: 0.63417 [0.4] - E Paths Init Done
  ESTART: 0.63418 [0.1] - E_Ipc Init
  ESTART: 0.63441 [0.00023] - E_Ipc Init Done
  ESTART: 0.63442 [0.1] - E_Font Init
  ESTART: 0.64435 [0.00993] - E_Font Init Done
  ESTART: 0.64438 [0.3] - E_Font Apply
  ESTART: 0.65442 [0.01004] - E_Font Apply Done
  ESTART: 0.65446 [0.3] - E_Canvas Recache
  ESTART: 0.65449 [0.3] - E_Canvas Recache Done
  ESTART: 0.65450 [0.1] - E_Theme Init
  ESTART: 0.65452 [0.2] - E_Theme Init Done
  ESTART: 0.65453 [0.1] - E_Moveresize Init
  ESTART: 0.65454 [0.1] - E_Moveresize Init Done
  ESTART: 0.66209 [0.00755] - E_Msgbus Init
  ESTART: 0.66353 [0.00144] - E_Msgbus Init Done
  ESTART: 0.66355 [0.2] - Efreet Init
  ESTART: 0.66569 [0.00214] - Efreet Init Done
  ESTART: 0.66571 [0.3] - E_Intl Post Init
  ESTART: 0.75103 [0.08531] - E_Intl Post Init Done
  ESTART: 0.79878 [0.04776] - E_Actions Init
  ESTART: 0.79928 [0.00050] - E_Actions Init Done
  ESTART: 0.79932

[E-devel] Enlightenment running error with wayland

2014-10-20 Thread Thiep Ha
/ecore_drm_inputs.c:87 Failed
to open device: /dev/input/mouse0
ESTART: 5.03018 [0.5] - SLEEP
DBGecore_drmlib/ecore_drm/ecore_drm_evdev.c:84
Input
device AT Translated Set 2 keyboard is a keyboard
ESTART: 5.03359 [0.00341] - SLEEP
ESTART: 5.03373 [0.00014] - SLEEP
ESTART: 5.03378 [0.5] - SLEEP
ESTART: 5.03381 [0.4] - SLEEP
ESTART: 5.03384 [0.2] - SLEEP
ESTART: 5.03387 [0.3] - SLEEP
ESTART: 5.03389 [0.2] - SLEEP
ESTART: 5.03392 [0.4] - SLEEP
ERRevas-drmmodules/evas/engines/drm/evas_drm.c:366
Cannot flip crtc for connector 18: Device or resource busy
ERRevas-drmmodules/evas/engines/drm/evas_drm.c:366
Cannot flip crtc for connector 18: Device or resource busy
INFpulsesrc/modules/mixer/pa.c:745 could not
locate local socket '/var/run/pulse/native'!
ERRevas-drmmodules/evas/engines/drm/evas_drm.c:366
Cannot flip crtc for connector 18: Device or resource busy



Could some one please help me to figure it out what I did wrong?

Best Regards,
Thiep Ha
--
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://p.sf.net/sfu/Zoho
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


[EGIT] [core/elementary] master 01/01: label: Fix size calculation for wrapped label

2014-09-01 Thread Thiep Ha
hermet pushed a commit to branch master.

http://git.enlightenment.org/core/elementary.git/commit/?id=eb17a036a79fba07176f37f094b608471bb92098

commit eb17a036a79fba07176f37f094b608471bb92098
Author: Thiep Ha thie...@gmail.com
Date:   Mon Sep 1 23:05:30 2014 +0900

label: Fix size calculation for wrapped label

Summary:
Label size is incorrectly calculated (text does not wrap) if
elm_label_line_wrap_set() is called before elm_label_wrap_width_set().

@fix

Test Plan:
The label3 test case is added to show the bug case.
In label3 test case, if we switch the calling sequence of
elm_label_line_wrap_set() and elm_label_wrap_width_set(),
the result is different.

Reviewers: raster, seoz, woohyun, Hermet

Differential Revision: https://phab.enlightenment.org/D1369
---
 src/bin/test.c   |  2 ++
 src/bin/test_label.c | 26 ++
 src/lib/elm_label.c  | 13 +
 3 files changed, 37 insertions(+), 4 deletions(-)

diff --git a/src/bin/test.c b/src/bin/test.c
index cc0f896..96ebff7 100644
--- a/src/bin/test.c
+++ b/src/bin/test.c
@@ -174,6 +174,7 @@ void test_flip_to(void *data, Evas_Object *obj, void 
*event_info);
 void test_flip_page(void *data, Evas_Object *obj, void *event_info);
 void test_label(void *data, Evas_Object *obj, void *event_info);
 void test_label2(void *data, Evas_Object *obj, void *event_info);
+void test_label3(void *data, Evas_Object *obj, void *event_info);
 void test_conformant(void *data, Evas_Object *obj, void *event_info);
 void test_conformant2(void *data, Evas_Object *obj, void *event_info);
 void test_conformant_indicator(void *data, Evas_Object *obj, void *event_info);
@@ -764,6 +765,7 @@ add_tests:
//--//
ADD_TEST(NULL, Text, Label, test_label);
ADD_TEST(NULL, Text, Label2, test_label2);
+   ADD_TEST(NULL, Text, Label3, test_label3);
 
//--//
ADD_TEST(NULL, Stored Surface Buffer, Launcher, test_launcher);
diff --git a/src/bin/test_label.c b/src/bin/test_label.c
index 4f25ada..5ebbc97 100644
--- a/src/bin/test_label.c
+++ b/src/bin/test_label.c
@@ -288,3 +288,29 @@ test_label2(void *data EINA_UNUSED, Evas_Object *obj 
EINA_UNUSED, void *event_in
evas_object_resize(win, 320, 320);
evas_object_show(win);
 }
+
+void
+test_label3(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void 
*event_info EINA_UNUSED)
+{
+   Evas_Object *win, *bx, *lb;
+
+   win = elm_win_util_standard_add(label, Label);
+   elm_win_autodel_set(win, EINA_TRUE);
+   bx = elm_box_add(win);
+
+   lb = elm_label_add(win);
+   elm_object_text_set(lb,
+   This is text for our label, that is long but 
+   not too long. The label is designed to have line-wrap.
+   );
+   elm_label_line_wrap_set(lb, ELM_WRAP_CHAR);
+   elm_label_wrap_width_set(lb, 200);
+   evas_object_size_hint_weight_set(lb, EVAS_HINT_EXPAND, 0.0);
+   evas_object_size_hint_align_set(lb, EVAS_HINT_FILL, EVAS_HINT_FILL);
+   elm_box_pack_end(bx, lb);
+   evas_object_show(lb);
+
+   evas_object_show(bx);
+   evas_object_show(win);
+   elm_win_resize_object_add(win, bx);
+}
diff --git a/src/lib/elm_label.c b/src/lib/elm_label.c
index 95da559..c206b47 100644
--- a/src/lib/elm_label.c
+++ b/src/lib/elm_label.c
@@ -39,13 +39,18 @@ _recalc(void *data)
ELM_WIDGET_DATA_GET_OR_RETURN(data, wd);
 
Evas_Coord minw = -1, minh = -1;
-   Evas_Coord resw;
+   Evas_Coord resw, w;
 
evas_event_freeze(evas_object_evas_get(data));
-   evas_object_geometry_get(wd-resize_obj, NULL, NULL, resw, NULL);
-   if (sd-wrap_w  resw)
- resw = sd-wrap_w;
+   edje_object_size_min_calc(wd-resize_obj, minw, NULL);
+   evas_object_geometry_get(wd-resize_obj, NULL, NULL, w, NULL);
 
+   if (sd-wrap_w  minw)
+ resw = sd-wrap_w;
+   else if ((sd-wrap_w  0)  (minw  sd-wrap_w))
+ resw = minw;
+   else
+ resw = w;
edje_object_size_min_restricted_calc(wd-resize_obj, minw, minh, resw, 0);
 
/* This is a hack to workaround the way min size hints are treated.

-- 




[EGIT] [core/elementary] elementary-1.11 01/01: label: Fix size calculation for wrapped label

2014-09-01 Thread Thiep Ha
hermet pushed a commit to branch elementary-1.11.

http://git.enlightenment.org/core/elementary.git/commit/?id=4743f872cb449078e664bbf61bb13a9374ba1613

commit 4743f872cb449078e664bbf61bb13a9374ba1613
Author: Thiep Ha thie...@gmail.com
Date:   Mon Sep 1 23:05:30 2014 +0900

label: Fix size calculation for wrapped label

Summary:
Label size is incorrectly calculated (text does not wrap) if
elm_label_line_wrap_set() is called before elm_label_wrap_width_set().

@fix

Test Plan:
The label3 test case is added to show the bug case.
In label3 test case, if we switch the calling sequence of
elm_label_line_wrap_set() and elm_label_wrap_width_set(),
the result is different.

Reviewers: raster, seoz, woohyun, Hermet

Differential Revision: https://phab.enlightenment.org/D1369
---
 src/bin/test.c   |  2 ++
 src/bin/test_label.c | 26 ++
 src/lib/elm_label.c  | 13 +
 3 files changed, 37 insertions(+), 4 deletions(-)

diff --git a/src/bin/test.c b/src/bin/test.c
index 11045a1..fbb6cd3 100644
--- a/src/bin/test.c
+++ b/src/bin/test.c
@@ -174,6 +174,7 @@ void test_flip_to(void *data, Evas_Object *obj, void 
*event_info);
 void test_flip_page(void *data, Evas_Object *obj, void *event_info);
 void test_label(void *data, Evas_Object *obj, void *event_info);
 void test_label2(void *data, Evas_Object *obj, void *event_info);
+void test_label3(void *data, Evas_Object *obj, void *event_info);
 void test_conformant(void *data, Evas_Object *obj, void *event_info);
 void test_conformant2(void *data, Evas_Object *obj, void *event_info);
 void test_conformant_indicator(void *data, Evas_Object *obj, void *event_info);
@@ -762,6 +763,7 @@ add_tests:
//--//
ADD_TEST(NULL, Text, Label, test_label);
ADD_TEST(NULL, Text, Label2, test_label2);
+   ADD_TEST(NULL, Text, Label3, test_label3);
 
//--//
ADD_TEST(NULL, Stored Surface Buffer, Launcher, test_launcher);
diff --git a/src/bin/test_label.c b/src/bin/test_label.c
index 4f25ada..5ebbc97 100644
--- a/src/bin/test_label.c
+++ b/src/bin/test_label.c
@@ -288,3 +288,29 @@ test_label2(void *data EINA_UNUSED, Evas_Object *obj 
EINA_UNUSED, void *event_in
evas_object_resize(win, 320, 320);
evas_object_show(win);
 }
+
+void
+test_label3(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void 
*event_info EINA_UNUSED)
+{
+   Evas_Object *win, *bx, *lb;
+
+   win = elm_win_util_standard_add(label, Label);
+   elm_win_autodel_set(win, EINA_TRUE);
+   bx = elm_box_add(win);
+
+   lb = elm_label_add(win);
+   elm_object_text_set(lb,
+   This is text for our label, that is long but 
+   not too long. The label is designed to have line-wrap.
+   );
+   elm_label_line_wrap_set(lb, ELM_WRAP_CHAR);
+   elm_label_wrap_width_set(lb, 200);
+   evas_object_size_hint_weight_set(lb, EVAS_HINT_EXPAND, 0.0);
+   evas_object_size_hint_align_set(lb, EVAS_HINT_FILL, EVAS_HINT_FILL);
+   elm_box_pack_end(bx, lb);
+   evas_object_show(lb);
+
+   evas_object_show(bx);
+   evas_object_show(win);
+   elm_win_resize_object_add(win, bx);
+}
diff --git a/src/lib/elm_label.c b/src/lib/elm_label.c
index 95da559..c206b47 100644
--- a/src/lib/elm_label.c
+++ b/src/lib/elm_label.c
@@ -39,13 +39,18 @@ _recalc(void *data)
ELM_WIDGET_DATA_GET_OR_RETURN(data, wd);
 
Evas_Coord minw = -1, minh = -1;
-   Evas_Coord resw;
+   Evas_Coord resw, w;
 
evas_event_freeze(evas_object_evas_get(data));
-   evas_object_geometry_get(wd-resize_obj, NULL, NULL, resw, NULL);
-   if (sd-wrap_w  resw)
- resw = sd-wrap_w;
+   edje_object_size_min_calc(wd-resize_obj, minw, NULL);
+   evas_object_geometry_get(wd-resize_obj, NULL, NULL, w, NULL);
 
+   if (sd-wrap_w  minw)
+ resw = sd-wrap_w;
+   else if ((sd-wrap_w  0)  (minw  sd-wrap_w))
+ resw = minw;
+   else
+ resw = w;
edje_object_size_min_restricted_calc(wd-resize_obj, minw, minh, resw, 0);
 
/* This is a hack to workaround the way min size hints are treated.

-- 




[EGIT] [core/efl] master 01/01: Evas textblock: Correct word start/end moving at new line or line begins with spaces

2014-08-04 Thread Thiep Ha
tasn pushed a commit to branch master.

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

commit 104f04eda19395396116ba4c4c23b17f00ace2ae
Author: Thiep Ha thie...@gmail.com
Date:   Mon Aug 4 11:01:51 2014 +0100

Evas textblock: Correct word start/end moving at new line or line begins 
with spaces

Summary:
Word start/end works incorrectly when it goes to new line or line begins 
with spaces.
Ex: In elementary_test/Entry, place cursor at the end of line, press ctrl + 
right arrow keys: cursor moves to begin of next line. In this case, cursor 
should move to end of 1st word in next line.
Ex2: In elementary_test/Entry, add some spaces to begin of 2nd line (   
uses markup), place cursor at the first word (uses), press ctrl + left arrow 
keys twice, cursor moves to begin of 2nd line. In this case, cursor should move 
to begin of last word in 1st line.

This patch provides a fix by considerring next/previous text node to move 
cursor to correct place.

@fix

Reviewers: woohyun, raster, tasn

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D1140
---
 src/lib/evas/canvas/evas_object_textblock.c | 30 -
 src/tests/evas/evas_test_textblock.c| 12 
 2 files changed, 41 insertions(+), 1 deletion(-)

diff --git a/src/lib/evas/canvas/evas_object_textblock.c 
b/src/lib/evas/canvas/evas_object_textblock.c
index 58cc476..87d6664 100644
--- a/src/lib/evas/canvas/evas_object_textblock.c
+++ b/src/lib/evas/canvas/evas_object_textblock.c
@@ -7349,7 +7349,23 @@ evas_textblock_cursor_word_start(Evas_Textblock_Cursor 
*cur)
 
for (i = cur-pos ; _is_white(text[i])  BREAK_AFTER(i) ; i--)
  {
-if (i == 0) break;
+if (i == 0)
+  {
+ Evas_Object_Textblock_Node_Text *pnode;
+ pnode = _NODE_TEXT(EINA_INLIST_GET(cur-node)-prev);
+ if (pnode)
+   {
+  cur-node = pnode;
+  len = eina_ustrbuf_length_get(cur-node-unicode);
+  cur-pos = len - 1;
+  free(breaks);
+  return evas_textblock_cursor_word_start(cur);
+   }
+ else
+   {
+  break;
+   }
+  }
  }
 
for ( ; i  0 ; i--)
@@ -7390,6 +7406,18 @@ evas_textblock_cursor_word_end(Evas_Textblock_Cursor 
*cur)
  }
 
for (i = cur-pos; text[i]  _is_white(text[i])  (BREAK_AFTER(i)) ; i++);
+   if (i == len)
+ {
+Evas_Object_Textblock_Node_Text *nnode;
+nnode = _NODE_TEXT(EINA_INLIST_GET(cur-node)-next);
+if (nnode)
+  {
+ cur-node = nnode;
+ cur-pos = 0;
+ free(breaks);
+ return evas_textblock_cursor_word_end(cur);
+  }
+ }
 
for ( ; text[i] ; i++)
  {
diff --git a/src/tests/evas/evas_test_textblock.c 
b/src/tests/evas/evas_test_textblock.c
index a727b76..63ba40e 100644
--- a/src/tests/evas/evas_test_textblock.c
+++ b/src/tests/evas/evas_test_textblock.c
@@ -637,6 +637,18 @@ START_TEST(evas_textblock_cursor)
 
 evas_textblock_cursor_word_end(cur);
 ck_assert_int_eq(5, evas_textblock_cursor_pos_get(cur));
+
+/* moving across paragraphs */
+evas_object_textblock_text_markup_set(tb,
+  testps/
+case);
+evas_textblock_cursor_pos_set(cur, 4);
+evas_textblock_cursor_word_end(cur);
+ck_assert_int_eq(10, evas_textblock_cursor_pos_get(cur));
+
+evas_textblock_cursor_pos_set(cur, 6);
+evas_textblock_cursor_word_start(cur);
+ck_assert_int_eq(0, evas_textblock_cursor_pos_get(cur));
  }
 
/* Make sure coords are correct for ligatures */

-- 




[EGIT] [core/efl] master 01/01: ecore_evas_extn: fix wrong plug image display after connect

2014-07-30 Thread Thiep Ha
huchi pushed a commit to branch master.

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

commit e3f68561b3f820cb27c93428ccd011355b03f370
Author: Thiep Ha thie...@gmail.com
Date:   Thu Jul 31 05:28:42 2014 +0200

ecore_evas_extn: fix wrong plug image display after connect

Summary:
Plug image is displayed incorrect after connect to socket.

Test case: Run ecore_evas_extn_socket_example - run 
ecore_evas_extn_plug_example - click Change bg to change bg color.
Run 2nd ecore_evas_extn_plug_example. The plug area image of 2nd plug is 
incorrect display (different with 1st plug image).
Reason: When a plug connects to socket, socket sends incorrect buffer 
information.
Fix: Change buffer information.

@fix

Reviewers: Hermet, huchi

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D1232
---
 src/modules/ecore_evas/engines/extn/ecore_evas_extn.c | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/modules/ecore_evas/engines/extn/ecore_evas_extn.c 
b/src/modules/ecore_evas/engines/extn/ecore_evas_extn.c
index 2da2f02..8ce77aa 100644
--- a/src/modules/ecore_evas/engines/extn/ecore_evas_extn.c
+++ b/src/modules/ecore_evas/engines/extn/ecore_evas_extn.c
@@ -1503,7 +1503,7 @@ _ipc_client_add(void *data, int type EINA_UNUSED, void 
*event)
Extn *extn;
Ipc_Data_Resize ipc;
Ipc_Data_Update ipc2;
-   int i;
+   int i, prev_b;
 
if (ee != ecore_ipc_server_data_get(ecore_ipc_client_server_get(e-client)))
  return ECORE_CALLBACK_PASS_ON;
@@ -1536,8 +1536,10 @@ _ipc_client_add(void *data, int type EINA_UNUSED, void 
*event)
ipc2.x = 0; ipc2.y = 0; ipc2.w = ee-w; ipc2.h = ee-h;
ecore_ipc_client_send(e-client, MAJOR, OP_UPDATE, 0, 0, 0, ipc2,
  sizeof(ipc2));
+   prev_b = extn-cur_b - 1;
+   if (prev_b  0) prev_b = NBUF - 1;
ecore_ipc_client_send(e-client, MAJOR, OP_UPDATE_DONE, 0, 0,
- extn-cur_b, NULL, 0);
+ prev_b, NULL, 0);
_ecore_evas_extn_event(ee, ECORE_EVAS_EXTN_CLIENT_ADD);
return ECORE_CALLBACK_PASS_ON;
 }

-- 




[EGIT] [core/efl] master 01/01: Evas textblock: Fix memory leak

2014-07-25 Thread Thiep Ha
tasn pushed a commit to branch master.

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

commit 808202e6afe648d6a848db053ca9e823208ddeff
Author: Thiep Ha thie...@gmail.com
Date:   Fri Jul 25 16:06:37 2014 +0100

Evas textblock: Fix memory leak

Summary:
In evas_textblock_cursor_word_end function, the breaks' memory is allocated 
but not freed when cursor position is equal to text length.
Fix: Remove memory allocating.

@fix

Reviewers: raster, tasn

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D1225
---
 src/lib/evas/canvas/evas_object_textblock.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/lib/evas/canvas/evas_object_textblock.c 
b/src/lib/evas/canvas/evas_object_textblock.c
index fa4118b..58cc476 100644
--- a/src/lib/evas/canvas/evas_object_textblock.c
+++ b/src/lib/evas/canvas/evas_object_textblock.c
@@ -7378,6 +7378,9 @@ evas_textblock_cursor_word_end(Evas_Textblock_Cursor *cur)
 
size_t len = eina_ustrbuf_length_get(cur-node-unicode);
 
+   if (cur-pos == len)
+  return EINA_TRUE;
+
text = eina_ustrbuf_string_get(cur-node-unicode);
 
  {
@@ -7386,9 +7389,6 @@ evas_textblock_cursor_word_end(Evas_Textblock_Cursor *cur)
 set_wordbreaks_utf32((const utf32_t *) text, len, lang, breaks);
  }
 
-   if (cur-pos == len)
-  return EINA_TRUE;
-
for (i = cur-pos; text[i]  _is_white(text[i])  (BREAK_AFTER(i)) ; i++);
 
for ( ; text[i] ; i++)

-- 




[EGIT] [core/efl] efl-1.10 01/01: Evas textblock: Fix memory leak

2014-07-25 Thread Thiep Ha
tasn pushed a commit to branch efl-1.10.

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

commit d437afbb7948a7fbd9be78f4c48f24c9b610b555
Author: Thiep Ha thie...@gmail.com
Date:   Fri Jul 25 16:06:37 2014 +0100

Evas textblock: Fix memory leak

Summary:
In evas_textblock_cursor_word_end function, the breaks' memory is allocated 
but not freed when cursor position is equal to text length.
Fix: Remove memory allocating.

@fix

Reviewers: raster, tasn

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D1225
---
 src/lib/evas/canvas/evas_object_textblock.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/lib/evas/canvas/evas_object_textblock.c 
b/src/lib/evas/canvas/evas_object_textblock.c
index 384a194..476dc82 100644
--- a/src/lib/evas/canvas/evas_object_textblock.c
+++ b/src/lib/evas/canvas/evas_object_textblock.c
@@ -7218,6 +7218,9 @@ evas_textblock_cursor_word_end(Evas_Textblock_Cursor *cur)
 
size_t len = eina_ustrbuf_length_get(cur-node-unicode);
 
+   if (cur-pos == len)
+  return EINA_TRUE;
+
text = eina_ustrbuf_string_get(cur-node-unicode);
 
  {
@@ -7226,9 +7229,6 @@ evas_textblock_cursor_word_end(Evas_Textblock_Cursor *cur)
 set_wordbreaks_utf32((const utf32_t *) text, len, lang, breaks);
  }
 
-   if (cur-pos == len)
-  return EINA_TRUE;
-
for (i = cur-pos; text[i]  _is_white(text[i])  (BREAK_AFTER(i)) ; i++);
 
for ( ; text[i] ; i++)

-- 




[EGIT] [core/efl] master 01/01: ecore_evas_extn: remove redundant message sending

2014-07-08 Thread Thiep Ha
hermet pushed a commit to branch master.

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

commit d732e52f32ad18a69aece4366bef001c290f7a62
Author: Thiep Ha thie...@gmail.com
Date:   Wed Jul 9 11:39:32 2014 +0900

ecore_evas_extn: remove redundant message sending

Summary:
When a client is added to socket server, socket server sends NBUF (2) times 
of OP_RESIZE, OP_UPDATE, OP_UPDATE_DONE messages to client. However, only one 
message of OP_RESIZE, OP_UPDATE, OP_UPDATE_DONE is enough.

This patch removes redundant OP_RESIZE, OP_UPDATE, OP_UPDATE_DONE sending.

Reviewers: raster, Hermet

Reviewed By: Hermet

CC: woohyun, huchi

Differential Revision: https://phab.enlightenment.org/D1141
---
 .../ecore_evas/engines/extn/ecore_evas_extn.c| 20 ++--
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/src/modules/ecore_evas/engines/extn/ecore_evas_extn.c 
b/src/modules/ecore_evas/engines/extn/ecore_evas_extn.c
index 75fcb8f..2da2f02 100644
--- a/src/modules/ecore_evas/engines/extn/ecore_evas_extn.c
+++ b/src/modules/ecore_evas/engines/extn/ecore_evas_extn.c
@@ -1501,6 +1501,8 @@ _ipc_client_add(void *data, int type EINA_UNUSED, void 
*event)
Ecore_Evas *ee = data;
Ecore_Evas_Engine_Buffer_Data *bdata = ee-engine.data;
Extn *extn;
+   Ipc_Data_Resize ipc;
+   Ipc_Data_Update ipc2;
int i;
 
if (ee != ecore_ipc_server_data_get(ecore_ipc_client_server_get(e-client)))
@@ -1515,8 +1517,6 @@ _ipc_client_add(void *data, int type EINA_UNUSED, void 
*event)
for (i = 0; i  NBUF; i++)
  {
 const char *lock;
-Ipc_Data_Resize ipc;
-Ipc_Data_Update ipc2;
 
 ecore_ipc_client_send(e-client, MAJOR, OP_SHM_REF0,
   extn-svc.num, extn-b[i].num, i,
@@ -1529,15 +1529,15 @@ _ipc_client_add(void *data, int type EINA_UNUSED, void 
*event)
 ecore_ipc_client_send(e-client, MAJOR, OP_SHM_REF2,
   ee-alpha, extn-svc.sys, i,
   NULL, 0);
-ipc.w = ee-w; ipc.h = ee-h;
-ecore_ipc_client_send(e-client, MAJOR, OP_RESIZE,
-  0, 0, 0, ipc, sizeof(ipc));
-ipc2.x = 0; ipc2.y = 0; ipc2.w = ee-w; ipc2.h = ee-h;
-ecore_ipc_client_send(e-client, MAJOR, OP_UPDATE, 0, 0, 0, ipc2,
-  sizeof(ipc2));
-ecore_ipc_client_send(e-client, MAJOR, OP_UPDATE_DONE, 0, 0,
-  extn-cur_b, NULL, 0);
  }
+   ipc.w = ee-w; ipc.h = ee-h;
+   ecore_ipc_client_send(e-client, MAJOR, OP_RESIZE,
+ 0, 0, 0, ipc, sizeof(ipc));
+   ipc2.x = 0; ipc2.y = 0; ipc2.w = ee-w; ipc2.h = ee-h;
+   ecore_ipc_client_send(e-client, MAJOR, OP_UPDATE, 0, 0, 0, ipc2,
+ sizeof(ipc2));
+   ecore_ipc_client_send(e-client, MAJOR, OP_UPDATE_DONE, 0, 0,
+ extn-cur_b, NULL, 0);
_ecore_evas_extn_event(ee, ECORE_EVAS_EXTN_CLIENT_ADD);
return ECORE_CALLBACK_PASS_ON;
 }

-- 




[EGIT] [core/elementary] master 01/01: dnd: rotate dragwin if main window is rotated when draging

2014-06-10 Thread Thiep Ha
raster pushed a commit to branch master.

http://git.enlightenment.org/core/elementary.git/commit/?id=014d2638c3514c18e21adc4bc725e2ea983b9d05

commit 014d2638c3514c18e21adc4bc725e2ea983b9d05
Author: Thiep Ha thie...@gmail.com
Date:   Wed Jun 11 14:19:27 2014 +0900

dnd: rotate dragwin if main window is rotated when draging

Summary:
During drag, dragwin should be rotated when main window is rotated.

@fix

Reviewers: raster, JackDanielZ, woohyun

Reviewed By: raster

Differential Revision: https://phab.enlightenment.org/D976
---
 src/lib/elm_cnp.c | 36 +++-
 1 file changed, 35 insertions(+), 1 deletion(-)

diff --git a/src/lib/elm_cnp.c b/src/lib/elm_cnp.c
index c82cb1f..fa9a662 100644
--- a/src/lib/elm_cnp.c
+++ b/src/lib/elm_cnp.c
@@ -1744,6 +1744,14 @@ _x11_dnd_status(void *data EINA_UNUSED, int etype 
EINA_UNUSED, void *ev)
return EINA_TRUE;
 }
 
+static void
+_x11_win_rotation_changed_cb(void *data, Evas_Object *obj, void *event_info 
EINA_UNUSED)
+{
+   Evas_Object *win = data;
+   int rot = elm_win_rotation_get(obj);
+   elm_win_rotation_set(win, rot);
+}
+
 static Eina_Bool
 _x11_drag_mouse_up(void *data, int etype EINA_UNUSED, void *event)
 {
@@ -1776,6 +1784,17 @@ _x11_drag_mouse_up(void *data, int etype EINA_UNUSED, 
void *event)
 if (dragdonecb) dragdonecb(dragdonedata, dragwidget);
 if (dragwin)
   {
+ if (dragwidget)
+   {
+  if (elm_widget_is(dragwidget))
+{
+   Evas_Object *win = elm_widget_top_get(dragwidget);
+   if (win  eo_isa(win, ELM_WIN_CLASS))
+ evas_object_smart_callback_del_full(win, 
rotation,changed,
+  
_x11_win_rotation_changed_cb, dragwin);
+}
+   }
+
  if (!doaccept)
{  /* Commit animation when drag cancelled */
   /* Record final position of dragwin, then do animation */
@@ -2246,7 +2265,12 @@ _x11_elm_drag_start(Evas_Object *obj, Elm_Sel_Format 
format, const char *data,
  {
 Evas_Object *win = elm_widget_top_get(obj);
 if (win  eo_isa(win, ELM_WIN_CLASS))
-  elm_win_rotation_set(dragwin, elm_win_rotation_get(win));
+  {
+ elm_win_rotation_set(dragwin, elm_win_rotation_get(win));
+ evas_object_smart_callback_add(win, rotation,changed,
+_x11_win_rotation_changed_cb,
+dragwin);
+  }
  }
 
if (createicon)
@@ -4442,6 +4466,16 @@ elm_drag_cancel(Evas_Object *obj)
 ELM_SAFE_FREE(handler_status, ecore_event_handler_del);
 ecore_x_dnd_abort(xwin);
  }
+   if (dragwidget)
+ {
+if (elm_widget_is(dragwidget))
+  {
+ Evas_Object *win = elm_widget_top_get(dragwidget);
+ if (win  eo_isa(win, ELM_WIN_CLASS))
+   evas_object_smart_callback_del_full(win, rotation,changed,
+  _x11_win_rotation_changed_cb, 
dragwin);
+  }
+ }
 #endif
 #ifdef HAVE_ELEMENTARY_WAYLAND
 /* Have to complete here.

-- 




[EGIT] [core/elementary] master 01/01: entry: update selection handlers' visibility when entry is hidden or shown

2014-05-25 Thread Thiep Ha
raster pushed a commit to branch master.

http://git.enlightenment.org/core/elementary.git/commit/?id=03d4c6be8cfcaf55a1a805d8dbb3c619cd919c77

commit 03d4c6be8cfcaf55a1a805d8dbb3c619cd919c77
Author: Thiep Ha thie...@gmail.com
Date:   Mon May 26 11:28:12 2014 +0900

entry: update selection handlers' visibility when entry is hidden or shown

Summary:
Selection handlers' visibility should be updated when entry is hidden or 
shown
When entry has selection and hidden, the selection handlers should be 
hidden also.
This fix T1175.

@fix

Reviewers: seoz, woohyun, raster

Reviewed By: raster

Maniphest Tasks: T1175

Differential Revision: https://phab.enlightenment.org/D877
---
 src/lib/elm_entry.c  | 33 +
 src/lib/elm_entry.eo |  2 ++
 2 files changed, 31 insertions(+), 4 deletions(-)

diff --git a/src/lib/elm_entry.c b/src/lib/elm_entry.c
index f1eea24..67dfa0b 100644
--- a/src/lib/elm_entry.c
+++ b/src/lib/elm_entry.c
@@ -384,10 +384,16 @@ _hide_selection_handler(Evas_Object *obj)
 
if (!sd-start_handler) return;
 
-   edje_object_signal_emit(sd-start_handler, elm,handler,hide, elm);
-   sd-start_handler_shown = EINA_FALSE;
-   edje_object_signal_emit(sd-end_handler, elm,handler,hide, elm);
-   sd-end_handler_shown = EINA_FALSE;
+   if (sd-start_handler_shown)
+ {
+edje_object_signal_emit(sd-start_handler, elm,handler,hide, elm);
+sd-start_handler_shown = EINA_FALSE;
+ }
+   if (sd-end_handler_shown)
+ {
+edje_object_signal_emit(sd-end_handler, elm,handler,hide, elm);
+sd-end_handler_shown = EINA_FALSE;
+ }
 }
 
 static Eina_Rectangle *
@@ -3562,6 +3568,25 @@ _elm_entry_evas_smart_resize(Eo *obj, Elm_Entry_Data 
*sd, Evas_Coord w, Evas_Coo
eo_do_super(obj, MY_CLASS, evas_obj_smart_resize(w, h));
 
evas_object_resize(sd-hit_rect, w, h);
+
+}
+
+EOLIAN static void
+_elm_entry_evas_smart_show(Eo *obj, Elm_Entry_Data *sd)
+{
+   eo_do_super(obj, MY_CLASS, evas_obj_smart_show());
+
+   if (sd-have_selection)
+ _update_selection_handler(obj);
+}
+
+EOLIAN static void
+_elm_entry_evas_smart_hide(Eo *obj, Elm_Entry_Data *sd)
+{
+   eo_do_super(obj, MY_CLASS, evas_obj_smart_hide());
+
+   if (sd-have_selection)
+ _hide_selection_handler(obj);
 }
 
 EOLIAN static void
diff --git a/src/lib/elm_entry.eo b/src/lib/elm_entry.eo
index 6cf05c7..e0eeefa 100644
--- a/src/lib/elm_entry.eo
+++ b/src/lib/elm_entry.eo
@@ -1163,6 +1163,8 @@ class Elm_Entry (Elm_Layout, Elm_Interface_Scrollable, 
Evas_Clickable_Interface)
   Evas_Smart::add;
   Evas_Smart::resize;
   Evas_Smart::del;
+  Evas_Smart::show;
+  Evas_Smart::hide;
   Elm_Widget::activate;
   Elm_Widget::focus_direction_manager_is;
   Elm_Widget::theme_apply;

-- 




[EGIT] [core/elementary] master 01/01: test_dnd: Change sending data to be compatible with other apps

2014-04-29 Thread Thiep Ha
raster pushed a commit to branch master.

http://git.enlightenment.org/core/elementary.git/commit/?id=0df4b5f70b41ac64eb25c496f844b0f5592cdf14

commit 0df4b5f70b41ac64eb25c496f844b0f5592cdf14
Author: Thiep Ha thie...@gmail.com
Date:   Tue Apr 29 16:28:12 2014 +0900

test_dnd: Change sending data to be compatible with other apps

Summary:
The sending data used # character, it is not compatible with other apps, so 
we should change it.

Change sending data to use newline character to be compatible with other 
apps, able to correctly drag to other apps like EFM, chrome, ...

Reviewers: JackDanielZ, seoz, raster, woohyun

Reviewed By: raster

Differential Revision: https://phab.enlightenment.org/D751
---
 src/bin/test_dnd.c | 330 +
 1 file changed, 184 insertions(+), 146 deletions(-)

diff --git a/src/bin/test_dnd.c b/src/bin/test_dnd.c
index 63b89fd..f33e1f8 100644
--- a/src/bin/test_dnd.c
+++ b/src/bin/test_dnd.c
@@ -3,6 +3,9 @@
 #endif
 #include Elementary.h
 
+#define FILESEP file://
+#define FILESEP_LEN sizeof(FILESEP) - 1
+
 static const char *img[9] =
 {
panel_01.jpg,
@@ -52,6 +55,91 @@ _item_ptr_cmp(const void *d1, const void *d2)
 static Elm_Genlist_Item_Class *itc1;
 static Elm_Gengrid_Item_Class *gic;
 
+static const char *
+_drag_data_build(Eina_List **items)
+{
+   const char *drag_data = NULL;
+   if (*items)
+ {
+Eina_List *l;
+Elm_Object_Item *it;
+const char *t;
+unsigned int len = 0;
+
+EINA_LIST_FOREACH(*items, l, it)
+  {
+ t = (char *)elm_object_item_data_get(it);
+ if (t)
+   len += strlen(t);
+  }
+
+drag_data = malloc(len + eina_list_count(*items) * (FILESEP_LEN + 1) + 
1);
+strcpy((char *) drag_data, );
+
+/* drag data in form: file://URI1\nfile://URI2\n */
+EINA_LIST_FOREACH(*items, l, it)
+  {
+ t = (char *)elm_object_item_data_get(it);
+ if (t)
+   {
+  strcat((char *) drag_data, FILESEP);
+  strcat((char *) drag_data, t);
+  strcat((char *) drag_data, \n);
+   }
+  }
+ }
+   return drag_data;
+}
+
+static char *
+_drag_data_extract(char **drag_data)
+{
+   char *uri = NULL;
+   if (!drag_data)
+ return uri;
+
+   char *p = *drag_data;
+   if (!p)
+ return uri;
+   char *s = strstr(p, FILESEP);
+   if (s)
+ {
+p += FILESEP_LEN;
+if (!p)
+  return uri;
+ }
+   s = strchr(p, '\n');
+   if (s)
+ {
+if (s - p  0)
+  {
+ char *s1 = s - 1;
+ if (s1[0] == '\r')
+   s1[0] = '\0';
+ else
+   {
+  char *s2 = s + 1;
+  if (s2[0] == '\r')
+{
+   s[0] = '\0';
+   s++;
+}
+  else
+s[0] = '\0';
+   }
+  }
+else
+  s[0] = '\0';
+s++;
+ }
+   else
+ p = NULL;
+   uri = p;
+   *drag_data = s;
+
+   return uri;
+}
+
 static char *
 gl_text_get(void *data, Evas_Object *obj EINA_UNUSED, const char *part 
EINA_UNUSED)
 {
@@ -125,49 +213,51 @@ _gl_dropcb(void *data EINA_UNUSED, Evas_Object *obj, 
Elm_Object_Item *it, Elm_Se
printf(%s %d str=%s\n, __func__, __LINE__, (char *) ev-data);
if (!ev-data)
  return EINA_FALSE;
+   if (ev-len = 0)
+ return EINA_FALSE;
 
-   char *p = ev-data;
-   p = strchr(p, '#');
-   while (p)
+   char *dd = strndup(ev-data, ev-len);
+   if (!dd) return EINA_FALSE;
+   char *p = dd;
+
+   char *s =  _drag_data_extract(p);
+   while (s)
  {
-p++;
-char *p2 = strchr(p, '#');
-if (p2)
+switch(yposret)
   {
- *p2 = '\0';
- printf(Item %s\n, p);
- switch(yposret)
-   {
-case -1:  /* Dropped on top-part of the it item */
- {
-elm_genlist_item_insert_before(obj,
-  itc1, strdup(p), NULL, it,
-  ELM_GENLIST_ITEM_NONE,
-  NULL, NULL);
-break;
- }
-case  0:  /* Dropped on center of the it item  */
-case  1:  /* Dropped on botton-part of the it item */
- {
-if (!it) it = elm_genlist_last_item_get(obj);
-if (it) it = elm_genlist_item_insert_after(obj,
-  itc1, strdup(p), NULL, it,
-  ELM_GENLIST_ITEM_NONE,
-  NULL, NULL);
-else
-   it = elm_genlist_item_append(obj,
- itc1, strdup

[EGIT] [core/elementary] master 01/01: dnd: Correct drag window positon in drag start

2014-04-21 Thread Thiep Ha
raster pushed a commit to branch master.

http://git.enlightenment.org/core/elementary.git/commit/?id=d68cf4c7f09af954151ba494c8babf5f4ea79dcc

commit d68cf4c7f09af954151ba494c8babf5f4ea79dcc
Author: Thiep Ha thie...@gmail.com
Date:   Mon Apr 21 17:27:46 2014 +0900

dnd: Correct drag window positon in drag start

Summary:
If window is rotated, the drag window position is incorrect.

In drag start, the drag window is placed in incorrect position if main 
window is rotated.
Fix: Update drag window according to window rotation.

@fix

Reviewers: JackDanielZ, raster

Reviewed By: raster

CC: woohyun, seoz

Differential Revision: https://phab.enlightenment.org/D746
---
 src/lib/elm_cnp.c | 36 +---
 1 file changed, 29 insertions(+), 7 deletions(-)

diff --git a/src/lib/elm_cnp.c b/src/lib/elm_cnp.c
index 54e697e..996209a 100644
--- a/src/lib/elm_cnp.c
+++ b/src/lib/elm_cnp.c
@@ -2170,8 +2170,10 @@ _x11_elm_drag_start(Evas_Object *obj, Elm_Sel_Format 
format, const char *data,
int x, y, x2 = 0, y2 = 0, x3, y3;
Evas_Object *icon = NULL;
int w = 0, h = 0;
+   int ex, ey, ew, eh;
Ecore_X_Atom actx;
int i;
+   int xr, yr, rot;
 
_x11_elm_cnp_init();
 
@@ -2268,21 +2270,41 @@ _x11_elm_drag_start(Evas_Object *obj, Elm_Sel_Format 
format, const char *data,
 
/* Position subwindow appropriately */
ee = ecore_evas_ecore_evas_get(evas_object_evas_get(obj));
-   ecore_evas_geometry_get(ee, x, y, NULL, NULL);
-   x += x2;
-   y += y2;
-   dragwin_x_start = dragwin_x_end = x;
-   dragwin_y_start = dragwin_y_end = y;
+   ecore_evas_geometry_get(ee, ex, ey, ew, eh);
evas_object_resize(dragwin, w, h);
 
evas_object_show(icon);
evas_object_show(dragwin);
-   evas_object_move(dragwin, x, y);
-
evas_pointer_canvas_xy_get(evas_object_evas_get(obj), x3, y3);
_dragx = x3 - x2;
_dragy = y3 - y2;
 
+   rot = ecore_evas_rotation_get(ee);
+   switch (rot)
+ {
+  case 90:
+ xr = y3;
+ yr = ew - x3;
+ break;
+  case 180:
+ xr = ew - x3;
+ yr = eh - y3;
+ break;
+  case 270:
+ xr = eh - y3;
+ yr = x3;
+ break;
+  default:
+ xr = x3;
+ yr = y3;
+ break;
+ }
+   x = ex + xr - _dragx;
+   y = ey + yr - _dragy;
+   evas_object_move(dragwin, x, y);
+   dragwin_x_start = dragwin_x_end = x;
+   dragwin_y_start = dragwin_y_end = y;
+
return EINA_TRUE;
 }
 

-- 




[EGIT] [core/elementary] master 01/01: dnd: Skip drag window when drag starts

2014-04-09 Thread Thiep Ha
raster pushed a commit to branch master.

http://git.enlightenment.org/core/elementary.git/commit/?id=87bfd7b9fcffafad69344374960b288c01801b50

commit 87bfd7b9fcffafad69344374960b288c01801b50
Author: Thiep Ha thie...@gmail.com
Date:   Thu Apr 10 11:20:50 2014 +0900

dnd: Skip drag window when drag starts

Summary:
Currently, when drag starts, drag window is not skipped. It makes ecore_x 
cannot find dropable window in some cases.

Issue: Dropable window is not found if we drop inside the initialized area 
of drag window.
(Example: in Dnd Types of elementary test, try to start dragging at right 
edge of left label and drop to left edge of right label. The drop is failed).
Reason: Ecore_x considers drag window when it tries to find dropable window 
at specific position. Therefore, it cannot find dropable window.
Resolve: Skip drag window.
@fix

Reviewers: raster, JackDanielZ, seoz

CC: woohyun, seoz

Differential Revision: https://phab.enlightenment.org/D710
---
 src/lib/elm_cnp.c | 8 
 1 file changed, 8 insertions(+)

diff --git a/src/lib/elm_cnp.c b/src/lib/elm_cnp.c
index 5b88d2f..ec436fe 100644
--- a/src/lib/elm_cnp.c
+++ b/src/lib/elm_cnp.c
@@ -181,12 +181,15 @@ static Eina_List *cont_drag_tg = NULL; /* List of 
Item_Container_Drag_Info */
 static void _cont_obj_mouse_up( void *data, Evas *e, Evas_Object *obj, void 
*event_info);
 static void _cont_obj_mouse_move( void *data, Evas *e, Evas_Object *obj, void 
*event_info);
 static void _all_drop_targets_cbs_del(void *data, Evas *e, Evas_Object *obj, 
void *info);
+static Ecore_X_Window _x11_elm_widget_xwin_get(const Evas_Object *obj);
 
 static Eina_Bool
 _drag_cancel_animate(void *data EINA_UNUSED, double pos)
 {  /* Animation to move back drag-window */
if (pos = 0.99)
  {
+Ecore_X_Window xdragwin = _x11_elm_widget_xwin_get(data);
+ecore_x_window_ignore_set(xdragwin, 0);
 evas_object_del(data);
 return ECORE_CALLBACK_CANCEL;
  }
@@ -1775,6 +1778,8 @@ _x11_drag_mouse_up(void *data, int etype EINA_UNUSED, 
void *event)
}
  else
{  /* No animation drop was committed */
+  Ecore_X_Window xdragwin = _x11_elm_widget_xwin_get(dragwin);
+  ecore_x_window_ignore_set(xdragwin, 0);
   evas_object_del(dragwin);
}
 
@@ -2154,6 +2159,7 @@ _x11_elm_drag_start(Evas_Object *obj, Elm_Sel_Format 
format, const char *data,
 Elm_Drag_State dragdone, void *donecbdata)
 {
Ecore_X_Window xwin = _x11_elm_widget_xwin_get(obj);
+   Ecore_X_Window xdragwin;
X11_Cnp_Selection *sel;
Elm_Sel_Type xdnd = ELM_SEL_TYPE_XDND;
Ecore_Evas *ee;
@@ -2224,6 +2230,8 @@ _x11_elm_drag_start(Evas_Object *obj, Elm_Sel_Format 
format, const char *data,
dragwin = elm_win_add(NULL, Elm-Drag, ELM_WIN_UTILITY);
elm_win_alpha_set(dragwin, EINA_TRUE);
elm_win_override_set(dragwin, EINA_TRUE);
+   xdragwin = _x11_elm_widget_xwin_get(dragwin);
+   ecore_x_window_ignore_set(xdragwin, 1);
 
/* dragwin has to be rotated as the main window is */
if (elm_widget_is(obj))

-- 




[EGIT] [core/elementary] master 01/01: [Elm_Dnd] Fix segmentation fault when deleting object with same registered drop callbacks

2014-04-03 Thread Thiep Ha
raster pushed a commit to branch master.

http://git.enlightenment.org/core/elementary.git/commit/?id=2eba14fa79e28db4976b3b5d71bd238f4a6c79c4

commit 2eba14fa79e28db4976b3b5d71bd238f4a6c79c4
Author: Thiep Ha thie...@gmail.com
Date:   Thu Apr 3 19:08:07 2014 +0900

[Elm_Dnd] Fix segmentation fault when deleting object with same registered 
drop callbacks

Summary:
In case we register two or more of same drop callbacks for one object, when 
that object is deleted, segmentation fault happens.

Test case: Register only same callbacks more than two times for one object. 
Delete that object (manual or auto). Segmentation fault happens.
Reason: When object is deleted, we remove all drop callbacks registered 
with the object. The _all_drops_targets_cbs_del and elm_drop_target_del are 
used to do that and they operates on the same cbs_list. If elm_drop_target_del 
remove the current and the next callbacks in cbs_list, the segmentation fault 
will happen at _all_drops_targets_cbs_del.
Fix: Check and use updated cbs_list.

@fix

Reviewers: JackDanielZ, raster, seoz

Reviewed By: JackDanielZ

CC: woohyun

Differential Revision: https://phab.enlightenment.org/D691
---
 src/lib/elm_cnp.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/lib/elm_cnp.c b/src/lib/elm_cnp.c
index df107a4..5b88d2f 100644
--- a/src/lib/elm_cnp.c
+++ b/src/lib/elm_cnp.c
@@ -208,10 +208,10 @@ _all_drop_targets_cbs_del(void *data EINA_UNUSED, Evas *e 
EINA_UNUSED, Evas_Obje
eo_do(obj, eo_base_data_get(__elm_dropable, (void **)dropable));
if (dropable)
  {
-Eina_Inlist *itr;
 Dropable_Cbs *cbs;
-EINA_INLIST_FOREACH_SAFE(dropable-cbs_list, itr, cbs)
+while (dropable-cbs_list)
   {
+ cbs = EINA_INLIST_CONTAINER_GET(dropable-cbs_list, Dropable_Cbs);
  elm_drop_target_del(obj, cbs-types,
cbs-entercb, cbs-enterdata, cbs-leavecb, cbs-leavedata,
cbs-poscb, cbs-posdata, cbs-dropcb, cbs-dropdata);

-- 




[EGIT] [core/elementary] master 01/01: [Elm_Dnd] Correct drag position when rotation

2014-03-31 Thread Thiep Ha
woohyun pushed a commit to branch master.

http://git.enlightenment.org/core/elementary.git/commit/?id=2ab054022ce1288def918ab8018027bade538827

commit 2ab054022ce1288def918ab8018027bade538827
Author: Thiep Ha thie...@gmail.com
Date:   Tue Apr 1 09:39:16 2014 +0900

[Elm_Dnd] Correct drag position when rotation

Summary:
When window is rotated, the drag position is not updated.
It makes dnd cannot find out correct dropable objects.
This patch updates the drag position when window is rotated, so that dnd 
can find correct dropable objects.
@fix

P/S: This patch is originated from JackDanielZ (Daniel Zaoui). I update it 
to conform with lastest code.

Reviewers: JackDanielZ, raster

Reviewed By: JackDanielZ

CC: woohyun

Differential Revision: https://phab.enlightenment.org/D680
---
 src/lib/elm_cnp.c | 38 --
 1 file changed, 36 insertions(+), 2 deletions(-)

diff --git a/src/lib/elm_cnp.c b/src/lib/elm_cnp.c
index 0d08c01..35af060 100644
--- a/src/lib/elm_cnp.c
+++ b/src/lib/elm_cnp.c
@@ -1244,12 +1244,46 @@ static void
 _x11_dropable_coords_adjust(Dropable *dropable, Evas_Coord *x, Evas_Coord *y)
 {
Ecore_Evas *ee;
-   int ex = 0, ey = 0;
+   int ex = 0, ey = 0, ew = 0, eh = 0;
+   Evas_Object *win;
+   Evas_Coord x2, y2;
 
ee = ecore_evas_ecore_evas_get(evas_object_evas_get(dropable-obj));
-   ecore_evas_geometry_get(ee, ex, ey, NULL, NULL);
+   ecore_evas_geometry_get(ee, ex, ey, ew, eh);
*x = *x - ex;
*y = *y - ey;
+
+   if (elm_widget_is(dropable-obj))
+ {
+win = elm_widget_top_get(dropable-obj);
+if (win  !strcmp(evas_object_type_get(win), elm_win))
+  {
+ int rot = elm_win_rotation_get(win);
+ switch (rot)
+   {
+case 90:
+   x2 = ew - *y;
+   y2 = *x;
+   break;
+case 180:
+   x2 = ew - *x;
+   y2 = eh - *y;
+   break;
+case 270:
+   x2 = *y;
+   y2 = eh - *x;
+   break;
+default:
+   x2 = *x;
+   y2 = *y;
+   break;
+   }
+ cnp_debug(rotation %d, w %d, h %d - x:%d-%d, y:%d-%d\n,
+   rot, ew, eh, *x, x2, *y, y2);
+ *x = x2;
+ *y = y2;
+  }
+ }
 }
 
 static Eina_Bool

-- 




[EGIT] [core/elementary] master 01/01: [Elm_Entry] Update selection handlers position and its visibility when scrolling

2014-03-20 Thread Thiep Ha
raster pushed a commit to branch master.

http://git.enlightenment.org/core/elementary.git/commit/?id=25664da87d6988020e31f01cfb48fd6641d2b01f

commit 25664da87d6988020e31f01cfb48fd6641d2b01f
Author: Thiep Ha thie...@gmail.com
Date:   Thu Mar 20 19:33:42 2014 +0900

[Elm_Entry] Update selection handlers position and its visibility when 
scrolling

Summary:
Selection handlers' position are not updated when entry is scrolled.
You can check on elementary_test - Entry 3 (or Entry 4 which is 
scrollable) - Select some text - Scroll entry and see.
This patch is submitted to fix this bug. It update selection handlers' 
position when entry is scrolled and hide them if needed.
@fix

Reviewers: raster

Differential Revision: https://phab.enlightenment.org/D640
---
 src/lib/elm_entry.c | 108 +++-
 1 file changed, 98 insertions(+), 10 deletions(-)

diff --git a/src/lib/elm_entry.c b/src/lib/elm_entry.c
index ef567c9..ac88619 100644
--- a/src/lib/elm_entry.c
+++ b/src/lib/elm_entry.c
@@ -388,6 +388,39 @@ _hide_selection_handler(Evas_Object *obj)
sd-end_handler_shown = EINA_FALSE;
 }
 
+static Eina_Rectangle *
+_viewport_region_get(Evas_Object *obj)
+{
+   ELM_ENTRY_DATA_GET(obj, sd);
+   Eina_Rectangle *rect = eina_rectangle_new(0, 0, 0, 0);
+   Evas_Object *parent;
+
+   if (sd-scroll)
+ evas_object_geometry_get(sd-scr_edje, rect-x, rect-y, rect-w, 
rect-h);
+   else
+ evas_object_geometry_get(sd-entry_edje, rect-x, rect-y, rect-w, 
rect-h);
+
+   parent = elm_widget_parent_get(obj);
+   while (parent)
+ {
+if (eo_isa(parent, ELM_INTERFACE_SCROLLABLE_CLASS))
+  {
+ Eina_Rectangle *pr = eina_rectangle_new(0, 0, 0, 0);
+ evas_object_geometry_get(parent, pr-x, pr-y, pr-w, pr-h);
+ if (!eina_rectangle_intersection(rect, pr))
+   {
+  rect-x = rect-y = rect-w = rect-h = 0;
+  eina_rectangle_free(pr);
+  break;
+   }
+ eina_rectangle_free(pr);
+  }
+parent = elm_widget_parent_get(parent);
+ }
+
+   return rect;
+}
+
 static void
 _update_selection_handler(Evas_Object *obj)
 {
@@ -400,6 +433,11 @@ _update_selection_handler(Evas_Object *obj)
 
if (!sd-sel_handler_disabled)
  {
+Eina_Rectangle *rect;
+Evas_Coord hx, hy;
+Eina_Bool hidden = EINA_FALSE;
+
+rect = _viewport_region_get(obj);
 start_pos = edje_object_part_text_cursor_pos_get
(sd-entry_edje, elm.text, EDJE_CURSOR_SELECTION_BEGIN);
 end_pos = edje_object_part_text_cursor_pos_get
@@ -407,7 +445,7 @@ _update_selection_handler(Evas_Object *obj)
 
 evas_object_geometry_get(sd-entry_edje, ent_x, ent_y, NULL, NULL);
 last_pos = edje_object_part_text_cursor_pos_get(sd-entry_edje, 
elm.text,
-EDJE_CURSOR_MAIN);
+EDJE_CURSOR_MAIN);
 edje_object_part_text_cursor_pos_set(sd-entry_edje, elm.text,
  EDJE_CURSOR_MAIN, start_pos);
 edje_object_part_text_cursor_geometry_get(sd-entry_edje, elm.text,
@@ -418,27 +456,67 @@ _update_selection_handler(Evas_Object *obj)
   ex, ey, NULL, eh);
 edje_object_part_text_cursor_pos_set(sd-entry_edje, elm.text,
  EDJE_CURSOR_MAIN, last_pos);
-if (!sd-start_handler_shown)
+if (start_pos  end_pos)
+  {
+ hx = ent_x + sx;
+ hy = ent_y + sy + sh;
+ evas_object_move(sd-start_handler, hx, hy);
+  }
+else
+  {
+ hx = ent_x + ex;
+ hy = ent_y + ey + eh;
+ evas_object_move(sd-start_handler, hx, hy);
+  }
+if (!eina_rectangle_xcoord_inside(rect, hx) ||
+!eina_rectangle_ycoord_inside(rect, hy))
+  {
+ hidden = EINA_TRUE;
+  }
+if (!sd-start_handler_shown  !hidden)
   {
  edje_object_signal_emit(sd-start_handler,
  elm,handler,show, elm);
  sd-start_handler_shown = EINA_TRUE;
   }
+else if (sd-start_handler_shown  hidden)
+  {
+ edje_object_signal_emit(sd-start_handler,
+ elm,handler,hide, elm);
+ sd-start_handler_shown = EINA_FALSE;
+  }
+
+hidden = EINA_FALSE;
 if (start_pos  end_pos)
-  evas_object_move(sd-start_handler, ent_x + sx, ent_y + sy + sh);
+  {
+ hx = ent_x + ex;
+ hy = ent_y + ey + eh;
+ evas_object_move(sd-end_handler, hx, hy);
+  }
 else
-  evas_object_move(sd-start_handler, ent_x + ex, ent_y + ey + eh

[EGIT] [core/elementary] master 01/01: [Elm_Dnd] Fix type matching of drag and drop target objects in X11.

2014-03-19 Thread Thiep Ha
raster pushed a commit to branch master.

http://git.enlightenment.org/core/elementary.git/commit/?id=d481ff843fc550a9bec3402a731abee561693648

commit d481ff843fc550a9bec3402a731abee561693648
Author: Thiep Ha thie...@gmail.com
Date:   Wed Mar 19 15:59:13 2014 +0900

[Elm_Dnd] Fix type matching of drag and drop target objects in X11.

Summary:
Type matching for drag and drop targets does not consider drop target 
objects' types.

For example, we have drag object which provides image type and drop target 
object which only accepts text type.
For current code, in _x11_dnd_drop function, we only check savedtypes.types 
with _x11_atoms.
As result, we allows the image to be dropped into text. You can refer to 
the test in D617.

This path fixes this issue by matching drag object's type with drop 
targets' types to find suitable one.
@fix

Reviewers: raster, JackDanielZ, seoz, woohyun

Differential Revision: https://phab.enlightenment.org/D628
---
 src/lib/elm_cnp.c | 337 ++
 1 file changed, 216 insertions(+), 121 deletions(-)

diff --git a/src/lib/elm_cnp.c b/src/lib/elm_cnp.c
index a6a1148..1816334 100644
--- a/src/lib/elm_cnp.c
+++ b/src/lib/elm_cnp.c
@@ -95,8 +95,10 @@ struct _Dropable
/* FIXME: Cache window */
Eina_Inlist*cbs_list; /* List of Dropable_Cbs * */
struct {
-  Evas_Coord   x, y;
-  Eina_Boolin : 1;
+  Evas_Coord  x, y;
+  Eina_Bool   in : 1;
+  const char *type;
+  Elm_Sel_Format  format;
} last;
 };
 
@@ -1171,10 +1173,10 @@ _x11_dropable_find(Ecore_X_Window win)
return NULL;
 }
 
-static Dropable *
-_x11_dropable_geom_find(Ecore_X_Window win, Evas_Coord px, Evas_Coord py)
+static Eina_List *
+_x11_dropable_list_geom_find(Ecore_X_Window win, Evas_Coord px, Evas_Coord py)
 {
-   Eina_List *itr, *top_objects_list = NULL;
+   Eina_List *itr, *top_objects_list = NULL, *dropable_list = NULL;
Evas *evas = NULL;
Evas_Object *top_obj;
Dropable *dropable = NULL;
@@ -1211,15 +1213,31 @@ _x11_dropable_geom_find(Ecore_X_Window win, Evas_Coord 
px, Evas_Coord py)
   {
  eo_do(object, eo_base_data_get(__elm_dropable, (void 
**)dropable));
  if (dropable)
-goto end;
+   {
+  Eina_Bool exist = EINA_FALSE;
+  Eina_List *l;
+  Dropable *d = NULL;
+  EINA_LIST_FOREACH(dropable_list, l, d)
+{
+   if (d == dropable)
+ {
+exist = EINA_TRUE;
+break;
+ }
+}
+  if (!exist)
+dropable_list = eina_list_append(dropable_list, dropable);
+  object = evas_object_smart_parent_get(object);
+  if (dropable)
+cnp_debug(Drop target %p of type %s found\n,
+  dropable-obj, 
eo_class_name_get(eo_class_get(dropable-obj)));
+   }
  else
 object = evas_object_smart_parent_get(object);
   }
  }
-end:
eina_list_free(top_objects_list);
-   if (dropable) cnp_debug(Drop target %p of type %s found\n, dropable-obj, 
eo_class_name_get(eo_class_get(dropable-obj)));
-   return dropable;
+   return dropable_list;
 }
 
 static void
@@ -1234,22 +1252,6 @@ _x11_dropable_coords_adjust(Dropable *dropable, 
Evas_Coord *x, Evas_Coord *y)
*y = *y - ey;
 }
 
-static void
-_x11_dropable_all_set(Ecore_X_Window win, Evas_Coord x, Evas_Coord y, 
Eina_Bool set)
-{
-   Eina_List *l;
-   Dropable *dropable;
-   EINA_LIST_FOREACH(drops, l, dropable)
- {
-if (_x11_elm_widget_xwin_get(dropable-obj) == win)
-  {
- dropable-last.x = x;
- dropable-last.y = y;
- dropable-last.in = set;
-  }
- }
-}
-
 static Eina_Bool
 _x11_dnd_enter(void *data EINA_UNUSED, int etype EINA_UNUSED, void *ev)
 {
@@ -1262,7 +1264,6 @@ _x11_dnd_enter(void *data EINA_UNUSED, int etype 
EINA_UNUSED, void *ev)
if (dropable)
  {
 cnp_debug(Enter %x\n, enter-win);
-_x11_dropable_all_set(enter-win, 0, 0, EINA_FALSE);
  }
/* Skip it */
cnp_debug(enter types=%p (%d)\n, enter-types, enter-num_types);
@@ -1294,53 +1295,74 @@ _x11_dnd_enter(void *data EINA_UNUSED, int etype 
EINA_UNUSED, void *ev)
 }
 
 static void
-_x11_dnd_dropable_handle(Dropable *dropable, Evas_Coord x, Evas_Coord y, 
Eina_Bool have_obj, Elm_Xdnd_Action action)
+_x11_dnd_dropable_handle(Dropable *dropable, Evas_Coord x, Evas_Coord y, 
Elm_Xdnd_Action action)
 {
-   Dropable *dropable_last = NULL;
+   Dropable *d, *last_dropable = NULL;
+   Eina_List *l;
Dropable_Cbs *cbs;
Eina_Inlist *itr;
 
-   if (dropable-last.in)
- dropable_last = _x11_dropable_geom_find

[EGIT] [core/elementary] master 01/01: Test_dnd: Add more test for dnd

2014-03-13 Thread Thiep Ha
seoz pushed a commit to branch master.

http://git.enlightenment.org/core/elementary.git/commit/?id=6e9b276006beea7fee4c7b36597c929a594d0c86

commit 6e9b276006beea7fee4c7b36597c929a594d0c86
Author: Thiep Ha thie...@gmail.com
Date:   Thu Mar 13 22:08:08 2014 +0900

Test_dnd: Add more test for dnd

Summary:
There is no dnd test for format types except ELM_SEL_FORMAT_TARGETS.
This patch adds a test for other formats, so that we can test more about 
dnd.

Reviewers: JackDanielZ, seoz

CC: seoz

Differential Revision: https://phab.enlightenment.org/D617
---
 src/bin/test.c |   2 +
 src/bin/test_dnd.c | 203 +
 2 files changed, 205 insertions(+)

diff --git a/src/bin/test.c b/src/bin/test.c
index dc66533..e3917ea 100644
--- a/src/bin/test.c
+++ b/src/bin/test.c
@@ -236,6 +236,7 @@ void test_dnd_genlist_default_anim(void *data, Evas_Object 
*obj, void *event_inf
 void test_dnd_genlist_user_anim(void *data, Evas_Object *obj, void 
*event_info);
 void test_dnd_genlist_gengrid(void *data, Evas_Object *obj, void *event_info);
 void test_dnd_multi_features(void *data, Evas_Object *obj, void *event_info);
+void test_dnd_types(void *data, Evas_Object *obj, void *event_info);
 void test_task_switcher(void *data, Evas_Object *obj, void *event_info);
 void test_application_server_message(void *data, Evas_Object *obj, void 
*event_info);
 void test_application_server_phone(void *data, Evas_Object *obj, void 
*event_info);
@@ -796,6 +797,7 @@ add_tests:
ADD_TEST(NULL, Drag  Drop, Genlist DnD User Anim, 
test_dnd_genlist_user_anim);
ADD_TEST(NULL, Drag  Drop, Genlist-Gengrid DnD, 
test_dnd_genlist_gengrid);
ADD_TEST(NULL, Drag  Drop, Features DnD, test_dnd_multi_features);
+   ADD_TEST(NULL, Drag  Drop, Types DnD, test_dnd_types);
 
//--//
ADD_TEST(NULL, Miscellaneous, Copy And Paste, test_cnp);
diff --git a/src/bin/test_dnd.c b/src/bin/test_dnd.c
index 1507ade..739843f 100644
--- a/src/bin/test_dnd.c
+++ b/src/bin/test_dnd.c
@@ -1107,3 +1107,206 @@ test_dnd_multi_features(void *data EINA_UNUSED, 
Evas_Object *obj EINA_UNUSED, vo
evas_object_resize(win, 680, 800);
evas_object_show(win);
 }
+
+static void
+_enter_cb(void *data EINA_UNUSED, Evas_Object *obj)
+{
+   printf(%s: obj: %s %p enter\n, __func__,
+  evas_object_type_get(obj), obj);
+}
+
+static void
+_leave_cb(void *data EINA_UNUSED, Evas_Object *obj)
+{
+   printf(%s: obj: %s %p leave\n, __func__,
+  evas_object_type_get(obj), obj);
+}
+
+static void
+_pos_cb(void *data EINA_UNUSED, Evas_Object *obj, Evas_Coord x, Evas_Coord y, 
Elm_Xdnd_Action action)
+{
+   printf(%s: obj: %s %p pos: %d %d, action: %d\n, __func__,
+  evas_object_type_get(obj), obj, x, y, action);
+}
+
+static Eina_Bool
+_label_drop_cb(void *data EINA_UNUSED, Evas_Object *obj, Elm_Selection_Data 
*ev)
+{
+   const char *text = ev-data;
+   printf(%s: obj: %s %p drop data: %s\n, __func__,
+  evas_object_type_get(obj), obj, text);
+   elm_object_text_set(obj, text);
+   return EINA_TRUE;
+}
+
+static Eina_Bool
+_image_drop_cb(void *data EINA_UNUSED, Evas_Object *obj, Elm_Selection_Data 
*ev)
+{
+   const char *f = ev-data;
+   printf(%s: obj: %s %p drop data: %s\n, __func__,
+  evas_object_type_get(obj), obj, f);
+   elm_image_file_set(obj, f, NULL);
+   return EINA_TRUE;
+}
+
+static Evas_Object *
+_label_create_icon(void *data, Evas_Object *parent, Evas_Coord *xoff, 
Evas_Coord *yoff)
+{
+   Evas_Object *lb = data;
+   Evas_Object *icon;
+   const char *text;
+   Evas_Coord x, y, w, h;
+   int xm, ym;
+
+   icon = elm_label_add(parent);
+   text = elm_object_text_get(lb);
+   elm_object_text_set(icon, text);
+
+   evas_object_geometry_get(lb, x, y, w, h);
+   evas_object_move(icon, x, y);
+   evas_object_resize(icon, w, h);
+   evas_object_show(icon);
+
+   evas_pointer_canvas_xy_get(evas_object_evas_get(lb), xm, ym);
+   if (xoff) *xoff = xm - (w / 2);
+   if (yoff) *yoff = ym - (h / 2);
+
+   return icon;
+}
+
+static void
+_label_mouse_down_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj 
EINA_UNUSED, void *event_info EINA_UNUSED)
+{
+   Evas_Object *lb = data;
+   const char *text = elm_object_text_get(lb);
+
+   elm_drag_start(lb, ELM_SEL_FORMAT_TEXT, text, ELM_XDND_ACTION_COPY,
+  _label_create_icon, lb,
+  NULL, NULL, NULL, NULL, NULL, NULL);
+}
+
+static Evas_Object *
+_image_create_icon(void *data, Evas_Object *parent, Evas_Coord *xoff, 
Evas_Coord *yoff)
+{
+   Evas_Object *ic;
+   Evas_Object *io = data;
+   const char *f, *g;
+   Evas_Coord x, y, w, h, xm, ym;
+
+   elm_image_file_get(io, f, g);
+   ic = elm_image_add(parent);
+   elm_image_file_set(ic, f, g);
+   evas_object_geometry_get(io, x, y, w, h);
+   evas_object_move(ic, x, y);
+   evas_object_resize(ic, 60, 60);
+   evas_object_show(ic);
+
+   evas_pointer_canvas_xy_get(evas_object_evas_get(io), xm

[EGIT] [core/elementary] master 02/03: Fix bug of moving cursor handler

2014-03-06 Thread Thiep Ha
raster pushed a commit to branch master.

http://git.enlightenment.org/core/elementary.git/commit/?id=f7a1955ebbc4223cdcd77d5c76fc9ca1c9f625c6

commit f7a1955ebbc4223cdcd77d5c76fc9ca1c9f625c6
Author: Thiep Ha thie...@gmail.com
Date:   Thu Mar 6 19:33:05 2014 +0900

Fix bug of moving cursor handler

Summary:
In elm entry, cursor handlers are placed and moved incorrectly if we do 
selection from bottom to top.
Ex: In elementary_test - Entry - Right click - choose Select - do 
selection from bottom to top (or press Shift + - keys to do selection).
Look at selection handlers: they are incorrectly placed.
Try to move selection handlers: They suddenly move to near each other.

Minor: Remove unused variable.

@fix

Reviewers: seoz

Differential Revision: https://phab.enlightenment.org/D583
---
 src/lib/elm_entry.c| 111 +++--
 src/lib/elm_widget_entry.h |   2 +
 2 files changed, 70 insertions(+), 43 deletions(-)

diff --git a/src/lib/elm_entry.c b/src/lib/elm_entry.c
index 5217940..ab4de25 100644
--- a/src/lib/elm_entry.c
+++ b/src/lib/elm_entry.c
@@ -393,10 +393,10 @@ _update_selection_handler(Evas_Object *obj)
 {
ELM_ENTRY_DATA_GET(obj, sd);
 
-   Evas_Coord sx, sy, sw, sh;
+   Evas_Coord sx, sy, sh;
Evas_Coord ent_x, ent_y;
-   Evas_Coord ex, ey, ew, eh;
-   int start_pos, end_pos;
+   Evas_Coord ex, ey, eh;
+   int start_pos, end_pos, last_pos;
 
if (!sd-sel_handler_disabled)
  {
@@ -406,31 +406,39 @@ _update_selection_handler(Evas_Object *obj)
(sd-entry_edje, elm.text, EDJE_CURSOR_SELECTION_END);
 
 evas_object_geometry_get(sd-entry_edje, ent_x, ent_y, NULL, NULL);
+last_pos = edje_object_part_text_cursor_pos_get(sd-entry_edje, 
elm.text,
+EDJE_CURSOR_MAIN);
 edje_object_part_text_cursor_pos_set(sd-entry_edje, elm.text,
  EDJE_CURSOR_MAIN, start_pos);
 edje_object_part_text_cursor_geometry_get(sd-entry_edje, elm.text,
-  sx, sy, sw, sh);
+  sx, sy, NULL, sh);
 edje_object_part_text_cursor_pos_set(sd-entry_edje, elm.text,
  EDJE_CURSOR_MAIN, end_pos);
 edje_object_part_text_cursor_geometry_get(sd-entry_edje, elm.text,
-  ex, ey, ew, eh);
-if (sd-start_handler_down)
-  edje_object_part_text_cursor_pos_set(sd-entry_edje, elm.text,
-   EDJE_CURSOR_MAIN, start_pos);
+  ex, ey, NULL, eh);
+edje_object_part_text_cursor_pos_set(sd-entry_edje, elm.text,
+ EDJE_CURSOR_MAIN, last_pos);
 if (!sd-start_handler_shown)
   {
  edje_object_signal_emit(sd-start_handler,
  elm,handler,show, elm);
  sd-start_handler_shown = EINA_TRUE;
   }
-evas_object_move(sd-start_handler, ent_x + sx, ent_y + sy + sh);
+if (start_pos  end_pos)
+  evas_object_move(sd-start_handler, ent_x + sx, ent_y + sy + sh);
+else
+  evas_object_move(sd-start_handler, ent_x + ex, ent_y + ey + eh);
+
 if (!sd-end_handler_shown)
   {
  edje_object_signal_emit(sd-end_handler,
  elm,handler,show, elm);
  sd-end_handler_shown = EINA_TRUE;
   }
-evas_object_move(sd-end_handler, ent_x + ex, ent_y + ey + eh);
+if (start_pos  end_pos)
+  evas_object_move(sd-end_handler, ent_x + ex, ent_y + ey + eh);
+else
+  evas_object_move(sd-end_handler, ent_x + sx, ent_y + sy + sh);
  }
else
  {
@@ -3025,7 +3033,6 @@ _resize_cb(void *data,
_elm_entry_resize_internal(data);
 }
 
-Evas_Coord ox, oy;
 static void
 _start_handler_mouse_down_cb(void *data,
  Evas *e EINA_UNUSED,
@@ -3037,21 +3044,33 @@ _start_handler_mouse_down_cb(void *data,
Evas_Event_Mouse_Down *ev = event_info;
Evas_Coord ex, ey;
Evas_Coord cx, cy, cw, ch;
-   int pos, main_pos;
+   int start_pos, end_pos, main_pos, pos;
 
sd-start_handler_down = EINA_TRUE;
-   pos = edje_object_part_text_cursor_pos_get(sd-entry_edje, elm.text,
+   start_pos = edje_object_part_text_cursor_pos_get(sd-entry_edje, elm.text,
   EDJE_CURSOR_SELECTION_BEGIN);
+   end_pos = edje_object_part_text_cursor_pos_get(sd-entry_edje, elm.text,
+  EDJE_CURSOR_SELECTION_END);
main_pos = edje_object_part_text_cursor_pos_get(sd-entry_edje, elm.text,
EDJE_CURSOR_MAIN

[EGIT] [core/elementary] elementary-1.9 02/03: Fix bug of moving cursor handler

2014-03-06 Thread Thiep Ha
raster pushed a commit to branch elementary-1.9.

http://git.enlightenment.org/core/elementary.git/commit/?id=d57cda07c48741779bc8c1384afcd422c327a338

commit d57cda07c48741779bc8c1384afcd422c327a338
Author: Thiep Ha thie...@gmail.com
Date:   Thu Mar 6 19:33:05 2014 +0900

Fix bug of moving cursor handler

Summary:
In elm entry, cursor handlers are placed and moved incorrectly if we do 
selection from bottom to top.
Ex: In elementary_test - Entry - Right click - choose Select - do 
selection from bottom to top (or press Shift + - keys to do selection).
Look at selection handlers: they are incorrectly placed.
Try to move selection handlers: They suddenly move to near each other.

Minor: Remove unused variable.

@fix

Reviewers: seoz

Differential Revision: https://phab.enlightenment.org/D583
---
 src/lib/elm_entry.c| 111 +++--
 src/lib/elm_widget_entry.h |   2 +
 2 files changed, 70 insertions(+), 43 deletions(-)

diff --git a/src/lib/elm_entry.c b/src/lib/elm_entry.c
index 5217940..ab4de25 100644
--- a/src/lib/elm_entry.c
+++ b/src/lib/elm_entry.c
@@ -393,10 +393,10 @@ _update_selection_handler(Evas_Object *obj)
 {
ELM_ENTRY_DATA_GET(obj, sd);
 
-   Evas_Coord sx, sy, sw, sh;
+   Evas_Coord sx, sy, sh;
Evas_Coord ent_x, ent_y;
-   Evas_Coord ex, ey, ew, eh;
-   int start_pos, end_pos;
+   Evas_Coord ex, ey, eh;
+   int start_pos, end_pos, last_pos;
 
if (!sd-sel_handler_disabled)
  {
@@ -406,31 +406,39 @@ _update_selection_handler(Evas_Object *obj)
(sd-entry_edje, elm.text, EDJE_CURSOR_SELECTION_END);
 
 evas_object_geometry_get(sd-entry_edje, ent_x, ent_y, NULL, NULL);
+last_pos = edje_object_part_text_cursor_pos_get(sd-entry_edje, 
elm.text,
+EDJE_CURSOR_MAIN);
 edje_object_part_text_cursor_pos_set(sd-entry_edje, elm.text,
  EDJE_CURSOR_MAIN, start_pos);
 edje_object_part_text_cursor_geometry_get(sd-entry_edje, elm.text,
-  sx, sy, sw, sh);
+  sx, sy, NULL, sh);
 edje_object_part_text_cursor_pos_set(sd-entry_edje, elm.text,
  EDJE_CURSOR_MAIN, end_pos);
 edje_object_part_text_cursor_geometry_get(sd-entry_edje, elm.text,
-  ex, ey, ew, eh);
-if (sd-start_handler_down)
-  edje_object_part_text_cursor_pos_set(sd-entry_edje, elm.text,
-   EDJE_CURSOR_MAIN, start_pos);
+  ex, ey, NULL, eh);
+edje_object_part_text_cursor_pos_set(sd-entry_edje, elm.text,
+ EDJE_CURSOR_MAIN, last_pos);
 if (!sd-start_handler_shown)
   {
  edje_object_signal_emit(sd-start_handler,
  elm,handler,show, elm);
  sd-start_handler_shown = EINA_TRUE;
   }
-evas_object_move(sd-start_handler, ent_x + sx, ent_y + sy + sh);
+if (start_pos  end_pos)
+  evas_object_move(sd-start_handler, ent_x + sx, ent_y + sy + sh);
+else
+  evas_object_move(sd-start_handler, ent_x + ex, ent_y + ey + eh);
+
 if (!sd-end_handler_shown)
   {
  edje_object_signal_emit(sd-end_handler,
  elm,handler,show, elm);
  sd-end_handler_shown = EINA_TRUE;
   }
-evas_object_move(sd-end_handler, ent_x + ex, ent_y + ey + eh);
+if (start_pos  end_pos)
+  evas_object_move(sd-end_handler, ent_x + ex, ent_y + ey + eh);
+else
+  evas_object_move(sd-end_handler, ent_x + sx, ent_y + sy + sh);
  }
else
  {
@@ -3025,7 +3033,6 @@ _resize_cb(void *data,
_elm_entry_resize_internal(data);
 }
 
-Evas_Coord ox, oy;
 static void
 _start_handler_mouse_down_cb(void *data,
  Evas *e EINA_UNUSED,
@@ -3037,21 +3044,33 @@ _start_handler_mouse_down_cb(void *data,
Evas_Event_Mouse_Down *ev = event_info;
Evas_Coord ex, ey;
Evas_Coord cx, cy, cw, ch;
-   int pos, main_pos;
+   int start_pos, end_pos, main_pos, pos;
 
sd-start_handler_down = EINA_TRUE;
-   pos = edje_object_part_text_cursor_pos_get(sd-entry_edje, elm.text,
+   start_pos = edje_object_part_text_cursor_pos_get(sd-entry_edje, elm.text,
   EDJE_CURSOR_SELECTION_BEGIN);
+   end_pos = edje_object_part_text_cursor_pos_get(sd-entry_edje, elm.text,
+  EDJE_CURSOR_SELECTION_END);
main_pos = edje_object_part_text_cursor_pos_get(sd-entry_edje, elm.text,
EDJE_CURSOR_MAIN

[EGIT] [core/elementary] master 01/01: [Elm_Entry] Fix bug: magnifier position is incorrect when mouse down on selection handler

2014-02-21 Thread Thiep Ha
hermet pushed a commit to branch master.

http://git.enlightenment.org/core/elementary.git/commit/?id=3dba4c1abb6018b46146454d66643268bb4e90fd

commit 3dba4c1abb6018b46146454d66643268bb4e90fd
Author: Thiep Ha thie...@gmail.com
Date:   Sat Feb 22 12:06:31 2014 +0900

[Elm_Entry] Fix bug: magnifier position is incorrect when mouse down on 
selection handler

Summary:
Magnifier is displayed incorrectly when mouse down on selection handler

Reproduce way: Right click on entry (eg Entry), choose Select, select some 
text, press left mouse
on selection handler (do not move the mouse), take a look at magnifier 
position.
Reason: Magnifier position is set to mouse down position in entry.
Fix: Check mouse down status and place correct position for magnifier.

Reviewers: seoz, Hermet

Reviewed By: Hermet

Differential Revision: https://phab.enlightenment.org/D573
---
 src/lib/elm_entry.c | 14 +-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/src/lib/elm_entry.c b/src/lib/elm_entry.c
index d3a3131..5217940 100644
--- a/src/lib/elm_entry.c
+++ b/src/lib/elm_entry.c
@@ -1442,7 +1442,19 @@ static void
 _magnifier_proxy_update(void *data, Evas *e EINA_UNUSED, Evas_Object *obj 
EINA_UNUSED, void *event_info EINA_UNUSED)
 {
ELM_ENTRY_DATA_GET(data, sd);
-   _magnifier_move(data, sd-downx, sd-downy);
+   if ((sd-start_handler_down) || (sd-end_handler_down))
+ {
+Evas_Coord ex, ey, cx, cy, ch;
+
+evas_object_geometry_get(sd-entry_edje, ex, ey, NULL, NULL);
+edje_object_part_text_cursor_geometry_get(sd-entry_edje, elm.text,
+  cx, cy, NULL, ch);
+_magnifier_move(data, ex + cx, ey + cy + (ch / 2));
+ }
+   else
+ {
+_magnifier_move(data, sd-downx, sd-downy);
+ }
 }
 
 static void

-- 




[EGIT] [core/elementary] master 01/01: [Dnd] Fix double text insert issue in elm_entry, drop at disable, non-editable entry

2014-02-18 Thread Thiep Ha
raster pushed a commit to branch master.

http://git.enlightenment.org/core/elementary.git/commit/?id=009bb2cef32251db3d15aa879e37ad8b3e938a25

commit 009bb2cef32251db3d15aa879e37ad8b3e938a25
Author: Thiep Ha thie...@gmail.com
Date:   Wed Feb 19 12:25:08 2014 +0900

[Dnd] Fix double text insert issue in elm_entry, drop at disable, 
non-editable entry

Summary:
Issue 1: If you drop text to elm_entry, text is inserted twice.
Reason: Drop callbacks are registered multiple times in elm_entry.
Resolve: Register only one drop callback at entry side.

Issue 2: Even thought entry is disabled, non-editable, you still can drop 
text, image file. (Example, run Entry Scrolled and drop text, image file to 
disabled or non-editable entries).
Reason: Drop callback are registered but not remove when entry is set to 
disabled, non-editable mode.
Resolve: Correct registering and removing drop callbacks in entry.

Reviewers: JackDanielZ, raster

Reviewed By: raster

CC: woohyun

Differential Revision: https://phab.enlightenment.org/D565
---
 src/lib/elm_entry.c| 123 -
 src/lib/elm_widget_entry.h |   1 +
 2 files changed, 79 insertions(+), 45 deletions(-)

diff --git a/src/lib/elm_entry.c b/src/lib/elm_entry.c
index 27b4c81..d3a3131 100644
--- a/src/lib/elm_entry.c
+++ b/src/lib/elm_entry.c
@@ -508,6 +508,39 @@ _elm_entry_theme_group_get(Evas_Object *obj)
  }
 }
 
+static Eina_Bool
+_drag_drop_cb(void *data EINA_UNUSED,
+  Evas_Object *obj,
+  Elm_Selection_Data *drop)
+{
+   Eina_Bool rv;
+
+   ELM_ENTRY_DATA_GET(obj, sd);
+
+   edje_object_part_text_cursor_copy
+ (sd-entry_edje, elm.text, EDJE_CURSOR_MAIN, /*-*/ EDJE_CURSOR_USER);
+   rv = edje_object_part_text_cursor_coord_set
+   (sd-entry_edje, elm.text, EDJE_CURSOR_MAIN, drop-x, drop-y);
+
+   if (!rv) WRN(Warning: Failed to position cursor: paste anyway);
+
+   elm_entry_entry_insert(obj, drop-data);
+   edje_object_part_text_cursor_copy
+ (sd-entry_edje, elm.text, EDJE_CURSOR_USER, /*-*/ EDJE_CURSOR_MAIN);
+
+   return EINA_TRUE;
+}
+
+static Elm_Sel_Format
+_get_drop_format(Evas_Object *obj)
+{
+   ELM_ENTRY_DATA_GET(obj, sd);
+
+   if ((sd-editable)  (!sd-single_line)  (!sd-password)  
(!sd-disabled))
+ return ELM_SEL_FORMAT_MARKUP | ELM_SEL_FORMAT_IMAGE;
+   return ELM_SEL_FORMAT_MARKUP;
+}
+
 /* we can't reuse layout's here, because it's on entry_edje only */
 static void
 _elm_entry_smart_disable(Eo *obj, void *_pd, va_list *list)
@@ -516,6 +549,11 @@ _elm_entry_smart_disable(Eo *obj, void *_pd, va_list *list)
if (ret) *ret = EINA_FALSE;
Elm_Entry_Smart_Data *sd = _pd;
 
+   elm_drop_target_del(obj, sd-drop_format,
+   NULL, NULL,
+   NULL, NULL,
+   NULL, NULL,
+   _drag_drop_cb, NULL);
if (elm_object_disabled_get(obj))
  {
 edje_object_signal_emit(sd-entry_edje, elm,state,disabled, elm);
@@ -535,6 +573,12 @@ _elm_entry_smart_disable(Eo *obj, void *_pd, va_list *list)
  eo_do(obj, elm_scrollable_interface_freeze_set(EINA_FALSE));
   }
 sd-disabled = EINA_FALSE;
+sd-drop_format = _get_drop_format(obj);
+elm_drop_target_add(obj, sd-drop_format,
+NULL, NULL,
+NULL, NULL,
+NULL, NULL,
+_drag_drop_cb, NULL);
  }
 
if (ret) *ret = EINA_TRUE;
@@ -2333,29 +2377,6 @@ _event_selection_clear(void *data EINA_UNUSED,
 }
 #endif
 
-static Eina_Bool
-_drag_drop_cb(void *data EINA_UNUSED,
-  Evas_Object *obj,
-  Elm_Selection_Data *drop)
-{
-   Eina_Bool rv;
-
-   ELM_ENTRY_DATA_GET(obj, sd);
-
-   edje_object_part_text_cursor_copy
- (sd-entry_edje, elm.text, EDJE_CURSOR_MAIN, /*-*/ EDJE_CURSOR_USER);
-   rv = edje_object_part_text_cursor_coord_set
-   (sd-entry_edje, elm.text, EDJE_CURSOR_MAIN, drop-x, drop-y);
-
-   if (!rv) WRN(Warning: Failed to position cursor: paste anyway);
-
-   elm_entry_entry_insert(obj, drop-data);
-   edje_object_part_text_cursor_copy
- (sd-entry_edje, elm.text, EDJE_CURSOR_USER, /*-*/ EDJE_CURSOR_MAIN);
-
-   return EINA_TRUE;
-}
-
 static Evas_Object *
 _item_get(void *data,
   Evas_Object *edje EINA_UNUSED,
@@ -3185,6 +3206,13 @@ _elm_entry_smart_add(Eo *obj, void *_pd, va_list *list 
EINA_UNUSED)
priv-auto_save = EINA_TRUE;
priv-editable = EINA_TRUE;
 
+   priv-drop_format = ELM_SEL_FORMAT_MARKUP | ELM_SEL_FORMAT_IMAGE;
+   elm_drop_target_add(obj, priv-drop_format,
+   NULL, NULL,
+   NULL, NULL,
+   NULL, NULL,
+   _drag_drop_cb, NULL);
+
if (!elm_layout_theme_set(obj, entry, base, elm_widget_style_get(obj)))
  CRI(Failed to set layout!);
 
@@ -3309,10 +3337,6

[EGIT] [core/elementary] master 01/01: [DnD] Fix bug of hard-coded type when drag

2014-02-17 Thread Thiep Ha
raster pushed a commit to branch master.

http://git.enlightenment.org/core/elementary.git/commit/?id=601856ede71c1d98197933695e2d04128b915ec5

commit 601856ede71c1d98197933695e2d04128b915ec5
Author: Thiep Ha thie...@gmail.com
Date:   Tue Feb 18 15:47:07 2014 +0900

[DnD] Fix bug of hard-coded type when drag

Summary:
When we start dragging, the type is always set to text/uri-list no matter 
the format type set by application.
This patch fixs this hard-coded type issue. It will set types corresponding 
to the format type set by application.
For example, if application set format as ELM_SEL_FORMAT_TEXT, it will set 
types UTF8_STRING, STRING, COMPOUND_TEXT, TEXT,
text/plain, text/plain;charset=utf-8.

Reviewers: JackDanielZ, raster

Reviewed By: raster

CC: woohyun, seoz

Differential Revision: https://phab.enlightenment.org/D546
---
 src/lib/elm_cnp.c | 20 +++-
 1 file changed, 19 insertions(+), 1 deletion(-)

diff --git a/src/lib/elm_cnp.c b/src/lib/elm_cnp.c
index f488003..a6a1148 100644
--- a/src/lib/elm_cnp.c
+++ b/src/lib/elm_cnp.c
@@ -2024,6 +2024,7 @@ _x11_elm_drag_start(Evas_Object *obj, Elm_Sel_Format 
format, const char *data,
Evas_Object *icon = NULL;
int w = 0, h = 0;
Ecore_X_Atom actx;
+   int i;
 
_x11_elm_cnp_init();
 
@@ -2035,7 +2036,24 @@ _x11_elm_drag_start(Evas_Object *obj, Elm_Sel_Format 
format, const char *data,
 return EINA_FALSE;
  }
 
-   ecore_x_dnd_type_set(xwin, text/uri-list, EINA_TRUE);
+   ecore_x_dnd_types_set(xwin, NULL, 0);
+   for (i = 0; i  CNP_N_ATOMS; i++)
+ {
+if (_x11_atoms[i].formats == ELM_SEL_FORMAT_TARGETS)
+  {
+ if (format == ELM_SEL_FORMAT_TARGETS)
+   {
+  ecore_x_dnd_type_set(xwin, _x11_atoms[i].name, EINA_TRUE);
+  cnp_debug(set dnd type: %s\n, _x11_atoms[i].name);
+   }
+  }
+else if (_x11_atoms[i].formats  format)
+  {
+ ecore_x_dnd_type_set(xwin, _x11_atoms[i].name, EINA_TRUE);
+ cnp_debug(set dnd type: %s\n, _x11_atoms[i].name);
+  }
+ }
+
sel = _x11_selections + ELM_SEL_TYPE_XDND;
sel-active = EINA_TRUE;
sel-widget = obj;

-- 




[EGIT] [core/elementary] master 01/02: Move selection handler from edje to elm

2013-11-08 Thread Thiep Ha
raster pushed a commit to branch master.

http://git.enlightenment.org/core/elementary.git/commit/?id=cf28573ad3a49ea6540e554c0a6d2034c4de82bb

commit cf28573ad3a49ea6540e554c0a6d2034c4de82bb
Author: Thiep Ha thie...@gmail.com
Date:   Fri Nov 8 17:06:08 2013 +0900

Move selection handler from edje to elm

Reviewers: cedric, raster, seoz, Hermet, tasn

CC: raster

Differential Revision: https://phab.enlightenment.org/D311
---
 data/themes/edc/elm/entry.edc |  13 +-
 src/lib/elm_entry.c   | 389 +++---
 src/lib/elm_entry_eo.h|  31 
 src/lib/elm_entry_legacy.h|  21 +++
 src/lib/elm_widget_entry.h|   7 +
 5 files changed, 393 insertions(+), 68 deletions(-)

diff --git a/data/themes/edc/elm/entry.edc b/data/themes/edc/elm/entry.edc
index e6188ec..fccab82 100644
--- a/data/themes/edc/elm/entry.edc
+++ b/data/themes/edc/elm/entry.edc
@@ -477,9 +477,6 @@ group { name: elm/entry/base/default;
  scale: 1;
  entry_mode: EDITABLE;
  select_mode: DEFAULT;
-// XXX: set BLOCK_HANDLE ONLY if in mobile mode... 
-// select_mode: BLOCK_HANDLE;
-
 // select_mode: EXPLICIT;
  cursor_mode: BEFORE;
  multiline: 1;
@@ -489,8 +486,6 @@ group { name: elm/entry/base/default;
  source4: elm/entry/cursor/default; // cursorover
 // source5: elm/entry/anchor/default; // anchor under
  source6: elm/entry/anchor/default; // anchor over
- source7: elm/entry/handler/start/default;
- source8: elm/entry/handler/end/default;
  description { state: default 0.0;
 /* we gotta use 0 0 here, because of scrolled entries */
 fixed: 0 0;
@@ -1029,13 +1024,13 @@ group { name: elm/entry/handler/start/default;
}
programs {
   program {
- signal: edje,handler,show; source: edje;
+ signal: elm,handler,show; source: elm;
  action: STATE_SET visible 0.0;
  target: base;
  target: event;
   }
   program {
- signal: edje,handler,hide; source: edje;
+ signal: elm,handler,hide; source: elm;
  action: STATE_SET default 0.0;
  target: base;
  target: event;
@@ -1076,13 +1071,13 @@ group { name: elm/entry/handler/end/default;
}
programs {
   program {
- signal: edje,handler,show; source: edje;
+ signal: elm,handler,show; source: elm;
  action: STATE_SET visible 0.0;
  target: base;
  target: event;
   }
   program {
- signal: edje,handler,hide; source: edje;
+ signal: elm,handler,hide; source: elm;
  action: STATE_SET default 0.0;
  target: base;
  target: event;
diff --git a/src/lib/elm_entry.c b/src/lib/elm_entry.c
index e047f6d..1dce14d 100644
--- a/src/lib/elm_entry.c
+++ b/src/lib/elm_entry.c
@@ -375,6 +375,77 @@ _mirrored_set(Evas_Object *obj,
  elm_widget_mirrored_set(sd-anchor_hover.hover, rtl);
 }
 
+static void
+_hide_selection_handler(Evas_Object *obj)
+{
+   ELM_ENTRY_DATA_GET(obj, sd);
+
+   edje_object_signal_emit(sd-start_handler, elm,handler,hide, elm);
+   sd-start_handler_shown = EINA_FALSE;
+   edje_object_signal_emit(sd-end_handler, elm,handler,hide, elm);
+   sd-end_handler_shown = EINA_FALSE;
+}
+
+static void
+_update_selection_handler(Evas_Object *obj)
+{
+   ELM_ENTRY_DATA_GET(obj, sd);
+
+   Evas_Coord sx, sy, sw, sh;
+   Evas_Coord ent_x, ent_y;
+   Evas_Coord ex, ey, ew, eh;
+   int start_pos, end_pos;
+
+   if (!sd-sel_handler_disabled)
+ {
+start_pos = edje_object_part_text_cursor_pos_get
+   (sd-entry_edje, elm.text, EDJE_CURSOR_SELECTION_BEGIN);
+end_pos = edje_object_part_text_cursor_pos_get
+   (sd-entry_edje, elm.text, EDJE_CURSOR_SELECTION_END);
+
+evas_object_geometry_get(sd-entry_edje, ent_x, ent_y, NULL, NULL);
+edje_object_part_text_cursor_pos_set(sd-entry_edje, elm.text,
+ EDJE_CURSOR_MAIN, start_pos);
+edje_object_part_text_cursor_geometry_get(sd-entry_edje, elm.text,
+  sx, sy, sw, sh);
+edje_object_part_text_cursor_pos_set(sd-entry_edje, elm.text,
+ EDJE_CURSOR_MAIN, end_pos);
+edje_object_part_text_cursor_geometry_get(sd-entry_edje, elm.text,
+  ex, ey, ew, eh);
+if (sd-start_handler_downed)
+  {
+ edje_object_part_text_cursor_pos_set(sd-entry_edje, elm.text,
+  EDJE_CURSOR_MAIN, start_pos);
+  }
+if (!sd-start_handler_shown)
+  {
+ sd-start_handler_shown = EINA_TRUE;
+ edje_object_signal_emit(sd-start_handler, elm,handler,show, 
elm);
+  }
+evas_object_move(sd-start_handler, ent_x + sx, ent_y + sy + sh

[EGIT] [core/efl] master 01/01: Remove selection handlers (and move to elm)

2013-11-08 Thread Thiep Ha
raster pushed a commit to branch master.

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

commit 44639b20984ce96c5b86aabe8b124b0a6102d534
Author: Thiep Ha thie...@gmail.com
Date:   Fri Nov 8 17:30:44 2013 +0900

Remove selection handlers (and move to elm)

Summary:
Selection handlers are now implemented in elementary. So, we should remove 
them from edje.
The BLOCK_HANDLE mode should be removed also.

Reviewers: cedric, tasn

CC: cedric, raster

Differential Revision: https://phab.enlightenment.org/D312
---
 data/edje/edc.vim|   2 +-
 data/edje/vim/syntax/edc.vim |   2 +-
 src/bin/edje/edje_cc_handlers.c  |  51 
 src/bin/edje/edje_convert.c  |   2 -
 src/bin/edje/edje_convert.h  |   2 +-
 src/bin/edje/edje_data_convert.c |   2 -
 src/lib/edje/edje_convert.c  |   2 -
 src/lib/edje/edje_convert.h  |   2 +-
 src/lib/edje/edje_data.c |   2 -
 src/lib/edje/edje_entry.c| 258 ++-
 src/lib/edje/edje_private.h  |   3 +-
 11 files changed, 15 insertions(+), 313 deletions(-)

diff --git a/data/edje/edc.vim b/data/edje/edc.vim
index e130e10..f8f31d0 100644
--- a/data/edje/edc.vim
+++ b/data/edje/edc.vim
@@ -68,7 +68,7 @@ syn keyword   cConstant   SCRIPT LUA_SCRIPT
 syn keywordcConstant   DRAG_VAL_SET DRAG_VAL_STEP DRAG_VAL_PAGE
 syn keywordcConstant   LINEAR SINUSOIDAL ACCELERATE DECELERATE SPRING
 syn keywordcConstant   VERTICAL HORIZONTAL ON_HOLD BOTH EDITABLE
-syn keywordcConstatn   DEFAULT EXPLICIT BLOCK_HANDLE
+syn keywordcConstatn   DEFAULT EXPLICIT
 syn keywordcConstant   CURRENT
 syn keywordcConstant   FOCUS_SET default NEITHER
 syn keywordcConstant   DYNAMIC STATIC PASSWORD
diff --git a/data/edje/vim/syntax/edc.vim b/data/edje/vim/syntax/edc.vim
index 27ced4f..6d87d70 100644
--- a/data/edje/vim/syntax/edc.vim
+++ b/data/edje/vim/syntax/edc.vim
@@ -63,7 +63,7 @@ syn keyword   edcConstant ACCEL_FAC DECEL_FAC SIN_FAC 
DIVISOR_INTERP
 syn keywordedcConstant ACCELERATE_FACTOR DECELERATE_FACTOR
 syn keywordedcConstant VERTICAL HORIZONTAL BOTH BOX TABLE
 syn keywordedcConstant EDITABLE PASSWORD default
-syn keyword edcConstant DEFAULT EXPLICIT BLOCK_HANDLE 
+syn keyword edcConstant DEFAULT EXPLICIT
 syn keyword edcConstant SOLID
 
 syn keywordedcTodo contained TODO FIXME XXX
diff --git a/src/bin/edje/edje_cc_handlers.c b/src/bin/edje/edje_cc_handlers.c
index a87b860..16622b5 100644
--- a/src/bin/edje/edje_cc_handlers.c
+++ b/src/bin/edje/edje_cc_handlers.c
@@ -226,8 +226,6 @@ static void st_collections_group_parts_part_source3(void);
 static void st_collections_group_parts_part_source4(void);
 static void st_collections_group_parts_part_source5(void);
 static void st_collections_group_parts_part_source6(void);
-static void st_collections_group_parts_part_source7(void);
-static void st_collections_group_parts_part_source8(void);
 static void st_collections_group_parts_part_entry_mode(void);
 static void st_collections_group_parts_part_select_mode(void);
 static void st_collections_group_parts_part_cursor_mode(void);
@@ -524,8 +522,6 @@ New_Statement_Handler statement_handlers[] =
  {collections.group.parts.part.source4, 
st_collections_group_parts_part_source4},
  {collections.group.parts.part.source5, 
st_collections_group_parts_part_source5},
  {collections.group.parts.part.source6, 
st_collections_group_parts_part_source6},
- {collections.group.parts.part.source7, 
st_collections_group_parts_part_source7},
- {collections.group.parts.part.source8, 
st_collections_group_parts_part_source8},
  {collections.group.parts.part.dragable.x, 
st_collections_group_parts_part_dragable_x},
  {collections.group.parts.part.dragable.y, 
st_collections_group_parts_part_dragable_y},
  {collections.group.parts.part.dragable.confine, 
st_collections_group_parts_part_dragable_confine},
@@ -2803,8 +2799,6 @@ st_collections_group_inherit(void)
 ep-source4 = STRDUP(ep2-source4);
 ep-source5 = STRDUP(ep2-source5);
 ep-source6 = STRDUP(ep2-source6);
-ep-source7 = STRDUP(ep2-source7);
-ep-source8 = STRDUP(ep2-source8);
 
 data_queue_copied_part_lookup(pc, (ep2-clip_to_id), 
(ep-clip_to_id));
 
@@ -4098,48 +4092,6 @@ st_collections_group_parts_part_source6(void)
 
 /**
 @page edcref
-@property
-source7
-@parameters
-[another group's name]
-@effect
-Only available to TEXTBLOCK parts. It is used for the group to be
-loaded and used for the start selection handler display.
-@endproperty
-*/
-static void
-st_collections_group_parts_part_source7(void)
-{
-   check_arg_count(1);
-
-   //FIXME: validate this somehow (need to decide on the format also)
-   current_part-source7 = parse_str(0);
-   data_queue_group_lookup

[EGIT] [core/elementary] master 01/01: elm_entry: fix magnifier not showing up.

2013-11-07 Thread Thiep Ha
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/elementary.git/commit/?id=d1cb9ecc4c59794882da274d4db04a09741d0280

commit d1cb9ecc4c59794882da274d4db04a09741d0280
Author: Thiep Ha thie...@gmail.com
Date:   Fri Nov 8 16:08:47 2013 +0900

elm_entry: fix magnifier not showing up.

The swallow part was properly renamed and namespaced, so reflect that
in the code. Also force a edje object recalc before moving the magnifier.

Reviewers: raster, cedric, Hermet, tasn

Reviewed By: cedric

CC: seoz

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

Signed-off-by: Cedric Bail cedric.b...@samsung.com
---
 ChangeLog |  4 
 data/themes/edc/elm/entry.edc |  1 +
 src/lib/elm_entry.c   | 11 +--
 3 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 2e58ed5..4939b81 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1724,6 +1724,10 @@
 
 * spinner: added signals spinner,drag,start and spinner,drag,stop.
 
+2013-10-27  Thiep Ha
+
+* entry: Correct magnifier showing.
+
 2013-10-30  Amitesh Singh (_ami_)
 
 * image: Add support for clicked callback on Return/space/KP_Enter 
key press.
diff --git a/data/themes/edc/elm/entry.edc b/data/themes/edc/elm/entry.edc
index 239287d..620f738 100644
--- a/data/themes/edc/elm/entry.edc
+++ b/data/themes/edc/elm/entry.edc
@@ -957,6 +957,7 @@ group { name: elm/entry/magnifier/default;
  scale: 1;
  description { state: default 0.0;
 min: 128 64;
+align: 0 0;
 image.normal: frame_rounded.png;
 image.border: 14 14 14 14;
 image.middle: 0;
diff --git a/src/lib/elm_entry.c b/src/lib/elm_entry.c
index 77ab8d9..9d2508a 100644
--- a/src/lib/elm_entry.c
+++ b/src/lib/elm_entry.c
@@ -1372,15 +1372,14 @@ _magnifier_move(void *data, Evas_Coord px, Evas_Coord 
py)
Evas_Coord x, y, w, h;
Evas_Coord ex, ey;
Evas_Coord sx, sy;
-   const Evas_Object *obj_bg;
+   const Evas_Object *obj_content;
double scale = _elm_config-magnifier_scale;
 
-   obj_bg = edje_object_part_object_get(sd-mgf_bg, bg);
-   evas_object_geometry_get(obj_bg, NULL, NULL, w, h);
-   evas_object_move(sd-mgf_bg, px - w/2, py - h);
+   edje_object_parts_extends_calc(sd-mgf_bg, x, y, w, h);
+   evas_object_move(sd-mgf_bg, px - x - w/2, py - y - h);
 
-   obj_bg = edje_object_part_object_get(sd-mgf_bg, swallow);
-   evas_object_geometry_get(obj_bg, x, y, w, h);
+   obj_content = edje_object_part_object_get(sd-mgf_bg, 
elm.swallow.content);
+   evas_object_geometry_get(obj_content, x, y, w, h);
sx = px - (x + w/2);
sy = py - (y + h/2);
 

-- 




Re: [E-devel] [PATCH] [Elementary] Patch to fix elementary list with separator

2013-02-18 Thread thiep ha
Sorry for breaking the mail thread. I haven't known that.
I will use another mail client.

Regards,
Thiep

--- Original Message ---
Sender : Carsten Haitzlerras...@rasterman.com 
Date   : Feb 18, 2013 21:24 (GMT+09:00)
Title  : Re: [E-devel] [PATCH] [Elementary] Patch to fix elementary list with
 separator

On Mon, 18 Feb 2013 20:56:51 +0900 Daniel Juyung Seo seojuyu...@gmail.com
said:

 On Mon, Feb 18, 2013 at 6:29 PM, Carsten Haitzler ras...@rasterman.comwrote:
 
  On Mon, 18 Feb 2013 17:27:46 +0900 Daniel Juyung Seo seojuyu...@gmail.com
  
  said:
 
   On Mon, Feb 18, 2013 at 5:13 PM, Carsten Haitzler ras...@rasterman.com
  wrote:
  
On Wed, 2 Jan 2013 19:13:00 +0900 Daniel Juyung Seo 
  seojuyu...@gmail.com
said:
   
 Oops Thiep, sorry I didn't review test_list.c
 So here are more comments.

 1. api_data
 api_data *api = calloc(1, sizeof(api_data));$

 api_data is not used in test_list_separator() so remove it and
  related
 codes.

 2. test_list_separator(xxx) indentation
 Indentations for test_list_separator(xxx) are wrong.

 +test_list_separator(void*data __UNUSED__,
 +  Evas_Object *obj __UNUSED__,
 +  void*event_info __UNUSED__)

 Thanks.
   
   
   Hello
  
  
i didnt see a followup from this in email... but some of the patch is
  in
svn i
think at least.. is this done? :)
   
  
   I guess you missed my reply.
 
  its not in my mailer in this thread.. did your mailer break the thread
  again?
  (like oh so many people do making it impossible to follow threads). :)
 
 
 Well I don't think so. Gmail works very fine with this kind of mail thread.
 The title is still Re: [E-devel] [PATCH] [Elementary] Patch to fix
 elementary list with separator.
 It should work.

thieps mail broke it. clients break thread by removing the In-Reply-To field in
the header. this is the header that for the past what 15.. 20  years has been
used by mail clients to figure out threads. it knows WHAT mail id this was in
reply to... a mailer will assign a unique id with Message-ID when you send it,
so mail clients can trace these id's and reply tos and do a thread correctly
and repliably. thats how it can do multiple levels of nesting etc. too.

gmail GUESSES by the subject being the same with an Re: that it might be a
thread. but it cant know exactly what you reply to like a proper nesting
thread unless you use such mail id's.

bad mail clients are unsociable and break such threads by simply posting a whole
new mail to the list with no context/reference what it is in reply to. it
breaks other peoples ability to track the conversation properly even though
for like 20 years clients have been playing nice. now they just don't bother
and are rude and remove such threading info.

Thanks in SVN!
Please modify ChangeLog and NEWS files when you fix a bug which was
   included in the released version.
I did it for you this time.
http://trac.enlightenment.org/e/changeset/82040
  http://trac.enlightenment.org/e/changeset/82040
http://trac.enlightenment.org/e/changeset/82041
  
   Daniel Juyung Seo (SeoZ)
  
  
 Daniel Juyung Seo (SeoZ)

 On Wed, Jan 2, 2013 at 6:53 PM, Daniel Juyung Seo 
  seojuyu...@gmail.com
wrote:

  Dear Thiep, thanks a lot for your bug fix.
  There was an explicit bug on elm list separator.
  And I have some comments.
 
  1. elementary-1.7
  Please support the same patches to elementary-1.7.
 
  2. it-deleted checks
  it-deleted checks in elm_list.c:600 is not needed.
  It was already checked.
 
  3. it-separator_themed
  separator_themed is not needed.
  it-fixed does the same job.
 
  4. code structure
  I think you can reuse some existing code.
  Move 38 ~ 47 lines of your patch to the following parts and reuse
  the
code.
  if (!it-fixed) ...
  If my explanation is ambigous I will do the refactoring once your
  code
is
  committed.
 
  Thanks.
 
  Daniel Juyung Seo (SeoZ)
 
 
  On Sun, Dec 30, 2012 at 3:03 PM, Thiep Ha thie...@gmail.com
  wrote:
 
  Hi all,
 
  I sent this patch before, but there is no reply.
  So, I resend it.
  Since separators in list are not correctly applied (always have
  same
size
  with other items),
  this patch is sent to fix that.
  Could someone review it?
 
  Thanks,
  Thiep
 
 
 
  From: thiep ha thiep...@samsung.com
   Date: Sun, Dec 9, 2012 at 11:11 AM
   Subject: [E-devel] [Patch] [Elementary] Patch to fix elementary
  list
  with
   separator
   To: enlightenment-devel@lists.sourceforge.net 
   enlightenment-devel@lists.sourceforge.net
  
  
   Dear All,
  
   In elementary list, the separator is not correctly set.
   I would like to send a patch to correct the list

Re: [E-devel] [PATCH] [Elementary] Fix memory leak and callback function in ctxpopup

2013-01-20 Thread thiep ha
Dear Hermet and Daniel,

Thank  you for your reviewing.

I provided the backport patch which is elm_ctxpopup_memleak_callback_1.7.diff.
Could you please check it and correct NEWS change for me?

Thanks  Regards,
Thiep


--- Original Message ---
Sender : Daniel Juyung Seoseojuyu...@gmail.com 
Date   : Jan 18, 2013 18:38 (GMT+09:00)
Title  : Re: [E-devel] [PATCH] [Elementary] Fix memory leak and callback
 function in ctxpopup

I think elm_ctxpopup_memleak_callback_1.7.diff is the backport.
But he made a mistake in NEWS.

Daniel Juyung Seo (SeoZ)

On Fri, Jan 18, 2013 at 6:12 PM, ChunEon Park her...@naver.com wrote:
 and theip,  could you please make a backport patch also?

 

 -Regards, Hermet-
 -Original Message-
 From: ChunEon Parklt;her...@naver.comgt;
 To: Enlightenment developer 
 listlt;enlightenment-devel@lists.sourceforge.netgt;;
 Cc:
 Sent: 2013-01-18 (금) 18:08:11
 Subject: Re: [E-devel][PATCH] [Elementary] Fix memory leak and callback 
 function in ctxpopup

 Here is my review of the first patch elm_ctxpopup_memleak_callback.diff.
 I don't have much time to review both.

 1. Reduce line as possible. We don't need to block the area if the 
 conditional  has only one

  32 +   EINA_LIST_FREE (sd-gt;items, it)
  33 + {
  34 +elm_widget_item_free(it);
  35 + }

 EINA_LIST_FREE (sd-gt;items, it)
   elm_widget_item_free(it);

 2. Changelog/NEWS have lack of information. People may dont understand why 
 does callback function fixed.

 3. Don't mix the different changes in one path. This should be seprated to 
 memory leak and callback function to be reviewed simple and fast.

 4. Please make a backport patch also.

 I submitted your patch this time but please consider my reivew in next time.
 Next patch i will review soon

 Thank you.

 

 -Regards, Hermet-
 -Original Message-
 From: thiep halt;thiep...@samsung.comgt;
 To: 
 enlightenment-devel@lists.sourceforge.netlt;enlightenment-devel@lists.sourceforge.netgt;;
 Cc:
 Sent: 2013-01-15 (화) 15:06:45
 Subject: [E-devel] [PATCH] [Elementary] Fix memory leak and callback function 
 in ctxpopup

 Hello everyone,



 There are two issues with ctxpopup:

 - Memory leak: Elm_Ctxpopup_Item is used but not deleted.

 - Incorrect callback function: returned object and event_info are list object 
 and item

   (should be ctxpopup object and item).



 I would like to send a patch to fix above issues.

 I also provide the patch for backporting.

 Please review them.



 Best Regards,

 Thiep


 --
 Master SQL Server Development, Administration, T-SQL, SSAS, SSIS, SSRS
 and more. Get SQL Server skills now (including 2012) with LearnDevNow -
 200+ hours of step-by-step video tutorials by Microsoft MVPs and experts.
 SALE $99.99 this month only - learn more at:
 http://p.sf.net/sfu/learnmore_122512
 ___
 enlightenment-devel mailing list
 enlightenment-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

 --
 Master HTML5, CSS3, ASP.NET, MVC, AJAX, Knockout.js, Web API and
 much more. Get web development skills now with LearnDevNow -
 350+ hours of step-by-step video tutorials by Microsoft MVPs and experts.
 SALE $99.99 this month only -- learn more at:
 http://p.sf.net/sfu/learnmore_122812
 ___
 enlightenment-devel mailing list
 enlightenment-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
 --
 Master HTML5, CSS3, ASP.NET, MVC, AJAX, Knockout.js, Web API and
 much more. Get web development skills now with LearnDevNow -
 350+ hours of step-by-step video tutorials by Microsoft MVPs and experts.
 SALE $99.99 this month only -- learn more at:
 http://p.sf.net/sfu/learnmore_122812
 ___
 enlightenment-devel mailing list
 enlightenment-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

--
Master HTML5, CSS3, ASP.NET, MVC, AJAX, Knockout.js, Web API and
much more. Get web development skills now with LearnDevNow -
350+ hours of step-by-step video tutorials by Microsoft MVPs and experts.
SALE $99.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122812
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
pnbsp;/ppnbsp;/p
--
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, 

[E-devel] [PATCH] [Elementary] Fix memory leak and callback function in ctxpopup

2013-01-14 Thread thiep ha
Hello everyone,

There are two issues with ctxpopup:
- Memory leak: Elm_Ctxpopup_Item is used but not deleted.
- Incorrect callback function: returned object and event_info are list object 
and item
  (should be ctxpopup object and item).

I would like to send a patch to fix above issues.
I also provide the patch for backporting.
Please review them.

Best Regards,
Thiep


elm_ctxpopup_memleak_callback.diff
Description: Binary data


elm_ctxpopup_memleak_callback_1.7.diff
Description: Binary data
--
Master SQL Server Development, Administration, T-SQL, SSAS, SSIS, SSRS
and more. Get SQL Server skills now (including 2012) with LearnDevNow -
200+ hours of step-by-step video tutorials by Microsoft MVPs and experts.
SALE $99.99 this month only - learn more at:
http://p.sf.net/sfu/learnmore_122512___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] [PATCH] [Elementary] Patch to fix elementary list with separator

2013-01-02 Thread thiep ha
Dear Daniel,

Thank you very much for your valuable reviewing.
Here are my opinion:
 1. elementary-1.7
 Please support the same patches to elementary-1.7.
I will do that.

 2. it-deleted checks
 it-deleted checks in elm_list.c:600 is not needed.
 It was already checked.
You are right.

 3. it-separator_themed
 separator_themed is not needed.
 it-fixed does the same job.

 4. code structure
 I think you can reuse some existing code.
 Move 38 ~ 47 lines of your patch to the following parts and reuse the code.
 if (!it-fixed) ...
The separator_themed was intended to reduce number of theme set on separator.
However, with your comment No. 4,
I will change my code to reuse the existing code and we can remove 
separator_themed.

I will modify the test_list.c file also and send the patch.

Best regards,
Thiep

--- Original Message ---
Sender : Daniel Juyung Seoseojuyu...@gmail.com 
Date   : Jan 02, 2013 19:13 (GMT+09:00)
Title  : Re: [E-devel] [PATCH] [Elementary] Patch to fix elementary list
with
 separator

Oops Thiep, sorry I didn't review test_list.c
So here are more comments.

1. api_data
api_data *api = calloc(1, sizeof(api_data));$

api_data is not used in test_list_separator() so remove it and related
codes.

2. test_list_separator(xxx) indentation
Indentations for test_list_separator(xxx) are wrong.

+test_list_separator(void*data __UNUSED__,
+  Evas_Object *obj __UNUSED__,
+  void*event_info __UNUSED__)

Thanks.

Daniel Juyung Seo (SeoZ)

On Wed, Jan 2, 2013 at 6:53 PM, Daniel Juyung Seo seojuyu...@gmail.comwrote:

 Dear Thiep, thanks a lot for your bug fix.
 There was an explicit bug on elm list separator.
 And I have some comments.

 1. elementary-1.7
 Please support the same patches to elementary-1.7.

 2. it-deleted checks
 it-deleted checks in elm_list.c:600 is not needed.
 It was already checked.

 3. it-separator_themed
 separator_themed is not needed.
 it-fixed does the same job.

 4. code structure
 I think you can reuse some existing code.
 Move 38 ~ 47 lines of your patch to the following parts and reuse the code.
 if (!it-fixed) ...
 If my explanation is ambigous I will do the refactoring once your code is
 committed.

 Thanks.

 Daniel Juyung Seo (SeoZ)


 On Sun, Dec 30, 2012 at 3:03 PM, Thiep Ha thie...@gmail.com wrote:

 Hi all,

 I sent this patch before, but there is no reply.
 So, I resend it.
 Since separators in list are not correctly applied (always have same size
 with other items),
 this patch is sent to fix that.
 Could someone review it?

 Thanks,
 Thiep



 From: thiep ha thiep...@samsung.com
  Date: Sun, Dec 9, 2012 at 11:11 AM
  Subject: [E-devel] [Patch] [Elementary] Patch to fix elementary list
 with
  separator
  To: enlightenment-devel@lists.sourceforge.net 
  enlightenment-devel@lists.sourceforge.net
 
 
  Dear All,
 
  In elementary list, the separator is not correctly set.
  I would like to send a patch to correct the list with separator.
  I also add an example named List Separator to test it.
 
  Please review this patch.
 
  Best Regards,
  Thiep Ha
 
 


 --
 Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
 MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
 with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
 MVPs and experts. ON SALE this month only -- learn more at:
 http://p.sf.net/sfu/learnmore_123012
 ___
 enlightenment-devel mailing list
 enlightenment-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/enlightenment-devel



--
Master Java SE, Java EE, Eclipse, Spring, Hibernate, JavaScript, jQuery
and much more. Keep your Java skills current with LearnJavaNow -
200+ hours of step-by-step video tutorials by Java experts.
SALE $49.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122612 
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
pnbsp;/ppnbsp;/p
--
Master Java SE, Java EE, Eclipse, Spring, Hibernate, JavaScript, jQuery
and much more. Keep your Java skills current with LearnJavaNow -
200+ hours of step-by-step video tutorials by Java experts.
SALE $49.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122612 
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] [PATCH] [Elementary] Patch to fix elementary list with separator

2013-01-02 Thread thiep ha
Dear Daniel,

I would like to send the modified source code.
Please review it.

P/S: Sorry for a little late, my laptop was broken last night.

Thanks  Regards,
Thiep

--- Original Message ---
Sender : Daniel Juyung Seoseojuyu...@gmail.com 
Date   : Jan 02, 2013 19:13 (GMT+09:00)
Title  : Re: [E-devel] [PATCH] [Elementary] Patch to fix elementary list
with
 separator

Oops Thiep, sorry I didn't review test_list.c
So here are more comments.

1. api_data
api_data *api = calloc(1, sizeof(api_data));$

api_data is not used in test_list_separator() so remove it and related
codes.

2. test_list_separator(xxx) indentation
Indentations for test_list_separator(xxx) are wrong.

+test_list_separator(void*data __UNUSED__,
+  Evas_Object *obj __UNUSED__,
+  void*event_info __UNUSED__)

Thanks.

Daniel Juyung Seo (SeoZ)

On Wed, Jan 2, 2013 at 6:53 PM, Daniel Juyung Seo seojuyu...@gmail.comwrote:

 Dear Thiep, thanks a lot for your bug fix.
 There was an explicit bug on elm list separator.
 And I have some comments.

 1. elementary-1.7
 Please support the same patches to elementary-1.7.

 2. it-deleted checks
 it-deleted checks in elm_list.c:600 is not needed.
 It was already checked.

 3. it-separator_themed
 separator_themed is not needed.
 it-fixed does the same job.

 4. code structure
 I think you can reuse some existing code.
 Move 38 ~ 47 lines of your patch to the following parts and reuse the code.
 if (!it-fixed) ...
 If my explanation is ambigous I will do the refactoring once your code is
 committed.

 Thanks.

 Daniel Juyung Seo (SeoZ)


 On Sun, Dec 30, 2012 at 3:03 PM, Thiep Ha thie...@gmail.com wrote:

 Hi all,

 I sent this patch before, but there is no reply.
 So, I resend it.
 Since separators in list are not correctly applied (always have same size
 with other items),
 this patch is sent to fix that.
 Could someone review it?

 Thanks,
 Thiep



 From: thiep ha thiep...@samsung.com
  Date: Sun, Dec 9, 2012 at 11:11 AM
  Subject: [E-devel] [Patch] [Elementary] Patch to fix elementary list
 with
  separator
  To: enlightenment-devel@lists.sourceforge.net 
  enlightenment-devel@lists.sourceforge.net
 
 
  Dear All,
 
  In elementary list, the separator is not correctly set.
  I would like to send a patch to correct the list with separator.
  I also add an example named List Separator to test it.
 
  Please review this patch.
 
  Best Regards,
  Thiep Ha
 
 


 --
 Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
 MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
 with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
 MVPs and experts. ON SALE this month only -- learn more at:
 http://p.sf.net/sfu/learnmore_123012
 ___
 enlightenment-devel mailing list
 enlightenment-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/enlightenment-devel



--
Master Java SE, Java EE, Eclipse, Spring, Hibernate, JavaScript, jQuery
and much more. Keep your Java skills current with LearnJavaNow -
200+ hours of step-by-step video tutorials by Java experts.
SALE $49.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122612 
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
pnbsp;/ppnbsp;/p

elm_list_separator.diff
Description: Binary data


elm_list_separator_1_7.diff
Description: Binary data
--
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122712___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] [PATCH] [Elementary] Patch to fix elementary list with separator

2013-01-02 Thread thiep ha
Thank you for your help.
I will do that from next time.

Best Regards,
Thiep
--- Original Message ---
Sender : Daniel Juyung Seoseojuyu...@gmail.com 
Date   : Jan 03, 2013 15:54 (GMT+09:00)
Title  : Re: [E-devel] [PATCH] [Elementary] Patch to fix elementary list
with
 separator

Thanks in SVN!
Please modify ChangeLog and NEWS files when you fix a bug which was
included in the released version.
I did it for you this time.
http://trac.enlightenment.org/e/changeset/82040
http://trac.enlightenment.org/e/changeset/82041


Thanks.

Daniel Juyung Seo (Seoz)

On Thu, Jan 3, 2013 at 12:45 PM, thiep ha thiep...@samsung.com wrote:

 Dear Daniel,

 I would like to send the modified source code.
 Please review it.

 P/S: Sorry for a little late, my laptop was broken last night.

 Thanks  Regards,
 Thiep

 --- Original Message ---
 Sender : Daniel Juyung Seoseojuyu...@gmail.com
 Date   : Jan 02, 2013 19:13 (GMT+09:00)
 Title  : Re: [E-devel] [PATCH] [Elementary] Patch to fix elementary list
  with
  separator

 Oops Thiep, sorry I didn't review test_list.c
 So here are more comments.

 1. api_data
 api_data *api = calloc(1, sizeof(api_data));$

 api_data is not used in test_list_separator() so remove it and related
 codes.

 2. test_list_separator(xxx) indentation
 Indentations for test_list_separator(xxx) are wrong.

 +test_list_separator(void*data __UNUSED__,
 +  Evas_Object *obj __UNUSED__,
 +  void*event_info __UNUSED__)

 Thanks.

 Daniel Juyung Seo (SeoZ)

 On Wed, Jan 2, 2013 at 6:53 PM, Daniel Juyung Seo seojuyu...@gmail.com
 wrote:

  Dear Thiep, thanks a lot for your bug fix.
  There was an explicit bug on elm list separator.
  And I have some comments.
 
  1. elementary-1.7
  Please support the same patches to elementary-1.7.
 
  2. it-deleted checks
  it-deleted checks in elm_list.c:600 is not needed.
  It was already checked.
 
  3. it-separator_themed
  separator_themed is not needed.
  it-fixed does the same job.
 
  4. code structure
  I think you can reuse some existing code.
  Move 38 ~ 47 lines of your patch to the following parts and reuse the
 code.
  if (!it-fixed) ...
  If my explanation is ambigous I will do the refactoring once your code is
  committed.
 
  Thanks.
 
  Daniel Juyung Seo (SeoZ)
 
 
  On Sun, Dec 30, 2012 at 3:03 PM, Thiep Ha thie...@gmail.com wrote:
 
  Hi all,
 
  I sent this patch before, but there is no reply.
  So, I resend it.
  Since separators in list are not correctly applied (always have same
 size
  with other items),
  this patch is sent to fix that.
  Could someone review it?
 
  Thanks,
  Thiep
 
 
 
  From: thiep ha thiep...@samsung.com
   Date: Sun, Dec 9, 2012 at 11:11 AM
   Subject: [E-devel] [Patch] [Elementary] Patch to fix elementary list
  with
   separator
   To: enlightenment-devel@lists.sourceforge.net 
   enlightenment-devel@lists.sourceforge.net
  
  
   Dear All,
  
   In elementary list, the separator is not correctly set.
   I would like to send a patch to correct the list with separator.
   I also add an example named List Separator to test it.
  
   Please review this patch.
  
   Best Regards,
   Thiep Ha
  
  
 
 
 
 --
  Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
  MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
  with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
  MVPs and experts. ON SALE this month only -- learn more at:
  http://p.sf.net/sfu/learnmore_123012
  ___
  enlightenment-devel mailing list
  enlightenment-devel@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
 
 
 

 --
 Master Java SE, Java EE, Eclipse, Spring, Hibernate, JavaScript, jQuery
 and much more. Keep your Java skills current with LearnJavaNow -
 200+ hours of step-by-step video tutorials by Java experts.
 SALE $49.99 this month only -- learn more at:
 http://p.sf.net/sfu/learnmore_122612
 ___
 enlightenment-devel mailing list
 enlightenment-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
 pnbsp;/ppnbsp;/p


 --
 Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
 MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
 with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
 MVPs and experts. ON SALE this month only -- learn more at:
 http://p.sf.net/sfu/learnmore_122712
 ___
 enlightenment-devel mailing list
 enlightenment-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

[E-devel] [PATCH] [Elementary] Patch to fix elementary list with separator

2012-12-29 Thread Thiep Ha
Hi all,

I sent this patch before, but there is no reply.
So, I resend it.
Since separators in list are not correctly applied (always have same size
with other items),
this patch is sent to fix that.
Could someone review it?

Thanks,
Thiep



From: thiep ha thiep...@samsung.com
 Date: Sun, Dec 9, 2012 at 11:11 AM
 Subject: [E-devel] [Patch] [Elementary] Patch to fix elementary list with
 separator
 To: enlightenment-devel@lists.sourceforge.net 
 enlightenment-devel@lists.sourceforge.net


 Dear All,

 In elementary list, the separator is not correctly set.
 I would like to send a patch to correct the list with separator.
 I also add an example named List Separator to test it.

 Please review this patch.

 Best Regards,
 Thiep Ha




elm_list_separator_1.diff
Description: Binary data
--
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnmore_123012___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


[E-devel] [Patch] [Elementary] Patch to fix elementary list with separator

2012-12-08 Thread thiep ha
Dear All,

In elementary list, the separator is not correctly set.
I would like to send a patch to correct the list with separator.
I also add an example named List Separator to test it.

Please review this patch.

Best Regards,
Thiep Ha

elm_list_separator.diff
Description: Binary data
--
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] [Patch] [Elementary] [Entry] Clear selection when entry loses focus

2012-11-28 Thread thiep ha
I updated it.
Could you please check it?

Best Regards,
Thiep Ha

--- Original Message ---
Sender : Cedric BAILcedric.b...@free.fr 
Date   : Nov 28, 2012 14:58 (GMT+09:00)
Title  : Re: [E-devel] [Patch] [Elementary] [Entry] Clear selection when entry
 loses focus

On Wed, Nov 7, 2012 at 4:42 PM, thiep ha thiep...@samsung.com wrote:
 Thank you for your comment.
 I changed the source code by adding an independent config entry in elm_config.
 Please review it.

Sorry for the delay of this late review, but it doesn't apply cleanly
anymore. Could you update it with latest svn ? I will push it after
that.
--
Cedric BAIL

--
Keep yourself connected to Go Parallel: 
INSIGHTS What's next for parallel hardware, programming and related areas?
Interviews and blogs by thought leaders keep you ahead of the curve.
http://goparallel.sourceforge.net
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
pnbsp;/ppnbsp;/p

elm_entry_unfocus_selection_2.diff
Description: Binary data
--
Keep yourself connected to Go Parallel: 
VERIFY Test and improve your parallel project with help from experts 
and peers. http://goparallel.sourceforge.net___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] [patch][elementary][entry] Hide copy/paste menu if there is no selection

2012-11-21 Thread thiep ha
I checked with revision 79529 and it still happended.
You can check it as below:
- In Entry 3 of Elementary Tests, click at the end of the first entry, right 
click, choose Select,
  double click, right click to see the menu. You can see Copy, Paste, Cancel 
submenus there.
- You can do the same way with an empty entry.

The reason is that we set the sd-have_selection to true at the start of 
selection (in elm_entry.c),
even after that, the edje entry _sel_extend return without emitting 
selection,changed signal.

Could you check it again?

Best Regards,
Thiep Ha

--- Original Message ---
Sender : Tom Hacohent...@stosb.com 
Date   : Nov 22, 2012 04:17 (GMT+09:00)
Title  : Re: [E-devel] [patch][elementary][entry] Hide copy/paste menu if there
 is no selection

On Mon, Nov 19, 2012 at 12:33 PM, thiep ha thiep...@samsung.com wrote:

 Dear All,

 I have seen that if there is no selection in an entry, the copy/cut menus
 are still shown in entry.
 (Example: double click at the end of entry or on an empty entry).
 I modified source code to not show copy/cut menus in above scenario.
 I also removed the redundant checking condition for showing copy/cut menus.
 Please review this patch.



I can't test it atm, but I was under the impression it was already there.
More specifically, I remember fixing it up a bit when I was working on
ecrire. Are you certain it's broken? Maybe you've tested with old code?
(Again, I can't test).
-- 
Tom.
--
Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth insight into apps, servers, databases, vmware,
SAP, cloud infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
pnbsp;/ppnbsp;/p
--
Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth insight into apps, servers, databases, vmware,
SAP, cloud infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


[E-devel] [patch][elementary][entry] Hide copy/paste menu if there is no selection

2012-11-19 Thread thiep ha
Dear All,

I have seen that if there is no selection in an entry, the copy/cut menus are 
still shown in entry.
(Example: double click at the end of entry or on an empty entry).
I modified source code to not show copy/cut menus in above scenario.
I also removed the redundant checking condition for showing copy/cut menus.
Please review this patch.

Best Regards,
Thiep Ha



elm_entry_copy_cut_menu.diff
Description: Binary data
--
Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth insight into apps, servers, databases, vmware,
SAP, cloud infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


[E-devel] Fwd: Re: Re: [Patch] [Elementary] [Entry] Clear selection when entry loses focus

2012-11-18 Thread thiep ha

   Dear All,


   I modified the source code as comment of Cedric and sent it long time ago.

   However, there is no review until now.

   So I re-send this patch.

   Could someone review this patch?


   Thanks  Regards,

   Thiep Ha


   --- Original Message ---

   Sender  :  thiep hathiep...@samsung.com S3/Assistant
   Engineer/Next-Generation Computing Lab./Samsung Electronics

   Date : Nov 07, 2012 16:42 (GMT+09:00)

   Title : Re: Re: [E-devel] [Patch] [Elementary] [Entry] Clear selection when
   entry loses focus


   Thank you for your comment.
   I  changed  the  source  code by adding an independent config entry in
   elm_config.
   Please review it.
   Thanks  Regards,
   Thiep Ha
   --- Original Message ---
   Sender : Cedric BAIL
   Date : Nov 06, 2012 16:28 (GMT+09:00)
   Title : Re: [E-devel] [Patch] [Elementary] [Entry] Clear selection when
   entry loses focus
   On Tue, Nov 6, 2012 at 3:05 PM, thiep ha wrote:
 In mobile environment, if an entry loses focus, we should clear its
   selection also.
I modified the source code to do that and attach it to this email.
Please review this patch.
   I am not sure it is really related to mobile vs desktop, but more an
   usability decision. Could you make an independent config entry in
   elm_config ?
   --
   Cedric BAIL
   
   --
   LogMeIn Central: Instant, anywhere, Remote PC access and management.
   Stay in control, update software, and manage PCs from one command center
   Diagnose problems and improve visibility into emerging IT issues
   Automate, monitor and manage. Do more in less time with Central
   http://p.sf.net/sfu/logmein12331_d2d
   ___
   enlightenment-devel mailing list
   enlightenment-devel@lists.sourceforge.net
   https://lists.sourceforge.net/lists/listinfo/enlightenment-devel




   [cid:BEI0XT4NZ5JE@namo.co.kr]

   [SeenTimeChecker?do=c6ef15d56c8835385f0d966141fc029f34423e074f8fe7eeb46b7a76
   4e5c34fa770255183a8f81f75f2c6c48df01bb6e980b3871b38ac2d74ed859d628c32758
   cd62c5cf0684a728c55b39cc59eacf878f9a26ce15a0]
201211191538718_QKNMBDIF.gif

elm_entry_unfocus_selection_1.diff
Description: Binary data
--
Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth insight into apps, servers, databases, vmware,
SAP, cloud infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


[E-devel] Fwd: Re: Re: [Patch] [Elementary] [Entry] Clear selection when entry loses focus

2012-11-18 Thread thiep ha
Dear All,

I modified the source code as comment of Cedric and sent it long time ago.
However, there is no review until now.
So I re-send this patch.
Could someone review this patch?

Thanks  Regards,
Thiep Ha

--- Original Message ---
Sender : thiep hathiep...@samsung.com S3/Assistant Engineer/Next-Generation 
Computing Lab./Samsung Electronics
Date : Nov 07, 2012 16:42 (GMT+09:00)
Title : Re: Re: [E-devel] [Patch] [Elementary] [Entry] Clear selection when 
entry loses focus

Thank you for your comment.
I changed the source code by adding an independent config entry in elm_config.
Please review it.

Thanks  Regards,
Thiep Ha

--- Original Message ---
Sender : Cedric BAIL
Date : Nov 06, 2012 16:28 (GMT+09:00)
Title : Re: [E-devel] [Patch] [Elementary] [Entry] Clear selection when entry 
loses focus

On Tue, Nov 6, 2012 at 3:05 PM, thiep ha wrote:
 In mobile environment, if an entry loses focus, we should clear its selection 
 also.
 I modified the source code to do that and attach it to this email.
 Please review this patch.

I am not sure it is really related to mobile vs desktop, but more an
usability decision. Could you make an independent config entry in
elm_config ?

--
Cedric BAIL

--
LogMeIn Central: Instant, anywhere, Remote PC access and management.
Stay in control, update software, and manage PCs from one command center
Diagnose problems and improve visibility into emerging IT issues
Automate, monitor and manage. Do more in less time with Central
http://p.sf.net/sfu/logmein12331_d2d
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel 

elm_entry_unfocus_selection_1.diff
Description: Binary data
--
Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth insight into apps, servers, databases, vmware,
SAP, cloud infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] [Patch] [Elementary] [Entry] Clear selection when entry loses focus

2012-11-06 Thread thiep ha
Thank you for your comment.
I changed the source code by adding an independent config entry in elm_config.
Please review it.

Thanks  Regards,
Thiep Ha

--- Original Message ---
Sender : Cedric BAILcedric.b...@free.fr
Date : Nov 06, 2012 16:28 (GMT+09:00)
Title : Re: [E-devel] [Patch] [Elementary] [Entry] Clear selection when entry 
loses focus

On Tue, Nov 6, 2012 at 3:05 PM, thiep ha wrote:
 In mobile environment, if an entry loses focus, we should clear its selection 
 also.
 I modified the source code to do that and attach it to this email.
 Please review this patch.

I am not sure it is really related to mobile vs desktop, but more an
usability decision. Could you make an independent config entry in
elm_config ?

--
Cedric BAIL

--
LogMeIn Central: Instant, anywhere, Remote PC access and management.
Stay in control, update software, and manage PCs from one command center
Diagnose problems and improve visibility into emerging IT issues
Automate, monitor and manage. Do more in less time with Central
http://p.sf.net/sfu/logmein12331_d2d
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

elm_entry_unfocus_selection_1.diff
Description: Binary data
--
LogMeIn Central: Instant, anywhere, Remote PC access and management.
Stay in control, update software, and manage PCs from one command center
Diagnose problems and improve visibility into emerging IT issues
Automate, monitor and manage. Do more in less time with Central
http://p.sf.net/sfu/logmein12331_d2d___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


[E-devel] [Patch] [Elementary] [Entry] Clear selection when entry loses focus

2012-11-05 Thread thiep ha
Dear All,

In mobile environment, if an entry loses focus, we should clear its selection 
also.
I modified the source code to do that and attach it to this email.
Please review this patch.

Thanks  Regards,
Thiep Ha

elm_entry_unfocus_selection.diff
Description: Binary data
--
LogMeIn Central: Instant, anywhere, Remote PC access and management.
Stay in control, update software, and manage PCs from one command center
Diagnose problems and improve visibility into emerging IT issues
Automate, monitor and manage. Do more in less time with Central
http://p.sf.net/sfu/logmein12331_d2d___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


[E-devel] [Patch] [Elementary] [Entry] Correct disabled mode

2012-10-31 Thread thiep ha
Dear All,

In elementary, the disabled entry works incorrectly.
We still can cut/paste from/to it.
I'd like to send a patch to fix it.
Please review this patch.

Thanks  Regards,
Thiep Ha

elm_entry_disabled.diff
Description: Binary data
--
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_sfd2d_oct___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


[E-devel] [Patch] [Elementary] ctxpopup - correct position and size of ctxpopup

2012-09-10 Thread thiep ha
Dear all,

With ctxpopup, if it has many items and user uses -1 as parameter in set 
direction priority function, 
the ctxpopup position and size are calculated incorrectly.
Ex:
elm_ctxpopup_direction_priority_set(ctxpopup, ELM_CTXPOPUP_DIRECTION_DOWN, 
ELM_CTXPOPUP_DIRECTION_UP, -1, -1); 

I would like to send a small patch to fix this issue.
Please take a look on it.

Thanks  Regards,
Thiep Ha

ctxpopup_position.diff
Description: Binary data
--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] [Patch] [Evas Textblock] Correct the way to select word

2012-08-23 Thread thiep ha

   Dear Tom,


   Thank you for your comment.

   I updated the source code and the problem is solved.


   Best Regards,

   Thiep Ha


   --- Original Message ---

   Sender   :   Tom   Hacohentom.haco...@samsung.com  Engineer/STRI-EFL
   Enhancement/Samsung Electronics

   Date : Aug 23, 2012 16:05 (GMT+09:00)

   Title : Re: [E-devel] [Patch] [Evas Textblock] Correct the way to select
   word


   Dear Thiep,
   Thanks a lot for the test case. Obviously, the previous test case was
   enough, I was asking where I could see the behaviour you are referring
   to... Then I remembered that Ctrl+Left-Arrow already works so it's easy
   to test it there.
   Anyhow, your patch has a bug in it. i is unsigned so doing = 0 is
   useless (it's always true, please turn on your compiler warnings. -Wall
   -Wextra) so it'll probably infinitely loop in some cases or just be
   plain wrong (become very large).
   Therefore I fixed it a bit differently, and I hope it's cleaner now. I
   also added a test case to make sure we never get that again. :)
   Rev: 75595.
   Enjoy, and please let me know if you experience any other issues.
   --
   Tom.
   On 23/08/12 03:51, thiep ha wrote:
You can use following test cases:
   
1.1+2.2
   
=3.3
   
(another test case)
   
Best Regards,
   
Thiep Ha
   
--- *Original Message* ---
   
*Sender* : Tom Hacohen Engineer/STRI-EFL
Enhancement/Samsung Electronics
   
*Date* : Aug 22, 2012 23:28 (GMT+09:00)
   
*Title* : Re: [E-devel] [Patch] [Evas Textblock] Correct the way to
select word
   
Do you have a test case we can use to verify?
   
--
Tom.
   
On 22/08/12 17:05, thiep ha wrote:
  Dear all,
 
  For current textblock, if the text starts with a word separator
(e.g.  =abcdef), we cannot select the text by double click on the text
(e.g. if we double click on abcdef, it will select = character).
  I attached to this email a patch to fix that.
  Please review this patch.
 
  Best Regards,
  Thiep Ha
 
 
 
 
   
   
   --
  Live Security Virtual Conference
  Exclusive live event will cover all the ways today's security and
   threat  landscape  has  changed and how IT managers can respond.
   Discussions
  will include endpoint security, mobile security and the latest in
   malware
  threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
 
 
 
  ___
  enlightenment-devel mailing list
  enlightenment-devel@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
 
   




   [cid:BEI0XT4NZ5JE@namo.co.kr]

   [SeenTimeChecker?do=36bd71f8ef089ccf25ffa0e2bc17d8585c25a37e215e041ab46b7a76
   4e5c34fa770255183a8f81f75f2c6c48df01bb6e980b3871b38ac2d74ed859d628c32758
   cd62c5cf0684a728c55b39cc59eacf878f9a26ce15a0]
201208241251515_QKNMBDIF.gif--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


[E-devel] [Patch] [Evas Textblock] Correct the way to select word

2012-08-22 Thread thiep ha
Dear all,

For current textblock, if the text starts with a word separator (e.g.  
=abcdef), we cannot select the text by double click on the text (e.g. if we 
double click on abcdef, it will select = character).
I attached to this email a patch to fix that.
Please review this patch.

Best Regards,
Thiep Ha

evas_textblock.diff
Description: Binary data
--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] [Patch] [Evas Textblock] Correct the way to select word

2012-08-22 Thread thiep ha

   You can use following test cases:


   1.1+2.2

   =3.3


   (another test case)



   Best Regards,

   Thiep Ha


   --- Original Message ---

   Sender   :   Tom   Hacohentom.haco...@samsung.com  Engineer/STRI-EFL
   Enhancement/Samsung Electronics

   Date : Aug 22, 2012 23:28 (GMT+09:00)

   Title : Re: [E-devel] [Patch] [Evas Textblock] Correct the way to select
   word


   Do you have a test case we can use to verify?
   --
   Tom.
   On 22/08/12 17:05, thiep ha wrote:
Dear all,
   
 For  current  textblock,  if  the text starts with a word separator
   (e.g.  =abcdef), we cannot select the text by double click on the text (e.g.
   if we double click on abcdef, it will select = character).
I attached to this email a patch to fix that.
Please review this patch.
   
Best Regards,
Thiep Ha
   
   
   
   
   
   --
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
   
   
   
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
   




   [cid:BEI0XT4NZ5JE@namo.co.kr]

   [SeenTimeChecker?do=36bd71f8ef089ccfa8eddb50398384395301cdb6a1b10716b46b7a76
   4e5c34fa770255183a8f81f75f2c6c48df01bb6e980b3871b38ac2d74ed859d628c32758
   cd62c5cf0684a728c55b39cc59eacf878f9a26ce15a0]
201208230951281_QKNMBDIF.gif--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] [Patch] [elm_entry] New APIs for user style

2012-05-29 Thread thiep ha
Dear All,

Thank you for your comments.
I would like to send you the modified patch.
Followings are my modification:
- Add my part to ChangeLog, AUTHORS files as Raster's comment.
- Add const to the parameter of elm_entry_text_style_user_peek and example for 
pop and peek to test_entry_style_user as Daniel's comment.

Please review it.

Thanks  Regards,
Thiep Ha

--- Original Message ---
Sender : Daniel Juyung Seoseojuyu...@gmail.com
Date : May 27, 2012 05:40 (GMT+09:00)
Title : Re: [E-devel] [Patch] [elm_entry] New APIs for user style

great as your first patch! and code looks good to me too. but i have two
comments.
1. add const to the parameter of elm_entry_text_style_user_peek.
2. add example for pop and keep to test_entry_style_user.

and here is a tip for thiep.
http://trac.enlightenment.org/e/wiki/PatchReview

thanks.
On May 25, 2012 7:55 PM, Carsten Haitzler wrote:

 On Thu, 24 May 2012 09:12:45 + (GMT) thiep ha 
 said:

 looks good with 1 exception. missing as part of the patch a patch to the
 Changelog file and adding yourself to AUTHORS. can you add those into your
 patch and re-send?

  Hello,
 
  As we known that, the user style is  a convenience way which helps users
 to
  work with style without the need of new edc file. It means that users
 can set
  their own style (e.g. font, font_size, color) without making new edc
 file.
  Currently, in Elementary Entry, there is no APIs supporting users to deal
  with user style stack (e.g. adding, removing). I added three APIs to
 Entry
  which are:
+ elm_entry_text_style_user_push: push an style to user style stack.
+ elm_entry_text_style_user_pop: remove the top style from user style
 stack.
+ elm_entry_text_style_user_peek: peek the top style from user style
 stack.
  With this modification, users only need to call the new api as below to
 apply
  desired style: elm_entry_text_style_user_push(en, DEFAULT='font_size=40
  color=#FF');
 
  Please review this patch.
  Thanks.
 
  Best Regards,
  Thiep Ha

 --
 - Codito, ergo sum - I code, therefore I am --
 The Rasterman (Carsten Haitzler)ras...@rasterman.com



 --
 Live Security Virtual Conference
 Exclusive live event will cover all the ways today's security and
 threat landscape has changed and how IT managers can respond. Discussions
 will include endpoint security, mobile security and the latest in malware
 threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
 ___
 enlightenment-devel mailing list
 enlightenment-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

elm_entry_style_user.patch
Description: Binary data
--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


[E-devel] [Patch] [elm_entry] New APIs for user style

2012-05-24 Thread thiep ha
Hello,

As we known that, the user style is  a convenience way which helps users to 
work with style without the need of new edc file. It means that users can set 
their own style (e.g. font, font_size, color) without making new edc file.
Currently, in Elementary Entry, there is no APIs supporting users to deal with 
user style stack (e.g. adding, removing).
I added three APIs to Entry which are:
  + elm_entry_text_style_user_push: push an style to user style stack.
  + elm_entry_text_style_user_pop: remove the top style from user style stack.
  + elm_entry_text_style_user_peek: peek the top style from user style stack.
With this modification, users only need to call the new api as below to apply 
desired style:
elm_entry_text_style_user_push(en, DEFAULT='font_size=40 color=#FF');

Please review this patch.
Thanks.

Best Regards,
Thiep Ha

elm_entry_style_user.patch
Description: Binary data
--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel