[EGIT] [apps/ephoto] master 01/01: Ephoto: Make the toolbar layout more consistent. Only allow dirs with subdirs to be expanded.

2015-12-01 Thread Stephen Houston
okra pushed a commit to branch master.

http://git.enlightenment.org/apps/ephoto.git/commit/?id=9e278c5a708b6dc46db569a1c02fc3e032ce44fa

commit 9e278c5a708b6dc46db569a1c02fc3e032ce44fa
Author: Stephen Houston 
Date:   Tue Dec 1 17:02:19 2015 -0600

Ephoto: Make the toolbar layout more consistent. Only allow dirs with 
subdirs to be expanded.
---
 src/bin/ephoto.h|   2 +-
 src/bin/ephoto_main.c   |  23 +-
 src/bin/ephoto_single_browser.c |   5 +-
 src/bin/ephoto_slideshow.c  |   8 +-
 src/bin/ephoto_thumb_browser.c  | 532 +---
 5 files changed, 305 insertions(+), 265 deletions(-)

diff --git a/src/bin/ephoto.h b/src/bin/ephoto.h
index bb77678..17855b7 100644
--- a/src/bin/ephoto.h
+++ b/src/bin/ephoto.h
@@ -51,7 +51,7 @@ Evas_Object *ephoto_thumb_add(Ephoto *ephoto, Evas_Object 
*parent,
 const char *path);
 void ephoto_thumb_path_set(Evas_Object *obj, const char *path);
 void ephoto_directory_set(Ephoto *ephoto, const char *path,
-Elm_Widget_Item *expanded, Eina_Bool dirs_only);
+Elm_Object_Item *expanded, Eina_Bool dirs_only, Eina_Bool thumbs_only);
 
 Eina_Bool ephoto_config_init(Ephoto *em);
 void ephoto_config_save(Ephoto *em);
diff --git a/src/bin/ephoto_main.c b/src/bin/ephoto_main.c
index 665f696..0ec69e9 100644
--- a/src/bin/ephoto_main.c
+++ b/src/bin/ephoto_main.c
@@ -16,8 +16,9 @@ typedef struct _Ephoto_Dir_Data Ephoto_Dir_Data;
 struct _Ephoto_Dir_Data
 {
Ephoto *ephoto;
-   Elm_Widget_Item *expanded;
+   Elm_Object_Item *expanded;
Eina_Bool dirs_only;
+   Eina_Bool thumbs_only;
 };
 
 static void
@@ -271,14 +272,14 @@ ephoto_window_add(const char *path)
 
if (ecore_file_is_dir(path))
  {
-   ephoto_directory_set(ephoto, path, NULL, EINA_FALSE);
+   ephoto_directory_set(ephoto, path, NULL, EINA_FALSE, EINA_FALSE);
_ephoto_thumb_browser_show(ephoto, NULL);
  }
else
  {
char *dir = ecore_file_dir_get(path);
 
-   ephoto_directory_set(ephoto, dir, NULL, EINA_FALSE);
+   ephoto_directory_set(ephoto, dir, NULL, EINA_FALSE, EINA_FALSE);
free(dir);
ephoto_single_browser_path_pending_set(ephoto->single_browser, path);
 
@@ -387,7 +388,9 @@ _ephoto_populate_filter(void *data, Eio_File *handler 
EINA_UNUSED,
if (bname[0] == '.')
   return EINA_FALSE;
if (info->type == EINA_FILE_DIR)
-  return EINA_TRUE;
+ {
+return EINA_TRUE;
+ }
if (!ed->dirs_only)
  return _ephoto_eina_file_direct_info_image_useful(info);
else
@@ -419,10 +422,13 @@ _ephoto_populate_entries(Ephoto_Dir_Data *ed)
 {
Ephoto_Entry *entry;
 
-   if (!ed->dirs_only)
- ephoto_entries_free(ed->ephoto);
-   else
+   if (ed->dirs_only)
  EINA_LIST_FREE(ed->ephoto->direntries, entry) ephoto_entry_free(entry);
+   else if (ed->thumbs_only)
+ EINA_LIST_FREE(ed->ephoto->entries, entry) ephoto_entry_free(entry);
+   else
+ ephoto_entries_free(ed->ephoto);
+
ed->ephoto->ls =
eio_file_stat_ls(ed->ephoto->config->directory, _ephoto_populate_filter,
_ephoto_populate_main, _ephoto_populate_end, _ephoto_populate_error, 
ed);
@@ -441,7 +447,7 @@ _ephoto_change_dir(void *data)
 
 void
 ephoto_directory_set(Ephoto *ephoto, const char *path, Evas_Object *expanded,
-Eina_Bool dirs_only)
+Eina_Bool dirs_only, Eina_Bool thumbs_only)
 {
Ephoto_Dir_Data *ed;
 
@@ -449,6 +455,7 @@ ephoto_directory_set(Ephoto *ephoto, const char *path, 
Evas_Object *expanded,
ed->ephoto = ephoto;
ed->expanded = expanded;
ed->dirs_only = dirs_only;
+   ed->thumbs_only = thumbs_only;
 
ephoto_title_set(ephoto, NULL);
eina_stringshare_replace(>config->directory, path);
diff --git a/src/bin/ephoto_single_browser.c b/src/bin/ephoto_single_browser.c
index 371db45..876d5d1 100644
--- a/src/bin/ephoto_single_browser.c
+++ b/src/bin/ephoto_single_browser.c
@@ -1128,7 +1128,7 @@ _save_image_as_overwrite(void *data, Evas_Object *obj 
EINA_UNUSED,
char *dir = ecore_file_dir_get(file);
 
ephoto_thumb_browser_fsel_clear(sb->ephoto);
-   ephoto_directory_set(sb->ephoto, dir, NULL, EINA_FALSE);
+   ephoto_directory_set(sb->ephoto, dir, NULL, EINA_FALSE, EINA_FALSE);
free(dir);
ephoto_single_browser_path_pending_set(sb->ephoto->single_browser,
file);
@@ -1233,7 +1233,8 @@ _save_image_as_done(void *data, Evas_Object *obj 
EINA_UNUSED, void *event_info)
  char *dir = ecore_file_dir_get(buf);
 
  ephoto_thumb_browser_fsel_clear(sb->ephoto);
- ephoto_directory_set(sb->ephoto, dir, NULL, EINA_FALSE);
+ ephoto_directory_set(sb->ephoto, dir, NULL,
+  EINA_FALSE, EINA_FALSE);
  free(dir);
  ephoto_single_browser_path_pending_set(sb->ephoto->
  single_browser, buf);
diff --git a/src/bin/ephoto_slideshow.c b/src/bin/ephoto_slideshow.c

[EGIT] [core/efl] master 01/01: efl: fix build failure when it builds with coverage.

2015-12-01 Thread Youngbok Shin
cedric pushed a commit to branch master.

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

commit c421e519b0e834053023a600e8cad5b77173b4ad
Author: Youngbok Shin 
Date:   Tue Dec 1 15:30:04 2015 -0800

efl: fix build failure when it builds with coverage.

Summary:
When src/bin/efl/ builds with [--with-tests=coverage], it fails to find 
gcov lib.
The gcov/lcov related options has to be passed when it is builded.
And it only contained in EFL_CFLAGS, EFL_LIBS.
@fix

Test Plan:
Be sure the your enviroments to build src/bin/efl/.

1. Run ./autogen.sh --with-tests=coverage
2. make or make check
3. See the build errors.

Reviewers: raster, jpeg, cedric

Reviewed By: cedric

Subscribers: herdsman

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

Signed-off-by: Cedric BAIL 
---
 src/Makefile_Efl.am | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/Makefile_Efl.am b/src/Makefile_Efl.am
index ea0809d..aad9686 100644
--- a/src/Makefile_Efl.am
+++ b/src/Makefile_Efl.am
@@ -90,7 +90,7 @@ bin/efl/efl_debugd.c \
 bin/efl/efl_debug_common.c \
 bin/efl/efl_debug_common.h
 bin_efl_efl_debugd_CPPFLAGS = -I$(top_builddir)/src/bin/efl @EINA_CFLAGS@ 
@ECORE_CFLAGS@ @ECORE_CON_CFLAGS@
-bin_efl_efl_debugd_LDADD = @USE_EINA_INTERNAL_LIBS@ @USE_ECORE_INTERNAL_LIBS@ 
@USE_ECORE_CON_INTERNAL_LIBS@
+bin_efl_efl_debugd_LDADD = @EFL_LIBS@ @USE_EINA_INTERNAL_LIBS@ 
@USE_ECORE_INTERNAL_LIBS@ @USE_ECORE_CON_INTERNAL_LIBS@
 bin_efl_efl_debugd_DEPENDENCIES = @USE_EINA_INTERNAL_LIBS@ 
@USE_ECORE_INTERNAL_LIBS@ @USE_ECORE_CON_INTERNAL_LIBS@
 
 bin_efl_efl_debug_SOURCES = \
@@ -98,6 +98,6 @@ bin/efl/efl_debug.c \
 bin/efl/efl_debug_common.c \
 bin/efl/efl_debug_common.h
 bin_efl_efl_debug_CPPFLAGS = -I$(top_builddir)/src/bin/efl @EINA_CFLAGS@ 
@ECORE_CFLAGS@ @ECORE_CON_CFLAGS@
-bin_efl_efl_debug_LDADD = @USE_EINA_INTERNAL_LIBS@ @USE_ECORE_INTERNAL_LIBS@ 
@USE_ECORE_CON_INTERNAL_LIBS@
+bin_efl_efl_debug_LDADD = @EFL_LIBS@ @USE_EINA_INTERNAL_LIBS@ 
@USE_ECORE_INTERNAL_LIBS@ @USE_ECORE_CON_INTERNAL_LIBS@
 bin_efl_efl_debug_DEPENDENCIES = @USE_EINA_INTERNAL_LIBS@ 
@USE_ECORE_INTERNAL_LIBS@ @USE_ECORE_CON_INTERNAL_LIBS@
 

-- 




[EGIT] [core/efl] master 01/01: evas: fix a NULL dereference issue in font.

2015-12-01 Thread Youngbok Shin
cedric pushed a commit to branch master.

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

commit 917fdbd59706145ea37eae59a6a47f7b9d1e7ff3
Author: Youngbok Shin 
Date:   Tue Dec 1 15:03:27 2015 -0800

evas: fix a NULL dereference issue in font.

Summary:
eina_list_remove returns Eina_List pointer.
It could be NULL if the last list item is removed.
And the returned Eina_List pointer could be different from the given list.
So, calling free for fdir->data after fdir's address is changed is 
dangerous.
@fix

Test Plan: Run expedite or test app with evas_font_path_append() API.

Reviewers: stefan_schmidt, jpeg

Reviewed By: jpeg

Subscribers: stefan, jiin.moon, cedric, jpeg

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

Signed-off-by: Cedric BAIL 
---
 src/lib/evas/canvas/evas_font_dir.c | 15 +++
 1 file changed, 7 insertions(+), 8 deletions(-)

diff --git a/src/lib/evas/canvas/evas_font_dir.c 
b/src/lib/evas/canvas/evas_font_dir.c
index dc9ac20..b54e6c0 100644
--- a/src/lib/evas/canvas/evas_font_dir.c
+++ b/src/lib/evas/canvas/evas_font_dir.c
@@ -1122,7 +1122,7 @@ static Evas_Font_Dir *
 object_text_font_cache_dir_add(char *dir)
 {
Evas_Font_Dir *fd;
-   char *tmp, *tmp2;
+   char *tmp, *tmp2, *file;
Eina_List *fdir;
Evas_Font *fn;
 
@@ -1183,9 +1183,9 @@ object_text_font_cache_dir_add(char *dir)
 
/* directoy listing */
fdir = evas_file_path_list(dir, "*.ttf", 0);
-   while (fdir)
+   EINA_LIST_FREE(fdir, file)
  {
-   tmp = evas_file_path_join(dir, fdir->data);
+   tmp = evas_file_path_join(dir, file);
if (tmp)
  {
 fn = calloc(1, sizeof(Evas_Font));
@@ -1194,12 +1194,12 @@ object_text_font_cache_dir_add(char *dir)
  char *p;
 
  fn->type = 0;
- tmp2 = alloca(strlen(fdir->data) + 1);
- strcpy(tmp2, fdir->data);
+ tmp2 = alloca(strlen(file) + 1);
+ strcpy(tmp2, file);
  p = strrchr(tmp2, '.');
  if (p) *p = 0;
  fn->simple.name = eina_stringshare_add(tmp2);
- tmp2 = evas_file_path_join(dir, fdir->data);
+ tmp2 = evas_file_path_join(dir, file);
  if (tmp2)
{
   fn->path = eina_stringshare_add(tmp2);
@@ -1209,8 +1209,7 @@ object_text_font_cache_dir_add(char *dir)
   }
 free(tmp);
  }
-   fdir = eina_list_remove(fdir, fdir->data);
-   free(fdir->data);
+   free(file);
  }
 
/* fonts.alias */

-- 




[EGIT] [core/efl] master 01/01: edje: add mising closing brace and adjust indents and spacing in test edc

2015-12-01 Thread Jee-Yong Um
cedric pushed a commit to branch master.

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

commit 20671d84cd2ce3cf1a1fbae6ad7943cd85557960
Author: Jee-Yong Um 
Date:   Tue Dec 1 14:54:15 2015 -0800

edje: add mising closing brace and adjust indents and spacing in test edc

Summary: A closing brace is missing, and indent is not aligned.

Reviewers: cedric

Subscribers: jpeg

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

Signed-off-by: Cedric BAIL 
---
 src/tests/edje/data/test_layout.edc | 7 ---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/tests/edje/data/test_layout.edc 
b/src/tests/edje/data/test_layout.edc
index fe6ea01..f1309cc 100644
--- a/src/tests/edje/data/test_layout.edc
+++ b/src/tests/edje/data/test_layout.edc
@@ -12,13 +12,14 @@ collections {
state: "default" 0.0;
color: 255 255 255 255;
 
-  rel1 {
-  relative: 0.0 0.0;  
+   rel1 {
+  relative: 0.0 0.0;
}
rel2 {
-  relative: 1.0 1.0;  
+  relative: 1.0 1.0;
}
 }
  }
+  }
}
 }

-- 




[EGIT] [core/efl] master 01/01: evas: refactor model's savers and loaders.

2015-12-01 Thread perepelits.m
cedric pushed a commit to branch master.

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

commit 32c33ed64dda542c7cfc952fc656bb711260441b
Author: perepelits.m 
Date:   Tue Dec 1 16:38:48 2015 -0800

evas: refactor model's savers and loaders.

Summary:
Move common part to a separated document.
Make code more readable using smaller functions. (from Task T2713)

Reviewers: cedric, raster, Hermet

Subscribers: artem.popov

Differential Revision: https://phab.enlightenment.org/D3373
---
 src/Makefile_Evas.am   |   3 +-
 ...odel_common.c => evas_model_load_save_common.c} |   2 +-
 ...odel_common.h => evas_model_load_save_common.h} |   0
 .../evas/model_loaders/eet/evas_model_load_eet.c   |   2 -
 .../evas/model_loaders/ply/evas_model_load_ply.c   | 319 +
 .../evas/model_savers/eet/evas_model_save_eet.c|   1 -
 .../evas/model_savers/obj/evas_model_save_obj.c| 239 +--
 .../evas/model_savers/ply/evas_model_save_ply.c| 121 +---
 8 files changed, 307 insertions(+), 380 deletions(-)

diff --git a/src/Makefile_Evas.am b/src/Makefile_Evas.am
index 9cc57a5..f768e2d 100644
--- a/src/Makefile_Evas.am
+++ b/src/Makefile_Evas.am
@@ -224,8 +224,7 @@ lib/evas/canvas/evas_canvas3d_node_callback.h
 lib_evas_libevas_la_SOURCES += \
 lib/evas/common3d/save_load/evas_model_load.c \
 lib/evas/common3d/save_load/evas_model_save.c \
-lib/evas/common3d/save_load/evas_model_common.c \
-lib/evas/common3d/save_load/evas_model_common.h \
+lib/evas/common3d/save_load/evas_model_load_save_common.c \
 modules/evas/model_loaders/eet/evas_model_load_eet.c \
 modules/evas/model_loaders/md2/evas_model_load_md2.c \
 modules/evas/model_loaders/obj/evas_model_load_obj.c \
diff --git a/src/lib/evas/common3d/save_load/evas_model_common.c 
b/src/lib/evas/common3d/save_load/evas_model_load_save_common.c
similarity index 99%
rename from src/lib/evas/common3d/save_load/evas_model_common.c
rename to src/lib/evas/common3d/save_load/evas_model_load_save_common.c
index 612bccd..190ba59 100644
--- a/src/lib/evas/common3d/save_load/evas_model_common.c
+++ b/src/lib/evas/common3d/save_load/evas_model_load_save_common.c
@@ -1,4 +1,4 @@
-#include "evas_model_common.h"
+#include "evas_model_load_save_common.h"
 
 # define SAVE_MESH_INDICES_COPY   \
if (header.indices_count)  \
diff --git a/src/lib/evas/common3d/save_load/evas_model_common.h 
b/src/lib/evas/common3d/save_load/evas_model_load_save_common.h
similarity index 100%
rename from src/lib/evas/common3d/save_load/evas_model_common.h
rename to src/lib/evas/common3d/save_load/evas_model_load_save_common.h
diff --git a/src/modules/evas/model_loaders/eet/evas_model_load_eet.c 
b/src/modules/evas/model_loaders/eet/evas_model_load_eet.c
index a36dff4..ea74208 100644
--- a/src/modules/evas/model_loaders/eet/evas_model_load_eet.c
+++ b/src/modules/evas/model_loaders/eet/evas_model_load_eet.c
@@ -128,5 +128,3 @@ evas_model_load_file_eet(Evas_Canvas3D_Mesh *mesh, 
Eina_File *file)
 
_evas_canvas3d_eet_file_free();
 }
-
-
diff --git a/src/modules/evas/model_loaders/ply/evas_model_load_ply.c 
b/src/modules/evas/model_loaders/ply/evas_model_load_ply.c
index 1beef18..971e951 100644
--- a/src/modules/evas/model_loaders/ply/evas_model_load_ply.c
+++ b/src/modules/evas/model_loaders/ply/evas_model_load_ply.c
@@ -1,44 +1,4 @@
-#ifdef HAVE_CONFIG_H
-# include "config.h"
-#endif
-
-#include 
-#include "stdio.h"
-#include "evas_common_private.h"
-#include "evas_private.h"
-#include 
-
-/* set value to position [x][y] to array name which have. */
-#define ARRAY_2D(name, x, y, count_y) (*(name + x * count_y + y))
-
-/* Structures for reading data from file. */
-typedef struct _PLY_HeaderPLY_Header;
-
-struct _PLY_Header
-{
-   int vertices_count;
-   int triangles_count;
-   Eina_Bool existence_of_geometries;
-   Eina_Bool existence_of_normals;
-   Eina_Bool existence_of_texcoords;
-   Eina_Bool existence_of_colors;
-};
-
-/* create new header */
-static inline PLY_Header
-_new_ply_header()
-{
-   PLY_Header header;
-
-   header.vertices_count = 0;
-   header.triangles_count = 0;
-   header.existence_of_geometries = EINA_FALSE;
-   header.existence_of_normals = EINA_FALSE;
-   header.existence_of_texcoords = EINA_FALSE;
-   header.existence_of_colors = EINA_FALSE;
-
-   return header;
-}
+#include "evas_model_load_save_common.h"
 
 static inline char *
 _to_next_line(char *current)
@@ -81,8 +41,8 @@ _read_data(float *array, int place, int count, char *current, 
float divider)
return current;
 }
 
-static inline PLY_Header
-_read_header(char *map)//Check properties of mesh in .ply file.
+static inline Eina_Bool
+_read_ply_header(char *map, Evas_Model_Load_Save_Header *header)
 {
eina_init();
 
@@ -90,30 +50,29 @@ _read_header(char 

[EGIT] [tools/erigo] master 01/01: Fixing segv when dragging between factory and window

2015-12-01 Thread Yakov Goldberg
yakov pushed a commit to branch master.

http://git.enlightenment.org/tools/erigo.git/commit/?id=36759bb7f1012aaa5afea7db2aea2ad1b6476e68

commit 36759bb7f1012aaa5afea7db2aea2ad1b6476e68
Author: Yakov Goldberg 
Date:   Tue Dec 1 19:05:13 2015 +0200

Fixing segv when dragging between factory and window

The bug was: segv in _obj_remove_from_session() because widget did not
exist. It happened because: in _drop_target_leave() we were deleting
eo_cur and deleting _dragged_wdg right after that.
Because of delay in callback call, widget was already deleted in
_obj_remove_from_session(), which is called by eo_del(eo_cur).

I added _factory_dragdone_post_cb(), which deletes _dragged_wdg if it
was not accepted or accepted outside Erigo.

Virtually crash still can happen if _drop_target_leave() will be called
and _dragdone will happen right after this. But practically this is
almost impossible.
---
 src/bin/gui/dnd.c| 10 ++
 src/bin/gui/dnd.h|  3 +--
 src/bin/gui/editor.c | 27 ---
 src/bin/gui/egui_logic.c |  4 ++--
 src/bin/gui/egui_logic_private.h |  1 +
 5 files changed, 26 insertions(+), 19 deletions(-)

diff --git a/src/bin/gui/dnd.c b/src/bin/gui/dnd.c
index 078716b..1eb9dc6 100644
--- a/src/bin/gui/dnd.c
+++ b/src/bin/gui/dnd.c
@@ -31,9 +31,10 @@ typedef struct
Eid *wdg_id; /*Widget id*/
char *image_path; /* image for DnD icon. */
Eo *obj; /*object, where drag starts. Used to call cb on delete.  */
+   void (*_factory_dragdone_post_cb)(Eina_Bool accept, const Eo *wdg_eo, const 
Gui_Widget * drag_start_wdg);
 } Factory_Drag_Info;
 
-Factory_Drag_Info _wdg_drag = {NULL, NULL, NULL};
+Factory_Drag_Info _wdg_drag = {NULL, NULL, NULL, NULL};
 
 /* Information about Drop Target*/
 typedef struct
@@ -177,8 +178,7 @@ static void
 _dragdone(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED)
 {
dnd_debug("In");
-
-   if (_drag_info_global.canvas_is_source)
+   if (_drag_info_global._wdg_dragdone_post_cb)
  {
 _drag_info_global._wdg_dragdone_post_cb(_drag_info_global.drag_accept, 
_drag_info_global.obj, _drag_info_global.drag_start_wdg);
  }
@@ -488,6 +488,7 @@ _drag_start_from_factory(void *data)
char *wdg_data = json_widget_generate(fdi->wdg_id);
dnd_debug("Data %s", wdg_data);
_drag_info_global._drag_data = wdg_data;
+   _drag_info_global._wdg_dragdone_post_cb = fdi->_factory_dragdone_post_cb;
elm_drag_start(fdi->obj, ELM_SEL_FORMAT_TEXT,
   wdg_data, ELM_XDND_ACTION_COPY,
   image_create_icon_f, fdi,
@@ -534,13 +535,14 @@ _factory_drag_info_free(void *data, Eo *obj EINA_UNUSED, 
const Eo_Event_Descript
 /* Function to make Eo object draggable, when mouse down/up are handled inside.
  * Dragging from factory. */
 void
-drag_add(Eo *obj, const char *image_path, Eid *wdg_id)
+drag_add(Eo *obj, const char *image_path, Eid *wdg_id, void 
(*_factory_dragdone_post_cb)(Eina_Bool accept, const Eo *wdg_eo, const 
Gui_Widget * drag_start_wdg))
 {
Factory_Drag_Info *fdi = calloc(1, sizeof(Factory_Drag_Info));
if (image_path)
  fdi->image_path = strdup(image_path);
fdi->wdg_id = wdg_id;
fdi->obj = obj;
+   fdi->_factory_dragdone_post_cb = _factory_dragdone_post_cb;
eo_do(obj, eo_event_callback_add(EVAS_OBJECT_EVENT_MOUSE_DOWN, 
_factory_drag_mouse_down, fdi));
eo_do(obj, eo_event_callback_add(EVAS_OBJECT_EVENT_DEL, 
_factory_drag_info_free, fdi));
 }
diff --git a/src/bin/gui/dnd.h b/src/bin/gui/dnd.h
index 884bb3e..63e4518 100644
--- a/src/bin/gui/dnd.h
+++ b/src/bin/gui/dnd.h
@@ -2,8 +2,7 @@
 #define _DND_H
 
 void
-drag_add(Eo *obj, const char *image_path, Eid *wdg_id);
-
+drag_add(Eo *obj, const char *image_path, Eid *wdg_id, void 
(*_factory_dragdone_post_cb)(Eina_Bool accept, const Eo *wdg_eo, const 
Gui_Widget * drag_start_wdg));
 void
 drag_start(Eo *obj, Eid *wdg_id, void (*_dragdone_post_cb)(Eina_Bool accept, 
const Eo *wdg_eo, const Gui_Widget *drag_start_wdg));
 
diff --git a/src/bin/gui/editor.c b/src/bin/gui/editor.c
index 84e6af8..f32e3fb 100644
--- a/src/bin/gui/editor.c
+++ b/src/bin/gui/editor.c
@@ -1632,17 +1632,6 @@ _drop_target_leave(void *data, Evas_Object *obj)
  {
 if (di->eo_cur) eo_do(di->eo_cur, efl_gfx_visible_set(EINA_FALSE));
  }
-
-   if (!dnd_counter_get())
- {
-/* If drag was started in factory or outside Erigo - delete widget */
-if (!dnd_is_source() && _dragged_wdg)
-  {
- wdg_del(_dragged_wdg);
-  }
-/* ... if started on canvas - NULL pointer */
-_dragged_wdg = NULL;
- }
 }
 
 /* In the beginning of drop handler we want to determine,
@@ -2794,6 +2783,21 @@ _drag_start_post(const Gui_Widget *wdg, const Eo 
*_wdg_eo)
wdg_parent_set((Gui_Widget *) wdg, NULL);
 }
 
+/* This callback is added for dragging object from factory. */
+static void

[EGIT] [core/efl] master 01/01: evas_gl_shader: refractor shader/program compile check code.

2015-12-01 Thread Amitesh Singh
jpeg pushed a commit to branch master.

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

commit cb227cb5fb2c5faba171e923df6c40e5d186c5ec
Author: Amitesh Singh 
Date:   Wed Dec 2 16:47:27 2015 +0900

evas_gl_shader: refractor shader/program compile check code.

Summary:
Call respective shader/program functions on shader/program target only.

Reviewers: cedric, raster, wonsik, spacegrapher, jpeg

Reviewed By: jpeg

Subscribers: alok25, sachin.dev, cedric, seoz

Differential Revision: https://phab.enlightenment.org/D3388
---
 .../evas/engines/gl_common/evas_gl_shader.c| 33 +-
 1 file changed, 13 insertions(+), 20 deletions(-)

diff --git a/src/modules/evas/engines/gl_common/evas_gl_shader.c 
b/src/modules/evas/engines/gl_common/evas_gl_shader.c
index 3b7986d..53f045b 100644
--- a/src/modules/evas/engines/gl_common/evas_gl_shader.c
+++ b/src/modules/evas/engines/gl_common/evas_gl_shader.c
@@ -66,32 +66,25 @@ static const char *_shader_flags[SHADER_FLAG_COUNT] = {
 static Eina_Bool compiler_released = EINA_FALSE;
 
 static void
-gl_compile_link_error(GLuint target, const char *action)
+gl_compile_link_error(GLuint target, const char *action, Eina_Bool is_shader)
 {
int loglen = 0, chars = 0;
char *logtxt;
 
-   /* Shader info log */
-   glGetShaderiv(target, GL_INFO_LOG_LENGTH, );
-   if (loglen > 0)
- {
-logtxt = calloc(loglen, sizeof(char));
-if (logtxt)
-  {
- glGetShaderInfoLog(target, loglen, , logtxt);
- ERR("Failed to %s: %s", action, logtxt);
- free(logtxt);
-  }
- }
+   if (is_shader)
+ /* Shader info log */
+ glGetShaderiv(target, GL_INFO_LOG_LENGTH, );
+   else
+ /* Program info log */
+ glGetProgramiv(target, GL_INFO_LOG_LENGTH, );
 
-   /* Program info log */
-   glGetProgramiv(target, GL_INFO_LOG_LENGTH, );
if (loglen > 0)
  {
 logtxt = calloc(loglen, sizeof(char));
 if (logtxt)
   {
- glGetProgramInfoLog(target, loglen, , logtxt);
+ if (is_shader) glGetShaderInfoLog(target, loglen, , logtxt);
+ else glGetProgramInfoLog(target, loglen, , logtxt);
  ERR("Failed to %s: %s", action, logtxt);
  free(logtxt);
   }
@@ -155,7 +148,7 @@ _evas_gl_common_shader_program_binary_load(Eet_File *ef, 
unsigned int flags)
glGetProgramiv(prg, GL_LINK_STATUS, );
if (!ok)
  {
-gl_compile_link_error(prg, "load a program object");
+gl_compile_link_error(prg, "load a program object", EINA_FALSE);
 ERR("Abort load of program (%s)", pname);
 glDeleteProgram(prg);
 glDeleteShader(vtx);
@@ -381,7 +374,7 @@ evas_gl_common_shader_compile(unsigned int flags, const 
char *vertex,
glGetShaderiv(vtx, GL_COMPILE_STATUS, );
if (!ok)
  {
-gl_compile_link_error(vtx, "compile vertex shader");
+gl_compile_link_error(vtx, "compile vertex shader", EINA_TRUE);
 ERR("Abort compile of vertex shader:\n%s", vertex);
 glDeleteShader(vtx);
 return NULL;
@@ -393,7 +386,7 @@ evas_gl_common_shader_compile(unsigned int flags, const 
char *vertex,
glGetShaderiv(frg, GL_COMPILE_STATUS, );
if (!ok)
  {
-gl_compile_link_error(frg, "compile fragment shader");
+gl_compile_link_error(frg, "compile fragment shader", EINA_TRUE);
 ERR("Abort compile of fragment shader:\n%s", fragment);
 glDeleteShader(vtx);
 glDeleteShader(frg);
@@ -423,7 +416,7 @@ evas_gl_common_shader_compile(unsigned int flags, const 
char *vertex,
glGetProgramiv(prg, GL_LINK_STATUS, );
if (!ok)
  {
-gl_compile_link_error(prg, "link fragment and vertex shaders");
+gl_compile_link_error(prg, "link fragment and vertex shaders", 
EINA_FALSE);
 ERR("Abort compile of shader (flags: %08x)", flags);
 glDeleteShader(vtx);
 glDeleteShader(frg);

-- 




[EGIT] [core/efl] master 01/01: edje cc fix - we parsed floats not intsfor min and max desc size

2015-12-01 Thread Carsten Haitzler
raster pushed a commit to branch master.

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

commit ea7394a49129ba663cb5987c07f07cc52f25a6fb
Author: Carsten Haitzler (Rasterman) 
Date:   Wed Dec 2 15:24:21 2015 +0900

edje cc fix - we parsed floats not intsfor min and max desc size

thanks conr2d for pointing this out - we uses the float parse func and
not in parse. we should use int parse as the min and max sizes are
just ints and not floats. :)

@fix
---
 src/bin/edje/edje_cc_handlers.c | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/bin/edje/edje_cc_handlers.c b/src/bin/edje/edje_cc_handlers.c
index aba6676..33c2205 100644
--- a/src/bin/edje/edje_cc_handlers.c
+++ b/src/bin/edje/edje_cc_handlers.c
@@ -7525,8 +7525,8 @@ st_collections_group_parts_part_description_min(void)
check_min_arg_count(1);
 
if (is_param(1)) {
-  current_desc->min.w = parse_float_range(0, 0, 0x7fff);
-  current_desc->min.h = parse_float_range(1, 0, 0x7fff);
+  current_desc->min.w = parse_int_range(0, 0, 0x7fff);
+  current_desc->min.h = parse_int_range(1, 0, 0x7fff);
} else {
   char *tmp;
 
@@ -7587,8 +7587,8 @@ st_collections_group_parts_part_description_max(void)
check_min_arg_count(1);
 
if (is_param(1)) {
-  current_desc->max.w = parse_float_range(0, -1.0, 0x7fff);
-  current_desc->max.h = parse_float_range(1, -1.0, 0x7fff);
+  current_desc->max.w = parse_int_range(0, -1, 0x7fff);
+  current_desc->max.h = parse_int_range(1, -1, 0x7fff);
} else {
   char *tmp;
 

-- 




[EGIT] [apps/ephoto] master 01/01: Ephoto: Allow delete from the single view, Add a right click edit menu to the single view, Expand fsel on double click

2015-12-01 Thread Stephen Houston
okra pushed a commit to branch master.

http://git.enlightenment.org/apps/ephoto.git/commit/?id=2e6998b0c089b97e61b9281911073707e50332ea

commit 2e6998b0c089b97e61b9281911073707e50332ea
Author: Stephen Houston 
Date:   Tue Dec 1 23:03:50 2015 -0600

Ephoto: Allow delete from the single view, Add a right click edit menu to 
the single view, Expand fsel on double click
---
 src/bin/ephoto_config.c |  91 ++--
 src/bin/ephoto_single_browser.c | 306 ++--
 src/bin/ephoto_thumb_browser.c  |  82 ---
 3 files changed, 437 insertions(+), 42 deletions(-)

diff --git a/src/bin/ephoto_config.c b/src/bin/ephoto_config.c
index 04906d7..47121a0 100644
--- a/src/bin/ephoto_config.c
+++ b/src/bin/ephoto_config.c
@@ -365,10 +365,61 @@ ephoto_config_slideshow(Ephoto *ephoto)
evas_object_show(popup);
 }
 
+static void
+_link_anchor_bt(void *data, Evas_Object *obj,
+void *event_info EINA_UNUSED)
+{
+   char buf[PATH_MAX];
+   Evas_Object *av = data;
+   const char *link = evas_object_data_get(obj, "link");
+
+   elm_entry_anchor_hover_end(av);
+   snprintf(buf, PATH_MAX, "xdg-open %s", link);
+   ecore_exe_run(buf, NULL);
+}
+
+static void
+_copy_anchor_bt(void *data, Evas_Object *obj,
+void *event_info EINA_UNUSED)
+{
+   char buf[PATH_MAX];
+   Evas_Object *av = data;
+   const char *link = evas_object_data_get(obj, "link");
+
+   elm_entry_anchor_hover_end(av);
+   snprintf(buf, PATH_MAX, "%s", link);
+   elm_cnp_selection_set(av, ELM_SEL_TYPE_CLIPBOARD, ELM_SEL_FORMAT_MARKUP,
+   buf, strlen(buf));
+}
+
+static void
+_link_anchor(void *data, Evas_Object *obj, void *event_info)
+{
+   Evas_Object *av = data;
+   Evas_Object *button;
+   Elm_Entry_Anchor_Hover_Info *ei = event_info;
+
+   button = elm_button_add(obj);
+   elm_object_text_set(button, _("Open Link In Browser"));
+   elm_object_part_content_set(ei->hover, "middle", button);
+   evas_object_smart_callback_add(button, "clicked", _link_anchor_bt,
+   av);
+   evas_object_data_set(button, "link", strdup(ei->anchor_info->name));
+   evas_object_show(button);
+
+   button = elm_button_add(obj);
+   elm_object_text_set(button, _("Copy Link"));
+   elm_object_part_content_set(ei->hover, "bottom", button);
+   evas_object_smart_callback_add(button, "clicked", _copy_anchor_bt,
+   av);
+   evas_object_data_set(button, "link", strdup(ei->anchor_info->name));
+   evas_object_show(button);
+}
+
 void
 ephoto_config_about(Ephoto *ephoto)
 {
-   Evas_Object *popup, *box, *ic, *button, *label;
+   Evas_Object *popup, *box, *bb, *entry, *ic, *button;
Eina_Strbuf *sbuf = eina_strbuf_new();
FILE *f;
 
@@ -383,15 +434,29 @@ ephoto_config_about(Ephoto *ephoto)
evas_object_size_hint_align_set(box, EVAS_HINT_FILL, EVAS_HINT_FILL);
evas_object_show(box);
 
-   label = elm_label_add(box);
-   evas_object_size_hint_weight_set(label, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
-   evas_object_size_hint_align_set(label, EVAS_HINT_FILL, EVAS_HINT_FILL);
+   bb = elm_bubble_add(box);
+   evas_object_size_hint_weight_set(bb, 0.0, 0.0);
+   evas_object_size_hint_align_set(bb, EVAS_HINT_FILL, EVAS_HINT_FILL);
+   elm_box_pack_end(box, bb);
+   evas_object_show(bb);
+
+   entry = elm_entry_add(bb);
+   elm_entry_anchor_hover_style_set(entry, "popout");
+   elm_entry_anchor_hover_parent_set(entry, popup);
+   elm_entry_editable_set(entry, EINA_FALSE);
+   elm_entry_context_menu_disabled_set(entry, EINA_TRUE);
+   elm_entry_line_wrap_set(entry, ELM_WRAP_NONE);
+   evas_object_size_hint_weight_set(entry, 0.0, 0.0);
+   evas_object_size_hint_align_set(entry, EVAS_HINT_FILL, EVAS_HINT_FILL);
eina_strbuf_append_printf(sbuf,
_("Ephoto is a comprehensive image viewer based on the EFL."
-  "For more information, please visit the Ephoto project page on the 
Enlightenment wiki:"
-  "https://phab.enlightenment.org/w/projects/ephoto"
+  "For more information, please visit the Ephoto project page on"
+   "the Enlightenment wiki:"
+  "https://phab.enlightenment.org/w/projects/ephoto>"
+   "https://phab.enlightenment.org/w/projects/ephoto"
   "Ephoto's source can be found through Enlightenment's git:"
-  "http://git.enlightenment.org/apps/ephoto.git" ""
+  "http://git.enlightenment.org/apps/ephoto.git>"
+   "http://git.enlightenment.org/apps/ephoto.git"
   "Authors:"));
f = fopen(PACKAGE_DATA_DIR "/AUTHORS", "r");
if (f)
@@ -428,17 +493,19 @@ ephoto_config_about(Ephoto *ephoto)
   *p = 0;
 }
   while (p);
-  eina_strbuf_append_printf(sbuf, "%s", buf);
+  eina_strbuf_append_printf(sbuf, "%s", buf);
}
  if (len == 0)
-eina_strbuf_append_printf(sbuf, "");
+eina_strbuf_append_printf(sbuf, "");
 

[EGIT] [core/elementary] master 01/01: atspi: add type of accessibility object

2015-12-01 Thread Lukasz Stanislawski
stanluk pushed a commit to branch master.

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

commit e2b1e28a12741b3be9db2aa4edae9e42877049e6
Author: Lukasz Stanislawski 
Date:   Thu Nov 26 16:53:32 2015 +0100

atspi: add type of accessibility object

Type API provides possibility to skip/ignore widgets in accessiblity
tree. It make sense to ignore object if it do not provide any valuable 
contextual
information for disabled users. Skipped objects are usually container 
objects
and are ommited in parent-child relationship.

@feature
---
 src/lib/elm_atspi_app_object.c|  6 -
 src/lib/elm_interface_atspi_accessible.c  | 44 +--
 src/lib/elm_interface_atspi_accessible.eo | 19 +
 src/lib/elm_widget.c  | 41 +++-
 4 files changed, 95 insertions(+), 15 deletions(-)

diff --git a/src/lib/elm_atspi_app_object.c b/src/lib/elm_atspi_app_object.c
index 6e49891..11d5bb2 100644
--- a/src/lib/elm_atspi_app_object.c
+++ b/src/lib/elm_atspi_app_object.c
@@ -33,7 +33,11 @@ 
_elm_atspi_app_object_elm_interface_atspi_accessible_children_get(Eo *obj EINA_U
 
EINA_LIST_FOREACH(_elm_win_list, l, win)
  {
-if (eo_isa(win, ELM_INTERFACE_ATSPI_ACCESSIBLE_MIXIN))
+Elm_Atspi_Type type;
+if (!eo_isa(win, ELM_INTERFACE_ATSPI_ACCESSIBLE_MIXIN))
+  continue;
+eo_do(win, type = elm_interface_atspi_accessible_type_get());
+if (type == ELM_ATSPI_TYPE_REGULAR)
   accs = eina_list_append(accs, win);
  }
 
diff --git a/src/lib/elm_interface_atspi_accessible.c 
b/src/lib/elm_interface_atspi_accessible.c
index 2a38380..357e609 100644
--- a/src/lib/elm_interface_atspi_accessible.c
+++ b/src/lib/elm_interface_atspi_accessible.c
@@ -129,6 +129,7 @@ struct _Elm_Interface_Atspi_Accessible_Data
const char*translation_domain;
Elm_Atspi_Relation_Set relations;
Elm_Interface_Atspi_Accessible *parent;
+   Elm_Atspi_Type type: 2;
 };
 
 typedef struct _Elm_Interface_Atspi_Accessible_Data 
Elm_Interface_Atspi_Accessible_Data;
@@ -168,11 +169,25 @@ _elm_interface_atspi_accessible_index_in_parent_get(Eo 
*obj, Elm_Interface_Atspi
 EOLIAN static Elm_Interface_Atspi_Accessible *
 _elm_interface_atspi_accessible_parent_get(Eo *obj EINA_UNUSED, 
Elm_Interface_Atspi_Accessible_Data *pd)
 {
-   return pd->parent;
+   Elm_Atspi_Type type;
+   Eo *parent = obj;
+
+   if (pd->parent) return pd->parent;
+
+   do {
+  eo_do(obj, parent = eo_parent_get());
+  if (eo_isa(parent, ELM_INTERFACE_ATSPI_ACCESSIBLE_MIXIN))
+{
+   eo_do(parent, type = elm_interface_atspi_accessible_type_get());
+   if (type != ELM_ATSPI_TYPE_SKIPPED) break;
+}
+   } while (parent);
+
+   return eo_isa(parent, ELM_INTERFACE_ATSPI_ACCESSIBLE_MIXIN) ? parent : NULL;
 }
 
 EOLIAN static void
-_elm_interface_atspi_accessible_parent_set(Eo *obj, 
Elm_Interface_Atspi_Accessible_Data *pd, Elm_Interface_Atspi_Accessible 
*new_parent)
+_elm_interface_atspi_accessible_parent_set(Eo *obj, 
Elm_Interface_Atspi_Accessible_Data *pd EINA_UNUSED, 
Elm_Interface_Atspi_Accessible *new_parent)
 {
if (pd->parent != new_parent)
  {
@@ -314,6 +329,7 @@ _elm_interface_atspi_accessible_event_emit(Eo *class 
EINA_UNUSED, void *pd EINA_
 {
Eina_List *l;
Elm_Atspi_Event_Handler *hdl;
+   Elm_Atspi_Type type;
 
if (!accessible || !event || !eo_isa(accessible, 
ELM_INTERFACE_ATSPI_ACCESSIBLE_MIXIN))
  {
@@ -321,6 +337,18 @@ _elm_interface_atspi_accessible_event_emit(Eo *class 
EINA_UNUSED, void *pd EINA_
 return;
  }
 
+   eo_do(accessible, type = elm_interface_atspi_accessible_type_get());
+   if (type != ELM_ATSPI_TYPE_REGULAR)
+ return;
+
+   if (event == ELM_INTERFACE_ATSPI_ACCESSIBLE_EVENT_CHILDREN_CHANGED)
+ {
+Elm_Atspi_Event_Children_Changed_Data *atspi_data = event_info;
+eo_do(atspi_data->child, type = 
elm_interface_atspi_accessible_type_get());
+if (type != ELM_ATSPI_TYPE_REGULAR)
+  return;
+ }
+
EINA_LIST_FOREACH(global_callbacks, l, hdl)
  {
 if (hdl->cb)
@@ -552,4 +580,16 @@ _elm_interface_atspi_accessible_root_get(Eo *class 
EINA_UNUSED, void *pd EINA_UN
return root;
 }
 
+EOLIAN Elm_Atspi_Type
+_elm_interface_atspi_accessible_type_get(Eo *obj EINA_UNUSED, 
Elm_Interface_Atspi_Accessible_Data *pd)
+{
+   return pd->type;
+}
+
+EOLIAN void
+_elm_interface_atspi_accessible_type_set(Eo *obj EINA_UNUSED, 
Elm_Interface_Atspi_Accessible_Data *pd, Elm_Atspi_Type val)
+{
+   pd->type = val;
+}
+
 #include "elm_interface_atspi_accessible.eo.c"
diff --git a/src/lib/elm_interface_atspi_accessible.eo 
b/src/lib/elm_interface_atspi_accessible.eo
index f337e56..378674e 100644
--- a/src/lib/elm_interface_atspi_accessible.eo
+++ b/src/lib/elm_interface_atspi_accessible.eo
@@ -1,3 +1,11 @@
+enum 

[EGIT] [tools/erigo] master 01/01: Refactoring/fixing content packing/unpacking flows

2015-12-01 Thread Yakov Goldberg
yakov pushed a commit to branch master.

http://git.enlightenment.org/tools/erigo.git/commit/?id=c7bdfc14567d3152f794eff9eb79daf36d5057ec

commit c7bdfc14567d3152f794eff9eb79daf36d5057ec
Author: Yakov Goldberg 
Date:   Sun Nov 29 13:32:05 2015 +0200

Refactoring/fixing content packing/unpacking flows

Create proper flow for objects packing/repacking through
content view and DnD.
Reorder memento creations in these flows.
---
 src/bin/gui/editor.c | 363 +--
 src/lib/gui_widget.c |  22 +++-
 src/lib/gui_widget.h |   5 +
 3 files changed, 232 insertions(+), 158 deletions(-)

diff --git a/src/bin/gui/editor.c b/src/bin/gui/editor.c
index e4962cd..84e6af8 100644
--- a/src/bin/gui/editor.c
+++ b/src/bin/gui/editor.c
@@ -1884,7 +1884,6 @@ _drop_target_drop(Gui_Widget *drop_target_wdg, Eo 
*canvas_drop_target, const cha
  }
else if (drop_to_wdg == DROP_TO_NAVIFRAME)
  {
-ERR("implement drop to naviframe");
 if (di->drop_instead_item_obj)
   {
  Item_Container_Item *wit = di->drop_item_cont_item, *new_wit;
@@ -1909,7 +1908,6 @@ _drop_target_drop(Gui_Widget *drop_target_wdg, Eo 
*canvas_drop_target, const cha
   if ((gui_value_type_get(val) == GUI_TYPE_OBJECT) &&
   (di->drop_instead_item_obj == EID_ID_GET(val)))
 {
-   ERR("Found val to drop item: %s", 
eid_name_get(di->drop_instead_item_obj));
break;
 }
}
@@ -2583,6 +2581,112 @@ _drop_target_pos(void *data, Eo *obj, Evas_Coord x, 
Evas_Coord y, Elm_Xdnd_Actio
  }
 }
 
+static Gui_Widget*
+_dummy_widget_create(const Gui_Context *ctx, const Gui_Widget *parent_wdg)
+{
+   Gui_Widget *_dummy_wdg = wdg_get(gui_context_eid_get_by_name(NULL, 
"__dummy"));
+   char *new_dummy_name = gui_context_free_name_get(ctx, 
wdg_class_name_get(_dummy_wdg));
+   Eid *new_dummy_eid = eid_new((Gui_Context *)ctx, new_dummy_name, 
EID_TYPE_WIDGET);
+   free(new_dummy_name);
+   Gui_Widget *new_dummy_wdg = wdg_copy(_dummy_wdg, new_dummy_eid, EINA_TRUE);
+   wdg_parent_set(new_dummy_wdg, wdg_name_get(parent_wdg));
+   return new_dummy_wdg;
+}
+
+/* Helper to remove 'item name' widget from container
+ * and create such memento.
+ * For LAYOUT container, dummy object will be created */
+static void
+_obj_container_item_remove_helper(Gui_Widget *wdg_container, const char 
*item_name)
+{
+   const Gui_Context *ctx = wdg_context_get(wdg_container);
+   Object_Container *_old_container, *_new_container;
+   _old_container = (Object_Container *) wdg_obj_container_get((Gui_Widget *) 
wdg_container);
+   _new_container = obj_container_copy(_old_container);
+
+   obj_container_ref(_old_container);
+   wdg_obj_container_unset((Gui_Widget *) wdg_container);
+   wdg_obj_container_set((Gui_Widget *) wdg_container, _new_container);
+
+   /* Take old container's class name from content-property. */
+   Object_Container_Item *_ci = wdg_obj_container_item_get(wdg_container, -1, 
item_name);
+
+   int idx = 0;
+   Object_Container_Item *dummy_ci = NULL;
+   Gui_Widget *new_dummy_wdg = NULL;
+   if (!strcmp(wdg_class_name_get(wdg_container), DB_DEF_LAYOUT_CLASS))
+ {
+new_dummy_wdg = _dummy_widget_create(ctx, wdg_container);
+Eid *new_dummy_eid = wdg_eid_get(new_dummy_wdg);
+memento_command_add(new_dummy_eid, MEMENTO_WIDGET,  (void *) 
(intptr_t) EINA_FALSE, (void *) (intptr_t) EINA_TRUE);
+
+/* Creating new dummy item */
+Gui_Widget_Property *i_prop = obj_container_item_prop_get(_ci);
+
+idx = wdg_obj_container_item_idx_get(wdg_container, 
obj_container_item_eid_get(_ci), EINA_FALSE);
+
+Gui_Widget_Property *new_dummy_prop = prop_copy(i_prop);
+Gui_Value *dummy_val = prop_value_nth_get(new_dummy_prop, 1);
+gui_value_name_id_set(dummy_val, GUI_TYPE_OBJECT, new_dummy_eid);
+dummy_ci = obj_container_item_new(new_dummy_prop, new_dummy_eid);
+ }
+
+   wdg_obj_container_item_remove(wdg_container, _ci);
+
+   /* If dummy item was created, add it into container, create Eo and pack it. 
*/
+   if (dummy_ci)
+ {
+wdg_obj_container_item_add(wdg_container, dummy_ci, idx);
+ }
+   memento_command_add(wdg_eid_get(wdg_container),
+   MEMENTO_OBJ_CONTAINER,
+   _old_container, _new_container);
+   obj_container_unref(_old_container);
+}
+
+/* If same_container param is true, new item and new memento will not be 
created. */
+static void
+_item_container_item_null_helper(const Gui_Widget *wdg_container, Eina_Bool 
same_container, const Item_Container_Item *it_to_change, const 
Gui_Widget_Property *prop_to_change, int val_idx_to_change)
+{
+   if (!wdg_container) return;
+   if (!it_to_change) return;
+   const Gui_Context *ctx = wdg_context_get(wdg_container);
+
+   Item_Container_Item *new_wit = NULL;
+