[EGIT] [core/efl] master 01/01: edje_edit: fix source generation

2017-07-12 Thread Andrii Kroitor
lorddrew pushed a commit to branch master.

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

commit 5f021bbfcfdaafda9bcc0e0be29d7aa21035ccd8
Author: Andrii Kroitor <an.kroi...@samsung.com>
Date:   Wed Jul 12 19:21:15 2017 +0300

edje_edit: fix source generation
---
 src/lib/edje/edje_edit.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lib/edje/edje_edit.c b/src/lib/edje/edje_edit.c
index 83f0cfa480..15da38971b 100644
--- a/src/lib/edje/edje_edit.c
+++ b/src/lib/edje/edje_edit.c
@@ -14378,7 +14378,7 @@ _edje_generate_source_state_map(Edje *ed,
  for (i = 0; i < pd->map.colors_count; ++i)
{
   if ((pd->map.colors[i]->r != 255) || (pd->map.colors[i]->g 
!= 255) ||
-  (pd->map.colors[i]->b != 255) || (pd->map.colors[i]->b 
!= 255))
+  (pd->map.colors[i]->b != 255) || (pd->map.colors[i]->a 
!= 255))
 BUF_APPENDF(I6 "color: %d %d %d %d %d;\n", 
pd->map.colors[i]->idx,
 pd->map.colors[i]->r, pd->map.colors[i]->g,
 pd->map.colors[i]->b, pd->map.colors[i]->a);

-- 




[EGIT] [core/efl] master 01/01: examples: fix ecore_exe_child example to work properly on Windows

2017-06-14 Thread Andrii Kroitor
raster pushed a commit to branch master.

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

commit c099ede159a55198949c50606eac1b7b9609476f
Author: Andrii Kroitor <an.kroi...@samsung.com>
Date:   Thu Jun 15 12:17:39 2017 +0900

examples: fix ecore_exe_child example to work properly on Windows

Summary: ecore_main_fd_handler_add is not working on Windows

Reviewers: vtorri, raster

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4470
---
 src/examples/ecore/ecore_exe_example_child.c | 20 +++-
 1 file changed, 19 insertions(+), 1 deletion(-)

diff --git a/src/examples/ecore/ecore_exe_example_child.c 
b/src/examples/ecore/ecore_exe_example_child.c
index c22a7e5034..b59ff815ee 100644
--- a/src/examples/ecore/ecore_exe_example_child.c
+++ b/src/examples/ecore/ecore_exe_example_child.c
@@ -8,8 +8,14 @@
 
 #define BUFFER_SIZE 1024
 
+#ifdef _WIN32
+#define HANDLER_TYPE Ecore_Win32_Handler
+#else
+#define HANDLER_TYPE Ecore_Fd_Handler
+#endif
+
 static Eina_Bool
-_fd_handler_cb(void *data EINA_UNUSED, Ecore_Fd_Handler *fd_handler 
EINA_UNUSED)
+_fd_handler_cb(void *data EINA_UNUSED, HANDLER_TYPE *fd_handler EINA_UNUSED)
 {
static int numberOfMessages = 0;
char message[BUFFER_SIZE];
@@ -40,10 +46,22 @@ main(void)
if (!ecore_init())
  goto error;
 
+#ifdef _WIN32
+   /* note that stdin fd's on windows don't work the same
+* as on unixes. this uses stdin just as a quick
+* example that's simple instead of a more complex
+* one, so this won't actually work on windows unless
+* you use a fd that comes from somewhere that is
+* select()able. */
+   ecore_main_win32_handler_add(GetStdHandle(STD_INPUT_HANDLE),
+_fd_handler_cb,
+NULL);
+#else
ecore_main_fd_handler_add(STDIN_FILENO,
  ECORE_FD_READ,
  _fd_handler_cb,
  NULL, NULL, NULL);
+#endif
ecore_main_loop_begin();
 
ecore_shutdown();

-- 




[EGIT] [tools/eflete] master 01/02: project_navigator: fix abort on recursive group deletion

2017-05-16 Thread Andrii Kroitor
rimmed pushed a commit to branch master.

http://git.enlightenment.org/tools/eflete.git/commit/?id=da0211b792de4aac618fd1c2ad4d1b9f9f4a5ac9

commit da0211b792de4aac618fd1c2ad4d1b9f9f4a5ac9
Author: Andrii Kroitor <an.kroi...@samsung.com>
Date:   Mon May 15 13:40:42 2017 +0300

project_navigator: fix abort on recursive group deletion

@fix

Change-Id: Ie2034fe45955221188ddb8df178ab9f90ef2a0e3
---
 src/bin/ui/project_navigator.c | 15 +++
 1 file changed, 7 insertions(+), 8 deletions(-)

diff --git a/src/bin/ui/project_navigator.c b/src/bin/ui/project_navigator.c
index c268efc..0cfb368 100644
--- a/src/bin/ui/project_navigator.c
+++ b/src/bin/ui/project_navigator.c
@@ -598,7 +598,6 @@ _folder_del_recursively(Elm_Object_Item *item, const char 
*folder)
Elm_Object_Item *itm;
Group2 *group;
const Elm_Genlist_Item_Class *itc;
-   Eina_Bool ret = true, rett;
 
widget_tree_items_get(ap.project->RM.groups, folder, , );
if ((item) && elm_genlist_item_expanded_get(item))
@@ -610,9 +609,9 @@ _folder_del_recursively(Elm_Object_Item *item, const char 
*folder)
  if (itc == project_navigator.itc_folder)
{
   prefix = elm_object_item_data_get(itm);
-  rett = _folder_del_recursively(itm, prefix);
-  ret = ret ? rett : ret;
-  if (rett) elm_object_item_del(itm);
+  if (!_folder_del_recursively(itm, prefix))
+return false;
+  elm_object_item_del(itm);
}
   }
  }
@@ -620,8 +619,8 @@ _folder_del_recursively(Elm_Object_Item *item, const char 
*folder)
  {
 EINA_LIST_FREE(folders, prefix)
   {
- rett = _folder_del_recursively(NULL, prefix);
- ret = ret ? rett : ret;
+ if (!_folder_del_recursively(NULL, prefix))
+   return false;
   }
  }
EINA_LIST_FREE(groups, group)
@@ -632,12 +631,12 @@ _folder_del_recursively(Elm_Object_Item *item, const char 
*folder)
_("Can't delete the opened layout. Please, "
  "close the layout tab before delete it."),
BTN_CANCEL, NULL, NULL);
- ret = false;
+ return false;
   }
 else
   _editor_group_del(group->common.name, true);
  }
-   return ret;
+   return true;
 }
 
 static void

-- 




[EGIT] [tools/eflete] master 02/02: project_navigator: remove ghost alias items

2017-05-16 Thread Andrii Kroitor
rimmed pushed a commit to branch master.

http://git.enlightenment.org/tools/eflete.git/commit/?id=5ac9b0a88b8b82d5298ee83efbb7b5e792d2371d

commit 5ac9b0a88b8b82d5298ee83efbb7b5e792d2371d
Author: Andrii Kroitor <an.kroi...@samsung.com>
Date:   Mon May 15 15:02:44 2017 +0300

project_navigator: remove ghost alias items

if alias item was deleted by deleting real group, it was still on the list
@fix

Change-Id: I507e2ff8240e3ddc2248d4065520c27d3b3a762c
---
 src/bin/ui/project_navigator.c | 68 --
 1 file changed, 33 insertions(+), 35 deletions(-)

diff --git a/src/bin/ui/project_navigator.c b/src/bin/ui/project_navigator.c
index 0cfb368..8105a85 100644
--- a/src/bin/ui/project_navigator.c
+++ b/src/bin/ui/project_navigator.c
@@ -270,7 +270,17 @@ _find_item(Elm_Object_Item *item, const char *name)
while (item)
  {
 if (elm_genlist_item_type_get(item) != ELM_GENLIST_ITEM_TREE)
-  item_name = _group_item_label_get(elm_object_item_data_get(item), 
NULL, NULL);
+  {
+ Eina_Strbuf *tmp = eina_strbuf_new();
+ Elm_Object_Item *parent = elm_genlist_item_parent_get(item);
+ if (parent != project_navigator.item_top)
+   {
+  eina_strbuf_append(tmp, elm_object_item_data_get(parent));
+   }
+ eina_strbuf_append(tmp, 
_group_item_label_get(elm_object_item_data_get(item), NULL, NULL));
+ item_name = eina_strbuf_string_steal(tmp);
+ eina_strbuf_free(tmp);
+  }
 else
   item_name = strdup(elm_object_item_data_get(item));
 
@@ -642,23 +652,11 @@ _folder_del_recursively(Elm_Object_Item *item, const char 
*folder)
 static void
 _folder_del(Elm_Object_Item *item)
 {
-   Elm_Object_Item *parent;
Eina_Stringshare *folder;
 
folder = elm_object_item_data_get(item);
 
-   if (_folder_del_recursively(item, folder))
- {
-parent = elm_genlist_item_parent_get(item);
-elm_object_item_del(item);
-while ((parent != project_navigator.item_top) &&
-   (elm_genlist_item_subitems_count(parent) == 0 ))
-  {
- item = parent;
- parent = elm_genlist_item_parent_get(item);
- elm_object_item_del(item);
-  }
- }
+   _folder_del_recursively(item, folder);
 }
 
 static void
@@ -668,26 +666,13 @@ _group_del(void *data __UNUSED__,
 {
Eina_Stringshare *group_name;
Elm_Object_Item *item, *parent;
-   Group2 *group;
-   const Elm_Genlist_Item_Class *itc;
-
-   item = elm_genlist_selected_item_get(project_navigator.genlist);
-   itc = elm_genlist_item_item_class_get(item);
-   if (itc != project_navigator.itc_group) return;
 
group_name = (Eina_Stringshare *)event_info;
-   group = elm_object_item_data_get(item);
+   item = 
_find_item(eina_list_data_get(elm_genlist_item_subitems_get(project_navigator.item_top)),
 group_name);
+   if (!item) return;
 
-   if ((group->common.name == group_name) || !strcmp(group->common.name, 
group_name))
- {
-parent = elm_genlist_item_parent_get(item);
-elm_object_item_del(item);
- }
-   else
- {
-CRIT("Unable to remove group. Income name different from delete.");
-return;
- }
+   parent = elm_genlist_item_parent_get(item);
+   elm_object_item_del(item);
 
while ((parent != project_navigator.item_top) &&
   (elm_genlist_item_subitems_count(parent) == 0 ))
@@ -698,6 +683,19 @@ _group_del(void *data __UNUSED__,
  }
 }
 
+static Eina_Bool _item_fully_expanded_get(Elm_Object_Item *item)
+{
+   Eina_Bool ret = true;
+   const Eina_List *l;
+
+   if (!elm_genlist_item_expanded_get(item)) return false;
+
+   const Eina_List *items = elm_genlist_item_subitems_get(item);
+   EINA_LIST_FOREACH(items, l, item)
+ ret &= _item_fully_expanded_get(item);
+   return ret;
+}
+
 static void
 _folder_del_popup_close_cb(void *data,
Evas_Object *obj __UNUSED__,
@@ -708,7 +706,11 @@ _folder_del_popup_close_cb(void *data,
 
if (BTN_CANCEL == btn_res) return;
 
+   Eina_Bool was_fully_expanded = _item_fully_expanded_get(glit);
_folder_del(glit);
+   // if item was fully expanded it is already deleted by _group_del callback
+   if (!was_fully_expanded)
+ elm_object_item_del(glit);
elm_object_disabled_set(project_navigator.btn_del, true);
 }
 
@@ -724,10 +726,6 @@ _group_del_popup_close_cb(void *data,
 
_editor_group_del(group->common.name, true);
elm_object_disabled_set(project_navigator.btn_del, true);
-
-   Elm_Object_Item *item;
-   item = elm_genlist_selected_item_get(project_navigator.genlist);
-   elm_object_item_del(item);
 }
 
 static void

-- 




[EGIT] [core/efl] efl-1.18 01/01: edje_edit: fix scripts compilation

2017-02-22 Thread Andrii Kroitor
lorddrew pushed a commit to branch efl-1.18.

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

commit 3c5d814da688f2f4515d8f4eec9411b5cf3583bb
Author: Andrii Kroitor <an.kroi...@samsung.com>
Date:   Tue Feb 21 19:33:51 2017 +0200

edje_edit: fix scripts compilation

@fix
---
 src/lib/edje/edje_edit.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/lib/edje/edje_edit.c b/src/lib/edje/edje_edit.c
index f704a05..ade3b5d 100644
--- a/src/lib/edje/edje_edit.c
+++ b/src/lib/edje/edje_edit.c
@@ -11803,7 +11803,7 @@ __part_replace(Edje_Edit *eed, char *pcode, char *name)
 {
int id;
 
-   id = _edje_part_id_find((Edje *)eed, name);
+   id = _edje_part_id_find(eed->base, name);
if (id < 0)
  return 0;
return eina_convert_itoa(id, pcode);
@@ -12223,7 +12223,7 @@ _edje_edit_embryo_rebuild(Edje_Edit *eed)
embryo_program_free(edc->script);
edc->script = embryo_program_new(eed->bytecode, eed->bytecode_size);
_edje_embryo_script_init(edc);
-   _edje_var_init((Edje *)eed);
+   _edje_var_init(eed->base);
 
 the_way_out:
fclose(f);

-- 




[EGIT] [core/efl] master 01/01: edje_edit: fix scripts compilation

2017-02-21 Thread Andrii Kroitor
lorddrew pushed a commit to branch master.

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

commit 75f772c898fcf91c947691e40b5dde86888a7889
Author: Andrii Kroitor <an.kroi...@samsung.com>
Date:   Tue Feb 21 19:33:51 2017 +0200

edje_edit: fix scripts compilation

@fix
---
 src/lib/edje/edje_edit.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/lib/edje/edje_edit.c b/src/lib/edje/edje_edit.c
index aaeb3a8..d2616fc 100644
--- a/src/lib/edje/edje_edit.c
+++ b/src/lib/edje/edje_edit.c
@@ -12210,7 +12210,7 @@ __part_replace(Edje_Edit *eed, char *pcode, char *name)
 {
int id;
 
-   id = _edje_part_id_find((Edje *)eed, name);
+   id = _edje_part_id_find(eed->base, name);
if (id < 0)
  return 0;
return eina_convert_itoa(id, pcode);
@@ -12632,7 +12632,7 @@ _edje_edit_embryo_rebuild(Edje_Edit *eed)
embryo_program_free(edc->script);
edc->script = embryo_program_new(eed->bytecode, eed->bytecode_size);
_edje_embryo_script_init(edc);
-   _edje_var_init((Edje *)eed);
+   _edje_var_init(eed->base);
 
 the_way_out:
fclose(f);

-- 




Re: [E-devel] EFL 1.19.0 beta 1

2017-02-14 Thread Andrii Kroitor
On 13.02.17 18:00, Stefan Schmidt wrote:
> This beta release brings the upcoming 1.19 release one step further.
> Please give it some good testing and let us know about the problems you
> run into.
>
> http://download.enlightenment.org/rel/libs/efl/efl-1.19.0-beta1.tar.gz
> a3f47470db32a3498de2c40e8edc936ba1da00d2a2091b5a60f890b1b5ce6506
>
> http://download.enlightenment.org/rel/libs/efl/efl-1.19.0-beta1.tar.xz
> d53d314707d5ac96e1207766389aec9f3f407674290dce360629861928880ac6
>
> **Fixes:**
>  * elm_code: Fix syntax crash on trailing newline in multiline macro
>  * ecore-wl2: roundtrip during client disconnect
>  * evas: fix bugs in gif image loader
>
>
>
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> ___
> enlightenment-devel mailing list
> enlightenment-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
>
>
I've tested this on Windows: build works, but I can't launch any GUI 
application (i.e. elementary_test).
It is flooding console with following two errors:

ERR:ecore_con lib/ecore_con/ecore_con_legacy.c:2085 
ecore_con_server_connect() Your platform doesn't support 
Efl_Net_Dialer-compatible local communication
ERR:eina_safety lib/ecore_con/ecore_con_legacy.c:2104 
ecore_con_server_connect() safety check failed: cls == NULL

-- 
*Best Regards,
Andrii Kroitor
* Engineer, Tizen Platform Lab

Samsung R Institute Ukraine
57, Lva Tolstogo St., Kyiv 01032, Ukraine
email: an.kroi...@samsung.com <mailto:an.kroi...@samsung.com>


--
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] cmake attempt

2017-01-25 Thread Andrii Kroitor
There was segfault on

[ 88%] Generating src/lib/eo/efl_object.eo.c, src/lib/eo/efl_object.eo.h

I think autotools-generated files somehow interfere with cmake build, 
but this doesn't matter.
After git clean build works fine(eina, eolian, eo, test).


On 25.01.17 12:22, marcel-hollerb...@t-online.de wrote:
> Hello,
>
> i am sorry for the wrong minum-version number. I think 3.0.2 is enough,
> since we are using LINK_PRIVATE and LINK_PUBLIC.
>
> What error messages are you getting?
>
> Greetings
> bu5hm4n
>
> On Wed, Jan 25, 2017 at 12:10:38PM +0200, Andrii Kroitor wrote:
>> Hello
>>
>> I'm very excited to see steps towards CMake :)
>> Is there any reason to limit minimum version to 3.7? Current unbuntu
>> release has cmake version 3.5.1 included.
>> Looks like with 3.5 cmake step passes ok, but build fails on eo files
>> generation. I'm wondering if it is because of some missing cmake
>> features or simply because work is in progress.
>>
>>
>> On 20.01.17 01:17, Gustavo Sverzut Barbieri wrote:
>>> Hi all,
>>>
>>> Marcel Hollerbach did a nice work and started a branch 
>>> devs/bu5hm4n/cmake-port
>>>
>>> After some review, I shared my experience with CMake and did a
>>> complement trying to simplify it: devs/barbieri/cmake
>>> (https://git.enlightenment.org/core/efl.git/log/?h=devs/barbieri/cmake)
>>>
>>> As you can see, complexities are hidden from the user using some
>>> macros/functions defined in cmake/helper/EflMacros.cmake
>>>
>>> At the toplevel directory you simply say: EFL_LIB(eina)
>>>
>>> Then the macro will include whenever appropriate
>>> src/{lib,bin,modules,tests}/eina and do the right action. You can see
>>> from sub-CMakeLists.txt how simple they become, basically define some
>>> variables (which makes it simpler for us to change to a new build
>>> system next time).
>>>
>>> There are some restrictions in that, which I'd like to keep and
>>> instead of work-around in the build system, change the code to reflect
>>> that:
>>>
>>>- one library per directory, offenders are efreet_mime/efreet_thrash
>>> and possibly others;
>>>
>>>- modules should install
>>> ${libdir}/${libname}/modules/${scope}/${modname}/v-${VMAJ}.${VMIN}/module.so,
>>> currently some libs miss "/modules", like ecore/system
>>>
>>> If you want to try it out, be aware that binaries are still not
>>> handled and eina_suite still doesn't work. And I'm forcing out-of-tree
>>> builds, so we fix that for once and for all:
>>>
>>>  mkdir -p build && cmake -H. -Bbuild && cd build && make
>>>
>>> To address raster's complains about hard targets and so on:
>>>
>>>  make eina
>>>
>>> builds eina checking dependencies, while:
>>>
>>>  make eina/fast
>>>
>>> doesn't check dependencies, this is in GNU Make. Ninja doesn't offer such 
>>> rule.
>>>
>>> I'm also offering targets for modules and tests:
>>>
>>>  make eina-tests
>>>  make eina-modules
>>>
>>> Everything should be placed in build/lib, build/bin and so on, so it
>>> will mimic the system installation and eina_prefix should be able to
>>> work (we're still missing the 'checkme' files).
>>>
>>> Although I know cmake from my years-ago usage, I'm not an expert that
>>> works with it every day, thus review of the CMake, particularly the
>>> macros is very helpful.
>>>
>>> >From an user (EFL developer that doesn't mess with build system) point of 
>>> >view:
>>>
>>> - library configuration checks and options (cmake/config/eina.cmake):
>>> https://git.enlightenment.org/core/efl.git/tree/cmake/config/eina.cmake?h=devs/barbieri/cmake=c15eca03344e9bc1e602769c4af6e3c2ae2cc405
>>>The idea is to isolate these complexities from source/headers as very
>>> few people will need to look at configure, but most developers need to
>>> touch file list.
>>>
>>> - library sources, headers (src/lib/eina/CMakeLists.txt):
>>> https://git.enlightenment.org/core/efl.git/tree/src/lib/eina/CMakeLists.txt?h=devs/barbieri/cmake=c15eca03344e9bc1e602769c4af6e3c2ae2cc405
>>>
>>>- library module (src/modules/eina/mp/pass_through/CMakeLists.txt):
>>> https://git.enlightenment.org/core/efl.git/tree/src/modules/eina/mp/pass_through/CMakeLists.txt?h=devs/barbieri/cm

Re: [E-devel] cmake attempt

2017-01-25 Thread Andrii Kroitor
Hello

I'm very excited to see steps towards CMake :)
Is there any reason to limit minimum version to 3.7? Current unbuntu 
release has cmake version 3.5.1 included.
Looks like with 3.5 cmake step passes ok, but build fails on eo files 
generation. I'm wondering if it is because of some missing cmake 
features or simply because work is in progress.


On 20.01.17 01:17, Gustavo Sverzut Barbieri wrote:
> Hi all,
>
> Marcel Hollerbach did a nice work and started a branch devs/bu5hm4n/cmake-port
>
> After some review, I shared my experience with CMake and did a
> complement trying to simplify it: devs/barbieri/cmake
> (https://git.enlightenment.org/core/efl.git/log/?h=devs/barbieri/cmake)
>
> As you can see, complexities are hidden from the user using some
> macros/functions defined in cmake/helper/EflMacros.cmake
>
> At the toplevel directory you simply say: EFL_LIB(eina)
>
> Then the macro will include whenever appropriate
> src/{lib,bin,modules,tests}/eina and do the right action. You can see
> from sub-CMakeLists.txt how simple they become, basically define some
> variables (which makes it simpler for us to change to a new build
> system next time).
>
> There are some restrictions in that, which I'd like to keep and
> instead of work-around in the build system, change the code to reflect
> that:
>
>   - one library per directory, offenders are efreet_mime/efreet_thrash
> and possibly others;
>
>   - modules should install
> ${libdir}/${libname}/modules/${scope}/${modname}/v-${VMAJ}.${VMIN}/module.so,
> currently some libs miss "/modules", like ecore/system
>
> If you want to try it out, be aware that binaries are still not
> handled and eina_suite still doesn't work. And I'm forcing out-of-tree
> builds, so we fix that for once and for all:
>
> mkdir -p build && cmake -H. -Bbuild && cd build && make
>
> To address raster's complains about hard targets and so on:
>
> make eina
>
> builds eina checking dependencies, while:
>
> make eina/fast
>
> doesn't check dependencies, this is in GNU Make. Ninja doesn't offer such 
> rule.
>
> I'm also offering targets for modules and tests:
>
> make eina-tests
> make eina-modules
>
> Everything should be placed in build/lib, build/bin and so on, so it
> will mimic the system installation and eina_prefix should be able to
> work (we're still missing the 'checkme' files).
>
> Although I know cmake from my years-ago usage, I'm not an expert that
> works with it every day, thus review of the CMake, particularly the
> macros is very helpful.
>
> >From an user (EFL developer that doesn't mess with build system) point of 
> >view:
>
>- library configuration checks and options (cmake/config/eina.cmake):
> https://git.enlightenment.org/core/efl.git/tree/cmake/config/eina.cmake?h=devs/barbieri/cmake=c15eca03344e9bc1e602769c4af6e3c2ae2cc405
>   The idea is to isolate these complexities from source/headers as very
> few people will need to look at configure, but most developers need to
> touch file list.
>
>- library sources, headers (src/lib/eina/CMakeLists.txt):
> https://git.enlightenment.org/core/efl.git/tree/src/lib/eina/CMakeLists.txt?h=devs/barbieri/cmake=c15eca03344e9bc1e602769c4af6e3c2ae2cc405
>
>   - library module (src/modules/eina/mp/pass_through/CMakeLists.txt):
> https://git.enlightenment.org/core/efl.git/tree/src/modules/eina/mp/pass_through/CMakeLists.txt?h=devs/barbieri/cmake=c15eca03344e9bc1e602769c4af6e3c2ae2cc405
>
>   - library unit tests (src/tests/eina/CMakeLists.txt):
> https://git.enlightenment.org/core/efl.git/tree/src/tests/eina/CMakeLists.txt?h=devs/barbieri/cmake=c15eca03344e9bc1e602769c4af6e3c2ae2cc405
>
> As you can see these files are very small, they basically define
> SOURCES, HEADERS, DEPENDENCIES, LIBRARIES... variables and these are
> used to execute CMake specific targets, set properties, etc.
>
> If we can settle on one-lib-per-dir, then we can even simplify those
> and remove ${libname}_ prefix, as done by modules we could specify
> SOURCES instead of eina_SOURCES.
>
>

-- 
*Best Regards,
Andrii Kroitor
* Engineer, Tizen Platform Lab

Samsung R Institute Ukraine
57, Lva Tolstogo St., Kyiv 01032, Ukraine
email: an.kroi...@samsung.com <mailto:an.kroi...@samsung.com>


--
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


[EGIT] [tools/eflete] eflete-1.18 22/91: replace popup_want_action with popup_add in simple cases

2017-01-23 Thread Andrii Kroitor
rimmed pushed a commit to branch eflete-1.18.

http://git.enlightenment.org/tools/eflete.git/commit/?id=d4a568fff772ef124cb8dc287177bd1a6aad7588

commit d4a568fff772ef124cb8dc287177bd1a6aad7588
Author: Andrii Kroitor <an.kroi...@samsung.com>
Date:   Mon Sep 5 11:47:57 2016 +0300

replace popup_want_action with popup_add in simple cases
---
 src/bin/ui/colorclass_manager.c  | 61 +++-
 src/bin/ui/project_common.c  |  4 +--
 src/bin/ui/project_export.c  |  6 ++--
 src/bin/ui/project_navigator.c   | 67 +++-
 src/bin/ui/sound_manager.c   | 30 +++---
 src/bin/ui/style_manager.c   | 28 +++--
 src/bin/ui/tab_home_common.c |  9 +++---
 src/bin/ui/tab_home_import_edc.c |  3 +-
 src/bin/ui/tab_home_import_edj.c |  6 ++--
 src/bin/ui/tab_home_new.c|  3 +-
 src/bin/ui/tab_home_open.c   | 30 +++---
 11 files changed, 140 insertions(+), 107 deletions(-)

diff --git a/src/bin/ui/colorclass_manager.c b/src/bin/ui/colorclass_manager.c
index 35185b0..21be2dd 100644
--- a/src/bin/ui/colorclass_manager.c
+++ b/src/bin/ui/colorclass_manager.c
@@ -94,52 +94,57 @@ _add_colorclass_content_get(void *data __UNUSED__, 
Evas_Object **to_focus)
 }
 
 static void
-_colorclass_add_cb(void *data __UNUSED__,
-   Evas_Object *obj __UNUSED__,
-   void *event_info __UNUSED__)
+_colorclass_add_popup_close_cb(void *data,
+   Evas_Object *obj __UNUSED__,
+   void *event_info)
 {
Attribute attribute = ATTRIBUTE_STATE_COLOR_CLASS;
Colorclasses_Manager *edit = (Colorclasses_Manager *)data;
Colorclass_Item *it = NULL;
Elm_Object_Item *glit_ccl = NULL;
Colorclass_Resource *res;
-   Popup_Button btn_res;
+   Popup_Button btn_res = (Popup_Button)event_info;
 
assert(edit != NULL);
 
-   mng.name_validator = resource_name_validator_new(NAME_REGEX, NULL);
-   resource_name_validator_list_set(mng.name_validator, 
>colorclasses, true);
-   btn_res = popup_want_action(_("Create a new layout"), NULL, 
_add_colorclass_content_get,
-   BTN_OK|BTN_CANCEL,
-   NULL, mng.entry);
-
-   if (BTN_CANCEL == btn_res) goto end;
-
-   it = (Colorclass_Item *)mem_calloc(1, sizeof(Colorclass_Item));
-   it->name = elm_entry_entry_get(mng.entry);
-
-   res = (Colorclass_Resource *)resource_add(it->name, 
RESOURCE_TYPE_COLORCLASS);
-   resource_insert(>colorclasses, (Resource *)res);
-   edje_edit_color_class_add(ap.project->global_object, 
eina_stringshare_add(it->name));
+   if (BTN_OK == btn_res)
+ {
+it = (Colorclass_Item *)mem_calloc(1, sizeof(Colorclass_Item));
+it->name = elm_entry_entry_get(mng.entry);
 
-   glit_ccl = elm_genlist_item_append(mng.genlist, _itc_ccl, it, NULL,
-  ELM_GENLIST_ITEM_NONE, NULL, NULL);
-   elm_genlist_item_selected_set(glit_ccl, EINA_TRUE);
+res = (Colorclass_Resource *)resource_add(it->name, 
RESOURCE_TYPE_COLORCLASS);
+resource_insert(>colorclasses, (Resource *)res);
+edje_edit_color_class_add(ap.project->global_object, 
eina_stringshare_add(it->name));
 
-   evas_object_del(mng.popup);
-   mng.popup = NULL;
+glit_ccl = elm_genlist_item_append(mng.genlist, _itc_ccl, it, NULL,
+   ELM_GENLIST_ITEM_NONE, NULL, NULL);
+elm_genlist_item_selected_set(glit_ccl, EINA_TRUE);
 
-   CRIT_ON_FAIL(editor_save(ap.project->global_object));
-   TODO("Remove this line once edje_edit_colorclass API would be added into 
Editor Module and saving would work properly")
-   ap.project->changed = true;
-   evas_object_smart_callback_call(ap.win, SIGNAL_EDITOR_ATTRIBUTE_CHANGED, 
);
+evas_object_del(mng.popup);
+mng.popup = NULL;
 
-end:
+CRIT_ON_FAIL(editor_save(ap.project->global_object));
+TODO("Remove this line once edje_edit_colorclass API would be added 
into Editor Module and saving would work properly")
+   ap.project->changed = true;
+evas_object_smart_callback_call(ap.win, 
SIGNAL_EDITOR_ATTRIBUTE_CHANGED, );
+ }
resource_name_validator_free(mng.name_validator);
evas_object_del(mng.item);
 }
 
 static void
+_colorclass_add_cb(void *data,
+   Evas_Object *obj __UNUSED__,
+   void *event_info __UNUSED__)
+{
+   Evas_Object *popup;
+   mng.name_validator = resource_name_validator_new(NAME_REGEX, NULL);
+   resource_name_validator_list_set(mng.name_validator, 
>colorclasses, true);
+   popup = popup_add(_("Create a new layout"), NULL, BTN_OK|BTN_CANCEL, 
_add_colorclass_content_get, mng.entry);
+   evas_object_smart_callback_add(popup, POPUP_CLOSE_CB, 
_colorclass_add_popup_close_cb, data);
+}
+
+static void
 _colorclass_del_cb(vo

[EGIT] [tools/eflete] eflete-1.18 32/91: remove eflete_main_loop_* functions

2017-01-23 Thread Andrii Kroitor
rimmed pushed a commit to branch eflete-1.18.

http://git.enlightenment.org/tools/eflete.git/commit/?id=c678f7a7a57bfff0c7f142f3ed0e174df2aa0ff1

commit c678f7a7a57bfff0c7f142f3ed0e174df2aa0ff1
Author: Andrii Kroitor <an.kroi...@samsung.com>
Date:   Mon Sep 5 18:34:56 2016 +0300

remove eflete_main_loop_* functions
---
 src/bin/eflete.c | 15 ---
 src/bin/eflete.h | 20 
 2 files changed, 35 deletions(-)

diff --git a/src/bin/eflete.c b/src/bin/eflete.c
index 9f79e76..ab0ab7d 100644
--- a/src/bin/eflete.c
+++ b/src/bin/eflete.c
@@ -27,21 +27,6 @@
 
 App_Data ap;
 
-static Eina_Bool do_block = true;
-
-void
-eflete_main_loop_begin(void)
-{
-   while (do_block) ecore_main_loop_iterate_may_block(0);
-   do_block = true;
-}
-
-void
-eflete_main_loop_quit(void)
-{
-   do_block = false;
-}
-
 Eina_Bool
 app_init()
 {
diff --git a/src/bin/eflete.h b/src/bin/eflete.h
index bcf38ba..bc8b404 100644
--- a/src/bin/eflete.h
+++ b/src/bin/eflete.h
@@ -188,26 +188,6 @@ app_init(void);
 Eina_Bool
 app_shutdown(void);
 
-/**
- * Start nested not blocked ecore main loop.
- *
- * @note Master Raster add to ecore_main_loop_begin the hard check to nested
- * main loops. Now have no time to remake our popup behavior, and add this
- * crutch. In further need to delete it.
- *
- * @ingroup Eflete
- */
-void
-eflete_main_loop_begin(void);
-
-/**
- * End nested main loop.
- *
- * @ingroup Eflete
- */
-void
-eflete_main_loop_quit(void);
-
 #define GET_IMAGE(IMG, PARENT, NAME) \
 { \
IMG = edje_object_add(PARENT); \

-- 




[EGIT] [tools/eflete] eflete-1.18 28/91: fileselector_helper: prepare code for async popup

2017-01-23 Thread Andrii Kroitor
rimmed pushed a commit to branch eflete-1.18.

http://git.enlightenment.org/tools/eflete.git/commit/?id=5d9629118485cad4a07ddb202e703762ad780afc

commit 5d9629118485cad4a07ddb202e703762ad780afc
Author: Andrii Kroitor <an.kroi...@samsung.com>
Date:   Mon Sep 5 18:02:09 2016 +0300

fileselector_helper: prepare code for async popup
---
 src/bin/ui/main_window.h |   3 ++
 src/bin/ui/popup.c   |  20 
 src/bin/ui/project_common.c  |   6 ++-
 src/bin/ui/project_common.h  |   2 +-
 src/bin/ui/project_export.c  | 101 +++
 src/bin/ui/tab_home_import_edc.c |  25 ++
 src/bin/ui/tab_home_import_edj.c |  24 ++
 src/bin/ui/tab_home_new.c|  26 +-
 8 files changed, 133 insertions(+), 74 deletions(-)

diff --git a/src/bin/ui/main_window.h b/src/bin/ui/main_window.h
index 6e37458..6839e4b 100644
--- a/src/bin/ui/main_window.h
+++ b/src/bin/ui/main_window.h
@@ -377,6 +377,9 @@ void
 popup_button_disabled_set(Evas_Object *popup, Popup_Button btn, Eina_Bool 
disabled);
 
 void
+popup_fileselector_helper_dismiss();
+
+void
 popup_fileselector_folder_helper(const char *title, Evas_Object *follow_up, 
const char *path,
  Helper_Done_Cb func, void *data,
  Eina_Bool multi, Eina_Bool is_save);
diff --git a/src/bin/ui/popup.c b/src/bin/ui/popup.c
index 536d771..39e0fab 100644
--- a/src/bin/ui/popup.c
+++ b/src/bin/ui/popup.c
@@ -481,6 +481,26 @@ _colorclass_done(void *data,
 }
 #endif
 
+void
+popup_fileselector_helper_dismiss()
+{
+   Evas_Object *follow_up = (Evas_Object *) helper;
+
+   evas_object_event_callback_del_full(follow_up, EVAS_CALLBACK_RESIZE, 
_helper_obj_follow, NULL);
+   evas_object_event_callback_del_full(follow_up, EVAS_CALLBACK_MOVE, 
_helper_obj_follow, NULL);
+   evas_object_event_callback_del_full(follow_up, EVAS_CALLBACK_RESIZE, 
_helper_property_follow, NULL);
+   evas_object_event_callback_del_full(follow_up, EVAS_CALLBACK_MOVE, 
_helper_property_follow, NULL);
+
+   if (!follow_up)
+ evas_object_event_callback_del_full(ap.win, EVAS_CALLBACK_RESIZE, 
_helper_win_follow, NULL);
+
+   Helper_Data *helper_data = evas_object_data_get(helper, "STRUCT");
+   if (helper_data) free(helper_data);
+
+   shortcuts_object_check_pop(helper);
+   ecore_job_add(_delete_object_job, helper);
+}
+
 static void
 _helper_dismiss(void *data __UNUSED__,
 Evas_Object *obj,
diff --git a/src/bin/ui/project_common.c b/src/bin/ui/project_common.c
index 5c41351..24b12f5 100644
--- a/src/bin/ui/project_common.c
+++ b/src/bin/ui/project_common.c
@@ -22,7 +22,9 @@
 
 Eina_Bool
 exist_permission_check(const char *path, const char *name,
-   const char *title, const char *msg, Eina_Bool append)
+   const char *title, const char *msg, Eina_Bool append,
+   Ecore_Cb func,
+   const void *data)
 {
Eina_Strbuf *buf, *buf_msg;
Popup_Button btn_res;
@@ -61,6 +63,8 @@ exist_permission_check(const char *path, const char *name,
  }
if (btn_res == BTN_REPLACE)
  ecore_file_recursive_rm(eina_strbuf_string_get(buf));
+   if (func)
+  func((void *)data);
eina_strbuf_free(buf);
return true;
 }
diff --git a/src/bin/ui/project_common.h b/src/bin/ui/project_common.h
index c5c211a..a5a115a 100644
--- a/src/bin/ui/project_common.h
+++ b/src/bin/ui/project_common.h
@@ -21,7 +21,7 @@
 #define PROJECT_COMMON_H
 
 Eina_Bool
-exist_permission_check(const char *path, const char *name, const char *title, 
const char *msg, Eina_Bool append);
+exist_permission_check(const char *path, const char *name, const char *title, 
const char *msg, Eina_Bool append, Ecore_Cb func, const void *data);
 
 Eina_Bool
 progress_print(void *data, Eina_Stringshare *progress_string);
diff --git a/src/bin/ui/project_export.c b/src/bin/ui/project_export.c
index 0fa37c8..1e44af2 100644
--- a/src/bin/ui/project_export.c
+++ b/src/bin/ui/project_export.c
@@ -40,6 +40,15 @@ _export_develop_setup(void *data, Splash_Status status 
__UNUSED__)
return true;
 }
 
+static void
+_after_export_dev_check(void *data)
+{
+   ap.splash = splash_add(ap.win, _export_develop_setup, _export_teardown, 
NULL, data);
+   evas_object_focus_set(ap.splash, true);
+   evas_object_show(ap.splash);
+   popup_fileselector_helper_dismiss();
+}
+
 static Eina_Bool
 _export_dev(void *data __UNUSED__,
 Evas_Object *obj, /* this is fileselector from popup */
@@ -64,19 +73,14 @@ _export_dev(void *data __UNUSED__,
eina_strbuf_append_printf(buf,
  _("

[EGIT] [tools/eflete] eflete-1.18 72/91: project_manager: fix dead assignment

2017-01-23 Thread Andrii Kroitor
rimmed pushed a commit to branch eflete-1.18.

http://git.enlightenment.org/tools/eflete.git/commit/?id=1fecf0d0120bcc5cdddb84a6522a80463a4dbf0d

commit 1fecf0d0120bcc5cdddb84a6522a80463a4dbf0d
Author: Andrii Kroitor <an.kroi...@samsung.com>
Date:   Thu Sep 15 13:20:58 2016 +0300

project_manager: fix dead assignment

Fix svace WID 436603
---
 src/bin/project_manager/project_manager.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/src/bin/project_manager/project_manager.c 
b/src/bin/project_manager/project_manager.c
index 47bd06a..c4be47c 100644
--- a/src/bin/project_manager/project_manager.c
+++ b/src/bin/project_manager/project_manager.c
@@ -795,7 +795,6 @@ _external_resources_export(Eina_List *resources, const char 
*dst)
 ecore_file_cp(res->path, eina_strbuf_string_get(buf));
 eina_strbuf_reset(buf);
 free(path);
-path = NULL;
  }
eina_strbuf_free(buf);
 }

-- 




[EGIT] [tools/eflete] eflete-1.18 31/91: remove popup_want_action

2017-01-23 Thread Andrii Kroitor
rimmed pushed a commit to branch eflete-1.18.

http://git.enlightenment.org/tools/eflete.git/commit/?id=425ffcbdfbb111b13a1b6ba9de94800692c4d50d

commit 425ffcbdfbb111b13a1b6ba9de94800692c4d50d
Author: Andrii Kroitor <an.kroi...@samsung.com>
Date:   Mon Sep 5 18:33:30 2016 +0300

remove popup_want_action
---
 src/bin/ui/main_window.h |   8 
 src/bin/ui/popup.c   | 111 ---
 2 files changed, 119 deletions(-)

diff --git a/src/bin/ui/main_window.h b/src/bin/ui/main_window.h
index 6839e4b..c0166f1 100644
--- a/src/bin/ui/main_window.h
+++ b/src/bin/ui/main_window.h
@@ -342,14 +342,6 @@ project_close(void);
  *
  * @ingroup Window
  */
-Popup_Button
-popup_want_action(const char *title,
-  const char *msg,
-  Popup_Content_Get_Func content_get,
-  Popup_Button p_btns,
-  Popup_Validator_Func func,
-  void *data);
-
 Evas_Object *
 popup_add(const char *title,
   const char *msg,
diff --git a/src/bin/ui/popup.c b/src/bin/ui/popup.c
index 0f5e9aa..062eaa9 100644
--- a/src/bin/ui/popup.c
+++ b/src/bin/ui/popup.c
@@ -23,7 +23,6 @@
 #include "config.h"
 #include "shortcuts.h"
 
-static Popup_Button btn_pressed;
 static Evas_Object *helper;
 static Evas_Object *fs;
 static Helper_Done_Cb dismiss_func;
@@ -35,8 +34,6 @@ static const Popup_Button _btn_append = BTN_APPEND;
 static const Popup_Button _btn_replace= BTN_REPLACE;
 static const Popup_Button _btn_dont_save  = BTN_DONT_SAVE;
 static const Popup_Button _btn_cancel = BTN_CANCEL;
-static Popup_Validator_Func validator = NULL;
-static void *user_data= NULL;
 static Popup_Current current;
 
 struct _Search_Data
@@ -71,114 +68,6 @@ _delete_object_job(void *data)
current = POPUP_NONE;
 }
 
-static void
-_btn_cb(void *data,
-Evas_Object *obj __UNUSED__,
-void *ei __UNUSED__)
-{
-   btn_pressed = *((Popup_Button *)data);
-   if ((BTN_OK == btn_pressed) || (BTN_SAVE == btn_pressed) ||
-   (BTN_REPLACE == btn_pressed) || (BTN_APPEND == btn_pressed))
- if (validator && (!validator(user_data))) return;
-   eflete_main_loop_quit();
-}
-
-#define BTN_ADD(TEXT, PLACE, DATA) \
-{ \
-   BUTTON_ADD(ap.popup, btn, TEXT); \
-   evas_object_smart_callback_add(btn, "clicked", _btn_cb, DATA); \
-   elm_object_part_content_set(ap.popup, PLACE, btn); \
-}
-
-Popup_Button
-popup_want_action(const char *title,
-  const char *msg,
-  Popup_Content_Get_Func content_get,
-  Popup_Button popup_btns,
-  Popup_Validator_Func func,
-  void *data)
-
-{
-   Evas_Object *btn;
-   Evas_Object *to_focus = NULL;
-
-   /* only one content will be setted to ap.popup: or message, or used content 
*/
-   assert((msg != NULL) != (content_get != NULL));
-   validator = func;
-   user_data = data;
-
-   ui_menu_items_list_disable_set(ap.menu, MENU_ITEMS_LIST_MAIN, true);
-
-   ap.popup = elm_popup_add(ap.win);
-   elm_popup_orient_set(ap.popup, ELM_POPUP_ORIENT_CENTER);
-   elm_object_part_text_set(ap.popup, "title,text", title);
-   elm_popup_content_text_wrap_type_set(ap.popup, ELM_WRAP_WORD);
-   if (popup_btns & BTN_OK)
- {
-BTN_ADD(_("Ok"), "button1", &_btn_ok);
-evas_object_smart_callback_add(ap.popup, SIGNAL_SHORTCUT_DONE, 
_btn_cb, &_btn_ok);
- }
-
-   if (popup_btns & BTN_SAVE)
- BTN_ADD(_("Save"), "button1", &_btn_save)
-
-   if (popup_btns & BTN_APPEND)
- BTN_ADD(_("Append"), "button1", &_btn_append)
-
-   if ((popup_btns & BTN_REPLACE) && (popup_btns & BTN_APPEND))
- BTN_ADD(_("Replace"), "button2", &_btn_replace)
-   else if (popup_btns & BTN_REPLACE)
- BTN_ADD(_("Replace"), "button1", &_btn_replace)
-
-   if (popup_btns & BTN_DONT_SAVE)
- BTN_ADD(_("Don't save"), "button2", &_btn_dont_save)
-
-   if ((popup_btns & BTN_CANCEL) && (popup_btns & BTN_DONT_SAVE))
- BTN_ADD(_("Cancel"), "button3", &_btn_cancel)
-   else if ((popup_btns & BTN_CANCEL) && (popup_btns & BTN_APPEND))
- {
-BTN_ADD(_("Cancel"), "button3", &_btn_cancel);
-evas_object_smart_callback_add(ap.popup, SIGNAL_SHORTCUT_CANCEL, 
_btn_cb, &_btn_cancel);
- }
-   else if ((popup_btns & BTN_CANCEL) && (popup_btns & BTN_APPEND))
- BTN_ADD(_("Cancel"), "button3", &_btn_cancel)
-   else if (popup_btns & BTN_CANCEL)
- {
-BTN_ADD(_("Cancel"), "button2", &_btn_cancel);
-evas_object_smart_callback_add(ap.popup, SIGNAL_SHORTCUT_CANCEL, 
_btn_cb, &_btn_cancel);
- }
-
-   i

[EGIT] [tools/eflete] eflete-1.18 81/91: signals: move used eflete_widget signals to signals struct

2017-01-23 Thread Andrii Kroitor
rimmed pushed a commit to branch eflete-1.18.

http://git.enlightenment.org/tools/eflete.git/commit/?id=2e423501894ff9cabb65ec47591e710da7ea60f5

commit 2e423501894ff9cabb65ec47591e710da7ea60f5
Author: Andrii Kroitor <an.kroi...@samsung.com>
Date:   Mon Sep 19 17:12:16 2016 +0300

signals: move used eflete_widget signals to signals struct
---
 src/bin/common/signals.c  | 33 ++
 src/bin/common/signals.h  | 34 +++
 src/bin/ui/colorclass_manager.c   |  4 ++--
 src/bin/ui/image_manager.c|  4 ++--
 src/bin/ui/modal_window/modal_window.c| 11 -
 src/bin/ui/property/property_color_control.c  |  4 ++--
 src/bin/ui/property/property_common.c | 10 
 src/bin/ui/property/property_common_image.c   |  2 +-
 src/bin/ui/property/property_common_tween.c   |  4 ++--
 src/bin/ui/property/property_image_selector.c |  2 +-
 src/bin/ui/sound_manager.c|  4 ++--
 src/bin/ui/style_manager.c|  4 ++--
 src/bin/ui/workspace/container.c  | 17 --
 src/bin/ui/workspace/groupview.c  |  6 ++---
 src/bin/ui/workspace/highlight.c  |  6 ++---
 src/bin/ui/workspace/workspace.c  |  2 +-
 16 files changed, 101 insertions(+), 46 deletions(-)

diff --git a/src/bin/common/signals.c b/src/bin/common/signals.c
index d1f9242..4407337 100644
--- a/src/bin/common/signals.c
+++ b/src/bin/common/signals.c
@@ -81,6 +81,39 @@ const Signals signals = {
   },
  },
 
+ .eflete = {
+  .modal_window = {
+   .done   = "[eflete]done",
+   .cancel = "[eflete]cancel",
+   .show_animation_finished= "[eflete]show,animation,finished",
+   .hide_animation_finished= "[eflete]hide,animation,finished",
+  },
+  .container = {
+   .changed= "[eflete]changed",
+   .handler_br_moved   = "[eflete]handler,BR,moved",
+  },
+  .highlight = {
+   .drag_start = "[eflete]hl,drag,start",
+   .drag_stop  = "[eflete]hl,drag,stop",
+   .changed= "[eflete]changed",
+  },
+  .property = {
+   .color_control = {
+.changed   = "[eflete]color,changed",
+.dismissed = "[eflete]color,dismissed",
+   },
+   .image_normal_control = {
+.changed   = "[eflete]image,normal,changed",
+   },
+   .image_tween_control = {
+.changed   = "[eflete]image,tween,changed",
+   },
+   .image_selector = {
+.changed   = "[eflete]image,selector,changed",
+   },
+  },
+ },
+
  .elm = {
   .spinner = {
.changed= "changed",
diff --git a/src/bin/common/signals.h b/src/bin/common/signals.h
index f4f8e01..5c8fb91 100644
--- a/src/bin/common/signals.h
+++ b/src/bin/common/signals.h
@@ -80,6 +80,40 @@ typedef struct {
  } zoom;
   } workspace;
} shortcut;
+
+   const struct {
+  const struct {
+ const char *done;
+ const char *cancel;
+ const char *show_animation_finished;
+ const char *hide_animation_finished;
+  } modal_window;
+  const struct {
+ const char *changed;
+ const char *handler_br_moved;
+  } container;
+  const struct {
+ const char *drag_start;
+ const char *drag_stop;
+ const char *changed;
+  } highlight;
+  const struct {
+ const struct {
+const char *changed;
+const char *dismissed;
+ } color_control;
+ const struct {
+const char *changed;
+ } image_normal_control;
+ const struct {
+const char *changed;
+ } image_tween_control;
+ const struct {
+const char *changed;
+ } image_selector;
+  } property;
+   } eflete;
+
const struct {
   const struct {
  const char *changed;
diff --git a/src/bin/ui/colorclass_manager.c b/src/bin/ui/colorclass_manager.c
index 8bb0787..c6a0fc7 100644
--- a/src/bin/ui/colorclass_manager.c
+++ b/src/bin/ui/colorclass_manager.c
@@ -450,8 +450,8 @@ colorclass_manager_add(void)
/* Creating main layout of window */
mng.win = mw_add();
mw_title_set(mng.win, _("Color class manager"));
-   evas_object_smart_callback_add(mng.win, "cancel", _mw_cancel_cb, NULL);
-   evas_object_smart_callback_add(mng.win, "done", _mw_done_cb, 

[EGIT] [tools/eflete] eflete-1.18 15/91: popup: add popup_button_disabled_set for async popup

2017-01-23 Thread Andrii Kroitor
rimmed pushed a commit to branch eflete-1.18.

http://git.enlightenment.org/tools/eflete.git/commit/?id=aee9a9d1913bd8bffe34492c83f3dbd5848f4047

commit aee9a9d1913bd8bffe34492c83f3dbd5848f4047
Author: Andrii Kroitor <an.kroi...@samsung.com>
Date:   Fri Sep 2 15:21:31 2016 +0300

popup: add popup_button_disabled_set for async popup
---
 src/bin/ui/main_window.h |  2 ++
 src/bin/ui/popup.c   | 36 
 2 files changed, 38 insertions(+)

diff --git a/src/bin/ui/main_window.h b/src/bin/ui/main_window.h
index 0213523..6e37458 100644
--- a/src/bin/ui/main_window.h
+++ b/src/bin/ui/main_window.h
@@ -373,6 +373,8 @@ popup_active_helper_close(void *data,
  */
 void
 popup_buttons_disabled_set(Popup_Button p_btns, Eina_Bool disabled);
+void
+popup_button_disabled_set(Evas_Object *popup, Popup_Button btn, Eina_Bool 
disabled);
 
 void
 popup_fileselector_folder_helper(const char *title, Evas_Object *follow_up, 
const char *path,
diff --git a/src/bin/ui/popup.c b/src/bin/ui/popup.c
index b8b29e5..3a13d21 100644
--- a/src/bin/ui/popup.c
+++ b/src/bin/ui/popup.c
@@ -269,6 +269,8 @@ popup_add(const char *title,
elm_object_part_text_set(pd->popup, "title,text", title);
elm_popup_content_text_wrap_type_set(pd->popup, ELM_WRAP_WORD);
 
+   evas_object_data_set(pd->popup, POPUP_DATA, pd);
+
int bt_num = 0;
pd->button.ok= _button_add(pd, _num, _("Ok"), popup_btns 
& BTN_OK);
pd->button.save  = _button_add(pd, _num, _("Save"),   popup_btns 
& BTN_SAVE);
@@ -293,6 +295,40 @@ popup_add(const char *title,
 
return pd->popup;
 }
+
+void
+popup_button_disabled_set(Evas_Object *popup, Popup_Button btn, Eina_Bool 
disabled)
+{
+   assert(popup != NULL);
+
+   if (!btn) return;
+
+   Popup_Data *pd = evas_object_data_get(popup, POPUP_DATA);
+   switch (btn)
+ {
+  case BTN_OK:
+ elm_object_disabled_set(pd->button.ok, disabled);
+ break;
+  case BTN_SAVE:
+ elm_object_disabled_set(pd->button.save, disabled);
+ break;
+  case BTN_APPEND:
+ elm_object_disabled_set(pd->button.append, disabled);
+ break;
+  case BTN_REPLACE:
+ elm_object_disabled_set(pd->button.replace, disabled);
+ break;
+  case BTN_DONT_SAVE:
+ elm_object_disabled_set(pd->button.dont_save, disabled);
+ break;
+  case BTN_CANCEL:
+ elm_object_disabled_set(pd->button.cancel, disabled);
+ break;
+  default:
+ ERR("Unknown button.");
+ abort(); /* only one single button allowed */
+ }
+}
 /* end of async popup */
 
 #if HAVE_TIZEN

-- 




[EGIT] [tools/eflete] eflete-1.18 21/91: popup: block menu while async popup is active

2017-01-23 Thread Andrii Kroitor
rimmed pushed a commit to branch eflete-1.18.

http://git.enlightenment.org/tools/eflete.git/commit/?id=c264f1bc4551a46c7ee1f62346f754af13eb96c3

commit c264f1bc4551a46c7ee1f62346f754af13eb96c3
Author: Andrii Kroitor <an.kroi...@samsung.com>
Date:   Fri Sep 2 16:45:12 2016 +0300

popup: block menu while async popup is active
---
 src/bin/ui/popup.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/bin/ui/popup.c b/src/bin/ui/popup.c
index 3a13d21..536d771 100644
--- a/src/bin/ui/popup.c
+++ b/src/bin/ui/popup.c
@@ -226,6 +226,7 @@ _popup_btn_cb(void *data,
 
ecore_job_add(_popup_del_job, pd);
evas_object_smart_callback_call(pd->popup, POPUP_CLOSE_CB, data);
+   ui_menu_items_list_disable_set(ap.menu, MENU_ITEMS_LIST_MAIN, false);
 }
 
 static Evas_Object *
@@ -293,6 +294,8 @@ popup_add(const char *title,
shortcuts_object_push(pd->popup);
evas_object_show(pd->popup);
 
+   ui_menu_items_list_disable_set(ap.menu, MENU_ITEMS_LIST_MAIN, true);
+
return pd->popup;
 }
 

-- 




[EGIT] [tools/eflete] eflete-1.18 58/91: popup: fix abort on exit

2017-01-23 Thread Andrii Kroitor
rimmed pushed a commit to branch eflete-1.18.

http://git.enlightenment.org/tools/eflete.git/commit/?id=4ccbf2de2fe1491973dbc5e25f0952d7e6d44ab8

commit 4ccbf2de2fe1491973dbc5e25f0952d7e6d44ab8
Author: Andrii Kroitor <an.kroi...@samsung.com>
Date:   Tue Sep 13 09:48:54 2016 +0300

popup: fix abort on exit
---
 src/bin/ui/popup.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/bin/ui/popup.c b/src/bin/ui/popup.c
index 4ac3e7e..5a9d0d2 100644
--- a/src/bin/ui/popup.c
+++ b/src/bin/ui/popup.c
@@ -97,7 +97,9 @@ _popup_btn_cb(void *data,
 
ecore_job_add(_popup_del_job, pd);
evas_object_smart_callback_call(pd->popup, POPUP_CLOSE_CB, data);
-   ui_menu_items_list_disable_set(ap.menu, MENU_ITEMS_LIST_MAIN, false);
+   /* menu clould be deleted in POPUP_CLOSE_CB in exit confirmation popup */
+   if (ap.menu)
+ ui_menu_items_list_disable_set(ap.menu, MENU_ITEMS_LIST_MAIN, false);
 }
 
 static Evas_Object *

-- 




[EGIT] [tools/eflete] eflete-1.18 82/91: workspace: disable history in demo mode

2017-01-23 Thread Andrii Kroitor
rimmed pushed a commit to branch eflete-1.18.

http://git.enlightenment.org/tools/eflete.git/commit/?id=029614f56c757bb4ceb70c710cf6a23e1e2536a8

commit 029614f56c757bb4ceb70c710cf6a23e1e2536a8
Author: Andrii Kroitor <an.kroi...@samsung.com>
Date:   Tue Sep 20 11:39:36 2016 +0300

workspace: disable history in demo mode
---
 src/bin/ui/workspace/workspace.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/bin/ui/workspace/workspace.c b/src/bin/ui/workspace/workspace.c
index a644ce4..dd14942 100644
--- a/src/bin/ui/workspace/workspace.c
+++ b/src/bin/ui/workspace/workspace.c
@@ -1184,6 +1184,7 @@ _mode_cb(void *data,
  //elm_object_part_content_set(wd->panes, "right", wd->group_navi);
  evas_object_show(wd->group_navi);
  _zoom_controls_disabled_set(wd, false);
+ elm_object_disabled_set(wd->toolbar.history, false);
  evas_object_smart_callback_call(ap.win, SIGNAL_GROUP_CHANGED, 
wd->group);
 
  area = >normal;
@@ -1203,6 +1204,7 @@ _mode_cb(void *data,
  demo_group_demo_update(wd->demo_navi);
 
  _zoom_controls_disabled_set(wd, true);
+ elm_object_disabled_set(wd->toolbar.history, true);
  evas_object_smart_callback_call(ap.win, SIGNAL_DIFFERENT_TAB_CLICKED, 
NULL);
 
  area = >demo;

-- 




[EGIT] [tools/eflete] eflete-1.18 86/91: group_navigator: use gm_part_type_text_get to get part type text

2017-01-23 Thread Andrii Kroitor
rimmed pushed a commit to branch eflete-1.18.

http://git.enlightenment.org/tools/eflete.git/commit/?id=93175f1a23ce541e2d5f2dfbcf1a3805fc0fa104

commit 93175f1a23ce541e2d5f2dfbcf1a3805fc0fa104
Author: Andrii Kroitor <an.kroi...@samsung.com>
Date:   Tue Sep 20 17:21:42 2016 +0300

group_navigator: use gm_part_type_text_get to get part type text
---
 src/bin/ui/workspace/group_navigator.c | 79 --
 1 file changed, 19 insertions(+), 60 deletions(-)

diff --git a/src/bin/ui/workspace/group_navigator.c 
b/src/bin/ui/workspace/group_navigator.c
index ea10daf..6822065 100644
--- a/src/bin/ui/workspace/group_navigator.c
+++ b/src/bin/ui/workspace/group_navigator.c
@@ -86,18 +86,18 @@ typedef struct
} popup;
 } Part_List;
 
-static char *part_types[] = {
- N_("Rectangle"),
- N_("Text"),
- N_("Image"),
- N_("Swallow"),
- N_("Textblock"),
- N_("Group"),
- N_("Box"),
- N_("Table"),
- N_("Proxy"),
- N_("Spacer"),
- NULL
+static Edje_Part_Type part_types[] = {
+ EDJE_PART_TYPE_RECTANGLE,
+ EDJE_PART_TYPE_TEXT,
+ EDJE_PART_TYPE_IMAGE,
+ EDJE_PART_TYPE_SWALLOW,
+ EDJE_PART_TYPE_TEXTBLOCK,
+ EDJE_PART_TYPE_GROUP,
+ EDJE_PART_TYPE_BOX,
+ EDJE_PART_TYPE_TABLE,
+ EDJE_PART_TYPE_PROXY,
+ EDJE_PART_TYPE_SPACER,
+ EDJE_PART_TYPE_NONE
 };
 static const char *program_actions[] = {
  N_("None"),
@@ -906,7 +906,6 @@ _popup_add_part_close_cb(void *data,
Popup_Button pb = (Popup_Button)ei;
if (pb != BTN_OK) return;
 
-   Edje_Part_Type type = EDJE_PART_TYPE_NONE;
Part_List *pl = data;
const char *name, *copy_name;
Eina_Stringshare *msg;
@@ -928,46 +927,11 @@ _popup_add_part_close_cb(void *data,
  }
else
  {
-switch (pl->popup.part_type)
-  {
-   case 0:
-  type = EDJE_PART_TYPE_RECTANGLE;
-  break;
-   case 1:
-  type = EDJE_PART_TYPE_TEXT;
-  break;
-   case 2:
-  type = EDJE_PART_TYPE_IMAGE;
-  break;
-   case 3:
-  type = EDJE_PART_TYPE_SWALLOW;
-  break;
-   case 4:
-  type = EDJE_PART_TYPE_TEXTBLOCK;
-  break;
-   case 5:
-  type = EDJE_PART_TYPE_GROUP;
-  break;
-   case 6:
-  type = EDJE_PART_TYPE_BOX;
-  break;
-   case 7:
-  type = EDJE_PART_TYPE_TABLE;
-  break;
-   case 8:
-  type = EDJE_PART_TYPE_PROXY;
-  break;
-   case 9:
-  type = EDJE_PART_TYPE_SPACER;
-  break;
-  }
-assert(type != EDJE_PART_TYPE_NONE);
-
 name = elm_entry_entry_get(pl->popup.entry_name);
 msg = eina_stringshare_printf(_("added new part \"%s\""), name);
 change = change_add(msg);
-CRIT_ON_FAIL(editor_part_add(pl->group->edit_object, change, false, 
true, name, type));
-pl->popup.part_type = 0; /* get that selected stuff down, next type 
RECT again */
+CRIT_ON_FAIL(editor_part_add(pl->group->edit_object, change, false, 
true, name, pl->popup.part_type));
+pl->popup.part_type = EDJE_PART_TYPE_RECTANGLE; /* get that selected 
stuff down, next type RECT again */
  }
 
history_change_add(pl->group->history, change);
@@ -1009,7 +973,6 @@ _part_selected_cb(void *data,
   void *event_info)
 {
Part_List *pl = data;
-   Elm_Genlist_Item *glit;
Combobox_Item *item;
Edje_Part_Type type;
 
@@ -1025,11 +988,7 @@ _part_selected_cb(void *data,
  }
else
  {
-glit = elm_genlist_first_item_get(pl->popup.combobox);
-item = elm_object_item_data_get(glit);
-elm_object_text_set(pl->popup.combobox, item->data);
-pl->popup.part_type = 0;
-
+elm_object_text_set(pl->popup.combobox, 
gm_part_type_text_get(pl->popup.part_type));
 elm_object_disabled_set(pl->popup.combobox, false);
  }
 }
@@ -1121,16 +1080,16 @@ _add_part_content_get(void *data, Evas_Object *popup 
__UNUSED__, Evas_Object **t
COMBOBOX_ADD(item, pl->popup.combobox)
evas_object_smart_callback_add(pl->popup.combobox, 
signals.elm.combobox.item_pressed,
   _combobox_item_pressed_cb, NULL);
-   for (i = 0; part_types[i]; i++)
+   for (i = 0; part_types[i] != EDJE_PART_TYPE_NONE; i++)
  {
 combobox_item = mem_malloc(sizeof(Combobox_Item));
-combobox_item->data = eina_stringshare_add(part_types[i]);
-combobox_item->index = i;
+combobox_item->data = 
eina_stringshare_add(gm_part_type_text_get(part_types[i]));
+combobox_item->index = part_types[i];
 elm_genl

[EGIT] [tools/eflete] eflete-1.18 66/91: popup: fix NULL pointer deref

2017-01-23 Thread Andrii Kroitor
rimmed pushed a commit to branch eflete-1.18.

http://git.enlightenment.org/tools/eflete.git/commit/?id=919267bf832a928c632308c9759120536fee84b9

commit 919267bf832a928c632308c9759120536fee84b9
Author: Andrii Kroitor <an.kroi...@samsung.com>
Date:   Thu Sep 15 12:33:09 2016 +0300

popup: fix NULL pointer deref

Fix svace WID 436496
---
 src/bin/ui/popup.c | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/bin/ui/popup.c b/src/bin/ui/popup.c
index 7d262a4..3fd42bf 100644
--- a/src/bin/ui/popup.c
+++ b/src/bin/ui/popup.c
@@ -317,6 +317,9 @@ _helper_colorclass_dismiss(void *data,
const char *source __UNUSED__)
 {
Helper_Data *helper_data = (Helper_Data *)data;
+
+   assert(helper_data != NULL);
+
Evas_Object *follow_up = helper_data->follow_up;
 
evas_object_event_callback_del_full(follow_up, EVAS_CALLBACK_RESIZE, 
_helper_obj_follow, NULL);
@@ -338,7 +341,7 @@ _helper_colorclass_dismiss(void *data,
if (helper_data->button)
  evas_object_del(helper_data->button);
 
-   if (helper_data) free(helper_data);
+   free(helper_data);
 
ecore_job_add(_delete_object_job, helper);
 }

-- 




[EGIT] [tools/eflete] eflete-1.18 78/91: spinner: use signals structure

2017-01-23 Thread Andrii Kroitor
rimmed pushed a commit to branch eflete-1.18.

http://git.enlightenment.org/tools/eflete.git/commit/?id=81b45b0a4f1ebc592d8a728379b25278dcf62b8b

commit 81b45b0a4f1ebc592d8a728379b25278dcf62b8b
Author: Andrii Kroitor <an.kroi...@samsung.com>
Date:   Fri Sep 16 16:56:00 2016 +0300

spinner: use signals structure
---
 src/bin/common/signals.c  | 11 ++-
 src/bin/common/signals.h  |  8 
 src/bin/ui/property/property_common.c |  6 +++---
 src/bin/ui/workspace/workspace.c  | 14 +-
 4 files changed, 26 insertions(+), 13 deletions(-)

diff --git a/src/bin/common/signals.c b/src/bin/common/signals.c
index c863b81..3d306d7 100644
--- a/src/bin/common/signals.c
+++ b/src/bin/common/signals.c
@@ -1,6 +1,6 @@
 /*
  * Edje Theme Editor
- * Copyright (C) 2013-2014 Samsung Electronics.
+ * Copyright (C) 2013-2016 Samsung Electronics.
  *
  * This file is part of Edje Theme Editor.
  *
@@ -80,4 +80,13 @@ const Signals signals = {
},
   },
  },
+
+ .elm = {
+  .spinner = {
+   .changed = "changed",
+   .changed_user= "changed",
+   .drag_start  = "spinner,drag,start",
+   .drag_stop   = "spinner,drag,stop",
+  },
+ },
 };
diff --git a/src/bin/common/signals.h b/src/bin/common/signals.h
index a78f6d9..5e5fa85 100644
--- a/src/bin/common/signals.h
+++ b/src/bin/common/signals.h
@@ -80,6 +80,14 @@ typedef struct {
  } zoom;
   } workspace;
} shortcut;
+   const struct {
+  const struct {
+ const char *changed;
+ const char *changed_user;
+ const char *drag_start;
+ const char *drag_stop;
+  } spinner;
+   } elm;
 } Signals;
 
 extern const Signals signals;
diff --git a/src/bin/ui/property/property_common.c 
b/src/bin/ui/property/property_common.c
index 55c3906..1ff74db 100644
--- a/src/bin/ui/property/property_common.c
+++ b/src/bin/ui/property/property_common.c
@@ -373,9 +373,9 @@ _control_create(Property_Attribute *pa, Property_Action 
*action, Evas_Object *pa
  break;
   case PROPERTY_CONTROL_SPINNER:
  SPINNER_ADD(parent, content, 0.0, .0, 1.0, true);
- evas_object_smart_callback_add(content, "spinner,drag,start", 
_start_cb, pa);
- evas_object_smart_callback_add(content, "spinner,drag,stop", 
_stop_cb, pa);
- evas_object_smart_callback_add(content, "changed", 
_start_change_stop_cb, pa);
+ evas_object_smart_callback_add(content, 
signals.elm.spinner.drag_start, _start_cb, pa);
+ evas_object_smart_callback_add(content, 
signals.elm.spinner.drag_stop, _stop_cb, pa);
+ evas_object_smart_callback_add(content, 
signals.elm.spinner.changed_user, _start_change_stop_cb, pa);
 
  evas_object_event_callback_priority_add(content,
  EVAS_CALLBACK_MOUSE_WHEEL,
diff --git a/src/bin/ui/workspace/workspace.c b/src/bin/ui/workspace/workspace.c
index 90e0a52..2bfd2d0 100644
--- a/src/bin/ui/workspace/workspace.c
+++ b/src/bin/ui/workspace/workspace.c
@@ -502,7 +502,7 @@ _zoom_controls_add(Workspace_Data *wd)
SPINNER_ADD(wd->toolbar.obj, wd->toolbar.zoom.cmb_zoom, 10, 1000, 10, true);
evas_object_size_hint_min_set(wd->toolbar.zoom.cmb_zoom, 76, 0);
elm_spinner_value_set(wd->toolbar.zoom.cmb_zoom, 100);
-   evas_object_smart_callback_add(wd->toolbar.zoom.cmb_zoom, "changed", 
_spinner_zoom_cb, wd);
+   evas_object_smart_callback_add(wd->toolbar.zoom.cmb_zoom, 
signals.elm.spinner.changed_user, _spinner_zoom_cb, wd);
elm_object_part_content_set(zoom_layout, "swallow.spinner", 
wd->toolbar.zoom.cmb_zoom);
tb_it = elm_toolbar_item_append(wd->toolbar.obj, NULL, NULL, NULL, NULL);
elm_object_item_part_content_set(tb_it, NULL, zoom_layout);
@@ -618,11 +618,9 @@ _container_size_controls_add(Workspace_Data *wd)
tb_it = elm_toolbar_item_append(wd->toolbar.obj, NULL, NULL, NULL, NULL);
elm_toolbar_item_separator_set(tb_it, true);
 
-   wd->toolbar.container_sizer.spinner_w = elm_spinner_add(wd->toolbar.obj);
-   elm_spinner_min_max_set(wd->toolbar.container_sizer.spinner_w, 0, );
-   elm_spinner_editable_set(wd->toolbar.container_sizer.spinner_w, true);
+   SPINNER_ADD(wd->toolbar.obj, wd->toolbar.container_sizer.spinner_w, 0, 
, 1, true);
elm_object_style_set(wd->toolbar.container_sizer.spinner_w, "vertical");
-   evas_object_smart_callback_add(wd->toolbar.container_sizer.spinner_w, 
"changed", _spinner_container_change, wd);
+   evas_object_smart_callback_add(wd->toolbar.container_sizer.spinner_w, 
signals.elm.spinner.changed_user, _spinner_container_change, wd);
 #if !HAVE_TIZEN
tb_it = elm_toolbar_item_append(wd->toolbar.obj, NULL, NULL,

[EGIT] [tools/eflete] eflete-1.18 50/91: sound_manager:fix tones validator

2017-01-23 Thread Andrii Kroitor
rimmed pushed a commit to branch eflete-1.18.

http://git.enlightenment.org/tools/eflete.git/commit/?id=faef68ef1e68609b2060fcfa9df66e6a7b66842f

commit faef68ef1e68609b2060fcfa9df66e6a7b66842f
Author: Andrii Kroitor <an.kroi...@samsung.com>
Date:   Thu Sep 8 16:50:13 2016 +0300

sound_manager:fix tones validator
---
 src/bin/ui/sound_manager.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/bin/ui/sound_manager.c b/src/bin/ui/sound_manager.c
index ea8f630..1da7a50 100644
--- a/src/bin/ui/sound_manager.c
+++ b/src/bin/ui/sound_manager.c
@@ -381,6 +381,8 @@ _add_tone_content_get(void *data __UNUSED__, Evas_Object 
*popup, Evas_Object **t
ENTRY_ADD(item, mng.frq_entry, true);
eo_event_callback_add(mng.frq_entry, ELM_ENTRY_EVENT_VALIDATE, 
elm_validator_regexp_helper, mng.frq_validator);
evas_object_smart_callback_add(mng.frq_entry, "changed", _validation, 
popup);
+   /* force validator trigger */
+   elm_entry_entry_set(mng.frq_entry, " ");
elm_object_part_text_set(mng.frq_entry, "guide", _("Type a frequency (20 - 
2)"));
elm_object_part_content_set(item, "elm.swallow.content", mng.frq_entry);
/* need to manualy set not valid string for triggered validator */

-- 




[EGIT] [tools/eflete] eflete-1.18 23/91: style_manager: use async popup for tag add

2017-01-23 Thread Andrii Kroitor
rimmed pushed a commit to branch eflete-1.18.

http://git.enlightenment.org/tools/eflete.git/commit/?id=1e2fc55dfdb35dc9c1b4179de3b7146fa9823102

commit 1e2fc55dfdb35dc9c1b4179de3b7146fa9823102
Author: Andrii Kroitor <an.kroi...@samsung.com>
Date:   Mon Sep 5 12:03:53 2016 +0300

style_manager: use async popup for tag add
---
 src/bin/ui/style_manager.c | 106 +
 1 file changed, 60 insertions(+), 46 deletions(-)

diff --git a/src/bin/ui/style_manager.c b/src/bin/ui/style_manager.c
index 11c7b73..da687ab 100644
--- a/src/bin/ui/style_manager.c
+++ b/src/bin/ui/style_manager.c
@@ -249,74 +249,88 @@ _add_tag_content_get(void *data __UNUSED__, Evas_Object 
**to_focus)
return item;
 }
 
+typedef struct {
+   Eina_Stringshare *style_name, *tag_name;
+   Elm_Object_Item *glit, *glit_parent;
+   Eina_List *resources;
+} Tag_Popup_Data;
+
+static void
+_tag_add_popup_close_cb(void *data,
+Evas_Object *obj __UNUSED__,
+void *event_info)
+{
+   Resource *res;
+   Popup_Button btn_res = (Popup_Button) event_info;
+   Tag_Popup_Data *tpd = data;
+
+   if (BTN_CANCEL == btn_res) goto close;
+
+   tpd->tag_name = elm_entry_entry_get(mng.popup.name);
+   edje_edit_style_tag_add(ap.project->global_object, tpd->style_name, 
tpd->tag_name);
+   if (!edje_edit_style_tag_value_set(ap.project->global_object, 
tpd->style_name, tpd->tag_name, ""))
+ {
+WARN(_("Failed to add tag value. Tag will be deleted"));
+edje_edit_style_tag_del(ap.project->global_object, tpd->style_name, 
tpd->tag_name);
+goto close;
+ }
+   tpd->glit = elm_genlist_item_append(mng.genlist, _itc_tags,
+  tpd->tag_name, tpd->glit_parent,
+  ELM_GENLIST_ITEM_NONE,
+  _on_glit_selected, NULL);
+   elm_object_item_data_set(tpd->glit, (void *)tpd->tag_name);
+   elm_genlist_item_selected_set(tpd->glit, true);
+   elm_genlist_item_bring_in(tpd->glit, ELM_GENLIST_ITEM_SCROLLTO_MIDDLE);
+
+   CRIT_ON_FAIL(editor_save(ap.project->global_object));
+   TODO("Remove this line once edje_edit API would be added into Editor Module 
and saving would work properly")
+   ap.project->changed = true;
+
+close:
+   EINA_LIST_FREE(tpd->resources, res)
+  resource_free(res);
+   evas_object_del(mng.popup.item);
+   resource_name_validator_free(mng.popup.validator);
+   free(tpd);
+}
 static void
 _tag_add_cb(void *data __UNUSED__,
 Evas_Object *obj __UNUSED__,
 void *event_info __UNUSED__)
 {
Resource *res;
-   Eina_List *resources = NULL;
-   Eina_Stringshare *style_name, *tag_name;
-   Popup_Button btn_res;
-   Elm_Object_Item *glit, *glit_parent;
Eina_Stringshare *buf;
Eina_List *tags, *l;
+   Evas_Object *popup;
+   Tag_Popup_Data * tpd = mem_calloc(1, sizeof(Tag_Popup_Data));
 
-   glit = elm_genlist_selected_item_get(mng.genlist);
-   glit_parent = elm_genlist_item_parent_get(glit);
+   tpd->glit = elm_genlist_selected_item_get(mng.genlist);
+   tpd->glit_parent = elm_genlist_item_parent_get(tpd->glit);
 
-   if (!glit_parent)
+   if (!tpd->glit_parent)
  {
-if (!elm_genlist_item_expanded_get(glit))
-  elm_genlist_item_expanded_set(glit, true);
+if (!elm_genlist_item_expanded_get(tpd->glit))
+  elm_genlist_item_expanded_set(tpd->glit, true);
 
-style_name = elm_object_item_data_get(glit);
-glit_parent = glit;
+tpd->style_name = elm_object_item_data_get(tpd->glit);
+tpd->glit_parent = tpd->glit;
  }
else
- style_name = elm_object_item_data_get(glit_parent);
+ tpd->style_name = elm_object_item_data_get(tpd->glit_parent);
 
-   tags = edje_edit_style_tags_list_get(ap.project->global_object, style_name);
+   tags = edje_edit_style_tags_list_get(ap.project->global_object, 
tpd->style_name);
EINA_LIST_FOREACH(tags, l, buf)
  {
 res = resource_add(buf, RESOURCE_TYPE_TAG);
-resource_insert(, res);
+resource_insert(>resources, res);
  }
edje_edit_string_list_free(tags);
mng.popup.validator = resource_name_validator_new(NAME_REGEX, NULL);
-   resource_name_validator_list_set(mng.popup.validator, , true);
-
-   buf = eina_stringshare_printf(_("Add tag for style: %s"), style_name);
-   btn_res = popup_want_action(buf, NULL, _add_tag_content_get,
-   BTN_OK|BTN_CANCEL,
-   NULL, mng.popup.name);
-   if (BTN_CANCEL == btn_res) goto close;
-
-   tag_name = elm_entry_entry_get(mng.popup.name);
-   edje_edit_style_tag_add(ap.project->global_object, style_name, tag_name);
-   if (!edje_edit_style_tag_value_set(ap.project->global_object, style_name, 
tag_name, ""))
-  

[EGIT] [tools/eflete] eflete-1.18 84/91: editor: add internal save after changing image border properties

2017-01-23 Thread Andrii Kroitor
rimmed pushed a commit to branch eflete-1.18.

http://git.enlightenment.org/tools/eflete.git/commit/?id=8cb63278ff0e1664ac6898c6944e142e942e7994

commit 8cb63278ff0e1664ac6898c6944e142e942e7994
Author: Andrii Kroitor <an.kroi...@samsung.com>
Date:   Tue Sep 20 14:22:38 2016 +0300

editor: add internal save after changing image border properties
---
 src/bin/editor/editor_macro.h  |  3 ++-
 src/bin/editor/editor_states.c | 12 
 2 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/src/bin/editor/editor_macro.h b/src/bin/editor/editor_macro.h
index 48a5ab9..6eb4f6b 100644
--- a/src/bin/editor/editor_macro.h
+++ b/src/bin/editor/editor_macro.h
@@ -341,7 +341,7 @@ editor_state_## FUNC ##_## NUMBER ##_set(Evas_Object 
*edit_object, Change *chang
return true; \
 }
 
-#define EDITOR_STATE_UCHAR(FUNC, ATTRIBUTE) \
+#define EDITOR_STATE_UCHAR(FUNC, ATTRIBUTE, SAVE) \
 Eina_Bool \
 editor_state_## FUNC ##_set(Evas_Object *edit_object, Change *change, 
Eina_Bool merge, Eina_Bool apply, \
 const char *part_name, const char *state_name, 
double state_val, unsigned char new_val) \
@@ -375,6 +375,7 @@ editor_state_## FUNC ##_set(Evas_Object *edit_object, 
Change *change, Eina_Bool
if (apply) \
  { \
CRIT_ON_FAIL(edje_edit_state_## FUNC ##_set(edit_object, part_name, 
state_name, state_val, new_val)); \
+   if (SAVE) CRIT_ON_FAIL(editor_save(edit_object)); \
_editor_project_changed(); \
if (!_editor_signals_blocked) evas_object_smart_callback_call(ap.win, 
SIGNAL_EDITOR_ATTRIBUTE_CHANGED, ); \
  } \
diff --git a/src/bin/editor/editor_states.c b/src/bin/editor/editor_states.c
index c8c18de..b01aa80 100644
--- a/src/bin/editor/editor_states.c
+++ b/src/bin/editor/editor_states.c
@@ -397,6 +397,7 @@ editor_state_image_border_left_set(Evas_Object 
*edit_object, Change *change, Ein
if (apply)
  {
 CRIT_ON_FAIL(edje_edit_state_image_border_set(edit_object, part_name, 
state_name, state_val, n4, o5, o6, o7));
+CRIT_ON_FAIL(editor_save(edit_object));
 _editor_project_changed();
 if (!_editor_signals_blocked) evas_object_smart_callback_call(ap.win, 
SIGNAL_EDITOR_ATTRIBUTE_CHANGED, );
  }
@@ -437,6 +438,7 @@ editor_state_image_border_right_set(Evas_Object 
*edit_object, Change *change, Ei
if (apply)
  {
 CRIT_ON_FAIL(edje_edit_state_image_border_set(edit_object, part_name, 
state_name, state_val, o4, n5, o6, o7));
+CRIT_ON_FAIL(editor_save(edit_object));
 _editor_project_changed();
 if (!_editor_signals_blocked) evas_object_smart_callback_call(ap.win, 
SIGNAL_EDITOR_ATTRIBUTE_CHANGED, );
  }
@@ -477,6 +479,7 @@ editor_state_image_border_top_set(Evas_Object *edit_object, 
Change *change, Eina
if (apply)
  {
 CRIT_ON_FAIL(edje_edit_state_image_border_set(edit_object, part_name, 
state_name, state_val, o4, o5, n6, o7));
+CRIT_ON_FAIL(editor_save(edit_object));
 _editor_project_changed();
 if (!_editor_signals_blocked) evas_object_smart_callback_call(ap.win, 
SIGNAL_EDITOR_ATTRIBUTE_CHANGED, );
  }
@@ -517,6 +520,7 @@ editor_state_image_border_bottom_set(Evas_Object 
*edit_object, Change *change, E
if (apply)
  {
 CRIT_ON_FAIL(edje_edit_state_image_border_set(edit_object, part_name, 
state_name, state_val, o4, o5, o6, n7));
+CRIT_ON_FAIL(editor_save(edit_object));
 _editor_project_changed();
 if (!_editor_signals_blocked) evas_object_smart_callback_call(ap.win, 
SIGNAL_EDITOR_ATTRIBUTE_CHANGED, );
  }
@@ -525,10 +529,10 @@ editor_state_image_border_bottom_set(Evas_Object 
*edit_object, Change *change, E
 
 /**/
 
-EDITOR_STATE_UCHAR(image_border_fill, ATTRIBUTE_STATE_IMAGE_BORDER_FILL)
-EDITOR_STATE_UCHAR(fill_type, ATTRIBUTE_STATE_FILL_TYPE)
-EDITOR_STATE_UCHAR(aspect_pref, ATTRIBUTE_STATE_ASPECT_PREF)
-EDITOR_STATE_UCHAR(table_homogeneous, ATTRIBUTE_STATE_TABLE_HOMOGENEOUS)
+EDITOR_STATE_UCHAR(image_border_fill, ATTRIBUTE_STATE_IMAGE_BORDER_FILL, true)
+EDITOR_STATE_UCHAR(fill_type, ATTRIBUTE_STATE_FILL_TYPE, false)
+EDITOR_STATE_UCHAR(aspect_pref, ATTRIBUTE_STATE_ASPECT_PREF, false)
+EDITOR_STATE_UCHAR(table_homogeneous, ATTRIBUTE_STATE_TABLE_HOMOGENEOUS, false)
 
 EDITOR_STATE_INT_SAVE(container_padding_x, ATTRIBUTE_STATE_CONTAINER_PADING_X)
 EDITOR_STATE_INT_SAVE(container_padding_y, ATTRIBUTE_STATE_CONTAINER_PADING_Y)

-- 




[EGIT] [tools/eflete] eflete-1.18 63/91: property_group: add name check

2017-01-23 Thread Andrii Kroitor
rimmed pushed a commit to branch eflete-1.18.

http://git.enlightenment.org/tools/eflete.git/commit/?id=a30d7b88423d978fcdd5d809d50f68036e85f0dd

commit a30d7b88423d978fcdd5d809d50f68036e85f0dd
Author: Andrii Kroitor <an.kroi...@samsung.com>
Date:   Thu Sep 15 12:13:50 2016 +0300

property_group: add name check

Fix svace WID 436564
---
 src/bin/ui/property/property_group.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/bin/ui/property/property_group.c 
b/src/bin/ui/property/property_group.c
index 8d8c38c..3609367 100644
--- a/src/bin/ui/property/property_group.c
+++ b/src/bin/ui/property/property_group.c
@@ -2452,7 +2452,7 @@ _update_cb(Property_Attribute *pa, Property_Action 
*action)
   case ATTRIBUTE_PROGRAM_SAMPLE_NAME:
  elm_genlist_clear(action->control);
  str_val1 = edje_edit_program_sample_name_get(EDIT_OBJ, PROGRAM_ARGS);
- if (!strcmp(str_val1, EFLETE_DUMMY_SAMPLE_NAME))
+ if (!str_val1 || !strcmp(str_val1, EFLETE_DUMMY_SAMPLE_NAME))
{
   edje_edit_string_free(str_val1);
   str_val1 = eina_stringshare_add(_("None"));

-- 




[EGIT] [tools/eflete] eflete-1.18 67/91: tabs: fix wrong args order

2017-01-23 Thread Andrii Kroitor
rimmed pushed a commit to branch eflete-1.18.

http://git.enlightenment.org/tools/eflete.git/commit/?id=18af8d90ec9d51453fa5fcdefcb2469941c2b25f

commit 18af8d90ec9d51453fa5fcdefcb2469941c2b25f
Author: Andrii Kroitor <an.kroi...@samsung.com>
Date:   Thu Sep 15 12:43:22 2016 +0300

tabs: fix wrong args order

Fix svace WID 436612
---
 src/bin/ui/tab_home_info.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/bin/ui/tab_home_info.c b/src/bin/ui/tab_home_info.c
index 8f826d4..af66fe3 100644
--- a/src/bin/ui/tab_home_info.c
+++ b/src/bin/ui/tab_home_info.c
@@ -75,7 +75,7 @@ _tab_project_update()
   eina_list_count(ap.project->images) - 1, /* dummy image 
should not be counted */
   eina_list_count(ap.project->sounds) + 
eina_list_count(ap.project->tones) - 1,/* dummy sample should not be counted */
   eina_list_count(ap.project->fonts),
-  authors, version, license, comment);
+  version, authors, license, comment);
  }
 }
 

-- 




[EGIT] [tools/eflete] eflete-1.18 53/91: project_manager: fix incorrect mutex usage in export_resources

2017-01-23 Thread Andrii Kroitor
rimmed pushed a commit to branch eflete-1.18.

http://git.enlightenment.org/tools/eflete.git/commit/?id=2fd911befe3a13cffd496b67db33c8322bd08fd9

commit 2fd911befe3a13cffd496b67db33c8322bd08fd9
Author: Andrii Kroitor <an.kroi...@samsung.com>
Date:   Mon Sep 12 18:31:31 2016 +0300

project_manager: fix incorrect mutex usage in export_resources
---
 src/bin/project_manager/project_manager_export_resources.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/bin/project_manager/project_manager_export_resources.c 
b/src/bin/project_manager/project_manager_export_resources.c
index 62efccc..deed8c6 100644
--- a/src/bin/project_manager/project_manager_export_resources.c
+++ b/src/bin/project_manager/project_manager_export_resources.c
@@ -164,7 +164,6 @@ _image_resources_feedback_job(void *data, Ecore_Thread *th)
ids->dev = project->dev;
ids->edit_object = project->global_object;
eina_lock_new(>mutex);
-   eina_lock_take(>mutex);
 
Image_Data_Get *idg = mem_calloc(1, sizeof(Image_Data_Get));
idg->edit_object = project->global_object;
@@ -209,6 +208,7 @@ _image_resources_feedback_job(void *data, Ecore_Thread *th)
   WARN("Image %s coudn't be exported", image_name);
   continue;
}
+ eina_lock_take(>mutex);
  ids->id = id;
  ids->im = NULL;
  ids->source = res->path;
@@ -216,7 +216,6 @@ _image_resources_feedback_job(void *data, Ecore_Thread *th)
  ecore_main_loop_thread_safe_call_sync(_image_save_routine, ids);
   }
  }
-   eina_lock_release(>mutex);
eina_lock_free(>mutex);
free(ids);
 

-- 




[EGIT] [tools/eflete] eflete-1.18 88/91: style_manager: fix label text

2017-01-23 Thread Andrii Kroitor
rimmed pushed a commit to branch eflete-1.18.

http://git.enlightenment.org/tools/eflete.git/commit/?id=98ca383f7d95fe37f5d5eea9315235cb51536eb1

commit 98ca383f7d95fe37f5d5eea9315235cb51536eb1
Author: Andrii Kroitor <an.kroi...@samsung.com>
Date:   Tue Sep 20 18:15:04 2016 +0300

style_manager: fix label text
---
 src/bin/ui/style_manager.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/bin/ui/style_manager.c b/src/bin/ui/style_manager.c
index 37ac932..c882354 100644
--- a/src/bin/ui/style_manager.c
+++ b/src/bin/ui/style_manager.c
@@ -837,7 +837,7 @@ style_manager_add()
mng.layout = elm_layout_add(ap.win);
elm_layout_theme_set(mng.layout, "layout", "manager", "internal");
elm_object_part_text_set(mng.layout, "elm.text", _("Preview"));
-   elm_layout_text_set(mng.layout, "elm.subtext", _("Font list"));
+   elm_layout_text_set(mng.layout, "elm.subtext", _("Textblock styles list"));
mng.panes = elm_panes_add(mng.win);
elm_panes_content_right_size_set(mng.panes, 0);
elm_panes_content_right_min_size_set(mng.panes, 355);

-- 




[EGIT] [tools/eflete] eflete-1.18 70/91: project_manager_export_edc: fix eina_lock_take result check

2017-01-23 Thread Andrii Kroitor
rimmed pushed a commit to branch eflete-1.18.

http://git.enlightenment.org/tools/eflete.git/commit/?id=533d9e07218f2712d54e95f5e29bbd165fd307c1

commit 533d9e07218f2712d54e95f5e29bbd165fd307c1
Author: Andrii Kroitor <an.kroi...@samsung.com>
Date:   Thu Sep 15 13:08:10 2016 +0300

project_manager_export_edc: fix eina_lock_take result check

Fix svace WID 436654
---
 src/bin/project_manager/project_manager_export_edc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/bin/project_manager/project_manager_export_edc.c 
b/src/bin/project_manager/project_manager_export_edc.c
index 7a2c29d..888bcb3 100644
--- a/src/bin/project_manager/project_manager_export_edc.c
+++ b/src/bin/project_manager/project_manager_export_edc.c
@@ -56,7 +56,7 @@ _project_source_code_export_feedback_job(void *data, 
Ecore_Thread *th)
 {
Eina_Stringshare *path;
Project_Thread *ptd = (Project_Thread *)data;
-   if (!eina_lock_take(>mutex))
+   if (eina_lock_take(>mutex) != EINA_LOCK_SUCCEED)
  {
ERR("Failed access data");
ecore_thread_cancel(th);
@@ -173,7 +173,7 @@ void
 _group_source_code_export_feedback_job(void *data, Ecore_Thread *th)
 {
Project_Thread *ptd = (Project_Thread *)data;
-   if (!eina_lock_take(>mutex))
+   if (eina_lock_take(>mutex) != EINA_LOCK_SUCCEED)
  {
ERR("Failed access data");
ecore_thread_cancel(th);

-- 




[EGIT] [tools/eflete] eflete-1.18 64/91: popup: fix enum check

2017-01-23 Thread Andrii Kroitor
rimmed pushed a commit to branch eflete-1.18.

http://git.enlightenment.org/tools/eflete.git/commit/?id=d17c529607c92c78cd8807509a22e42722a75cd1

commit d17c529607c92c78cd8807509a22e42722a75cd1
Author: Andrii Kroitor <an.kroi...@samsung.com>
Date:   Thu Sep 15 12:22:41 2016 +0300

popup: fix enum check

Fix svace WID 436569
---
 src/bin/ui/popup.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/bin/ui/popup.c b/src/bin/ui/popup.c
index 5a9d0d2..77a7b2d 100644
--- a/src/bin/ui/popup.c
+++ b/src/bin/ui/popup.c
@@ -177,7 +177,7 @@ popup_button_disabled_set(Evas_Object *popup, Popup_Button 
btn, Eina_Bool disabl
 {
assert(popup != NULL);
 
-   if (!btn) return;
+   if (btn == BTN_NONE) return;
 
Popup_Data *pd = evas_object_data_get(popup, POPUP_DATA);
switch (btn)

-- 




[EGIT] [tools/eflete] eflete-1.18 17/91: group_navigator: use async popup for group data add

2017-01-23 Thread Andrii Kroitor
rimmed pushed a commit to branch eflete-1.18.

http://git.enlightenment.org/tools/eflete.git/commit/?id=02e637a09229bdf1a37a6b022f44f32e598d27bd

commit 02e637a09229bdf1a37a6b022f44f32e598d27bd
Author: Andrii Kroitor <an.kroi...@samsung.com>
Date:   Fri Sep 2 16:17:46 2016 +0300

group_navigator: use async popup for group data add
---
 src/bin/ui/workspace/group_navigator.c | 42 --
 1 file changed, 15 insertions(+), 27 deletions(-)

diff --git a/src/bin/ui/workspace/group_navigator.c 
b/src/bin/ui/workspace/group_navigator.c
index 5eef48f..c4658ba 100644
--- a/src/bin/ui/workspace/group_navigator.c
+++ b/src/bin/ui/workspace/group_navigator.c
@@ -1185,21 +1185,24 @@ _on_group_data_name_changed(void *data,
 
if (resource_name_validator_status_get(pl->group_data_name_validator) != 
ELM_REG_NOERROR)
  {
-   popup_buttons_disabled_set(BTN_OK, true);
+   popup_button_disabled_set(pl->popup_win, BTN_OK, true);
elm_object_signal_emit(obj, "validation,default,fail", "elm");
  }
else
  {
-   popup_buttons_disabled_set(BTN_OK, false);
+   popup_button_disabled_set(pl->popup_win, BTN_OK, false);
elm_object_signal_emit(obj, "validation,default,pass", "elm");
  }
 }
 
 static void
-_popup_add_group_data_ok_clicked(void *data,
- Evas_Object *obj __UNUSED__,
- void *event_info __UNUSED__)
+_popup_add_group_data_close_cb(void *data,
+   Evas_Object *obj __UNUSED__,
+   void *event_info)
 {
+   Popup_Button pb = (Popup_Button)event_info;
+   if (pb != BTN_OK) return;
+
Part_List *pl = data;
const char *name;
Eina_Stringshare *msg;
@@ -1207,9 +1210,6 @@ _popup_add_group_data_ok_clicked(void *data,
 
assert(pl != NULL);
 
-   if (resource_name_validator_status_get(pl->group_data_name_validator) != 
ELM_REG_NOERROR)
-  return;
-
name = elm_entry_entry_get(pl->popup.entry_name);
msg = eina_stringshare_printf(_("added new data item \"%s\""), name);
change = change_add(msg);
@@ -1217,25 +1217,14 @@ _popup_add_group_data_ok_clicked(void *data,
 
history_change_add(pl->group->history, change);
eina_stringshare_del(msg);
-   evas_object_del(pl->popup.box);
 }
 
-Eina_Bool
-_popup_add_group_data_validator(void *data)
-{
-   Part_List *pl = (Part_List *) data;
-   _popup_add_group_data_ok_clicked(data, NULL, NULL);
-   if (resource_name_validator_status_get(pl->group_data_name_validator) != 
ELM_REG_NOERROR)
- return false;
-   return true;
-}
-
-Evas_Object *
+static Evas_Object *
 _add_group_data_content_get(void *data, Evas_Object **to_focus)
 {
Part_List *pl = (Part_List *) data;
Evas_Object *box, *item;
-   BOX_ADD(ap.popup, box, false, false);
+   BOX_ADD(ap.win, box, false, false);
 
LAYOUT_PROP_ADD(box, _("Data item name"), "popup", "1swallow")
ENTRY_ADD(box, pl->popup.entry_name, true);
@@ -1250,7 +1239,6 @@ _add_group_data_content_get(void *data, Evas_Object 
**to_focus)
 
pl->popup.box = box;
if (to_focus) *to_focus = pl->popup.entry_name;
-   popup_buttons_disabled_set(BTN_OK, true);
 
return pl->popup.box;
 }
@@ -1267,11 +1255,11 @@ _on_menu_add_group_data_clicked(void *data __UNUSED__,
assert(pl != NULL);
 
title = eina_stringshare_printf(_("Add New Data Item to Group \"%s\""), 
pl->group->name);
-   Popup_Button button = popup_want_action(title, NULL, 
_add_group_data_content_get,
-BTN_OK | BTN_CANCEL,
-   _popup_add_group_data_validator, 
pl);
-   if (button == BTN_CANCEL)
- evas_object_del(pl->popup.box);
+   pl->popup_win = popup_add(title, NULL,
+ BTN_OK | BTN_CANCEL,
+ _add_group_data_content_get, pl);
+   evas_object_smart_callback_add(pl->popup_win, POPUP_CLOSE_CB, 
_popup_add_group_data_close_cb, pl);
+   popup_button_disabled_set(pl->popup_win, BTN_OK, true);
eina_stringshare_del(title);
 }
 

-- 




[EGIT] [tools/eflete] eflete-1.18 39/91: example: add color_class test

2017-01-23 Thread Andrii Kroitor
rimmed pushed a commit to branch eflete-1.18.

http://git.enlightenment.org/tools/eflete.git/commit/?id=5048c30c2a5ac62ac8dd9ffb2079c0e57a96c02d

commit 5048c30c2a5ac62ac8dd9ffb2079c0e57a96c02d
Author: Andrii Kroitor <an.kroi...@samsung.com>
Date:   Wed Sep 7 13:01:56 2016 +0300

example: add color_class test
---
 example/example.edc | 111 +++-
 1 file changed, 110 insertions(+), 1 deletion(-)

diff --git a/example/example.edc b/example/example.edc
index 79274d4..fcb1e10 100644
--- a/example/example.edc
+++ b/example/example.edc
@@ -33,6 +33,33 @@ images {
image: "not_an_image.txt" RAW;
 }
 
+color_classes {
+color_class {
+name:  "colorclass_red_green_blue";
+color:  255 0 0 255;
+color2: 0 255 0 255;
+color3: 0 0 255 255;
+}
+color_class {
+name:  "colorclass_red_green_blue_transparent";
+color:  255 0 0 125;
+color2: 0 255 0 125;
+color3: 0 0 255 125;
+}
+color_class {
+name:  "colorclass_green_blue_red";
+color:  0 255 0 255;
+color2: 0 0 255 255;
+color3: 255 0 0 255;
+}
+color_class {
+name:  "colorclass_green_blue_transparent";
+color:  0 255 0 125;
+color2: 0 0 255 125;
+color3: 255 0 0 125;
+}
+}
+
 collections {
 
sounds {
@@ -231,7 +258,7 @@ collections {
  }
   }
}
-   group { "test/sounds";
+   group { name: "test/sounds";
   parts {
  part { name: "click_me_wav"; type: TEXT;
 description { state: "default"; color: 0 0 0 255;
@@ -298,6 +325,88 @@ collections {
   }
}
 
+   group { name: "test/colorclasses";
+  parts {
+ part { name: "rect_rgb"; type: RECT;
+description { state: "default";
+   color_class: "colorclass_red_green_blue";
+   rel1.relative: 0.0 0.0;
+   rel2.relative: 0.5 0.25;
+}
+ }
+ part { name: "rect_rgba"; type: RECT;
+description { state: "default";
+   color_class: "colorclass_red_green_blue_transparent";
+   rel1.relative: 0.0 0.25;
+   rel2.relative: 0.5 0.5;
+}
+ }
+ part { name: "rect_rgb_and_color"; type: RECT;
+description { state: "default";
+   color_class: "colorclass_red_green_blue";
+   color: 50 200 100 255;
+   rel1.relative: 0.0 0.5;
+   rel2.relative: 0.5 0.75;
+}
+ }
+ part { name: "rect_rgba_and_color"; type: RECT;
+description { state: "default";
+   color_class: "colorclass_red_green_blue_transparent";
+   color: 50 200 100 255;
+   rel1.relative: 0.0 0.75;
+   rel2.relative: 0.5 1;
+}
+ }
+ part { name: "text_rgb"; type: TEXT;
+effect: OUTLINE_SHADOW;
+description { state: "default";
+   color_class: "colorclass_red_green_blue";
+   color2: 255 255 255 255;
+   color3: 255 255 255 255;
+   rel1.relative: 0.5 0.0;
+   rel2.relative: 1.0 0.25;
+   text { size: 42; text: "rgb color class"; }
+}
+ }
+ part { name: "text_rgba"; type: TEXT;
+effect: OUTLINE_SHADOW;
+description { state: "default";
+   color_class: "colorclass_red_green_blue_transparent";
+   color2: 255 255 255 255;
+   color3: 255 255 255 255;
+   rel1.relative: 0.5 0.25;
+   rel2.relative: 1.0 0.5;
+   text { size: 42; text: "rgba color class"; }
+}
+ }
+ part { name: "text_rgb_and_color"; type: TEXT;
+effect: OUTLINE_SHADOW;
+description { state: "default";
+   color_class: "colorclass_red_green_blue";
+   color:  50 200 100 255;
+   color2: 50 200 100 255;
+   color3: 50 200 100 255;
+   rel1.relative: 0.5 0.5;
+   rel2.relative: 1.0 0.75;
+   text { size: 42; text: "color+rgb color class"; }
+}
+ }
+ part { name: "text_rgba_and_color"; type: TEXT;
+effect: OUTLINE_SHADOW;
+description { state: "default";
+   color_class: "colorclass_red_green_blue_transparent";
+   color:  50 200 100 255;
+   color2: 50 200 100 255;
+   color3: 50 200 100 255;
+   rel1.relative: 0.5 0.75;
+   rel2.relative: 1.0 1.0;
+   text { size: 42; text: "color+rgba color class"; }
+}
+ }
+
+  }
+   }
+
group { name: "test/wrong_files";
   parts {
  part { name: "click_me_not_a_sound"; type: TEXT;

-- 




[EGIT] [tools/eflete] eflete-1.18 30/91: popup: fix abort on shortcuts pop

2017-01-23 Thread Andrii Kroitor
rimmed pushed a commit to branch eflete-1.18.

http://git.enlightenment.org/tools/eflete.git/commit/?id=bb740365bd0078a81e49f1cf57bd7cb409de2d81

commit bb740365bd0078a81e49f1cf57bd7cb409de2d81
Author: Andrii Kroitor <an.kroi...@samsung.com>
Date:   Mon Sep 5 18:31:40 2016 +0300

popup: fix abort on shortcuts pop
---
 src/bin/ui/popup.c | 8 +++-
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/src/bin/ui/popup.c b/src/bin/ui/popup.c
index 39e0fab..0f5e9aa 100644
--- a/src/bin/ui/popup.c
+++ b/src/bin/ui/popup.c
@@ -66,6 +66,7 @@ static Elm_Gengrid_Item_Class *gic = NULL;
 static void
 _delete_object_job(void *data)
 {
+   shortcuts_object_check_pop(data);
evas_object_del(data);
current = POPUP_NONE;
 }
@@ -439,7 +440,7 @@ _helper_property_color_follow(void *data __UNUSED__,
 
 static void
 _helper_colorclass_dismiss(void *data,
-   Evas_Object *obj,
+   Evas_Object *obj __UNUSED__,
const char *signal __UNUSED__,
const char *source __UNUSED__)
 {
@@ -467,7 +468,6 @@ _helper_colorclass_dismiss(void *data,
 
if (helper_data) free(helper_data);
 
-   shortcuts_object_check_pop(obj);
ecore_job_add(_delete_object_job, helper);
 }
 
@@ -497,13 +497,12 @@ popup_fileselector_helper_dismiss()
Helper_Data *helper_data = evas_object_data_get(helper, "STRUCT");
if (helper_data) free(helper_data);
 
-   shortcuts_object_check_pop(helper);
ecore_job_add(_delete_object_job, helper);
 }
 
 static void
 _helper_dismiss(void *data __UNUSED__,
-Evas_Object *obj,
+Evas_Object *obj __UNUSED__,
 const char *signal __UNUSED__,
 const char *source __UNUSED__)
 {
@@ -520,7 +519,6 @@ _helper_dismiss(void *data __UNUSED__,
Helper_Data *helper_data = evas_object_data_get(helper, "STRUCT");
if (helper_data) free(helper_data);
 
-   shortcuts_object_check_pop(obj);
ecore_job_add(_delete_object_job, helper);
 }
 

-- 




[EGIT] [tools/eflete] eflete-1.18 73/91: editor_part: fix macros usage error

2017-01-23 Thread Andrii Kroitor
rimmed pushed a commit to branch eflete-1.18.

http://git.enlightenment.org/tools/eflete.git/commit/?id=4b36cb6f03e497027f48a4de7de4b5c867739c60

commit 4b36cb6f03e497027f48a4de7de4b5c867739c60
Author: Andrii Kroitor <an.kroi...@samsung.com>
Date:   Thu Sep 15 14:51:12 2016 +0300

editor_part: fix macros usage error

Fix svace WID 436695
---
 src/bin/editor/editor_part.c | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/bin/editor/editor_part.c b/src/bin/editor/editor_part.c
index 52d3848..ad338d6 100644
--- a/src/bin/editor/editor_part.c
+++ b/src/bin/editor/editor_part.c
@@ -958,8 +958,10 @@ _editor_part_del(Evas_Object *edit_object, Change *change, 
Eina_Bool merge __UNU
   RESET_PART_REF(textblock_anchors_under, source5);
   RESET_PART_REF(textblock_anchors_over, source6);
}
- if (type == EDJE_PART_TYPE_GROUP)
-   RESET_PART_REF(group_source, source);
+ else if (type == EDJE_PART_TYPE_GROUP)
+   {
+  RESET_PART_REF(group_source, source);
+   }
 
   }
 edje_edit_string_list_free(parts);

-- 




[EGIT] [tools/eflete] eflete-1.18 09/91: ewe_ruler: fix uninitialized variable usage

2017-01-23 Thread Andrii Kroitor
rimmed pushed a commit to branch eflete-1.18.

http://git.enlightenment.org/tools/eflete.git/commit/?id=10b1e5830cf2dd91ee663462cb04b01b0463a558

commit 10b1e5830cf2dd91ee663462cb04b01b0463a558
Author: Andrii Kroitor <an.kroi...@samsung.com>
Date:   Thu Sep 1 15:31:14 2016 +0300

ewe_ruler: fix uninitialized variable usage
---
 src/lib/ewe_ruler.c | 15 +++
 1 file changed, 7 insertions(+), 8 deletions(-)

diff --git a/src/lib/ewe_ruler.c b/src/lib/ewe_ruler.c
index 20705e9..fc8f5e4 100644
--- a/src/lib/ewe_ruler.c
+++ b/src/lib/ewe_ruler.c
@@ -541,21 +541,20 @@ _ewe_ruler_marker_add(Eo *obj,
ret->style = eina_stringshare_add(style);
buf = eina_strbuf_new();
if (sd->horizontal)
- {
-eina_strbuf_append_printf(buf, MARKER"/%s", style);
-edje_object_size_min_calc(elm_layout_edje_get(ret->obj), >size, 
NULL);
- }
+ eina_strbuf_append_printf(buf, MARKER"/%s", style);
else
- {
-eina_strbuf_append_printf(buf, MARKER_VER"/%s", style);
-edje_object_size_min_calc(elm_layout_edje_get(ret->obj), NULL, 
>size);
- }
+ eina_strbuf_append_printf(buf, MARKER_VER"/%s", style);
 
ret->obj = elm_layout_add(obj);
evas_object_clip_set(ret->obj, sd->clip);
elm_layout_file_set(ret->obj, EWE_THEME, eina_strbuf_string_get(buf));
evas_object_smart_member_add(ret->obj, obj);
 
+   if (sd->horizontal)
+ edje_object_size_min_calc(elm_layout_edje_get(ret->obj), >size, 
NULL);
+   else
+ edje_object_size_min_calc(elm_layout_edje_get(ret->obj), NULL, 
>size);
+
ret->scale = NULL;
ret->rel_position = 0;
ret->abs_position = 0;

-- 




[EGIT] [tools/eflete] eflete-1.18 85/91: group_navigator: show type of copied part

2017-01-23 Thread Andrii Kroitor
rimmed pushed a commit to branch eflete-1.18.

http://git.enlightenment.org/tools/eflete.git/commit/?id=703740fa5b4f38bc2e64484ceeec225887015d14

commit 703740fa5b4f38bc2e64484ceeec225887015d14
Author: Andrii Kroitor <an.kroi...@samsung.com>
Date:   Tue Sep 20 17:07:03 2016 +0300

group_navigator: show type of copied part
---
 src/bin/ui/workspace/group_navigator.c | 17 +++--
 1 file changed, 15 insertions(+), 2 deletions(-)

diff --git a/src/bin/ui/workspace/group_navigator.c 
b/src/bin/ui/workspace/group_navigator.c
index 1e5dc3e..ea10daf 100644
--- a/src/bin/ui/workspace/group_navigator.c
+++ b/src/bin/ui/workspace/group_navigator.c
@@ -1009,16 +1009,29 @@ _part_selected_cb(void *data,
   void *event_info)
 {
Part_List *pl = data;
+   Elm_Genlist_Item *glit;
Combobox_Item *item;
+   Edje_Part_Type type;
 
assert(pl != NULL);
 
item = elm_object_item_data_get(event_info);
pl->popup.copy_part = item->index;
if (item->index != 0)
- elm_object_disabled_set(pl->popup.combobox, true);
+ {
+type = edje_edit_part_type_get(pl->group->edit_object, 
elm_object_text_get(pl->popup.combobox_copy));
+elm_object_text_set(pl->popup.combobox, gm_part_type_text_get(type));
+elm_object_disabled_set(pl->popup.combobox, true);
+ }
else
- elm_object_disabled_set(pl->popup.combobox, false);
+ {
+glit = elm_genlist_first_item_get(pl->popup.combobox);
+item = elm_object_item_data_get(glit);
+elm_object_text_set(pl->popup.combobox, item->data);
+pl->popup.part_type = 0;
+
+elm_object_disabled_set(pl->popup.combobox, false);
+ }
 }
 
 static void

-- 




[EGIT] [tools/eflete] eflete-1.18 90/91: Revert "ewe_ruler: don't set labels text if marker position was changed"

2017-01-23 Thread Andrii Kroitor
rimmed pushed a commit to branch eflete-1.18.

http://git.enlightenment.org/tools/eflete.git/commit/?id=46c3fbe70711980be343a8f773f833a74217aa7a

commit 46c3fbe70711980be343a8f773f833a74217aa7a
Author: Andrii Kroitor <an.kroi...@samsung.com>
Date:   Tue Sep 20 18:53:54 2016 +0300

Revert "ewe_ruler: don't set labels text if marker position was changed"

This reverts commit c8c551619700ee2c29ce09bfb5bb0e0fe40df4be.

Because of this commit labels are not updated when scrolling ruler.
---
 src/lib/ewe_ruler.c | 9 +++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/src/lib/ewe_ruler.c b/src/lib/ewe_ruler.c
index fc8f5e4..1f05ad9 100644
--- a/src/lib/ewe_ruler.c
+++ b/src/lib/ewe_ruler.c
@@ -660,6 +660,7 @@ _ewe_ruler_marker_relative_set(Eo *obj,
  }
marker->rel_position = pos;
 
+   sd->text_changed = EINA_TRUE;
evas_object_smart_changed(obj);
return EINA_TRUE;
 }
@@ -700,6 +701,7 @@ _ewe_ruler_marker_absolute_set(Eo *obj,
  }
marker->abs_position = pos;
 
+   sd->text_changed = EINA_TRUE;
evas_object_smart_changed(obj);
return EINA_TRUE;
 }
@@ -738,6 +740,7 @@ _ewe_ruler_marker_visible_set(Eo *obj EINA_UNUSED,
  evas_object_hide(marker->obj);
else if (sd->ruler_visible)
  evas_object_show(marker->obj);
+   sd->text_changed = EINA_TRUE;
evas_object_smart_changed(obj);
return EINA_TRUE;
 }
@@ -969,8 +972,10 @@ _ewe_ruler_efl_canvas_group_group_calculate(Eo *obj 
EINA_UNUSED,
 sd->position_changed = EINA_FALSE;
  }
if (sd->text_changed)
- _set_labels(sd);
-   _place_markers(sd);
+ {
+_set_labels(sd);
+_place_markers(sd);
+ }
 }
 
 EOLIAN static Elm_Theme_Apply

-- 




[EGIT] [tools/eflete] eflete-1.18 55/91: project_manager: unset project from ap before closing it

2017-01-23 Thread Andrii Kroitor
rimmed pushed a commit to branch eflete-1.18.

http://git.enlightenment.org/tools/eflete.git/commit/?id=7f633b9db6bf5727c9b38949acd0dc4be3ff7fe8

commit 7f633b9db6bf5727c9b38949acd0dc4be3ff7fe8
Author: Andrii Kroitor <an.kroi...@samsung.com>
Date:   Mon Sep 12 19:20:16 2016 +0300

project_manager: unset project from ap before closing it
---
 src/bin/ui/project_close.c | 6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/bin/ui/project_close.c b/src/bin/ui/project_close.c
index ef95cd8..1339e6d 100644
--- a/src/bin/ui/project_close.c
+++ b/src/bin/ui/project_close.c
@@ -171,6 +171,7 @@ _popup_close_cb(void *data __UNUSED__,
 Eina_Bool
 project_close(void)
 {
+   Project *project_to_close;
Evas_Object *popup;
Eina_Stringshare *title;
 
@@ -194,8 +195,11 @@ project_close(void)
project_navigator_project_unset();
tabs_clean();
 
-   pm_project_close(ap.project);
+   /* some code in close project callback checks ap.project for NULL, so we 
need to
+  change it before closing project */
+   project_to_close = ap.project;
ap.project = NULL;
+   pm_project_close(project_to_close);
elm_layout_text_set(ap.win_layout, "eflete.project.time", _("Last saved: 
none"));
elm_layout_text_set(ap.win_layout, "eflete.project.part", _("Project path: 
none"));
 

-- 




[EGIT] [tools/eflete] eflete-1.18 74/91: project_manager: fix NULL pointer usage

2017-01-23 Thread Andrii Kroitor
rimmed pushed a commit to branch eflete-1.18.

http://git.enlightenment.org/tools/eflete.git/commit/?id=724e8cc2f3f00275e7bc893b6316604b68928589

commit 724e8cc2f3f00275e7bc893b6316604b68928589
Author: Andrii Kroitor <an.kroi...@samsung.com>
Date:   Thu Sep 15 14:55:45 2016 +0300

project_manager: fix NULL pointer usage

Fix svace WID 436492
---
 src/bin/project_manager/project_manager.c | 7 ++-
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/src/bin/project_manager/project_manager.c 
b/src/bin/project_manager/project_manager.c
index c4be47c..12a2788 100644
--- a/src/bin/project_manager/project_manager.c
+++ b/src/bin/project_manager/project_manager.c
@@ -185,15 +185,13 @@ Eina_Bool
 _build_script_write(const char *path)
 {
FILE *f;
-   Eina_Bool res = true;
Eina_Strbuf *buf;
 
f = fopen(path, "w");
if (!f)
  {
 ERR("Could't open file '%s'", path);
-res = false;
-goto exit;
+return false;
  }
 
buf = eina_strbuf_new();
@@ -203,9 +201,8 @@ _build_script_write(const char *path)
eina_strbuf_free(buf);
chmod(path, S_IRWXU|S_IRWXG|S_IROTH|S_IWOTH);
 
-exit:
fclose(f);
-   return res;
+   return true;
 }
 
 void

-- 




[EGIT] [tools/eflete] eflete-1.18 54/91: project_manager: fix use-after-free error

2017-01-23 Thread Andrii Kroitor
rimmed pushed a commit to branch eflete-1.18.

http://git.enlightenment.org/tools/eflete.git/commit/?id=9b8bed7548f360c679b16ccb0a117ee9f78260e4

commit 9b8bed7548f360c679b16ccb0a117ee9f78260e4
Author: Andrii Kroitor <an.kroi...@samsung.com>
Date:   Mon Sep 12 18:37:39 2016 +0300

project_manager: fix use-after-free error
---
 src/bin/project_manager/project_manager.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/bin/project_manager/project_manager.c 
b/src/bin/project_manager/project_manager.c
index 43220ca..47bd06a 100644
--- a/src/bin/project_manager/project_manager.c
+++ b/src/bin/project_manager/project_manager.c
@@ -690,8 +690,8 @@ pm_project_close(Project *project)
if (project->pro_fd != -1)
  close(project->pro_fd);
 #endif
-   free(project);
evas_object_smart_callback_call(ap.win, SIGNAL_PROJECT_CLOSED, NULL);
+   free(project);
 
return true;
 }

-- 




[EGIT] [tools/eflete] eflete-1.18 61/91: alloc: exit application on memory error

2017-01-23 Thread Andrii Kroitor
rimmed pushed a commit to branch eflete-1.18.

http://git.enlightenment.org/tools/eflete.git/commit/?id=471ea04bee2bd2da13c92ace66d2785d5d514d1e

commit 471ea04bee2bd2da13c92ace66d2785d5d514d1e
Author: Andrii Kroitor <an.kroi...@samsung.com>
Date:   Thu Sep 15 11:56:18 2016 +0300

alloc: exit application on memory error
---
 src/bin/alloc/alloc.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/bin/alloc/alloc.h b/src/bin/alloc/alloc.h
index 8b83610..6f9eb46 100644
--- a/src/bin/alloc/alloc.h
+++ b/src/bin/alloc/alloc.h
@@ -53,6 +53,7 @@ mem_malloc(size_t size)
  {
 CRIT(TERM_MESSAGE);
 app_shutdown();
+exit(EXIT_FAILURE);
  }
return mem_block;
 }

-- 




[EGIT] [tools/eflete] eflete-1.18 52/91: config: don't save too small window size

2017-01-23 Thread Andrii Kroitor
rimmed pushed a commit to branch eflete-1.18.

http://git.enlightenment.org/tools/eflete.git/commit/?id=6ac1f4e092477fc5e0628c698b6976ab86f6619e

commit 6ac1f4e092477fc5e0628c698b6976ab86f6619e
Author: Andrii Kroitor <an.kroi...@samsung.com>
Date:   Mon Sep 12 18:03:22 2016 +0300

config: don't save too small window size
---
 src/bin/config/config.c | 14 --
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/src/bin/config/config.c b/src/bin/config/config.c
index 80502d9..4fc9780 100644
--- a/src/bin/config/config.c
+++ b/src/bin/config/config.c
@@ -494,7 +494,7 @@ config_save(void)
int x, y, w, h;
Eet_File *ef;
Eina_Bool ok;
-   Eina_Stringshare *cfg, *tmp; 
+   Eina_Stringshare *cfg, *tmp;
 
if (!edd_base)
  {
@@ -503,12 +503,14 @@ config_save(void)
  }
 
evas_object_geometry_get(ap.win, , , , );
-   if (profile->general.save_win_pos)
+   TODO("find out why w/h here sometimes become close to 0");
+   if ((profile->general.save_win_pos) &&
+(w > 200 && h > 200)) /* don't write too small windwo size to config */
  {
-config->window.x =x;
-config->window.y =y;
-config->window.w =w;
-config->window.h =h;
+config->window.x = x;
+config->window.y = y;
+config->window.w = w;
+config->window.h = h;
  }
if (profile->general.save_ui)
  config_panes_sizes_data_update();

-- 




[EGIT] [tools/eflete] eflete-1.18 40/91: example: add map test

2017-01-23 Thread Andrii Kroitor
rimmed pushed a commit to branch eflete-1.18.

http://git.enlightenment.org/tools/eflete.git/commit/?id=efed397415253c58d77c4f136b4ce69628fb42a2

commit efed397415253c58d77c4f136b4ce69628fb42a2
Author: Andrii Kroitor <an.kroi...@samsung.com>
Date:   Wed Sep 7 13:38:29 2016 +0300

example: add map test
---
 example/example.edc | 17 +
 1 file changed, 17 insertions(+)

diff --git a/example/example.edc b/example/example.edc
index fcb1e10..96c2e9b 100644
--- a/example/example.edc
+++ b/example/example.edc
@@ -407,6 +407,23 @@ collections {
   }
}
 
+   group { "test/map";
+  inherit: "test/parts/all_part_types";
+  parts {
+ part { name: "rect";  description { state: "default" 0.0; map { 
on:1; rotation.z:45;} } }
+ part { name: "img";   description { state: "default" 0.0; map { 
on:1; rotation.z:45;} } }
+ part { name: "spacer";description { state: "default" 0.0; map { 
on:1; rotation.z:45;} } }
+ part { name: "swallow";   description { state: "default" 0.0; map { 
on:1; rotation.z:45;} } }
+ part { name: "text";  description { state: "default" 0.0; map { 
on:1; rotation.z:45;} } }
+ part { name: "tb";description { state: "default" 0.0; map { 
on:1; rotation.z:45;} } }
+ part { name: "group"; description { state: "default" 0.0; map { 
on:1; rotation.z:45;} } }
+ part { name: "proxy"; description { state: "default" 0.0; map { 
on:1; rotation.z:45;} } }
+ part { name: "box";   description { state: "default" 0.0; map { 
on:1; rotation.z:45;} } }
+ part { name: "external";  description { state: "default" 0.0; map { 
on:1; rotation.z:45;} } }
+ part { name: "table"; description { state: "default" 0.0; map { 
on:1; rotation.z:45;} } }
+  }
+   }
+
group { name: "test/wrong_files";
   parts {
  part { name: "click_me_not_a_sound"; type: TEXT;

-- 




[EGIT] [tools/eflete] eflete-1.18 12/91: popup: add async version

2017-01-23 Thread Andrii Kroitor
rimmed pushed a commit to branch eflete-1.18.

http://git.enlightenment.org/tools/eflete.git/commit/?id=91ad2fa7dc9bb85636387232127c52df7e9c859e

commit 91ad2fa7dc9bb85636387232127c52df7e9c859e
Author: Andrii Kroitor <an.kroi...@samsung.com>
Date:   Fri Sep 2 14:22:35 2016 +0300

popup: add async version
---
 src/bin/ui/main_window.h |   8 
 src/bin/ui/popup.c   | 104 +++
 2 files changed, 112 insertions(+)

diff --git a/src/bin/ui/main_window.h b/src/bin/ui/main_window.h
index 3112c7b..0213523 100644
--- a/src/bin/ui/main_window.h
+++ b/src/bin/ui/main_window.h
@@ -123,6 +123,7 @@ typedef Eina_Bool(* Popup_Validator_Func)(void *data);
  */
 typedef Evas_Object *(* Popup_Content_Get_Func)(void *data, Evas_Object 
**to_focus);
 
+#define POPUP_CLOSE_CB "POPUP_CLOSE_CB"
 /**
  * The fileselector helper callback.
  *
@@ -349,6 +350,13 @@ popup_want_action(const char *title,
   Popup_Validator_Func func,
   void *data);
 
+Evas_Object *
+popup_add(const char *title,
+  const char *msg,
+  Popup_Button popup_btns,
+  Popup_Content_Get_Func content_get,
+  void *data);
+
 void
 popup_active_helper_close(void *data,
   Evas *e,
diff --git a/src/bin/ui/popup.c b/src/bin/ui/popup.c
index f2cd32a..b8b29e5 100644
--- a/src/bin/ui/popup.c
+++ b/src/bin/ui/popup.c
@@ -191,6 +191,110 @@ popup_buttons_disabled_set(Popup_Button popup_btns, 
Eina_Bool disabled)
  elm_object_disabled_set(elm_object_part_content_get(ap.popup, "button2"), 
disabled);
 }
 
+/* async popup */
+#define POPUP_DATA "POPUP_DATA"
+typedef struct {
+   Evas_Object *popup;
+   struct {
+  Evas_Object *ok,
+  *cancel,
+  *save,
+  *dont_save,
+  *replace,
+  *append;
+   } button;
+} Popup_Data;
+
+static void
+_popup_del_job(void *data)
+{
+   Popup_Data *pd= data;
+   shortcuts_object_check_pop(pd->popup);
+   evas_object_del(pd->popup);
+   free(pd);
+}
+
+static void
+_popup_btn_cb(void *data,
+  Evas_Object *obj,
+  void *ei __UNUSED__)
+{
+   Popup_Data *pd = evas_object_data_get(obj, POPUP_DATA);
+
+   assert(pd != NULL);
+   assert(pd->popup != NULL);
+
+   ecore_job_add(_popup_del_job, pd);
+   evas_object_smart_callback_call(pd->popup, POPUP_CLOSE_CB, data);
+}
+
+static Evas_Object *
+_button_add(Popup_Data *pd, int *btn_pos, const char *text, Popup_Button pb)
+{
+   Evas_Object *btn;
+   static const char* position_name[] = { "button1", "button2", "button3" };
+
+   assert(pd != NULL);
+   assert(btn_pos != NULL);
+   assert(*btn_pos < 3); /* maximum buttons count */
+   assert(text != NULL);
+
+   if (!pb)
+ return NULL;
+
+   BUTTON_ADD(pd->popup, btn, text);
+   evas_object_data_set(btn, POPUP_DATA, pd);
+   evas_object_smart_callback_add(btn, "clicked", _popup_btn_cb, (void *)pb);
+   elm_object_part_content_set(pd->popup, position_name[*btn_pos], btn);
+   *btn_pos = *btn_pos + 1;
+
+   return btn;
+}
+
+Evas_Object *
+popup_add(const char *title,
+  const char *msg,
+  Popup_Button popup_btns,
+  Popup_Content_Get_Func content_get,
+  void *data)
+{
+   Popup_Data *pd;
+
+   /* only one content will be setted to popup: or message, or used content */
+   assert((msg != NULL) != (content_get != NULL));
+
+   pd = mem_calloc(1, sizeof(Popup_Data));
+   pd->popup = elm_popup_add(ap.win);
+   elm_popup_orient_set(pd->popup, ELM_POPUP_ORIENT_CENTER);
+   elm_object_part_text_set(pd->popup, "title,text", title);
+   elm_popup_content_text_wrap_type_set(pd->popup, ELM_WRAP_WORD);
+
+   int bt_num = 0;
+   pd->button.ok= _button_add(pd, _num, _("Ok"), popup_btns 
& BTN_OK);
+   pd->button.save  = _button_add(pd, _num, _("Save"),   popup_btns 
& BTN_SAVE);
+   pd->button.append= _button_add(pd, _num, _("Append"), popup_btns 
& BTN_APPEND);
+   pd->button.replace   = _button_add(pd, _num, _("Replace"),popup_btns 
& BTN_REPLACE);
+   pd->button.dont_save = _button_add(pd, _num, _("Don't save"), popup_btns 
& BTN_DONT_SAVE);
+   pd->button.cancel= _button_add(pd, _num, _("Cancel"), popup_btns 
& BTN_CANCEL);
+
+   if (msg)
+ elm_object_text_set(pd->popup, msg);
+   else /* content_get != NULL */
+ {
+Evas_Object *to_focus = NULL;
+Evas_Object *content = content_get(data, _focus);
+elm_object_content_set(pd->popup, content);
+if (to_focus)
+  elm_object_focus_set(to_focus, true);
+ }
+
+   shortcuts_object_push(pd->popup);
+   evas_object_show(pd->popup);
+
+   return pd->popup;
+}
+/* end of async popup */
+
 #if HAVE_TIZEN
 #define FS_W 510
 #define FS_H 500

-- 




[EGIT] [tools/eflete] eflete-1.18 76/91: property: fix color control breaking transparent colors

2017-01-23 Thread Andrii Kroitor
rimmed pushed a commit to branch eflete-1.18.

http://git.enlightenment.org/tools/eflete.git/commit/?id=8770e6b7c559aaf62ebe3c7c1b461828a69ae6a5

commit 8770e6b7c559aaf62ebe3c7c1b461828a69ae6a5
Author: Andrii Kroitor <an.kroi...@samsung.com>
Date:   Fri Sep 16 10:48:47 2016 +0300

property: fix color control breaking transparent colors
---
 src/bin/ui/property/property_color_control.c | 52 
 1 file changed, 45 insertions(+), 7 deletions(-)

diff --git a/src/bin/ui/property/property_color_control.c 
b/src/bin/ui/property/property_color_control.c
index de30212..50b5f7c 100644
--- a/src/bin/ui/property/property_color_control.c
+++ b/src/bin/ui/property/property_color_control.c
@@ -21,18 +21,24 @@
 #include "property_private.h"
 #include "main_window.h"
 
+typedef struct {
+   int r, g, b, a;
+} Color;
+#define COLOR_DATA "COLOR_DATA"
+
 static void
 _on_color_change(void *data,
  Evas_Object *obj,
  void *event_info __UNUSED__)
 {
-   int r, g, b, a;
+   Color *c;
Evas_Object *control = data;
 
assert(control != NULL);
 
-   elm_colorselector_color_get(obj, , , , );
-   property_color_control_color_set(control, r, g, b, a);
+   c = evas_object_data_get(control, COLOR_DATA);
+   elm_colorselector_color_get(obj, >r, >g, >b, >a);
+   property_color_control_color_set(control, c->r, c->g, c->b, c->a);
evas_object_smart_callback_call(control, "changed", NULL);
 }
 
@@ -70,10 +76,24 @@ _on_color_clicked(void *data __UNUSED__,
elm_object_scroll_freeze_push(control);
 }
 
+static void
+_color_free(void *data,
+Evas *e __UNUSED__,
+Evas_Object *obj __UNUSED__,
+void *event_info __UNUSED__)
+{
+   Color *c = data;
+
+   assert(c != NULL);
+
+   free(c);
+}
+
 Evas_Object *
 property_color_control_add(Evas_Object *parent)
 {
Evas_Object *control, *color;
+   Color *c;
 
assert(parent != NULL);
 
@@ -91,6 +111,10 @@ property_color_control_add(Evas_Object *parent)
   popup_active_helper_close,
   
(void*)(uintptr_t)POPUP_COLORSELECTOR_HELPER);
 
+   c = mem_calloc(1, sizeof(Color));
+   evas_object_data_set(control, COLOR_DATA, c);
+   evas_object_event_callback_add(control, EVAS_CALLBACK_FREE, _color_free, c);
+
return control;
 }
 
@@ -98,6 +122,7 @@ void
 property_color_control_color_set(Evas_Object *control, int r, int g, int b, 
int a)
 {
Evas_Object *color;
+   Color *c;
 
assert(control != NULL);
assert((r >= 0) && (r <= 255));
@@ -105,6 +130,15 @@ property_color_control_color_set(Evas_Object *control, int 
r, int g, int b, int
assert((b >= 0) && (b <= 255));
assert((a >= 0) && (a <= 255));
 
+   c = evas_object_data_get(control, COLOR_DATA);
+
+   assert(c != NULL);
+
+   c->r = r;
+   c->g = g;
+   c->b = b;
+   c->a = a;
+
color = elm_layout_content_get(control, NULL);
evas_color_argb_premul(a, , , );
evas_object_color_set(color, r, g, b, a);
@@ -113,10 +147,14 @@ property_color_control_color_set(Evas_Object *control, 
int r, int g, int b, int
 void
 property_color_control_color_get(Evas_Object *control, int *r, int *g, int *b, 
int *a)
 {
-   Evas_Object *color;
-
assert(control != NULL);
 
-   color = elm_layout_content_get(control, NULL);
-   evas_object_color_get(color, r, g, b, a);
+   Color *color = evas_object_data_get(control, COLOR_DATA);
+
+   assert(color != NULL);
+
+   *r = color->r;
+   *g = color->g;
+   *b = color->b;
+   *a = color->a;
 }

-- 




[EGIT] [tools/eflete] eflete-1.18 69/91: live_frame: fix dead assignment

2017-01-23 Thread Andrii Kroitor
rimmed pushed a commit to branch eflete-1.18.

http://git.enlightenment.org/tools/eflete.git/commit/?id=f3b839b0725e1830c0cbd8f5183587f559e09822

commit f3b839b0725e1830c0cbd8f5183587f559e09822
Author: Andrii Kroitor <an.kroi...@samsung.com>
Date:   Thu Sep 15 12:58:20 2016 +0300

live_frame: fix dead assignment

Fix svace WID 436592
---
 src/bin/ui/live_view/elementary/live_frame.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/src/bin/ui/live_view/elementary/live_frame.c 
b/src/bin/ui/live_view/elementary/live_frame.c
index a042bc8..b87b43d 100644
--- a/src/bin/ui/live_view/elementary/live_frame.c
+++ b/src/bin/ui/live_view/elementary/live_frame.c
@@ -39,7 +39,6 @@ _on_frame_swallow_check(void *data __UNUSED__,
{
   content = elm_object_part_content_unset(frame_obj, 
part->name);
   evas_object_del(content);
-  content = NULL;
   part->object = NULL;
}
 

-- 




[EGIT] [tools/eflete] eflete-1.18 60/91: group_navigator: fix incorrect cast on part_item selection

2017-01-23 Thread Andrii Kroitor
rimmed pushed a commit to branch eflete-1.18.

http://git.enlightenment.org/tools/eflete.git/commit/?id=c6dfc678694955a4e5b01d5fd735283d4e9990a1

commit c6dfc678694955a4e5b01d5fd735283d4e9990a1
Author: Andrii Kroitor <an.kroi...@samsung.com>
Date:   Tue Sep 13 17:25:34 2016 +0300

group_navigator: fix incorrect cast on part_item selection
---
 src/bin/ui/workspace/group_navigator.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/bin/ui/workspace/group_navigator.c 
b/src/bin/ui/workspace/group_navigator.c
index 950..4f91870 100644
--- a/src/bin/ui/workspace/group_navigator.c
+++ b/src/bin/ui/workspace/group_navigator.c
@@ -738,7 +738,7 @@ _selected_cb(void *data,
 if (pl->group->current_selected->resource_type == RESOURCE_TYPE_PART)
   {
  pl->part = (Part *)pl->group->current_selected;
- evas_object_smart_callback_call(pl->layout, 
SIGNAL_GROUP_NAVIGATOR_PART_SELECTED, pl->group->current_selected);
+ evas_object_smart_callback_call(pl->layout, 
SIGNAL_GROUP_NAVIGATOR_PART_SELECTED, pl->part);
 #if HAVE_TIZEN
  Evas_Object *check = elm_object_item_part_content_get(glit, 
"elm.swallow.icon");
  if (check)
@@ -748,7 +748,7 @@ _selected_cb(void *data,
 else if (pl->group->current_selected->resource_type == 
RESOURCE_TYPE_STATE)
   {
  pl->part = ((State *)pl->group->current_selected)->part;
- evas_object_smart_callback_call(pl->layout, 
SIGNAL_GROUP_NAVIGATOR_PART_SELECTED, ((State 
*)pl->group->current_selected)->part);
+ evas_object_smart_callback_call(pl->layout, 
SIGNAL_GROUP_NAVIGATOR_PART_SELECTED, pl->part);
  state = elm_object_item_data_get(glit);
  
CRIT_ON_FAIL(editor_part_selected_state_set(pl->group->edit_object, NULL, 
false, true,
  state->part->name,
@@ -758,7 +758,7 @@ _selected_cb(void *data,
 else if (pl->group->current_selected->resource_type == 
RESOURCE_TYPE_ITEM)
   {
  pl->part = ((Part_Item *)pl->group->current_selected)->part;
- evas_object_smart_callback_call(pl->layout, 
SIGNAL_GROUP_NAVIGATOR_PART_SELECTED, ((State 
*)pl->group->current_selected)->part);
+ evas_object_smart_callback_call(pl->layout, 
SIGNAL_GROUP_NAVIGATOR_PART_SELECTED, pl->part);
   }
 else
   evas_object_smart_callback_call(pl->layout, 
SIGNAL_GROUP_NAVIGATOR_PART_SELECTED, NULL);

-- 




[EGIT] [tools/eflete] eflete-1.18 77/91: signals: refactor shortcuts signals

2017-01-23 Thread Andrii Kroitor
rimmed pushed a commit to branch eflete-1.18.

http://git.enlightenment.org/tools/eflete.git/commit/?id=7478d9ab1e6b520e9743fbbe1802af9b98f30c6e

commit 7478d9ab1e6b520e9743fbbe1802af9b98f30c6e
Author: Andrii Kroitor <an.kroi...@samsung.com>
Date:   Fri Sep 16 13:41:11 2016 +0300

signals: refactor shortcuts signals
---
 src/bin/Makefile.am  |   1 +
 src/bin/common/signals.c |  83 
 src/bin/common/signals.h | 114 +--
 src/bin/ui/main_window.c |   4 +-
 src/bin/ui/project_navigator.c   |   4 +-
 src/bin/ui/shortcuts/shortcuts.c | 103 ++-
 src/bin/ui/tabs.c|  56 +--
 7 files changed, 232 insertions(+), 133 deletions(-)

diff --git a/src/bin/Makefile.am b/src/bin/Makefile.am
index 3e2f0c6..c6a21c0 100644
--- a/src/bin/Makefile.am
+++ b/src/bin/Makefile.am
@@ -60,6 +60,7 @@ noinst_LIBRARIES = libete.a
 libete_a_SOURCES = \
 ../../src/bin/eflete.c \
 ../../src/bin/common/string_common.c \
+../../src/bin/common/signals.c \
 ../../src/bin/common/validator.c \
 ../../src/bin/common/widget_list.c \
 ../../src/bin/project_manager/group_manager.c \
diff --git a/src/bin/common/signals.c b/src/bin/common/signals.c
new file mode 100644
index 000..c863b81
--- /dev/null
+++ b/src/bin/common/signals.c
@@ -0,0 +1,83 @@
+/*
+ * Edje Theme Editor
+ * Copyright (C) 2013-2014 Samsung Electronics.
+ *
+ * This file is part of Edje Theme Editor.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; If not, see www.gnu.org/licenses/lgpl.html.
+ */
+
+#include "history.h"
+#include "signals.h"
+
+const Signals signals = {
+ .shortcut = {
+  .del  = "signal.shortcut.del",
+  .help = "signal.shortcut.help",
+  .quit = "signal.shortcut.quit",
+  .save = "signal.shortcut.save",
+  .add = {
+   .data_item   = "signal.shortcut.add.data_item",
+   .group   = "signal.shortcut.add.group",
+   .item= "signal.shortcut.add.item",
+   .part= "signal.shortcut.add.part",
+   .program = "signal.shortcut.add.program",
+   .state   = "signal.shortcut.add.state",
+  },
+  .history = {
+   .redo= "signal.shortcut.history.redo",
+   .undo= "signal.shortcut.history.undo",
+  },
+  .manager = {
+   .color_class = "signal.shortcut.manager.color_class",
+   .image   = "signal.shortcut.manager.image",
+   .sound   = "signal.shortcut.manager.sound",
+   .style   = "signal.shortcut.manager.style",
+  },
+  .popup = {
+   .cancel  = "signal.shortcut.popup.cancel",
+   .done= "signal.shortcut.popup.done",
+  },
+  .tab = {
+   .close   = "signal.shortcut.tab.close",
+   .next= "signal.shortcut.tab.next",
+   .prev= "signal.shortcut.tab.prev",
+   .num = "signal.shortcut.tab.num",
+  },
+  .workspace = {
+   .fill= "signal.shortcut.workspace.fill",
+   .mode = {
+.code   = "signal.shortcut.workspace.mode.code",
+.demo   = "signal.shortcut.workspace.mode.demo",
+.normal = "signal.shortcut.workspace.mode.normal",
+   },
+   .show_hide = {
+.object_area= 
"signal.shortcut.workspace.show_hide.object_area",
+.part   = 
"signal.shortcut.workspace.show_hide.part",
+.all_parts  = 
"signal.shortcut.workspace.show_hide.all_parts",
+.rulers = 
"signal.shortcut.workspace.s

[EGIT] [tools/eflete] eflete-1.18 56/91: property: remove callbacks before freeing the data

2017-01-23 Thread Andrii Kroitor
rimmed pushed a commit to branch eflete-1.18.

http://git.enlightenment.org/tools/eflete.git/commit/?id=904133a828e5a00e0a6850948d1e47259e96c4c1

commit 904133a828e5a00e0a6850948d1e47259e96c4c1
Author: Andrii Kroitor <an.kroi...@samsung.com>
Date:   Mon Sep 12 19:20:45 2016 +0300

property: remove callbacks before freeing the data
---
 src/bin/ui/property/property.c | 14 --
 1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/src/bin/ui/property/property.c b/src/bin/ui/property/property.c
index a4c6400..ca38bde 100644
--- a/src/bin/ui/property/property.c
+++ b/src/bin/ui/property/property.c
@@ -178,15 +178,25 @@ _unrealized_cb(void *data,
elm_object_focus_set(pd->genlist, true);
 }
 
-void
+static void
 _property_del(void *data,
   Evas *e __UNUSED__,
   Evas_Object *obj __UNUSED__,
   void *event_info __UNUSED__)
 {
-   Property_Mode *pd = (Property_Mode *)data;
+   Property_Data *pd = (Property_Data *)data;
 
property_group_del();
+
+   /* We need to delete all calbacks here because some of them could be 
triggered
+  later (i.e. unrealize_cb) and have incorrect data */
+   evas_object_smart_callback_del(pd->genlist, "expand,request", 
_expand_request_cb);
+   evas_object_smart_callback_del(pd->genlist, "contract,request", 
_contract_request_cb);
+   evas_object_smart_callback_del(pd->genlist, "expanded", _expanded_cb);
+   evas_object_smart_callback_del(pd->genlist, "contracted", _contracted_cb);
+   evas_object_smart_callback_del(pd->genlist, "realized", _realized_cb);
+   evas_object_smart_callback_del(pd->genlist, "unrealized", _unrealized_cb);
+
free(pd);
 }
 

-- 




[EGIT] [tools/eflete] eflete-1.18 20/91: group_navigator: use async popup for program add

2017-01-23 Thread Andrii Kroitor
rimmed pushed a commit to branch eflete-1.18.

http://git.enlightenment.org/tools/eflete.git/commit/?id=d2886b697217922c5977c4eb9132029fa72da549

commit d2886b697217922c5977c4eb9132029fa72da549
Author: Andrii Kroitor <an.kroi...@samsung.com>
Date:   Fri Sep 2 16:41:17 2016 +0300

group_navigator: use async popup for program add
---
 src/bin/ui/workspace/group_navigator.c | 39 +-
 1 file changed, 15 insertions(+), 24 deletions(-)

diff --git a/src/bin/ui/workspace/group_navigator.c 
b/src/bin/ui/workspace/group_navigator.c
index 2e6555d..3317c89 100644
--- a/src/bin/ui/workspace/group_navigator.c
+++ b/src/bin/ui/workspace/group_navigator.c
@@ -888,12 +888,12 @@ _program_validate(void *data,
 
if (resource_name_validator_status_get(pl->program_name_validator) != 
ELM_REG_NOERROR)
  {
-   popup_buttons_disabled_set(BTN_OK, true);
+   popup_button_disabled_set(pl->popup_win, BTN_OK, true);
elm_object_signal_emit(obj, "validation,default,fail", "elm");
  }
else
  {
-   popup_buttons_disabled_set(BTN_OK, false);
+   popup_button_disabled_set(pl->popup_win, BTN_OK, false);
elm_object_signal_emit(obj, "validation,default,pass", "elm");
  }
 }
@@ -1576,10 +1576,13 @@ _on_menu_add_item_clicked(void *data __UNUSED__,
 }
 
 static void
-_popup_add_program_ok_clicked(void *data,
-  Evas_Object *obj __UNUSED__,
-  void *event_info __UNUSED__)
+_popup_add_program_close_cb(void *data,
+Evas_Object *obj __UNUSED__,
+void *event_info)
 {
+   Popup_Button pb = (Popup_Button) event_info;
+   if (pb != BTN_OK) return;
+
Edje_Action_Type type = EDJE_ACTION_TYPE_NONE;
Part_List *pl = data;
const char *name;
@@ -1630,20 +1633,9 @@ _popup_add_program_ok_clicked(void *data,
 
history_change_add(pl->group->history, change);
eina_stringshare_del(msg);
-   evas_object_del(pl->popup.box);
 }
 
-Eina_Bool
-_popup_add_program_validator(void *data)
-{
-   Part_List *pl = (Part_List *) data;
-   _popup_add_program_ok_clicked(data, NULL, NULL);
-   if (resource_name_validator_status_get(pl->program_name_validator) != 
ELM_REG_NOERROR)
- return false;
-   return true;
-}
-
-Evas_Object *
+static Evas_Object *
 _add_program_content_get(void *data, Evas_Object **to_focus)
 {
Part_List *pl = (Part_List *) data;
@@ -1651,7 +1643,7 @@ _add_program_content_get(void *data, Evas_Object 
**to_focus)
unsigned int i = 0;
Combobox_Item *combobox_item;
 
-   BOX_ADD(ap.popup, box, false, false);
+   BOX_ADD(ap.win, box, false, false);
elm_box_padding_set(box, 0, 10);
 
LAYOUT_PROP_ADD(box, _("Program name"), "popup", "1swallow")
@@ -1684,7 +1676,6 @@ _add_program_content_get(void *data, Evas_Object 
**to_focus)
elm_box_pack_end(box, item);
pl->popup.box = box;
if (to_focus) *to_focus = pl->popup.entry_name;
-   popup_buttons_disabled_set(BTN_OK, true);
 
return pl->popup.box;
 }
@@ -1700,12 +1691,12 @@ _on_menu_add_program_clicked(void *data __UNUSED__,
assert(pl != NULL);
 
title = eina_stringshare_add(_("Add New Program"));
-   Popup_Button button = popup_want_action(title, NULL, 
_add_program_content_get,
-   BTN_OK | BTN_CANCEL,
-   _popup_add_program_validator, pl);
+   pl->popup_win = popup_add(title, NULL,
+ BTN_OK | BTN_CANCEL,
+ _add_program_content_get, pl);
+   evas_object_smart_callback_add(pl->popup_win, POPUP_CLOSE_CB, 
_popup_add_program_close_cb, pl);
+   popup_button_disabled_set(pl->popup_win, BTN_OK, true);
 
-   if (button == BTN_CANCEL)
- evas_object_del(pl->popup.box);
eina_stringshare_del(title);
 }
 

-- 




[EGIT] [tools/eflete] eflete-1.18 75/91: project_common: fix memory leak

2017-01-23 Thread Andrii Kroitor
rimmed pushed a commit to branch eflete-1.18.

http://git.enlightenment.org/tools/eflete.git/commit/?id=b7ff3d3d8e051e762946582cd34d91ad0a422807

commit b7ff3d3d8e051e762946582cd34d91ad0a422807
Author: Andrii Kroitor <an.kroi...@samsung.com>
Date:   Thu Sep 15 15:14:22 2016 +0300

project_common: fix memory leak

Fix svace WID 436687
---
 src/bin/ui/project_common.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/bin/ui/project_common.c b/src/bin/ui/project_common.c
index 1a8933f..af64cc2 100644
--- a/src/bin/ui/project_common.c
+++ b/src/bin/ui/project_common.c
@@ -83,6 +83,7 @@ exist_permission_check(const char *path, const char *name,
 eina_strbuf_append_printf(buf_msg, _("Haven't permision to write 
'%s'"), path);
 popup_add(title, eina_strbuf_string_get(buf_msg), BTN_OK, NULL, NULL);
 eina_strbuf_free(buf_msg);
+free(pcd);
 return false;
  }
pcd->buf = eina_strbuf_new();

-- 




[EGIT] [tools/eflete] eflete-1.18 18/91: group_navigator: use async popup for state add

2017-01-23 Thread Andrii Kroitor
rimmed pushed a commit to branch eflete-1.18.

http://git.enlightenment.org/tools/eflete.git/commit/?id=060779e42a18d3f38da0c248c4dadb02b4f9d558

commit 060779e42a18d3f38da0c248c4dadb02b4f9d558
Author: Andrii Kroitor <an.kroi...@samsung.com>
Date:   Fri Sep 2 16:28:13 2016 +0300

group_navigator: use async popup for state add
---
 src/bin/ui/workspace/group_navigator.c | 40 +-
 1 file changed, 15 insertions(+), 25 deletions(-)

diff --git a/src/bin/ui/workspace/group_navigator.c 
b/src/bin/ui/workspace/group_navigator.c
index c4658ba..fa84b41 100644
--- a/src/bin/ui/workspace/group_navigator.c
+++ b/src/bin/ui/workspace/group_navigator.c
@@ -808,12 +808,12 @@ _state_validate(void *data,
if ((elm_validator_regexp_status_get(pl->name_validator) != 
ELM_REG_NOERROR) ||
(edje_edit_state_exist(pl->group->edit_object, pl->part->name, name, 
val)))
  {
-   popup_buttons_disabled_set(BTN_OK, true);
+   popup_button_disabled_set(pl->popup_win, BTN_OK, true);
elm_object_signal_emit(obj, "validation,default,fail", "elm");
  }
else
  {
-   popup_buttons_disabled_set(BTN_OK, false);
+   popup_button_disabled_set(pl->popup_win, BTN_OK, false);
elm_object_signal_emit(obj, "validation,default,pass", "elm");
  }
 }
@@ -1264,10 +1264,13 @@ _on_menu_add_group_data_clicked(void *data __UNUSED__,
 }
 
 static void
-_popup_add_state_ok_clicked(void *data,
-Evas_Object *obj __UNUSED__,
-void *event_info __UNUSED__)
+_popup_add_state_close_cb(void *data,
+  Evas_Object *obj __UNUSED__,
+  void *event_info)
 {
+   Popup_Button pb = (Popup_Button)event_info;
+   if (pb != BTN_OK) return;
+
Part_List *pl = data;
const char *name;
double val;
@@ -1310,18 +1313,6 @@ _popup_add_state_ok_clicked(void *data,
 
history_change_add(pl->group->history, change);
eina_stringshare_del(msg);
-   evas_object_del(pl->popup.box);
-}
-
-Eina_Bool
-_popup_add_state_validator(void *data)
-{
-   Part_List *pl = (Part_List *) data;
-   _popup_add_state_ok_clicked(data, NULL, NULL);
-
-   if (elm_validator_regexp_status_get(pl->name_validator) != ELM_REG_NOERROR)
- return false;
-   return true;
 }
 
 void
@@ -1361,7 +1352,7 @@ group_navigator_part_state_add(Evas_Object *obj, Part 
*part, State *state)
  }
 }
 
-Evas_Object *
+static Evas_Object *
 _add_state_content_get(void *data, Evas_Object **to_focus)
 {
Part_List *pl = (Part_List *)data;
@@ -1372,7 +1363,7 @@ _add_state_content_get(void *data, Evas_Object **to_focus)
Combobox_Item *combobox_item;
unsigned int i = 0;
 
-   BOX_ADD(ap.popup, box, false, false);
+   BOX_ADD(ap.win, box, false, false);
elm_box_padding_set(box, 0, 10);
 
LAYOUT_PROP_ADD(box, _("State name"), "popup", "1swallow");
@@ -1424,7 +1415,6 @@ _add_state_content_get(void *data, Evas_Object **to_focus)
elm_box_pack_end(box, item);
 
if (to_focus) *to_focus = pl->popup.entry_name;
-   popup_buttons_disabled_set(BTN_OK, true);
pl->popup.box = box;
return box;
 }
@@ -1440,12 +1430,12 @@ _on_menu_add_state_clicked(void *data __UNUSED__,
assert(pl->part != NULL);
 
title = eina_stringshare_printf(_("Add New State to Part \"%s\""), 
pl->part->name);
-   Popup_Button button = popup_want_action(title, NULL, _add_state_content_get,
-   BTN_OK | BTN_CANCEL,
-   _popup_add_state_validator, pl);
+   pl->popup_win = popup_add(title, NULL,
+ BTN_OK | BTN_CANCEL,
+ _add_state_content_get, pl);
+   evas_object_smart_callback_add(pl->popup_win, POPUP_CLOSE_CB, 
_popup_add_state_close_cb, pl);
+   popup_button_disabled_set(pl->popup_win, BTN_OK, true);
 
-   if (button == BTN_CANCEL)
- evas_object_del(pl->popup.box);
eina_stringshare_del(title);
 }
 

-- 




[EGIT] [tools/eflete] eflete-1.18 24/91: project_navigator: use async popup for group del

2017-01-23 Thread Andrii Kroitor
rimmed pushed a commit to branch eflete-1.18.

http://git.enlightenment.org/tools/eflete.git/commit/?id=42c19c548043addeffb46ec76bd74ca3b686653d

commit 42c19c548043addeffb46ec76bd74ca3b686653d
Author: Andrii Kroitor <an.kroi...@samsung.com>
Date:   Mon Sep 5 12:17:40 2016 +0300

project_navigator: use async popup for group del
---
 src/bin/ui/project_navigator.c | 71 +-
 1 file changed, 49 insertions(+), 22 deletions(-)

diff --git a/src/bin/ui/project_navigator.c b/src/bin/ui/project_navigator.c
index 11b335e..fda1e7d 100644
--- a/src/bin/ui/project_navigator.c
+++ b/src/bin/ui/project_navigator.c
@@ -592,24 +592,62 @@ _group_del(void *data __UNUSED__,
 }
 
 static void
+_folder_del_popup_close_cb(void *data,
+   Evas_Object *obj __UNUSED__,
+   void *event_info)
+{
+   Elm_Object_Item *glit = data;
+   Popup_Button btn_res = (Popup_Button) event_info;
+
+   if (BTN_CANCEL == btn_res) return;
+
+   _folder_del(elm_object_item_data_get(glit));
+   elm_object_disabled_set(project_navigator.btn_del, true);
+}
+
+static void
+_group_del_popup_close_cb(void *data,
+  Evas_Object *obj __UNUSED__,
+  void *event_info)
+{
+   Eina_Stringshare *tmp, *msg;
+   Group *group = data;
+   Popup_Button btn_res = (Popup_Button) event_info;
+
+   if (BTN_CANCEL == btn_res) return;
+
+   tmp = eina_stringshare_add(group->name);
+   if (editor_group_del(ap.project->global_object, tmp))
+ gm_group_del(ap.project, group);
+   else
+ {
+msg = eina_stringshare_printf(_("Can't delete layout \"%s\""), 
group->name);
+popup_add(_("Error"), msg, BTN_OK, NULL, NULL);
+eina_stringshare_del(msg);
+return;
+ }
+   eina_stringshare_del(tmp);
+
+   elm_object_disabled_set(project_navigator.btn_del, true);
+}
+
+static void
 _btn_del_group_cb(void *data __UNUSED__,
   Evas_Object *obj __UNUSED__,
   void *event_info __UNUSED__)
 {
-   Popup_Button btn_res;
Group *group;
+   Evas_Object *popup;
Elm_Object_Item *glit;
-   Eina_Stringshare *tmp, *msg;
 
glit = elm_genlist_selected_item_get(project_navigator.genlist);
if (elm_genlist_item_type_get(glit) == ELM_GENLIST_ITEM_TREE)
  {
-btn_res = popup_want_action(_("Confirm delete layouts"),
-_("Are you sure you want to delete the 
selected layouts?"
-  "All aliases will be delete too."),
-NULL, BTN_OK|BTN_CANCEL, NULL, NULL);
-if (BTN_CANCEL == btn_res) return;
-_folder_del(elm_object_item_data_get(glit));
+popup = popup_add(_("Confirm delete layouts"),
+  _("Are you sure you want to delete the selected 
layouts?"
+"All aliases will be delete too."),
+  BTN_OK|BTN_CANCEL, NULL, NULL);
+evas_object_smart_callback_add(popup, POPUP_CLOSE_CB, 
_folder_del_popup_close_cb, glit);
  }
else
  {
@@ -624,23 +662,12 @@ _btn_del_group_cb(void *data __UNUSED__,
BTN_CANCEL, NULL, NULL);
  return;
   }
-btn_res = popup_want_action(_("Confirm delete layout"),
+popup = popup_add(_("Confirm delete layout"),
 _("Are you sure you want to delete the 
selected layout?"
   "All aliases will be delete too."),
-NULL, BTN_OK|BTN_CANCEL, NULL, NULL);
-if (BTN_CANCEL == btn_res) return;
-tmp = eina_stringshare_add(group->name);
-if (editor_group_del(ap.project->global_object, tmp))
-  gm_group_del(ap.project, group);
-else
-  {
- msg = eina_stringshare_printf(_("Can't delete layout \"%s\""), 
group->name);
- popup_want_action(_("Error"), msg, NULL, BTN_OK, NULL, NULL);
- eina_stringshare_del(msg);
-  }
-eina_stringshare_del(tmp);
+BTN_OK|BTN_CANCEL, NULL, NULL);
+evas_object_smart_callback_add(popup, POPUP_CLOSE_CB, 
_group_del_popup_close_cb, group);
  }
-   elm_object_disabled_set(project_navigator.btn_del, true);
 }
 
 static void

-- 




[EGIT] [tools/eflete] eflete-1.18 65/91: popup: fix enum check

2017-01-23 Thread Andrii Kroitor
rimmed pushed a commit to branch eflete-1.18.

http://git.enlightenment.org/tools/eflete.git/commit/?id=e27da97fd6899d3b29d4b15f2eda564353a120f6

commit e27da97fd6899d3b29d4b15f2eda564353a120f6
Author: Andrii Kroitor <an.kroi...@samsung.com>
Date:   Thu Sep 15 12:24:40 2016 +0300

popup: fix enum check

Fix svace WID 436596
---
 src/bin/ui/popup.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/bin/ui/popup.c b/src/bin/ui/popup.c
index 77a7b2d..7d262a4 100644
--- a/src/bin/ui/popup.c
+++ b/src/bin/ui/popup.c
@@ -113,7 +113,7 @@ _button_add(Popup_Data *pd, int *btn_pos, const char *text, 
Popup_Button pb)
assert(*btn_pos < 3); /* maximum buttons count */
assert(text != NULL);
 
-   if (!pb)
+   if (pb == BTN_NONE)
  return NULL;
 
BUTTON_ADD(pd->popup, btn, text);

-- 




[EGIT] [tools/eflete] eflete-1.18 59/91: tabs: fix lost object after closing home tab

2017-01-23 Thread Andrii Kroitor
rimmed pushed a commit to branch eflete-1.18.

http://git.enlightenment.org/tools/eflete.git/commit/?id=e90dda18a3b21635956eed5d428343df923d2c3b

commit e90dda18a3b21635956eed5d428343df923d2c3b
Author: Andrii Kroitor <an.kroi...@samsung.com>
Date:   Tue Sep 13 17:03:48 2016 +0300

tabs: fix lost object after closing home tab
---
 src/bin/ui/tabs.c | 15 +++
 1 file changed, 15 insertions(+)

diff --git a/src/bin/ui/tabs.c b/src/bin/ui/tabs.c
index 945c15c..4b5dc1d 100644
--- a/src/bin/ui/tabs.c
+++ b/src/bin/ui/tabs.c
@@ -1110,6 +1110,7 @@ _tab_close(void *data,
_del_tab(item);
if (tabs.selected == it)
  {
+tabs.selected = NULL;
 content = elm_layout_content_unset(ap.panes.left_ver, "right");
 evas_object_hide(content);
 elm_layout_content_set(ap.panes.left_ver, "right", 
workspace_group_navigator_get(NULL));
@@ -1150,6 +1151,19 @@ tabs_tab_add(Group *group)
tabs.items = eina_list_append(tabs.items, item);
 }
 
+static void
+_tab_home_del(void *data __UNUSED__,
+  Evas *e __UNUSED__,
+  Evas_Object *obj __UNUSED__,
+  void *event_info __UNUSED__)
+{
+   evas_object_del(tabs.home.content_open_project);
+   evas_object_del(tabs.home.content_new_project);
+   evas_object_del(tabs.home.content_import_edj);
+   evas_object_del(tabs.home.content_import_edc);
+   evas_object_del(tabs.home.content_project_info);
+}
+
 void
 tabs_home_tab_add(Tabs_Menu view)
 {
@@ -1169,6 +1183,7 @@ tabs_home_tab_add(Tabs_Menu view)
evas_object_show(scroller);
 
tabs.home.content = elm_layout_add(ap.win);
+   evas_object_event_callback_add(tabs.home.content, EVAS_CALLBACK_DEL, 
_tab_home_del, NULL);
elm_layout_theme_set(tabs.home.content, "layout", "tab_home", "default");
tabs.home.tabs = elm_toolbar_add(tabs.home.content);
elm_layout_content_set(tabs.home.content, "elm.swallow.toolbar", 
tabs.home.tabs);

-- 




[EGIT] [tools/eflete] eflete-1.18 71/91: project_manager_export_resources: fix eina_lock_take result check

2017-01-23 Thread Andrii Kroitor
rimmed pushed a commit to branch eflete-1.18.

http://git.enlightenment.org/tools/eflete.git/commit/?id=97b42c22413f631282c24d1b85d3b330f0f87a76

commit 97b42c22413f631282c24d1b85d3b330f0f87a76
Author: Andrii Kroitor <an.kroi...@samsung.com>
Date:   Thu Sep 15 13:12:11 2016 +0300

project_manager_export_resources: fix eina_lock_take result check

Fix svace WID 436588, 436636, 436639, 436683
---
 src/bin/project_manager/project_manager_export_resources.c | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/bin/project_manager/project_manager_export_resources.c 
b/src/bin/project_manager/project_manager_export_resources.c
index deed8c6..8de585a 100644
--- a/src/bin/project_manager/project_manager_export_resources.c
+++ b/src/bin/project_manager/project_manager_export_resources.c
@@ -117,7 +117,7 @@ void
 _image_resources_feedback_job(void *data, Ecore_Thread *th)
 {
Feedback_Thread_Data *ftd = (Feedback_Thread_Data *)data;
-   if (!eina_lock_take(>mutex))
+   if (eina_lock_take(>mutex) != EINA_LOCK_SUCCEED)
  {
ERR("Failed access data");
ecore_thread_cancel(th);
@@ -234,7 +234,7 @@ void
 _sound_resources_feedback_job(void *data, Ecore_Thread *th)
 {
Feedback_Thread_Data *ftd = (Feedback_Thread_Data *)data;
-   if (!eina_lock_take(>mutex))
+   if (eina_lock_take(>mutex) != EINA_LOCK_SUCCEED)
  {
ERR("Failed access data");
ecore_thread_cancel(th);
@@ -320,7 +320,7 @@ void
 _font_resources_feedback_job(void *data, Ecore_Thread *th)
 {
Feedback_Thread_Data *ftd = (Feedback_Thread_Data *)data;
-   if (!eina_lock_take(>mutex))
+   if (eina_lock_take(>mutex) != EINA_LOCK_SUCCEED)
  {
ERR("Failed access data");
ecore_thread_cancel(th);
@@ -414,7 +414,7 @@ void
 _tones_resources_feedback_job(void *data, Ecore_Thread *th)
 {
Feedback_Thread_Data *ftd = (Feedback_Thread_Data *)data;
-   if (!eina_lock_take(>mutex))
+   if (eina_lock_take(>mutex) != EINA_LOCK_SUCCEED)
  {
ERR("Failed access data");
ecore_thread_cancel(th);
@@ -461,7 +461,7 @@ void
 _colorclasses_resources_feedback_job(void *data, Ecore_Thread *th)
 {
Feedback_Thread_Data *ftd = (Feedback_Thread_Data *)data;
-   if (!eina_lock_take(>mutex))
+   if (eina_lock_take(>mutex) != EINA_LOCK_SUCCEED)
  {
ERR("Failed access data");
ecore_thread_cancel(th);
@@ -518,7 +518,7 @@ void
 _styles_resources_feedback_job(void *data, Ecore_Thread *th)
 {
Feedback_Thread_Data *ftd = (Feedback_Thread_Data *)data;
-   if (!eina_lock_take(>mutex))
+   if (eina_lock_take(>mutex) != EINA_LOCK_SUCCEED)
  {
ERR("Failed access data");
ecore_thread_cancel(th);

-- 




[EGIT] [tools/eflete] eflete-1.18 16/91: group_navigator: use async popup for part add

2017-01-23 Thread Andrii Kroitor
rimmed pushed a commit to branch eflete-1.18.

http://git.enlightenment.org/tools/eflete.git/commit/?id=fc64cd0b3e6dd56e829c282fc4f7d36b88ab4da3

commit fc64cd0b3e6dd56e829c282fc4f7d36b88ab4da3
Author: Andrii Kroitor <an.kroi...@samsung.com>
Date:   Fri Sep 2 16:04:46 2016 +0300

group_navigator: use async popup for part add
---
 src/bin/ui/workspace/group_navigator.c | 41 ++
 1 file changed, 17 insertions(+), 24 deletions(-)

diff --git a/src/bin/ui/workspace/group_navigator.c 
b/src/bin/ui/workspace/group_navigator.c
index 1375d89..5eef48f 100644
--- a/src/bin/ui/workspace/group_navigator.c
+++ b/src/bin/ui/workspace/group_navigator.c
@@ -71,6 +71,7 @@ typedef struct
Resource_Name_Validator *program_name_validator;
Resource_Name_Validator *group_data_name_validator;
 
+   Evas_Object *popup_win;
struct {
 int copy_part, part_type, program_selected;
 Combobox_Item *state_selected, *item_selected;
@@ -778,12 +779,12 @@ _on_part_name_changed(void *data,
 
if (resource_name_validator_status_get(pl->part_name_validator) != 
ELM_REG_NOERROR)
  {
-   popup_buttons_disabled_set(BTN_OK, true);
+   popup_button_disabled_set(pl->popup_win, BTN_OK, true);
elm_object_signal_emit(obj, "validation,default,fail", "elm");
  }
else
  {
-   popup_buttons_disabled_set(BTN_OK, false);
+   popup_button_disabled_set(pl->popup_win, BTN_OK, false);
elm_object_signal_emit(obj, "validation,default,pass", "elm");
  }
 }
@@ -898,10 +899,13 @@ _program_validate(void *data,
 }
 
 static void
-_popup_add_part_ok_clicked(void *data,
-   Evas_Object *obj __UNUSED__,
-   void *event_info __UNUSED__)
+_popup_add_part_close_cb(void *data,
+ Evas_Object *obj __UNUSED__,
+ void *ei)
 {
+   Popup_Button pb = (Popup_Button)ei;
+   if (pb != BTN_OK) return;
+
Edje_Part_Type type = EDJE_PART_TYPE_NONE;
Part_List *pl = data;
const char *name, *copy_name;
@@ -968,20 +972,8 @@ _popup_add_part_ok_clicked(void *data,
 
history_change_add(pl->group->history, change);
eina_stringshare_del(msg);
-   evas_object_del(pl->popup.box);
 }
 
-Eina_Bool
-_popup_add_part_validator(void *data)
-{
-   Part_List *pl = (Part_List *) data;
-   _popup_add_part_ok_clicked(data, NULL, NULL);
-   if (resource_name_validator_status_get(pl->part_name_validator) != 
ELM_REG_NOERROR)
- return false;
-   return true;
-}
-
-
 void
 group_navigator_part_add(Evas_Object *obj, Part *part)
 {
@@ -1088,7 +1080,7 @@ _combobox_item_pressed_cb(void *data __UNUSED__, 
Evas_Object *obj,
elm_entry_cursor_end_set(obj);
 }
 
-Evas_Object *
+static Evas_Object *
 _add_part_content_get(void *data, Evas_Object **to_focus)
 {
Combobox_Item *combobox_item;
@@ -1157,7 +1149,6 @@ _add_part_content_get(void *data, Evas_Object **to_focus)
elm_box_pack_end(box, item);
 
if (to_focus) *to_focus = pl->popup.entry_name;
-   popup_buttons_disabled_set(BTN_OK, true);
pl->popup.box = box;
return box;
 }
@@ -1173,11 +1164,13 @@ _on_menu_add_part_clicked(void *data __UNUSED__,
assert(pl != NULL);
 
title = eina_stringshare_printf(_("Add New Part to Group \"%s\""), 
pl->group->name);
-   Popup_Button button = popup_want_action(title, NULL, _add_part_content_get,
-   BTN_OK | BTN_CANCEL,
-   _popup_add_part_validator, pl);
-   if (BTN_CANCEL == button)
- evas_object_del(pl->popup.box);
+   pl->popup_win = popup_add(title, NULL,
+ BTN_OK | BTN_CANCEL,
+ _add_part_content_get,
+ pl);
+   evas_object_smart_callback_add(pl->popup_win, POPUP_CLOSE_CB, 
_popup_add_part_close_cb, pl);
+   popup_button_disabled_set(pl->popup_win, BTN_OK, true);
+
eina_stringshare_del(title);
 }
 

-- 




[EGIT] [tools/eflete] eflete-1.18 62/91: alloc: exit application on calloc error

2017-01-23 Thread Andrii Kroitor
rimmed pushed a commit to branch eflete-1.18.

http://git.enlightenment.org/tools/eflete.git/commit/?id=9b8fa5760ab8b0401d63d2473a22c0aa0b488789

commit 9b8fa5760ab8b0401d63d2473a22c0aa0b488789
Author: Andrii Kroitor <an.kroi...@samsung.com>
Date:   Thu Sep 15 12:04:14 2016 +0300

alloc: exit application on calloc error
---
 src/bin/alloc/alloc.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/bin/alloc/alloc.h b/src/bin/alloc/alloc.h
index 6f9eb46..84dcce5 100644
--- a/src/bin/alloc/alloc.h
+++ b/src/bin/alloc/alloc.h
@@ -79,6 +79,7 @@ mem_calloc(size_t num, size_t size)
  {
 CRIT(TERM_MESSAGE);
 app_shutdown();
+exit(EXIT_FAILURE);
  }
return mem_block;
 }

-- 




[EGIT] [tools/eflete] eflete-1.18 34/91: popup: remove unused variables

2017-01-23 Thread Andrii Kroitor
rimmed pushed a commit to branch eflete-1.18.

http://git.enlightenment.org/tools/eflete.git/commit/?id=e95281ec4e0d76004b1dbd291cae22c7bae1e833

commit e95281ec4e0d76004b1dbd291cae22c7bae1e833
Author: Andrii Kroitor <an.kroi...@samsung.com>
Date:   Tue Sep 6 16:26:48 2016 +0300

popup: remove unused variables
---
 src/bin/ui/popup.c | 6 --
 1 file changed, 6 deletions(-)

diff --git a/src/bin/ui/popup.c b/src/bin/ui/popup.c
index 062eaa9..1c0feef 100644
--- a/src/bin/ui/popup.c
+++ b/src/bin/ui/popup.c
@@ -28,12 +28,6 @@ static Evas_Object *fs;
 static Helper_Done_Cb dismiss_func;
 static void* func_data;
 
-static const Popup_Button _btn_ok = BTN_OK;
-static const Popup_Button _btn_save   = BTN_SAVE;
-static const Popup_Button _btn_append = BTN_APPEND;
-static const Popup_Button _btn_replace= BTN_REPLACE;
-static const Popup_Button _btn_dont_save  = BTN_DONT_SAVE;
-static const Popup_Button _btn_cancel = BTN_CANCEL;
 static Popup_Current current;
 
 struct _Search_Data

-- 




[EGIT] [tools/eflete] eflete-1.18 33/91: config: fix default panes size

2017-01-23 Thread Andrii Kroitor
rimmed pushed a commit to branch eflete-1.18.

http://git.enlightenment.org/tools/eflete.git/commit/?id=e1c166aa9a1b3c04251929a67423b84d6078a237

commit e1c166aa9a1b3c04251929a67423b84d6078a237
Author: Andrii Kroitor <an.kroi...@samsung.com>
Date:   Tue Sep 6 11:50:49 2016 +0300

config: fix default panes size
---
 src/bin/config/config.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/bin/config/config.c b/src/bin/config/config.c
index bc2c529..80502d9 100644
--- a/src/bin/config/config.c
+++ b/src/bin/config/config.c
@@ -422,7 +422,7 @@ _config_default_new(void)
conf->window.w =   1366;
conf->window.h =   768;
conf->panes.left = 0.2;
-   conf->panes.right =0.3;
+   conf->panes.right =0.7;
conf->panes.left_ver = 0.5;
conf->profile = strdup("default");
 

-- 




[EGIT] [tools/eflete] eflete-1.18 83/91: popup: fix image manager call from image_helper

2017-01-23 Thread Andrii Kroitor
rimmed pushed a commit to branch eflete-1.18.

http://git.enlightenment.org/tools/eflete.git/commit/?id=ad00f6e69b61fd8c1ed449b06eaab63ea68343b1

commit ad00f6e69b61fd8c1ed449b06eaab63ea68343b1
Author: Andrii Kroitor <an.kroi...@samsung.com>
Date:   Tue Sep 20 13:59:36 2016 +0300

popup: fix image manager call from image_helper
---
 src/bin/ui/popup.c | 8 +++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/src/bin/ui/popup.c b/src/bin/ui/popup.c
index 6d29eee..7a9bef1 100644
--- a/src/bin/ui/popup.c
+++ b/src/bin/ui/popup.c
@@ -815,12 +815,18 @@ _search_next_gengrid_item_cb(void *data,
 }
 
 static void
+_image_manager_add_job(void *data __UNUSED__)
+{
+   image_manager_add();
+}
+
+static void
 _btn_image_manager_cb(void *data __UNUSED__,
   Evas_Object *obj __UNUSED__,
   void *event_info __UNUSED__)
 {
_helper_dismiss(NULL, helper, NULL, NULL);
-   image_manager_add();
+   ecore_job_add(_image_manager_add_job, NULL);
 }
 
 void

-- 




[EGIT] [tools/eflete] eflete-1.18 68/91: live_multibuttonentry: fix dead assignment

2017-01-23 Thread Andrii Kroitor
rimmed pushed a commit to branch eflete-1.18.

http://git.enlightenment.org/tools/eflete.git/commit/?id=7462a099222bb860e43f24df0554529917a9c843

commit 7462a099222bb860e43f24df0554529917a9c843
Author: Andrii Kroitor <an.kroi...@samsung.com>
Date:   Thu Sep 15 12:56:30 2016 +0300

live_multibuttonentry: fix dead assignment

Fix svace WID 436578
---
 src/bin/ui/live_view/elementary/live_multibuttonentry.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/src/bin/ui/live_view/elementary/live_multibuttonentry.c 
b/src/bin/ui/live_view/elementary/live_multibuttonentry.c
index 230c2d0..28d71f4 100644
--- a/src/bin/ui/live_view/elementary/live_multibuttonentry.c
+++ b/src/bin/ui/live_view/elementary/live_multibuttonentry.c
@@ -36,7 +36,6 @@ _on_multibutton_swallow_check(void *data __UNUSED__,
{
   content = elm_object_part_content_unset(multi_item, 
part->name);
   evas_object_del(content);
-  content = NULL;
   part->object = NULL;
}
 

-- 




[EGIT] [tools/eflete] eflete-1.18 14/91: main_window: use async popup on project close

2017-01-23 Thread Andrii Kroitor
rimmed pushed a commit to branch eflete-1.18.

http://git.enlightenment.org/tools/eflete.git/commit/?id=d133cf89815276bf1cd354231f17465463519fba

commit d133cf89815276bf1cd354231f17465463519fba
Author: Andrii Kroitor <an.kroi...@samsung.com>
Date:   Fri Sep 2 15:04:12 2016 +0300

main_window: use async popup on project close
---
 src/bin/eflete.h   |  4 
 src/bin/ui/main_window.c   |  1 +
 src/bin/ui/project_close.c | 52 +++---
 3 files changed, 40 insertions(+), 17 deletions(-)

diff --git a/src/bin/eflete.h b/src/bin/eflete.h
index 6ada2be..bcf38ba 100644
--- a/src/bin/eflete.h
+++ b/src/bin/eflete.h
@@ -143,6 +143,10 @@ struct _App_Data
} path;
Project *project;
Shortcut_Module *shortcuts; /**< Structure with data from shortcuts module 
*/
+   Eina_Bool exit_in_progress : 1; /**< is set to true when 
ui_main_window_del() is called.
+   This is needed to continue closing 
application after
+   clicking in save/don't save buttons in 
project close
+   popup */
 #ifdef HAVE_ENVENTOR
Evas_Object *enventor;
Eina_Bool enventor_mode : 1;
diff --git a/src/bin/ui/main_window.c b/src/bin/ui/main_window.c
index ac9ecab..c96c090 100644
--- a/src/bin/ui/main_window.c
+++ b/src/bin/ui/main_window.c
@@ -57,6 +57,7 @@ _help(void *data __UNUSED__,
 Eina_Bool
 ui_main_window_del(void)
 {
+   ap.exit_in_progress = true;
if (ap.project)
  if (!project_close())
return false;
diff --git a/src/bin/ui/project_close.c b/src/bin/ui/project_close.c
index bf3ce32..ef95cd8 100644
--- a/src/bin/ui/project_close.c
+++ b/src/bin/ui/project_close.c
@@ -140,11 +140,38 @@ project_save(void)
  ui_menu_disable_set(ap.menu, MENU_FILE_SAVE, true);
 }
 
+static void
+_popup_close_cb(void *data __UNUSED__,
+Evas_Object *obj __UNUSED__,
+void *ei)
+{
+   Popup_Button btn_res = (Popup_Button) ei;
+
+   switch (btn_res)
+ {
+  case BTN_OK:
+ project_save();
+ break;
+  case BTN_DONT_SAVE:
+ ap.project->changed = false;
+ break;
+  case BTN_CANCEL:
+ ap.exit_in_progress = false;
+ return;
+  default:
+ ERR("Popup return wrong value. Go fix it!");
+ abort(); /* it's wrong value need to fix popup code or popup call */
+ }
+   if (ap.exit_in_progress)
+ ui_main_window_del();
+   else
+ project_close();
+}
 
 Eina_Bool
 project_close(void)
 {
-   Popup_Button btn_res;
+   Evas_Object *popup;
Eina_Stringshare *title;
 
assert(ap.project != NULL);
@@ -152,23 +179,14 @@ project_close(void)
if (ap.project->changed)
  {
 title = eina_stringshare_printf(_("Close project %s"), 
ap.project->name);
-btn_res = popup_want_action(title, _("Do you want to save changes?"), 
NULL,
-BTN_OK|BTN_DONT_SAVE|BTN_CANCEL,
-NULL, NULL);
-switch (btn_res)
-  {
-   case BTN_OK:
-  project_save();
-  break;
-   case BTN_DONT_SAVE:
-  break;
-   case BTN_CANCEL:
-  return false;
-   default:
-  ERR("Popup return wrong value. Go to fix it!");
-  abort(); /* it's wrong value need to fix popup code or popup 
call */
-  }
+popup = popup_add(title,
+  _("Do you want to save changes?"),
+  BTN_OK|BTN_DONT_SAVE|BTN_CANCEL,
+  NULL,
+  NULL);
+evas_object_smart_callback_add(popup, POPUP_CLOSE_CB, _popup_close_cb, 
NULL);
 eina_stringshare_del(title);
+return false;
  }
 
ui_menu_items_list_disable_set(ap.menu, MENU_ITEMS_LIST_BASE, true);

-- 




[EGIT] [tools/eflete] eflete-1.18 87/91: group_manager: don't use upper case for part type names

2017-01-23 Thread Andrii Kroitor
rimmed pushed a commit to branch eflete-1.18.

http://git.enlightenment.org/tools/eflete.git/commit/?id=75d10de96139009a31d4e6f3bf6f4cf7a48163d4

commit 75d10de96139009a31d4e6f3bf6f4cf7a48163d4
Author: Andrii Kroitor <an.kroi...@samsung.com>
Date:   Tue Sep 20 17:22:40 2016 +0300

group_manager: don't use upper case for part type names
---
 src/bin/project_manager/group_manager.c | 34 -
 1 file changed, 17 insertions(+), 17 deletions(-)

diff --git a/src/bin/project_manager/group_manager.c 
b/src/bin/project_manager/group_manager.c
index 91bce4e..4e2fc7d 100644
--- a/src/bin/project_manager/group_manager.c
+++ b/src/bin/project_manager/group_manager.c
@@ -1114,23 +1114,23 @@ gm_group_data_rename(Project *pro, Group *group, 
Resource* group_data, const cha
  * ref http://docs.enlightenment.org/auto/edje/group__Edje__Object__Part.html
  */
 static char *part_types[] = {
- "NONE",
- "RECTANGLE",
- "TEXT",
- "IMAGE",
- "SWALLOW",
- "TEXTBLOCK",
- "GRADIENT",
- "GROUP",
- "BOX",
- "TABLE",
- "EXTERNAL",
- "PROXY",
- "SPACER",
- "MESH NODE",
- "LIGHT",
- "CAMERA",
- "SNAPSHOT"
+ "None",
+ "Rectangle",
+ "Text",
+ "Image",
+ "Swallow",
+ "Textblock",
+ "Gradient",
+ "Group",
+ "Box",
+ "Table",
+ "External",
+ "Proxy",
+ "Spacer",
+ "Mesh node",
+ "Light",
+ "Camera",
+ "Snapshot"
 };
 static unsigned int part_types_count = 16;
 

-- 




[EGIT] [tools/eflete] eflete-1.18 49/91: popup: finish migration to async version

2017-01-23 Thread Andrii Kroitor
rimmed pushed a commit to branch eflete-1.18.

http://git.enlightenment.org/tools/eflete.git/commit/?id=7bae3bec6c83b625099158284cb3a843fd159de8

commit 7bae3bec6c83b625099158284cb3a843fd159de8
Author: Andrii Kroitor <an.kroi...@samsung.com>
Date:   Thu Sep 8 16:42:55 2016 +0300

popup: finish migration to async version

remove old popup_buttons_disabled_set method
add popup object as argument to Popup_Content_Cb

 Conflicts:
src/bin/ui/colorclass_manager.c
src/bin/ui/project_navigator.c
src/bin/ui/sound_manager.c
src/bin/ui/style_manager.c
---
 src/bin/ui/colorclass_manager.c| 24 ++--
 src/bin/ui/main_window.c   |  6 +++---
 src/bin/ui/main_window.h   |  4 +---
 src/bin/ui/popup.c | 15 +--
 src/bin/ui/project_navigator.c | 16 +---
 src/bin/ui/sound_manager.c | 19 +++
 src/bin/ui/style_manager.c | 24 +---
 src/bin/ui/workspace/group_navigator.c | 10 +-
 8 files changed, 57 insertions(+), 61 deletions(-)

diff --git a/src/bin/ui/colorclass_manager.c b/src/bin/ui/colorclass_manager.c
index 21be2dd..41e30e9 100644
--- a/src/bin/ui/colorclass_manager.c
+++ b/src/bin/ui/colorclass_manager.c
@@ -59,36 +59,40 @@ struct _Colorclasses_Manager
 static Colorclasses_Manager mng;
 
 static void
-_validation(void *data __UNUSED__,
+_validation(void *data,
 Evas_Object *obj __UNUSED__,
 void *event_info __UNUSED__)
 {
-  if (ELM_REG_NOERROR != 
resource_name_validator_status_get(mng.name_validator))
+   Evas_Object *popup = data;
+
+   assert(popup != NULL);
+
+   if (ELM_REG_NOERROR != 
resource_name_validator_status_get(mng.name_validator))
  {
-   popup_buttons_disabled_set(BTN_OK, true);
-   elm_object_signal_emit(obj, "validation,default,fail", "elm");
+popup_button_disabled_set(popup, BTN_OK, true);
+elm_object_signal_emit(obj, "validation,default,fail", "elm");
  }
else
  {
-   popup_buttons_disabled_set(BTN_OK, false);
-   elm_object_signal_emit(obj, "validation,default,pass", "elm");
+popup_button_disabled_set(popup, BTN_OK, false);
+elm_object_signal_emit(obj, "validation,default,pass", "elm");
  }
 }
 
-Evas_Object *
-_add_colorclass_content_get(void *data __UNUSED__, Evas_Object **to_focus)
+static Evas_Object *
+_add_colorclass_content_get(void *data __UNUSED__, Evas_Object *popup, 
Evas_Object **to_focus)
 {
Evas_Object *item = NULL;
 
LAYOUT_PROP_ADD(ap.win, _("Color class name: "), "property", "1swallow")
ENTRY_ADD(item, mng.entry, true);
eo_event_callback_add(mng.entry, ELM_ENTRY_EVENT_VALIDATE, 
resource_name_validator_helper, mng.name_validator);
-   evas_object_smart_callback_add(mng.entry, "changed", _validation, NULL);
+   evas_object_smart_callback_add(mng.entry, "changed", _validation, popup);
elm_object_part_text_set(mng.entry, "guide", _("Type new color class name 
here"));
elm_object_part_content_set(item, "elm.swallow.content", mng.entry);
mng.item = item;
if (to_focus) *to_focus = mng.entry;
-   popup_buttons_disabled_set(BTN_OK, true);
+   popup_button_disabled_set(popup, BTN_OK, true);
 
return mng.item;
 }
diff --git a/src/bin/ui/main_window.c b/src/bin/ui/main_window.c
index c96c090..771faeb 100644
--- a/src/bin/ui/main_window.c
+++ b/src/bin/ui/main_window.c
@@ -177,7 +177,7 @@ ui_main_window_add(void)
 
 #if !HAVE_TIZEN
 Evas_Object *
-_about_window_content_get(void *data, Evas_Object **to_focus __UNUSED__)
+_about_window_content_get(void *data, Evas_Object *popup __UNUSED__, 
Evas_Object **to_focus __UNUSED__)
 {
Evas_Object *label = (Evas_Object *) data;
elm_object_text_set(label,
@@ -220,7 +220,7 @@ about_window_add(void)
 
 #else
 Evas_Object *
-_about_window_content_get(void *data, Evas_Object **to_focus __UNUSED__)
+_about_window_content_get(void *data, Evas_Object *popup __UNUSED__, 
Evas_Object **to_focus __UNUSED__)
 {
   Evas_Object *layout = (Evas_Object *)data;
   elm_layout_theme_set(layout, "layout", "about", "default");
@@ -240,7 +240,7 @@ about_window_add(void)
 
 #endif
 static Evas_Object *
-_shortcuts_window_content_get(void *data, Evas_Object **to_focus __UNUSED__)
+_shortcuts_window_content_get(void *data, Evas_Object *popup __UNUSED__, 
Evas_Object **to_focus __UNUSED__)
 {
Evas_Object *box = data;
Evas_Object *scroller = elm_scroller_add(ap.win);
diff --git a/src/bin/ui/main_window.h b/src/bin/ui/main_window.h
index c0166f1..19cd2d5 100644
--- a/src/bin/ui/main_window.h
+++ b/src/bin/ui/main_window.h
@@ -121,7 +121,7 @@ typedef Eina_Bool(* Popup_Validator_Func)(void *data);
  *
  * @ingr

[EGIT] [tools/eflete] eflete-1.18 80/91: signals: move used elm_widget signals to signals struct

2017-01-23 Thread Andrii Kroitor
rimmed pushed a commit to branch eflete-1.18.

http://git.enlightenment.org/tools/eflete.git/commit/?id=52364c353bb001c74c494c259d76c437f6cbf5f8

commit 52364c353bb001c74c494c259d76c437f6cbf5f8
Author: Andrii Kroitor <an.kroi...@samsung.com>
Date:   Mon Sep 19 16:15:54 2016 +0300

signals: move used elm_widget signals to signals struct

 Conflicts:
src/bin/common/signals.c
src/bin/ui/colorclass_manager.c
src/bin/ui/project_navigator.c
src/bin/ui/sound_manager.c
src/bin/ui/style_manager.c
src/bin/ui/tab_home_import_edc.c
src/bin/ui/tab_home_import_edj.c
src/bin/ui/tab_home_new.c
---
 src/bin/common/signals.c   | 160 +++--
 src/bin/common/signals.h   |  74 ++
 src/bin/ui/colorclass_manager.c|  18 +--
 src/bin/ui/history_ui.c|  16 +--
 src/bin/ui/image_manager.c |  10 +-
 src/bin/ui/live_view/elementary/live_ctxpopup.c|   2 +-
 src/bin/ui/live_view/elementary/live_genlist.c |  12 +-
 src/bin/ui/live_view/elementary/live_naviframe.c   |   8 +-
 src/bin/ui/live_view/elementary/live_notify.c  |   2 +-
 .../ui/live_view/elementary/live_widget_common.c   |   8 +-
 src/bin/ui/main_window.c   |   2 +-
 src/bin/ui/modal_window/modal_window.c |  12 +-
 src/bin/ui/popup.c |  24 ++--
 src/bin/ui/project_navigator.c |  26 ++--
 src/bin/ui/property/property.c |  12 +-
 src/bin/ui/property/property_common.c  |  26 ++--
 src/bin/ui/property/property_common_image.c|   4 +-
 src/bin/ui/property/property_common_tween.c|   4 +-
 src/bin/ui/property/property_image_selector.c  |   4 +-
 src/bin/ui/shortcuts/shortcuts.c   |   2 +-
 src/bin/ui/sound_manager.c |  14 +-
 src/bin/ui/sound_player/sound_player.c |   4 +-
 src/bin/ui/splash.c|   2 +-
 src/bin/ui/style_manager.c |  26 ++--
 src/bin/ui/tab_home_common.c   |   2 +-
 src/bin/ui/tab_home_import_edc.c   |  10 +-
 src/bin/ui/tab_home_import_edj.c   |  20 +--
 src/bin/ui/tab_home_info.c |  10 +-
 src/bin/ui/tab_home_new.c  |  10 +-
 src/bin/ui/tab_home_open.c |  12 +-
 src/bin/ui/tabs.c  |   2 +-
 src/bin/ui/workspace/demo_group.c  |  12 +-
 src/bin/ui/workspace/group_navigator.c |  58 
 src/bin/ui/workspace/workspace.c   |  32 ++---
 34 files changed, 394 insertions(+), 246 deletions(-)

diff --git a/src/bin/common/signals.c b/src/bin/common/signals.c
index 3d306d7..d1f9242 100644
--- a/src/bin/common/signals.c
+++ b/src/bin/common/signals.c
@@ -22,71 +22,149 @@
 
 const Signals signals = {
  .shortcut = {
-  .del  = "signal.shortcut.del",
-  .help = "signal.shortcut.help",
-  .quit = "signal.shortcut.quit",
-  .save = "signal.shortcut.save",
+  .del = "signal.shortcut.del",
+  .help= "signal.shortcut.help",
+  .quit= "signal.shortcut.quit",
+  .save= "signal.shortcut.save",
   .add = {
-   .data_item   = "signal.shortcut.add.data_item",
-   .group   = "signal.shortcut.add.group",
-   .item= "signal.shortcut.add.item",
-   .part= "signal.shortcut.add.part",
-   .program = "signal.shortcut.add.program",
-   .state   = "signal.shortcut.add.state",
+   .data_item  = "signal.shortcut.add.data_item",
+   .group  = "signal.shortcut.add.group",
+   .item   = "signal.shortcut.add.item",
+   .part   = "signal.shortcut.add.part",
+   .program= "signal.shortcut.add.program",
+   .state  = "signal.shortcut.add.state",
   },
   .history = {
-   .redo= "signal.shortcut.history.redo",
-   .undo= "signal.shortcut.history.undo",
+   .redo   = "signal.shortcut.history.redo",
+   .undo  

[EGIT] [tools/eflete] eflete-1.18 19/91: group_navigator: use async popup for item add

2017-01-23 Thread Andrii Kroitor
rimmed pushed a commit to branch eflete-1.18.

http://git.enlightenment.org/tools/eflete.git/commit/?id=f935af12d9e3591b810a08fc57349e3b963e8cb0

commit f935af12d9e3591b810a08fc57349e3b963e8cb0
Author: Andrii Kroitor <an.kroi...@samsung.com>
Date:   Fri Sep 2 16:36:18 2016 +0300

group_navigator: use async popup for item add
---
 src/bin/ui/workspace/group_navigator.c | 41 +-
 1 file changed, 15 insertions(+), 26 deletions(-)

diff --git a/src/bin/ui/workspace/group_navigator.c 
b/src/bin/ui/workspace/group_navigator.c
index fa84b41..2e6555d 100644
--- a/src/bin/ui/workspace/group_navigator.c
+++ b/src/bin/ui/workspace/group_navigator.c
@@ -869,11 +869,11 @@ _item_validate(void *data,
  goto item_data_invalidated;
  }
 
-   popup_buttons_disabled_set(BTN_OK, false);
+   popup_button_disabled_set(pl->popup_win, BTN_OK, false);
return;
 
 item_data_invalidated:
-   popup_buttons_disabled_set(BTN_OK, true);
+   popup_button_disabled_set(pl->popup_win, BTN_OK, true);
return;
 }
 
@@ -1440,18 +1440,19 @@ _on_menu_add_state_clicked(void *data __UNUSED__,
 }
 
 static void
-_popup_add_item_ok_clicked(void *data,
-   Evas_Object *obj __UNUSED__,
-   void *event_info __UNUSED__)
+_popup_add_item_close_cb(void *data,
+ Evas_Object *obj __UNUSED__,
+ void *event_info)
 {
+   Popup_Button pb = (Popup_Button) event_info;
+   if (pb != BTN_OK) return;
+
Part_List *pl = data;
const char *name;
Eina_Stringshare *msg;
Change *change;
 
assert(pl != NULL);
-
-
assert(pl->part != NULL);
 
name = elm_entry_entry_get(pl->popup.entry_name);
@@ -1462,17 +1463,6 @@ _popup_add_item_ok_clicked(void *data,
 
history_change_add(pl->group->history, change);
eina_stringshare_del(msg);
-   evas_object_del(pl->popup.box);
-}
-
-Eina_Bool
-_popup_add_item_validator(void *data)
-{
-   Part_List *pl = (Part_List *) data;
-   _popup_add_item_ok_clicked(data, NULL, NULL);
-   if (elm_validator_regexp_status_get(pl->name_validator) != ELM_REG_NOERROR)
- return false;
-   return true;
 }
 
 void
@@ -1512,7 +1502,7 @@ group_navigator_part_item_add(Evas_Object *obj, Part 
*part, Eina_Stringshare * i
  }
 }
 
-Evas_Object *
+static Evas_Object *
 _add_item_content_get(void *data, Evas_Object **to_focus)
 {
Part_List *pl = (Part_List *)data;
@@ -1522,7 +1512,7 @@ _add_item_content_get(void *data, Evas_Object **to_focus)
Eina_List *l;
unsigned int i = 0;
 
-   BOX_ADD(ap.popup, box, false, false);
+   BOX_ADD(ap.win, box, false, false);
elm_box_padding_set(box, 0, 10);
 
LAYOUT_PROP_ADD(box, _("Name"), "popup", "1swallow")
@@ -1561,7 +1551,6 @@ _add_item_content_get(void *data, Evas_Object **to_focus)
elm_box_pack_end(box, item);
pl->popup.box = box;
if (to_focus) *to_focus = pl->popup.entry_name;
-   popup_buttons_disabled_set(BTN_OK, true);
 
return pl->popup.box;
 }
@@ -1577,12 +1566,12 @@ _on_menu_add_item_clicked(void *data __UNUSED__,
assert(pl->part != NULL);
 
title = eina_stringshare_printf(_("Add New Item to Part \"%s\""), 
pl->part->name);
-   Popup_Button button = popup_want_action(title, NULL, _add_item_content_get,
-BTN_OK | BTN_CANCEL,
-   _popup_add_item_validator, pl);
+   pl->popup_win = popup_add(title, NULL,
+ BTN_OK | BTN_CANCEL,
+ _add_item_content_get, pl);
+   evas_object_smart_callback_add(pl->popup_win, POPUP_CLOSE_CB, 
_popup_add_item_close_cb, pl);
+   popup_button_disabled_set(pl->popup_win, BTN_OK, true);
 
-   if (button == BTN_CANCEL)
- evas_object_del(pl->popup.box);
eina_stringshare_del(title);
 }
 

-- 




[EGIT] [tools/eflete] eflete-1.18 51/91: install: don't install private headers

2017-01-23 Thread Andrii Kroitor
rimmed pushed a commit to branch eflete-1.18.

http://git.enlightenment.org/tools/eflete.git/commit/?id=b6dd69576dbc5cd7554569787be945bafcfe7c06

commit b6dd69576dbc5cd7554569787be945bafcfe7c06
Author: Andrii Kroitor <an.kroi...@samsung.com>
Date:   Fri Sep 9 10:52:16 2016 +0300

install: don't install private headers

 Conflicts:
tests/Makefile.am
---
 src/bin/Makefile.am |  3 +--
 src/lib/Makefile.am |  8 
 tests/Makefile.am   | 31 +++
 3 files changed, 20 insertions(+), 22 deletions(-)

diff --git a/src/bin/Makefile.am b/src/bin/Makefile.am
index bd884f6..3e2f0c6 100644
--- a/src/bin/Makefile.am
+++ b/src/bin/Makefile.am
@@ -4,7 +4,7 @@ LOCALE_DIR = @LOCALE_DIR@
 
 bin_PROGRAMS = eflete
 
-includesub_HEADERS = \
+EXTRA_DIST = \
eflete.h \
alloc/alloc.h \
common/common_macro.h \
@@ -55,7 +55,6 @@ includesub_HEADERS = \
ui/workspace/demo_group.h \
ui/workspace/group_navigator.h \
ui/workspace/workspace.h
-includesubdir = $(pkgincludedir)-@VMAJ@
 
 noinst_LIBRARIES = libete.a
 libete_a_SOURCES = \
diff --git a/src/lib/Makefile.am b/src/lib/Makefile.am
index e5f4aae..7cb13ba 100644
--- a/src/lib/Makefile.am
+++ b/src/lib/Makefile.am
@@ -30,13 +30,11 @@ Ewe.h
 includesdir = $(pkgincludedir)-@VMAJ@
 
 includesub_HEADERS = \
-logger/logger.h \
 ewe_main.h \
 ewe_ruler.h \
 ewe_ruler_legacy.h \
 ewe_ruler_eo.h \
-ewe_ruler_common.h \
-ewe_widget_ruler.h
+ewe_ruler_common.h
 
 includesubdir = $(pkgincludedir)-@VMAJ@
 
@@ -52,4 +50,6 @@ BUILT_SOURCES = \
 ewe_ruler.eo.c \
 ewe_ruler.eo.h
 
-EXTRA_DIST = ewe_ruler.eo
+EXTRA_DIST = ewe_ruler.eo \
+logger/logger.h \
+ewe_widget_ruler.h
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 6adecef..2b8058f 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -46,21 +46,6 @@ LD = $(top_builddir)/src/bin/libete.a \
 @EFL_LIBS@ \
 ${top_builddir}/src/lib/libewe.la
 
-include_HEADERS = \
-   ../tests/test_common.h \
-   ../tests/utc_common.h \
-   ../tests/test_ewe_init/test_ewe_init.h \
-   ../tests/test_ewe_ruler/test_ewe_ruler.h \
-   ../tests/test_eflete/test_eflete.h \
-   ../tests/test_alloc/test_alloc.h \
-   ../tests/test_diff/test_diff.h \
-   ../tests/test_change/test_change.h \
-   ../tests/test_history/test_history.h \
-   ../tests/test_logger/test_logger.h \
-   ../tests/test_config/test_config.h \
-   ../tests/test_cursor/test_cursor.h \
-   ../tests/test_live_widget/test_live_widget.h
-
 ewe_init_test_SOURCES = \
 ../tests/test_ewe_init/test_ewe_init.c \
 ../tests/test_ewe_init/ewe_init.c
@@ -217,4 +202,18 @@ coverage:
echo "" >> ../coverage.html
 
 EXTRA_DIST = \
-   tests_report_generator.py
+   tests_report_generator.py \
+   test_common.h \
+   utc_common.h \
+   test_ewe_init/test_ewe_init.h \
+   test_ewe_ruler/test_ewe_ruler.h \
+   test_eflete/test_eflete.h \
+   test_alloc/test_alloc.h \
+   test_diff/test_diff.h \
+   test_change/test_change.h \
+   test_history/test_history.h \
+   test_logger/test_logger.h \
+   test_project_manager/test_project_manager.h \
+   test_config/test_config.h \
+   test_cursor/test_cursor.h \
+   test_live_widget/test_live_widget.h

-- 




[EGIT] [tools/eflete] eflete-1.18 13/91: main_window: use async popup for about and shortcuts

2017-01-23 Thread Andrii Kroitor
rimmed pushed a commit to branch eflete-1.18.

http://git.enlightenment.org/tools/eflete.git/commit/?id=9e74f30fb0b68e4399ce3fd3ae45144dd5ac0ffb

commit 9e74f30fb0b68e4399ce3fd3ae45144dd5ac0ffb
Author: Andrii Kroitor <an.kroi...@samsung.com>
Date:   Fri Sep 2 15:03:21 2016 +0300

main_window: use async popup for about and shortcuts
---
 src/bin/ui/main_window.c | 9 +++--
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/src/bin/ui/main_window.c b/src/bin/ui/main_window.c
index 90f59bc..ac9ecab 100644
--- a/src/bin/ui/main_window.c
+++ b/src/bin/ui/main_window.c
@@ -213,8 +213,7 @@ Evas_Object *
 about_window_add(void)
 {
Evas_Object *content = elm_label_add(ap.win);
-   popup_want_action(_("About"), NULL, _about_window_content_get, BTN_CANCEL, 
NULL, content);
-   evas_object_del(content);
+   popup_add(_("About"), NULL, BTN_CANCEL, _about_window_content_get, content);
return NULL;
 }
 
@@ -234,8 +233,7 @@ Evas_Object *
 about_window_add(void)
 {
Evas_Object *content = elm_layout_add(ap.win);
-   popup_want_action(_("About Component Designer"), NULL, 
_about_window_content_get, BTN_OK, NULL, content);
-   evas_object_del(content);
+   popup_add(_("About Component Designer"), NULL, BTN_OK, 
_about_window_content_get, content);
return NULL;
 }
 
@@ -306,7 +304,6 @@ shortcuts_window_add(void)
 
evas_object_size_hint_min_set(content, 0, 300);
 
-   popup_want_action(_("Help: shortcuts"), NULL, 
_shortcuts_window_content_get, BTN_OK, NULL, content);
-   evas_object_del(content);
+   popup_add(_("Help: shortcuts"), NULL, BTN_OK, 
_shortcuts_window_content_get, content);
return NULL;
 }

-- 




[EGIT] [tools/eflete] eflete-1.18 29/91: project_common: use async popup

2017-01-23 Thread Andrii Kroitor
rimmed pushed a commit to branch eflete-1.18.

http://git.enlightenment.org/tools/eflete.git/commit/?id=007602bd8eb2dde55ef672d20dd1ecf0f370dff8

commit 007602bd8eb2dde55ef672d20dd1ecf0f370dff8
Author: Andrii Kroitor <an.kroi...@samsung.com>
Date:   Mon Sep 5 18:31:07 2016 +0300

project_common: use async popup
---
 src/bin/ui/project_common.c | 81 -
 1 file changed, 58 insertions(+), 23 deletions(-)

diff --git a/src/bin/ui/project_common.c b/src/bin/ui/project_common.c
index 24b12f5..1a8933f 100644
--- a/src/bin/ui/project_common.c
+++ b/src/bin/ui/project_common.c
@@ -20,18 +20,60 @@
 #include "main_window.h"
 #include "project_manager.h"
 
+typedef struct {
+   Eina_Strbuf *buf, *buf_msg;
+   const char *name;
+   const char *title;
+   const char *path;
+   Ecore_Cb func;
+   const void *data;
+} Permission_Check_Data;
+
+static void
+_exist_permission_popup_close_cb(void *data, Evas_Object *obj __UNUSED__, void 
*event_info)
+{
+   Popup_Button btn_res = (Popup_Button) event_info;
+   Permission_Check_Data *pcd = data;
+   Eina_Strbuf *buf_msg;
+
+   if (btn_res == BTN_CANCEL) goto end;
+   if (!ecore_file_can_write(eina_strbuf_string_get(pcd->buf)))
+ {
+buf_msg = eina_strbuf_new();
+eina_strbuf_append_printf(buf_msg, _("Haven't permision to overwrite 
'%s' in '%s'"), pcd->name, pcd->path);
+popup_add(pcd->title, eina_strbuf_string_get(buf_msg), BTN_OK, NULL, 
NULL);
+eina_strbuf_free(buf_msg);
+goto end;
+ }
+   if (btn_res == BTN_REPLACE)
+ ecore_file_recursive_rm(eina_strbuf_string_get(pcd->buf));
+   if (pcd->func)
+  pcd->func((void *)pcd->data);
+
+end:
+   eina_strbuf_free(pcd->buf);
+   free(pcd);
+}
+
 Eina_Bool
 exist_permission_check(const char *path, const char *name,
const char *title, const char *msg, Eina_Bool append,
Ecore_Cb func,
const void *data)
 {
-   Eina_Strbuf *buf, *buf_msg;
-   Popup_Button btn_res;
+   Evas_Object *popup;
+   Eina_Strbuf *buf_msg;
+   Permission_Check_Data *pcd = mem_calloc(1, sizeof(Permission_Check_Data));
 
assert(path != NULL);
assert(name != NULL);
assert(title != NULL);
+
+   pcd->name = name;
+   pcd->title = title;
+   pcd->path = path;
+   pcd->func = func;
+   pcd->data = data;
/* we alwayes imported and exported project to folder by given path, means
 * that we alwayes create a new folder for project or exported source.
 * So need to check there is the folder "path/name" */
@@ -43,29 +85,22 @@ exist_permission_check(const char *path, const char *name,
 eina_strbuf_free(buf_msg);
 return false;
  }
-   buf = eina_strbuf_new();
-   eina_strbuf_append_printf(buf, "%s/%s", path, name);
-   if (!ecore_file_exists(eina_strbuf_string_get(buf))) return true;
-   if (!append)
- btn_res = popup_want_action(title, msg, NULL,
- BTN_REPLACE | BTN_CANCEL, NULL, NULL);
-   else
- btn_res = popup_want_action(title, msg, NULL,
- BTN_APPEND | BTN_REPLACE | BTN_CANCEL, NULL, 
NULL);
-   if (btn_res == BTN_CANCEL) return false;
-   if (!ecore_file_can_write(eina_strbuf_string_get(buf)))
+   pcd->buf = eina_strbuf_new();
+   eina_strbuf_append_printf(pcd->buf, "%s/%s", path, name);
+   if (!ecore_file_exists(eina_strbuf_string_get(pcd->buf)))
  {
-buf_msg = eina_strbuf_new();
-eina_strbuf_append_printf(buf_msg, _("Haven't permision to overwrite 
'%s' in '%s'"), name, path);
-popup_add(title, eina_strbuf_string_get(buf_msg), BTN_OK, NULL, NULL);
-eina_strbuf_free(buf_msg);
-return false;
+if (pcd->func)
+  pcd->func((void *)pcd->data);
+eina_strbuf_free(pcd->buf);
+free(pcd);
+return true;
  }
-   if (btn_res == BTN_REPLACE)
- ecore_file_recursive_rm(eina_strbuf_string_get(buf));
-   if (func)
-  func((void *)data);
-   eina_strbuf_free(buf);
+   if (!append)
+ popup = popup_add(title, msg, BTN_REPLACE | BTN_CANCEL, NULL, NULL);
+   else
+ popup = popup_add(title, msg, BTN_APPEND | BTN_REPLACE | BTN_CANCEL, 
NULL, NULL);
+   evas_object_smart_callback_add(popup, POPUP_CLOSE_CB, 
_exist_permission_popup_close_cb, pcd);
+
return true;
 }
 

-- 




[EGIT] [tools/eflete] master 04/05: property_group: update program script view

2017-01-17 Thread Andrii Kroitor
rimmed pushed a commit to branch master.

http://git.enlightenment.org/tools/eflete.git/commit/?id=ea4a12e7b9f63befd11db3910d23c9bd8c2b8f6a

commit ea4a12e7b9f63befd11db3910d23c9bd8c2b8f6a
Author: Andrii Kroitor <an.kroi...@samsung.com>
Date:   Tue Jan 17 13:49:07 2017 +0200

property_group: update program script view

You can now select and copy code

Change-Id: I79304aeba7cbfa6a8064cfb1eaeb067c5cc83b40
---
 src/bin/ui/property/property_group.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/bin/ui/property/property_group.c 
b/src/bin/ui/property/property_group.c
index 3853e18..e885386 100644
--- a/src/bin/ui/property/property_group.c
+++ b/src/bin/ui/property/property_group.c
@@ -851,8 +851,8 @@ _init_cb(Property_Attribute *pa, Property_Action *action)
  break;
   case ATTRIBUTE_PROGRAM_SCRIPT:
  elm_entry_single_line_set(action->control, false);
+ elm_entry_editable_set(action->control, false);
  evas_object_size_hint_min_set(action->control, 0, 400);
- elm_object_disabled_set(action->control, true);
  break;
   case ATTRIBUTE_PART_NAME:
  efl_event_callback_add(action->control, ELM_ENTRY_EVENT_VALIDATE, 
resource_name_validator_helper, group_pd.part_name_validator);

-- 




[EGIT] [tools/eflete] master 05/05: project_manager: fix edc import

2017-01-17 Thread Andrii Kroitor
rimmed pushed a commit to branch master.

http://git.enlightenment.org/tools/eflete.git/commit/?id=91a71c62beb844538f0a10d13ad7d5aa20ac2030

commit 91a71c62beb844538f0a10d13ad7d5aa20ac2030
Author: Andrii Kroitor <an.kroi...@samsung.com>
Date:   Thu Dec 8 15:57:27 2016 +0200

project_manager: fix edc import

Change-Id: I37b85430c21684733d90f17654beea37458e1d65
---
 src/bin/project_manager/project_manager2.c | 11 +++
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/src/bin/project_manager/project_manager2.c 
b/src/bin/project_manager/project_manager2.c
index 2692367..3b6cf10 100644
--- a/src/bin/project_manager/project_manager2.c
+++ b/src/bin/project_manager/project_manager2.c
@@ -1090,6 +1090,7 @@ static PM_Project_Result
 _project_import_edc(void *data)
 {
Project_Process_Data *ppd = data;
+   Eina_Strbuf *ebuf;
char buf[PATH_MAX];
 
assert(ppd != NULL);
@@ -1100,10 +1101,12 @@ _project_import_edc(void *data)
 
eina_file_mkdtemp("eflete_build_XX", >tmp_dirname);
ppd->edj = eina_stringshare_printf("%s/out.edj", ppd->tmp_dirname);
-   snprintf(buf, sizeof(buf),
-"edje_cc -v %s %s %s", ppd->edc, ppd->edj, ppd->build_options);
-   DBG("Run command for compile: %s\n", buf);
-   ecore_exe_pipe_run(buf, FLAGS, NULL);
+
+   ebuf = eina_strbuf_new();
+   eina_strbuf_append_printf(ebuf, "edje_cc -v %s %s %s", ppd->edc, ppd->edj, 
ppd->build_options);
+   DBG("Run command for compile: %s\n", eina_strbuf_string_get(ebuf));
+   ecore_exe_pipe_run(eina_strbuf_string_get(ebuf), FLAGS, NULL);
+   eina_strbuf_free(ebuf);
 
ppd->data_handler = ecore_event_handler_add(ECORE_EXE_EVENT_DATA, 
_exe_output_handler, ppd);
ppd->del_handler = ecore_event_handler_add(ECORE_EXE_EVENT_DEL, 
_finish_from_edje_cc, ppd);

-- 




[EGIT] [core/efl] master 01/01: edje_edit: add Efl.File.mmap.set implementation for edje_edit

2017-01-17 Thread Andrii Kroitor
lorddrew pushed a commit to branch master.

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

commit b909f913ed5c4175a62442df212dced6b112dd63
Author: Andrii Kroitor <an.kroi...@samsung.com>
Date:   Tue Jan 17 13:35:54 2017 +0200

edje_edit: add Efl.File.mmap.set implementation for edje_edit

This fixes edje_edit_program_source_get for mmaped edje_edit object
@fix
---
 src/lib/edje/edje_edit.c  | 94 ---
 src/lib/edje/edje_edit.eo |  1 +
 2 files changed, 57 insertions(+), 38 deletions(-)

diff --git a/src/lib/edje/edje_edit.c b/src/lib/edje/edje_edit.c
index c7eaa19..38b08e6 100644
--- a/src/lib/edje/edje_edit.c
+++ b/src/lib/edje/edje_edit.c
@@ -194,53 +194,19 @@ _edje_edit_eet_close(Eet_File *ef)
  eet_close(ef);
 }
 
-EOLIAN static Eina_Bool
-_edje_edit_efl_file_file_set(Eo *obj, Edje_Edit *eed, const char *file, const 
char *group)
+static Eina_Bool
+_load_scripts(Eo *obj, Edje_Edit *eed)
 {
-   Eina_Bool ret;
Eet_File *ef;
char **keys, buf[64];
int count, i;
int len = strlen("edje/scripts/embryo/source/");
 
-   ret = EINA_FALSE;
-
-   _edje_edit_data_clean(eed);
-
-   /* TODO and maybes:
-*  * The whole point of this thing is keep track of stuff such as
-*strings to free and who knows what, so we need to take care
-*of those if the file/group changes.
-*  * Maybe have the possibility to open just files, not always with
-*a group given.
-*  * A way to skip the cache? Could help avoid some issues when editing
-*a group being used by the application in some other way, or multiple
-*opens of the same file.
-*  * Here we probably want to allow opening groups with broken references
-*(GROUP parts or BOX/TABLE items pointing to non-existent/renamed
-*groups).
-*/
-   Efl_Vpath_File *file_obj =
- efl_vpath_manager_fetch(EFL_VPATH_MANAGER_CLASS, file);
-   efl_vpath_file_do(file_obj);
-   // XXX:FIXME: allow this to be async
-   efl_vpath_file_wait(file_obj);
-   file = efl_vpath_file_result_get(file_obj);
-
-   Eina_Bool int_ret = EINA_FALSE;
-   int_ret = efl_file_set(efl_super(obj, MY_CLASS), file, group);
-   if (!int_ret)
- {
-efl_del(file_obj);
-return ret;
- }
-
GET_ED_OR_RETURN(EINA_FALSE);
 
eed->program_scripts = 
eina_hash_int32_new((Eina_Free_Cb)_edje_edit_program_script_free);
 
ef = _edje_edit_eet_open(ed, EET_FILE_MODE_READ);
-   efl_del(file_obj);
 
snprintf(buf, sizeof(buf), "edje/scripts/embryo/source/%i",
 eed->base->collection->id);
@@ -266,9 +232,61 @@ _edje_edit_efl_file_file_set(Eo *obj, Edje_Edit *eed, 
const char *file, const ch
  }
_edje_edit_eet_close(ef);
 
-   ret = EINA_TRUE;
+   return EINA_TRUE;
+}
 
-   return ret;
+EOLIAN static Eina_Bool
+_edje_edit_efl_file_file_set(Eo *obj, Edje_Edit *eed, const char *file, const 
char *group)
+{
+   _edje_edit_data_clean(eed);
+
+   /* TODO and maybes:
+*  * The whole point of this thing is keep track of stuff such as
+*strings to free and who knows what, so we need to take care
+*of those if the file/group changes.
+*  * Maybe have the possibility to open just files, not always with
+*a group given.
+*  * A way to skip the cache? Could help avoid some issues when editing
+*a group being used by the application in some other way, or multiple
+*opens of the same file.
+*  * Here we probably want to allow opening groups with broken references
+*(GROUP parts or BOX/TABLE items pointing to non-existent/renamed
+*groups).
+*  P.S. don't forget about mmap version below
+*/
+   Efl_Vpath_File *file_obj =
+ efl_vpath_manager_fetch(EFL_VPATH_MANAGER_CLASS, file);
+   efl_vpath_file_do(file_obj);
+   // XXX:FIXME: allow this to be async
+   efl_vpath_file_wait(file_obj);
+   file = efl_vpath_file_result_get(file_obj);
+
+   Eina_Bool int_ret;
+   int_ret = efl_file_set(efl_super(obj, MY_CLASS), file, group);
+   efl_del(file_obj);
+   if (!int_ret)
+ return EINA_FALSE;
+
+   if (!_load_scripts(obj, eed))
+ return EINA_FALSE;
+
+   return EINA_TRUE;
+}
+
+EOLIAN static Eina_Bool
+_edje_edit_efl_file_mmap_set(Eo *obj, Edje_Edit *eed, const Eina_File *mmap, 
const char *group)
+{
+   _edje_edit_data_clean(eed);
+
+   Eina_Bool int_ret;
+   int_ret = efl_file_mmap_set(efl_super(obj, MY_CLASS), mmap, group);
+   if (!int_ret)
+ return EINA_FALSE;
+
+   if (!_load_scripts(obj, eed))
+ return EINA_FALSE;
+
+   return EINA_TRUE;
 }
 
 EAPI Evas_Object *
diff --git a/src/lib/edje/edje_edit.eo b/src/lib/edje/edje_edit.eo
index 5dd8e83..0d87b32 100644
--- a/src/lib/edje/edje_edit.eo
+++ b/src/lib/edje/edje_edit.eo
@@ -12,5 +12,6 @@ class Edje.Edit (Edje.Object)
   Efl.Object.destructor;
   Efl.Canvas.Group.group_del;
   Efl.File.file { set; }
+  Efl.File.mmap { set; }
}
 }

-- 




[EGIT] [tools/eflete] master 01/01: project_manager: add missing argument to open call

2017-01-10 Thread Andrii Kroitor
rimmed pushed a commit to branch master.

http://git.enlightenment.org/tools/eflete.git/commit/?id=cfd82661a7af3f1622ce5b4c8fe83ab24ef1daa0

commit cfd82661a7af3f1622ce5b4c8fe83ab24ef1daa0
Author: Andrii Kroitor <an.kroi...@samsung.com>
Date:   Tue Jan 10 11:52:26 2017 +0200

project_manager: add missing argument to open call

Change-Id: If209d19a15a010f321b1377194dcffb0e6563e29
---
 src/bin/project_manager/project_manager2.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/bin/project_manager/project_manager2.c 
b/src/bin/project_manager/project_manager2.c
index 3eaacac..2ad41a7 100644
--- a/src/bin/project_manager/project_manager2.c
+++ b/src/bin/project_manager/project_manager2.c
@@ -424,7 +424,9 @@ _project_lock(Project *project)
dir = ecore_file_dir_get(project->pro_path);
snprintf(path, sizeof(path), "%s/"LOCK_FILE, dir);
free(dir);
-   project->fd_lock = open(path, O_RDWR | O_CREAT, S_IROTH | S_IWOTH);
+   project->fd_lock = open(path,
+   O_RDWR | O_CREAT,
+   S_IREAD | S_IWRITE | S_IRGRP | S_IROTH); /* 
rw-r--r-- */
if (!project->fd_lock)
  {
 ERR("%s: %s\n", path, strerror(errno));

-- 




[EGIT] [tools/eflete] master 01/05: elm_spinner: apply Tizen hack on upstream because of last changes

2016-12-29 Thread Andrii Kroitor
rimmed pushed a commit to branch master.

http://git.enlightenment.org/tools/eflete.git/commit/?id=a8998f1e683a2b35cbe6a7306b6f1ae5cf169054

commit a8998f1e683a2b35cbe6a7306b6f1ae5cf169054
Author: Andrii Kroitor <an.kroi...@samsung.com>
Date:   Fri Dec 23 14:56:31 2016 +0200

elm_spinner: apply Tizen hack on upstream because of last changes

Change-Id: I6a3f895ad55dd5db13eb58e27d994a4d332a08a4
---
 src/bin/Makefile.am   |  2 +-
 src/bin/common/{tizen_hacks.c => hacks.c} | 10 --
 src/bin/common/signals.c  |  4 
 src/bin/eflete.h  | 10 --
 4 files changed, 9 insertions(+), 17 deletions(-)

diff --git a/src/bin/Makefile.am b/src/bin/Makefile.am
index f792aef..a9d5285 100644
--- a/src/bin/Makefile.am
+++ b/src/bin/Makefile.am
@@ -65,7 +65,7 @@ libete_a_SOURCES = \
 ../../src/bin/eflete.c \
 ../../src/bin/common/string_common.c \
 ../../src/bin/common/signals.c \
-../../src/bin/common/tizen_hacks.c \
+../../src/bin/common/hacks.c \
 ../../src/bin/common/validator.c \
 ../../src/bin/common/widget_list.c \
 ../../src/bin/project_manager/group_manager.c \
diff --git a/src/bin/common/tizen_hacks.c b/src/bin/common/hacks.c
similarity index 83%
rename from src/bin/common/tizen_hacks.c
rename to src/bin/common/hacks.c
index 62486f1..6645601 100644
--- a/src/bin/common/tizen_hacks.c
+++ b/src/bin/common/hacks.c
@@ -18,11 +18,10 @@
  */
 
 #include "eflete.h"
-#ifdef HAVE_TIZEN
 
 static int _spinner_changed_from_code = 0;
 static void
-_tizen_spinner_changed_hack(void *data __UNUSED__, Evas_Object *obj, void *ei)
+_spinner_changed_hack(void *data __UNUSED__, Evas_Object *obj, void *ei)
 {
/* don't call callback if we are setting value to spinner from code */
if (!_spinner_changed_from_code)
@@ -30,7 +29,7 @@ _tizen_spinner_changed_hack(void *data __UNUSED__, 
Evas_Object *obj, void *ei)
 }
 
 void
-tizen_hack_spinner_value_set(Evas_Object *spinner, double val)
+hack_spinner_value_set(Evas_Object *spinner, double val)
 {
assert(spinner != NULL);
 
@@ -40,10 +39,9 @@ tizen_hack_spinner_value_set(Evas_Object *spinner, double 
val)
 }
 
 Evas_Object *
-tizen_hack_spinner_add(Evas_Object *parent)
+hack_spinner_add(Evas_Object *parent)
 {
Evas_Object *ret = _elm_spinner_add(parent);
-   evas_object_smart_callback_add(ret, signals.elm.spinner.changed, 
_tizen_spinner_changed_hack, NULL);
+   evas_object_smart_callback_add(ret, signals.elm.spinner.changed, 
_spinner_changed_hack, NULL);
return ret;
 }
-#endif
diff --git a/src/bin/common/signals.c b/src/bin/common/signals.c
index 4407337..f8c8599 100644
--- a/src/bin/common/signals.c
+++ b/src/bin/common/signals.c
@@ -117,11 +117,7 @@ const Signals signals = {
  .elm = {
   .spinner = {
.changed= "changed",
-#if HAVE_TIZEN
.changed_user   = "[eflete_custom]changed,user",
-#else
-   .changed_user   = "changed",
-#endif
.drag_start = "spinner,drag,start",
.drag_stop  = "spinner,drag,stop",
   },
diff --git a/src/bin/eflete.h b/src/bin/eflete.h
index f39bbce..431a2b7 100644
--- a/src/bin/eflete.h
+++ b/src/bin/eflete.h
@@ -197,18 +197,16 @@ app_shutdown(void);
 #include "alloc.h"
 
 
-#ifdef HAVE_TIZEN
 /* hack functions prototypes (same as original functions) */
 Evas_Object *
-tizen_hack_spinner_add(Evas_Object *parent);
+hack_spinner_add(Evas_Object *parent);
 void
-tizen_hack_spinner_value_set(Evas_Object *spinner, double val);
+hack_spinner_value_set(Evas_Object *spinner, double val);
 /* saving function pointers to use later in tizen_hack* functions to avoid 
infonote recursion on call */
 static void (* _elm_spinner_value_set)(Evas_Object *, double) __UNUSED__ = 
elm_spinner_value_set;
 static Evas_Object * (* _elm_spinner_add)(Evas_Object *)  __UNUSED__ = 
elm_spinner_add;
 /* replacing functions with hack-version */
-#define elm_spinner_value_settizen_hack_spinner_value_set
-#define elm_spinner_add  tizen_hack_spinner_add
-#endif
+#define elm_spinner_value_sethack_spinner_value_set
+#define elm_spinner_add  hack_spinner_add
 
 #endif /* EFLETE_H */

-- 




[EGIT] [tools/eflete] master 02/05: project_manager2: fix cross compilation

2016-12-29 Thread Andrii Kroitor
rimmed pushed a commit to branch master.

http://git.enlightenment.org/tools/eflete.git/commit/?id=bc17a30b93e5333700d8182bf77e2d93c7c7b738

commit bc17a30b93e5333700d8182bf77e2d93c7c7b738
Author: Andrii Kroitor <an.kroi...@samsung.com>
Date:   Tue Dec 27 13:26:35 2016 +0200

project_manager2: fix cross compilation

Change-Id: I1fd2c542607db61d649009f59efdc446d8bf923e
---
 src/bin/project_manager/project_manager2.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/bin/project_manager/project_manager2.c 
b/src/bin/project_manager/project_manager2.c
index fce3b2b..b51df35 100644
--- a/src/bin/project_manager/project_manager2.c
+++ b/src/bin/project_manager/project_manager2.c
@@ -26,7 +26,7 @@
 #include 
 #else
 #include 
-#include 
+#include 
 static HANDLE hMutex = NULL;
 #endif
 

-- 




[EGIT] [core/efl] master 01/01: ecore_main: don't wait on marked to delete handlers on Windows

2016-12-27 Thread Andrii Kroitor
lorddrew pushed a commit to branch master.

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

commit ea66c8302a20b268cf67230c5d237773e4c6697d
Author: Andrii Kroitor <an.kroi...@samsung.com>
Date:   Tue Dec 27 15:52:30 2016 +0200

ecore_main: don't wait on marked to delete handlers on Windows

This could lead to greedy wait with 100% CPU consumption because on wait
error we never reach actual handlers deletion.
---
 src/lib/ecore/ecore_main.c | 6 ++
 1 file changed, 6 insertions(+)

diff --git a/src/lib/ecore/ecore_main.c b/src/lib/ecore/ecore_main.c
index 91bff0e..9b8f9f9 100644
--- a/src/lib/ecore/ecore_main.c
+++ b/src/lib/ecore/ecore_main.c
@@ -2598,6 +2598,9 @@ _ecore_main_win32_select(int nfds EINA_UNUSED,
/* Create an event object per socket */
EINA_INLIST_FOREACH(fd_handlers, fdh)
  {
+if (fdh->delete_me)
+  continue;
+
 WSAEVENT event;
 long network_event;
 
@@ -2632,6 +2635,9 @@ _ecore_main_win32_select(int nfds EINA_UNUSED,
/* store the HANDLEs in the objects to wait for */
EINA_INLIST_FOREACH(win32_handlers, wh)
  {
+if (wh->delete_me)
+  continue;
+
 if (wh->h == stdin_handle)
   {
  if (stdin_wait_thread == INVALID_HANDLE_VALUE)

-- 




[E-devel] elementary callbacks hell

2016-12-23 Thread Andrii Kroitor
Hello everyone.

Recently existing callbacks behavior was broken once again. This time by 
https://git.enlightenment.org/core/efl.git/commit/?id=082ea9667343b7016d86143a625881a8c4aa30a4
Before that commit "changed" callback was triggered only on user 
changes, after - on user changes and changes from code.
I understand that in some cases this flow is needed. But previously you 
could simply trigger your callback after setting value to spinner from 
code to get desired missing behavior.
On the other side - now you can't distinguish value changes made by code 
from value changes made by user without dirty and painful to support 
hacks. If you don't want your callback to be
triggered by elm_spinner_value_set you need to add some flag meaning 
"change from code", raise it before every call of value_set, check it 
inside callback, remove it after the call.
And if you want to call it from spinner "changed" callback..? Good luck 
here. This is possible, but requires additional wrappers around 
spinner_add and spinner_value_set and replacement with custom signals.

So this change added bigger problems than solved.

Some time ago there was discussion on phab about introducing 
"changed,user" callback to every widget (that has "changed" callback) 
and making this callbacks behavior consistent through all widgets.
Main argument against this was "this will break some existing code". And 
now only code-breaking part of that idea gets merged without even 
providing sane way to preserve old flow for those who need it =\.

I think it's time to fix this inconsistency. My vision is we should make 
following changes:

1. "changed" callback should be triggered regardless of change initiator
2. "changed,user" callback should be triggered on user-made changes
3. (optional) there should be way to make changes from code as if they 
were made by user. This includes not only issuing "changed,user" 
callback, but also checking if that action is possible (i.e. widget 
should be enabled, be in editable mode, etc.)
4. (optional) add pre-changed callbacks?

I'd like to hear your opinion on this topic.

-- 
*Best Regards,
Andrii Kroitor
* Engineer, Tizen Platform Lab

Samsung R Institute Ukraine
57, Lva Tolstogo St., Kyiv 01032, Ukraine
email: an.kroi...@samsung.com <mailto:an.kroi...@samsung.com>


--
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/intel
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] [Re]: [EGIT] [core/efl] master 01/03: ecore: fix wait for stdin on Windows

2016-12-23 Thread Andrii Kroitor

On 23.12.16 06:35, Vincent Torri wrote:
> hey
>
> i don't like the idea of getc/ungetc in the thread, imho it's a bad hack
> you do that for ethumb_slave, i guess, but i think that the wait for
> input should be in ethumb slave, with a thread and ReadConsole(). and
> not the hack you did
>
> Vincent
>
> --
> Developer Access Program for Intel Xeon Phi Processors
> Access to Intel Xeon Phi processor-based developer platforms.
> With one year of Intel Parallel Studio XE.
> Training and support from Colfax.
> Order your platform today.http://sdm.link/intel
> ___
> enlightenment-devel mailing list
> enlightenment-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
>
I'm also not 100% happy with getc/ungetc thread, but this was the only 
solution, that works in all cases.
I have tried various approaches, but all other are failing to wait for 
input correctly at least in one of the following cases:
1. direct run and input from console
2. debug run and input from console (yep, this is somehow different from 
case 1 :( )
3. redirected stdin input ( "app.exe <in.txt" )
4. direct run within pipeline ( "some_other_app.exe | app.exe" )
5. run as subprocess with stdin replaced with pipe from parent (i.e. 
parent uses ecore_exe)

If I remember it right ReadConsole will fail in cases 3-5.

So if you find some better solution that will work in all this cases it 
will be great.


I disagree with you about this code placement. My point is that as many 
as possible platform-dependent things should be in libraries rather than 
in client-side code.
-- 
*Best Regards,
Andrii Kroitor
* Engineer, Tizen Platform Lab

Samsung R Institute Ukraine
57, Lva Tolstogo St., Kyiv 01032, Ukraine
email: an.kroi...@samsung.com <mailto:an.kroi...@samsung.com>


--
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/intel
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


[EGIT] [core/efl] master 01/01: ecore_exe: do not try to send 0 bytes

2016-12-22 Thread Andrii Kroitor
lorddrew pushed a commit to branch master.

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

commit 792acc9f9eaf8587490ea7cc5a984689f7283502
Author: Andrii Kroitor <an.kroi...@samsung.com>
Date:   Thu Dec 22 18:49:27 2016 +0200

ecore_exe: do not try to send 0 bytes

Summary: This action is meaningless when communicating with child process.

Reviewers: barbieri

Reviewed By: barbieri

Subscribers: jpeg, vtorri, cedric, raster

Differential Revision: https://phab.enlightenment.org/D4510
---
 src/lib/ecore/ecore_exe.c   | 2 ++
 src/lib/ecore/ecore_exe_win32.c | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/lib/ecore/ecore_exe.c b/src/lib/ecore/ecore_exe.c
index 6cf7e59..dcf9cea 100644
--- a/src/lib/ecore/ecore_exe.c
+++ b/src/lib/ecore/ecore_exe.c
@@ -126,6 +126,8 @@ ecore_exe_send(Ecore_Exe  *obj,
if (!efl_isa(obj, MY_CLASS))
   return EINA_FALSE;
 
+   EINA_SAFETY_ON_TRUE_RETURN_VAL(size == 0, EINA_TRUE);
+
if (exe->close_stdin)
{
   ERR("Ecore_Exe %p stdin is closed! Cannot send %d bytes from %p",
diff --git a/src/lib/ecore/ecore_exe_win32.c b/src/lib/ecore/ecore_exe_win32.c
index 6479985..33854f8 100644
--- a/src/lib/ecore/ecore_exe_win32.c
+++ b/src/lib/ecore/ecore_exe_win32.c
@@ -560,7 +560,7 @@ _impl_ecore_exe_send(Ecore_Exe  *obj,
BOOL res;
 
res = WriteFile(exe->pipe_write.child_pipe_x, data, size, _exe, NULL);
-   if (size && !res || num_exe == 0)
+   if (!res || num_exe == 0)
  {
 ERR("Ecore_Exe %p stdin is closed! Cannot send %d bytes from %p",
 obj, size, data);

-- 




Re: [E-devel] [EGIT] [core/efl] master 03/03: ecore_exe: fix send on Windows

2016-12-22 Thread Andrii Kroitor
On 22.12.16 17:44, Gustavo Sverzut Barbieri wrote:
> On Thu, Dec 22, 2016 at 11:40 AM, Andrii Kroitor <an.kroi...@samsung.com> 
> wrote:
>> On 22.12.16 15:00, Gustavo Sverzut Barbieri wrote:
>>> On Thu, Dec 22, 2016 at 10:27 AM, Andrii Kroitor <an.kroi...@samsung.com> 
>>> wrote:
>>>> lorddrew pushed a commit to branch master.
>>>>
>>>> http://git.enlightenment.org/core/efl.git/commit/?id=11e687578dca47f024dc230f2d23c579ddd91961
>>>>
>>>> commit 11e687578dca47f024dc230f2d23c579ddd91961
>>>> Author: Andrii Kroitor <an.kroi...@samsung.com>
>>>> Date:   Thu Dec 22 14:10:10 2016 +0200
>>>>
>>>>   ecore_exe: fix send on Windows
>>>>
>>>>   Check for bytes written only if more than 0 bytes were sent.
>>>>   I don't know why some efl code is trying to send 0 bytes, but that 
>>>> works on
>>>>   Linux and therefore should be fixed on Windows.
>>>> ---
>>>>src/lib/ecore/ecore_exe_win32.c | 2 +-
>>>>1 file changed, 1 insertion(+), 1 deletion(-)
>>>>
>>>> diff --git a/src/lib/ecore/ecore_exe_win32.c 
>>>> b/src/lib/ecore/ecore_exe_win32.c
>>>> index 305298e..3532fe1 100644
>>>> --- a/src/lib/ecore/ecore_exe_win32.c
>>>> +++ b/src/lib/ecore/ecore_exe_win32.c
>>>> @@ -560,7 +560,7 @@ _impl_ecore_exe_send(Ecore_Exe  *obj,
>>>>   BOOL res;
>>>>
>>>>   res = WriteFile(exe->pipe_write.child_pipe_x, data, size, _exe, 
>>>> NULL);
>>>> -   if (!res || num_exe == 0)
>>>> +   if (size && !res || num_exe == 0)
>>> eventually apps don't check what they try to send... but the library
>>> should, then don't try to send, the WriteFile with zero-size is not
>>> right.
>>>
>> I've experimented with adding abort() on sending zero bytes and this
>> leads to segfault on `elementary_test -to Thumb` on Linux.
>> So EFL code itself is actually trying to send 0 bytes to child process.
>> I'm wondering is there any reason to do this on Linux?
> I bet it's a bug in upper layers. But we shouldn't try to write zero
> bytes. Also, see the Linux manpage write(2):
>
> If count is zero and fd refers to a  regular  file,  then  write()  
> may
> return  a failure status if one of the errors below is detected.  If 
> no
> errors are detected, or error detection is not  performed,  0  will  
> be
> returned  without  causing  any  other effect.  If count is zero and 
> fd
> refers to a file other than a regular file, the results are not  
> speci‐
> fied.
>
> We're talking about non-regular file, thus the second case, which
> means unspecified.
>
> TL;DR: before WriteFile() or write() we should check:
>
> EINA_SAFETY_ON_TRUE_RETURN_VAL(size == 0, ...);
>
Please look at https://phab.enlightenment.org/D4510

-- 
*Best Regards,
Andrii Kroitor
* Engineer, Tizen Platform Lab

Samsung R Institute Ukraine
57, Lva Tolstogo St., Kyiv 01032, Ukraine
email: an.kroi...@samsung.com <mailto:an.kroi...@samsung.com>


--
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/intel
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] [EGIT] [core/efl] master 03/03: ecore_exe: fix send on Windows

2016-12-22 Thread Andrii Kroitor
On 22.12.16 15:00, Gustavo Sverzut Barbieri wrote:
> On Thu, Dec 22, 2016 at 10:27 AM, Andrii Kroitor <an.kroi...@samsung.com> 
> wrote:
>> lorddrew pushed a commit to branch master.
>>
>> http://git.enlightenment.org/core/efl.git/commit/?id=11e687578dca47f024dc230f2d23c579ddd91961
>>
>> commit 11e687578dca47f024dc230f2d23c579ddd91961
>> Author: Andrii Kroitor <an.kroi...@samsung.com>
>> Date:   Thu Dec 22 14:10:10 2016 +0200
>>
>>  ecore_exe: fix send on Windows
>>
>>  Check for bytes written only if more than 0 bytes were sent.
>>  I don't know why some efl code is trying to send 0 bytes, but that 
>> works on
>>  Linux and therefore should be fixed on Windows.
>> ---
>>   src/lib/ecore/ecore_exe_win32.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/src/lib/ecore/ecore_exe_win32.c 
>> b/src/lib/ecore/ecore_exe_win32.c
>> index 305298e..3532fe1 100644
>> --- a/src/lib/ecore/ecore_exe_win32.c
>> +++ b/src/lib/ecore/ecore_exe_win32.c
>> @@ -560,7 +560,7 @@ _impl_ecore_exe_send(Ecore_Exe  *obj,
>>  BOOL res;
>>
>>  res = WriteFile(exe->pipe_write.child_pipe_x, data, size, _exe, 
>> NULL);
>> -   if (!res || num_exe == 0)
>> +   if (size && !res || num_exe == 0)
> eventually apps don't check what they try to send... but the library
> should, then don't try to send, the WriteFile with zero-size is not
> right.
>
I've experimented with adding abort() on sending zero bytes and this 
leads to segfault on `elementary_test -to Thumb` on Linux.
So EFL code itself is actually trying to send 0 bytes to child process. 
I'm wondering is there any reason to do this on Linux?


-- 
*Best Regards,
Andrii Kroitor
* Engineer, Tizen Platform Lab

Samsung R Institute Ukraine
57, Lva Tolstogo St., Kyiv 01032, Ukraine
email: an.kroi...@samsung.com <mailto:an.kroi...@samsung.com>


--
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/intel
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


[EGIT] [core/efl] master 01/01: ecore_exe_win32: fix typo in input poll thread

2016-12-22 Thread Andrii Kroitor
lorddrew pushed a commit to branch master.

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

commit 7e156742b3256f2392dffedd3043d90b6772018e
Author: Andrii Kroitor <an.kroi...@samsung.com>
Date:   Thu Dec 22 14:38:26 2016 +0200

ecore_exe_win32: fix typo in input poll thread
---
 src/lib/ecore/ecore_exe_win32.c | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/lib/ecore/ecore_exe_win32.c b/src/lib/ecore/ecore_exe_win32.c
index 3532fe1..6479985 100644
--- a/src/lib/ecore/ecore_exe_win32.c
+++ b/src/lib/ecore/ecore_exe_win32.c
@@ -105,7 +105,7 @@ _ecore_exe_win32_io_poll_thread(void *data, Ecore_Thread 
*th)
 {
Threaddata *tdat = data;
Threadreply *trep;
-   Eina_Bool data_read, data_write;
+   Eina_Bool data_read, data_error;
char buf[4096];
DWORD size, current_size;
BOOL res;
@@ -113,7 +113,7 @@ _ecore_exe_win32_io_poll_thread(void *data, Ecore_Thread 
*th)
while (EINA_TRUE)
  {
 data_read = EINA_FALSE;
-data_write = EINA_FALSE;
+data_error = EINA_FALSE;
 
 if (tdat->read)
   {
@@ -166,13 +166,13 @@ _ecore_exe_win32_io_poll_thread(void *data, Ecore_Thread 
*th)
 trep->buf_size = size;
 trep->error = EINA_TRUE;
 ecore_thread_feedback(th, trep);
-//data_error = EINA_TRUE;
+data_error = EINA_TRUE;
  }
 }
}
   }
 if (ecore_thread_check(th)) break;
-if (!(data_read || data_write)) Sleep(100);
+if (!(data_read || data_error)) Sleep(100);
 else if (ecore_thread_check(th)) break;
  }
free(tdat);

-- 




[EGIT] [core/efl] master 03/03: ecore_exe: fix send on Windows

2016-12-22 Thread Andrii Kroitor
lorddrew pushed a commit to branch master.

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

commit 11e687578dca47f024dc230f2d23c579ddd91961
Author: Andrii Kroitor <an.kroi...@samsung.com>
Date:   Thu Dec 22 14:10:10 2016 +0200

ecore_exe: fix send on Windows

Check for bytes written only if more than 0 bytes were sent.
I don't know why some efl code is trying to send 0 bytes, but that works on
Linux and therefore should be fixed on Windows.
---
 src/lib/ecore/ecore_exe_win32.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lib/ecore/ecore_exe_win32.c b/src/lib/ecore/ecore_exe_win32.c
index 305298e..3532fe1 100644
--- a/src/lib/ecore/ecore_exe_win32.c
+++ b/src/lib/ecore/ecore_exe_win32.c
@@ -560,7 +560,7 @@ _impl_ecore_exe_send(Ecore_Exe  *obj,
BOOL res;
 
res = WriteFile(exe->pipe_write.child_pipe_x, data, size, _exe, NULL);
-   if (!res || num_exe == 0)
+   if (size && !res || num_exe == 0)
  {
 ERR("Ecore_Exe %p stdin is closed! Cannot send %d bytes from %p",
 obj, size, data);

-- 




[EGIT] [core/efl] master 01/03: ecore: fix wait for stdin on Windows

2016-12-22 Thread Andrii Kroitor
lorddrew pushed a commit to branch master.

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

commit 053613db5277708f81de5b4e088155c127ba8ec9
Author: Andrii Kroitor <an.kroi...@samsung.com>
Date:   Wed Dec 21 15:08:58 2016 +0200

ecore: fix wait for stdin on Windows

We can't directly wait on stdin handle because it is signaled imediatly even
if there is no new data on input stream.
---
 src/lib/ecore/ecore_main.c | 39 ---
 1 file changed, 36 insertions(+), 3 deletions(-)

diff --git a/src/lib/ecore/ecore_main.c b/src/lib/ecore/ecore_main.c
index 640be7d..91bff0e 100644
--- a/src/lib/ecore/ecore_main.c
+++ b/src/lib/ecore/ecore_main.c
@@ -2551,6 +2551,15 @@ _ecore_main_win32_objects_wait(DWORD objects_nbr,
return WAIT_FAILED;
 }
 
+static unsigned int
+_stdin_wait_thread(void *data EINA_UNUSED)
+{
+   int c = getc(stdin);
+   ungetc(c, stdin);
+
+   return 0;
+}
+
 static int
 _ecore_main_win32_select(int nfds EINA_UNUSED,
  fd_set *readfds,
@@ -2559,6 +2568,9 @@ _ecore_main_win32_select(int nfds EINA_UNUSED,
  struct timeval *tv)
 {
HANDLE *objects;
+   static HANDLE stdin_wait_thread = INVALID_HANDLE_VALUE;
+   Eina_Bool stdin_thread_done = EINA_FALSE;
+   HANDLE stdin_handle;
int *sockets;
Ecore_Fd_Handler *fdh;
Ecore_Win32_Handler *wh;
@@ -2616,11 +2628,25 @@ _ecore_main_win32_select(int nfds 
EINA_UNUSED,
  objects_nbr++;
   }
  }
-
+   stdin_handle = GetStdHandle(STD_INPUT_HANDLE);
/* store the HANDLEs in the objects to wait for */
EINA_INLIST_FOREACH(win32_handlers, wh)
  {
-objects[objects_nbr] = wh->h;
+if (wh->h == stdin_handle)
+  {
+ if (stdin_wait_thread == INVALID_HANDLE_VALUE)
+   stdin_wait_thread = (HANDLE)_beginthreadex(NULL,
+  0,
+  _stdin_wait_thread,
+  NULL,
+  0,
+  NULL);
+ objects[objects_nbr] = stdin_wait_thread;
+  }
+else
+  {
+ objects[objects_nbr] = wh->h;
+  }
 objects_nbr++;
  }
 
@@ -2709,11 +2735,15 @@ _ecore_main_win32_select(int nfds 
EINA_UNUSED,
   win32_handler_current = (Ecore_Win32_Handler 
*)EINA_INLIST_GET(win32_handler_current)->next;
   }
 
+if (objects[result - WAIT_OBJECT_0] == stdin_wait_thread)
+  stdin_thread_done = EINA_TRUE;
+
 while (win32_handler_current)
   {
  wh = win32_handler_current;
 
- if (objects[result - WAIT_OBJECT_0] == wh->h)
+ if (objects[result - WAIT_OBJECT_0] == wh->h ||
+ (objects[result - WAIT_OBJECT_0] == stdin_wait_thread && 
wh->h == stdin_handle))
{
   if (!wh->delete_me)
 {
@@ -2741,6 +2771,9 @@ err :
/* Remove event objects again */
for (i = 0; i < events_nbr; i++) WSACloseEvent(objects[i]);
 
+   if (stdin_thread_done)
+ stdin_wait_thread = INVALID_HANDLE_VALUE;
+
free(objects);
free(sockets);
return res;

-- 




[EGIT] [core/efl] master 02/03: ethumb: rewrite slave input/output

2016-12-22 Thread Andrii Kroitor
lorddrew pushed a commit to branch master.

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

commit 9f6d773fcea57e4863c8286b5aaab7128dee92e8
Author: Andrii Kroitor <an.kroi...@samsung.com>
Date:   Thu Dec 22 13:15:42 2016 +0200

ethumb: rewrite slave input/output

Using stdio instead of low-level read and write because low-level API has
different behaviour on Linux and Windows.
---
 src/bin/ethumb_client/ethumbd_slave.c | 143 ++
 1 file changed, 60 insertions(+), 83 deletions(-)

diff --git a/src/bin/ethumb_client/ethumbd_slave.c 
b/src/bin/ethumb_client/ethumbd_slave.c
index 09efff5..d7b7ff6 100644
--- a/src/bin/ethumb_client/ethumbd_slave.c
+++ b/src/bin/ethumb_client/ethumbd_slave.c
@@ -25,6 +25,7 @@
 #endif
 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -57,74 +58,49 @@ struct _Ethumbd_Child
 };
 
 
-int
-_ec_read_safe(int fd, void *buf, ssize_t size)
+static int
+_ec_read_safe(FILE* stream, void *buf, ssize_t size)
 {
ssize_t todo;
-   char *p;
+   unsigned char *p;
+   int c;
 
todo = size;
p = buf;
 
while (todo > 0)
  {
-   ssize_t r;
-
-   r = read(fd, p, todo);
-   if (r > 0)
- {
-todo -= r;
-p += r;
- }
-   else if (r == 0)
- return 0;
-   else
- {
-if (errno == EINTR || errno == EAGAIN)
-  continue;
-else
-  {
- ERR("could not read from fd %d: %s",
- fd, strerror(errno));
- return 0;
-  }
- }
+c = getc(stream);
+if (c == EOF)
+  {
+ ERR("could not read from stream %p", stream);
+ return 0;
+  }
+*p = c;
+++p;
+--todo;
  }
-
return 1;
 }
 
-int
-_ec_write_safe(int fd, const void *buf, ssize_t size)
+static int
+_ec_write_safe(FILE *stream, const void *buf, ssize_t size)
 {
ssize_t todo;
-   const char *p;
+   const unsigned char *p;
 
todo = size;
p = buf;
 
while (todo > 0)
  {
-   ssize_t r;
-
-   r = write(fd, p, todo);
-   if (r > 0)
- {
-todo -= r;
-p += r;
- }
-   else if (r == 0)
- return 0;
-   else
- {
-if (errno == EINTR || errno == EAGAIN)
-  continue;
-else
-  {
- ERR("could not write to fd %d: %s", fd, strerror(errno));
- return 0;
-  }
- }
+if (putc(*p, stream) == EOF)
+  {
+ ERR("could not write to stream %p", stream);
+ return 0;
+  }
+++p;
+--todo;
  }
 
return 1;
@@ -137,7 +113,7 @@ _ec_pipe_str_read(struct _Ethumbd_Child *ec EINA_UNUSED, 
char **str)
int r;
char buf[PATH_MAX] = { '\0' };
 
-   r = _ec_read_safe(STDIN_FILENO, , sizeof(size));
+   r = _ec_read_safe(stdin, , sizeof(size));
if (!r)
  {
*str = NULL;
@@ -150,7 +126,7 @@ _ec_pipe_str_read(struct _Ethumbd_Child *ec EINA_UNUSED, 
char **str)
return 1;
  }
 
-   r = _ec_read_safe(STDIN_FILENO, buf, size);
+   r = _ec_read_safe(stdin, buf, size);
if (!r)
  {
*str = NULL;
@@ -199,7 +175,7 @@ _ec_op_new(struct _Ethumbd_Child *ec)
int r;
int idx;
 
-   r = _ec_read_safe(STDIN_FILENO, , sizeof(idx));
+   r = _ec_read_safe(stdin, , sizeof(idx));
if (!r)
  return 0;
 
@@ -215,7 +191,7 @@ _ec_op_del(struct _Ethumbd_Child *ec)
int r;
int idx;
 
-   r = _ec_read_safe(STDIN_FILENO, , sizeof(idx));
+   r = _ec_read_safe(stdin, , sizeof(idx));
if (!r)
  return 0;
 
@@ -248,14 +224,15 @@ _ec_op_generated_cb(void *data EINA_UNUSED, Ethumb *e, 
Eina_Bool success)
size_cmd = sizeof(success) + sizeof(size_path) + size_path +
   sizeof(size_key) + size_key;
 
-   _ec_write_safe(STDOUT_FILENO, _cmd, sizeof(size_cmd));
-   _ec_write_safe(STDOUT_FILENO, , sizeof(success));
+   _ec_write_safe(stdout, _cmd, sizeof(size_cmd));
+   _ec_write_safe(stdout, , sizeof(success));
 
-   _ec_write_safe(STDOUT_FILENO, _path, sizeof(size_path));
-   _ec_write_safe(STDOUT_FILENO, thumb_path, size_path);
+   _ec_write_safe(stdout, _path, sizeof(size_path));
+   _ec_write_safe(stdout, thumb_path, size_path);
 
-   _ec_write_safe(STDOUT_FILENO, _key, sizeof(size_key));
-   _ec_write_safe(STDOUT_FILENO, thumb_key, size_key);
+   _ec_write_safe(stdout, _key, sizeof(size_key));
+   _ec_write_safe(stdout, thumb_key, size_key);
+   fflush(stdout);
 }
 
 static int
@@ -265,7 +242,7 @@ _ec_op_generate(struct _Ethumbd_Child *ec)
char *path, *key, *thumb_path, *thumb_key;
int r;
 
-   r = _ec_read_safe(STDIN_FILENO, , sizeof(idx));
+   r = _ec_read_safe(stdin, , sizeof(idx));
if (!r)
  return 0;
 
@@ -320,7 +297,7 @@ _ec_fdo_set(st

[EGIT] [core/efl] master 01/01: ecore_exe is broken on Windows

2016-12-21 Thread Andrii Kroitor
raster pushed a commit to branch master.

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

commit bceb263910601bee133e5d1137604ae73963e732
Author: Andrii Kroitor <an.kroi...@samsung.com>
Date:   Thu Dec 22 11:10:42 2016 +0900

ecore_exe is broken on Windows

Summary:
T4938

diff from @raster
Aaaargh! There is no other way to get code from diff on phab..

Reviewers: vtorri

Subscribers: vtorri, i.furs, cedric, jpeg, raster

Differential Revision: https://phab.enlightenment.org/D4448
---
 src/lib/ecore/ecore_exe_private.h |  25 +-
 src/lib/ecore/ecore_exe_win32.c   | 666 +++---
 2 files changed, 339 insertions(+), 352 deletions(-)

diff --git a/src/lib/ecore/ecore_exe_private.h 
b/src/lib/ecore/ecore_exe_private.h
index 030b046..17a726d 100644
--- a/src/lib/ecore/ecore_exe_private.h
+++ b/src/lib/ecore/ecore_exe_private.h
@@ -80,28 +80,25 @@ struct _Ecore_Exe_Data
Ecore_Win32_Handler *h_close;
Ecore_Exe_Win32_Signal sig;
 
-   struct
-   {
+   Ecore_Thread *th;
+
+   struct {
   HANDLE child_pipe;
-  HANDLE thread;
   void *data_buf;
-  DWORD data_size;
+  int data_size;
} pipe_read;
 
-   struct
-   {
-  HANDLE child_pipe;
-  HANDLE child_pipe_x;
-   } pipe_write;
-
-   struct
-   {
+   struct {
   HANDLE child_pipe;
-  HANDLE thread;
   void *data_buf;
-  DWORD data_size;
+  int data_size;
} pipe_error;
 
+   struct {
+  HANDLE child_pipe;
+  HANDLE child_pipe_x;
+   } pipe_write;
+
Eina_Bool close_threads : 1;
Eina_Bool is_suspended : 1;
 #else
diff --git a/src/lib/ecore/ecore_exe_win32.c b/src/lib/ecore/ecore_exe_win32.c
index 67b26fb..305298e 100644
--- a/src/lib/ecore/ecore_exe_win32.c
+++ b/src/lib/ecore/ecore_exe_win32.c
@@ -40,27 +40,12 @@ static void
 _ecore_exe_threads_terminate(Ecore_Exe *obj)
 {
Ecore_Exe_Data *exe = efl_data_scope_get(obj, ECORE_EXE_CLASS);
-   HANDLE threads[2] = { NULL, NULL };
-   int i = 0;
 
if (!exe) return;
-   if (exe->pipe_read.thread)
- {
-threads[i] = exe->pipe_read.thread;
-i++;
- }
-   if (exe->pipe_error.thread)
- {
-threads[i] = exe->pipe_error.thread;
-i++;
- }
-   if (i > 0)
- {
-exe->close_threads = 1;
-WaitForMultipleObjects(i, threads, TRUE, INFINITE);
-   IF_FN_DEL(CloseHandle, exe->pipe_error.thread);
-   IF_FN_DEL(CloseHandle, exe->pipe_read.thread);
- }
+   if (!exe->th) return;
+   ecore_thread_cancel(exe->th);
+   ecore_thread_wait(exe->th, 0.3);
+   exe->th = NULL;
 }
 
 static Eina_Bool
@@ -73,7 +58,6 @@ _ecore_exe_close_cb(void *data,
DWORD exit_code = 0;
 
if (!exe) return 0;
-   _ecore_exe_threads_terminate(obj);
 
e = calloc(1, sizeof(Ecore_Exe_Event_Del));
if (!e) return 0;
@@ -81,10 +65,8 @@ _ecore_exe_close_cb(void *data,
/* FIXME : manage the STILL_ACTIVE returned error */
if (!GetExitCodeProcess(exe->process, _code))
  {
-char *msg;
-
-msg = evil_last_error_get();
-printf("%s\n", msg);
+char *msg = evil_last_error_get();
+DBG("%s", msg);
 free(msg);
  }
 
@@ -94,154 +76,182 @@ _ecore_exe_close_cb(void *data,
e->exe = obj;
exe->h_close = NULL; // It's going to get deleted in the next callback.
 
-   ecore_event_add(ECORE_EXE_EVENT_DEL, e,
-   _ecore_exe_event_del_free, NULL);
+   ecore_event_add(ECORE_EXE_EVENT_DEL, e, _ecore_exe_event_del_free, NULL);
 
DBG("Exiting process %s with exit code %d\n", exe->cmd, e->exit_code);
-
return 0;
 }
 
-static unsigned int __stdcall
-_ecore_exe_pipe_read_thread_cb(void *data)
+typedef struct
 {
-   char buf[64];
-   Ecore_Exe *obj = data;
-   Ecore_Exe_Data *exe = efl_data_scope_get(obj, ECORE_EXE_CLASS);
-   Ecore_Exe_Event_Data *event_data;
-   char *current_buf = NULL;
-   DWORD size;
-   DWORD current_size = 0;
+   Ecore_Exe  *obj;
+   HANDLE  read_pipe;
+   HANDLE  error_pipe;
+   Eina_Bool   read : 1;
+   Eina_Bool   error : 1;
+} Threaddata;
+
+typedef struct
+{
+   Ecore_Exe *obj;
+   unsigned char *buf;
+   intbuf_size;
+   Eina_Bool  read : 1;
+   Eina_Bool  error : 1;
+} Threadreply;
+
+static void
+_ecore_exe_win32_io_poll_thread(void *data, Ecore_Thread *th)
+{
+   Threaddata *tdat = data;
+   Threadreply *trep;
+   Eina_Bool data_read, data_write;
+   char buf[4096];
+   DWORD size, current_size;
BOOL res;
 
-   if (!exe) return 0;
-   while (1)
+   while (EINA_TRUE)
  {
-res = PeekNamedPipe(exe->pipe_read.child_pipe,
-buf, sizeof(buf) - 1, , _size, NULL);
-if (!res || (size == 0))
-  {
- if (exe->close_threads)
-   break;
-
- Sleep(100);
- continue;

[EGIT] [tools/eflete] master 01/01: about: add build time

2016-12-16 Thread Andrii Kroitor
rimmed pushed a commit to branch master.

http://git.enlightenment.org/tools/eflete.git/commit/?id=1ed859e921a3895f937bb80ac6b5dacde12792bf

commit 1ed859e921a3895f937bb80ac6b5dacde12792bf
Author: Andrii Kroitor <an.kroi...@samsung.com>
Date:   Fri Dec 16 13:56:22 2016 +0200

about: add build time

Change-Id: Ieba8861a121ad7a24ba40f6c6ef44bae6d064460
---
 configure.ac | 4 
 src/bin/ui/main_window.c | 3 ++-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index fa44319..8fe7a7e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -210,6 +210,10 @@ EFLETE_DEFINE+=" -DCOMPILE_PATH=\\\"`pwd`\\\" "
 
 AC_SUBST([EFLETE_DEFINE])
 
+#space need to be escaped because otherwise gcc complains
+BUILD_TIME=$(date +"%F\ %H:%M")
+EFLETE_DEFINE+=" -DBUILD_TIME=\\\"${BUILD_TIME}\\\" "
+
 AM_PROG_CC_C_O
 
 #AM_CONDITIONAL([HAVE_ENVENTOR], [test "x$have_enventor" = "xyes" -a 
"x$want_enventor" = "xyes"])
diff --git a/src/bin/ui/main_window.c b/src/bin/ui/main_window.c
index 64fa1bc..a6736e3 100644
--- a/src/bin/ui/main_window.c
+++ b/src/bin/ui/main_window.c
@@ -248,7 +248,7 @@ _about_window_content_get(void *data, Evas_Object *popup 
__UNUSED__, Evas_Object
Evas_Object *label = (Evas_Object *) data;
elm_object_text_set(label,
  "

[EGIT] [core/efl] master 01/02: ethumb: fix absolute path generation

2016-12-09 Thread Andrii Kroitor
lorddrew pushed a commit to branch master.

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

commit 62a0c41fd3bf8796efec55db52395f13a78fb27f
Author: Andrii Kroitor <an.kroi...@samsung.com>
Date:   Fri Dec 9 15:38:54 2016 +0200

ethumb: fix absolute path generation

replace _ethumb_build_absolute_path with eina_file_path_sanitize
It makes same thing and works on Windows correctly.
---
 src/lib/ethumb/ethumb.c | 84 +
 1 file changed, 15 insertions(+), 69 deletions(-)

diff --git a/src/lib/ethumb/ethumb.c b/src/lib/ethumb/ethumb.c
index ab7eda6..7b8f4f0 100644
--- a/src/lib/ethumb/ethumb.c
+++ b/src/lib/ethumb/ethumb.c
@@ -690,73 +690,16 @@ ethumb_frame_get(const Ethumb *e, const char 
**theme_file, const char **group, c
  }
 }
 
-static const char *
-_ethumb_build_absolute_path(const char *path, char buf[PATH_MAX])
-{
-   char *p;
-   int len;
-
-   if (!path)
- return NULL;
-
-   p = buf;
-
-   if (path[0] == '/')
- {
-strncpy(p, path, PATH_MAX - 1);
-p[PATH_MAX - 1] = 0;
- }
-   else if (path[0] == '~')
- {
-#if defined(HAVE_GETUID) && defined(HAVE_GETEUID)
-if (getuid() == geteuid())
-#endif
-  {
- const char *home = eina_environment_home_get();
- if (!home) return NULL;
- strncpy(p, home, PATH_MAX - 1);
- p[PATH_MAX - 1] = 0;
-  }
-#if defined(HAVE_GETUID) && defined(HAVE_GETEUID)
-else
-  {
- struct passwd *pw = getpwent();
-
- if ((!pw) || (!pw->pw_dir)) return NULL;
- strncpy(p, pw->pw_dir, PATH_MAX - 1);
- p[PATH_MAX - 1] = 0;
-  }
-#endif
-len = strlen(p);
-p += len;
-p[0] = '/';
-p++;
-strcpy(p, path + 2);
- }
-   else
- {
-if (!getcwd(p, PATH_MAX))
-  return NULL;
-len = strlen(p);
-p += len;
-p[0] = '/';
-p++;
-strncpy(p, path, PATH_MAX - 1 - len - 1);
-p[PATH_MAX - 1 - len - 1] = 0;
- }
-
-   return buf;
-}
-
 EAPI void
 ethumb_thumb_dir_path_set(Ethumb *e, const char *path)
 {
-   char buf[PATH_MAX];
+   char *sanitized_path;
EINA_SAFETY_ON_NULL_RETURN(e);
 
DBG("ethumb=%p, path=%s", e, path ? path : "");
-   path = _ethumb_build_absolute_path(path, buf);
-   eina_stringshare_replace(>thumb_dir, path);
+   sanitized_path = eina_file_path_sanitize(path);
+   eina_stringshare_replace(>thumb_dir, sanitized_path);
+   free(sanitized_path);
 }
 
 EAPI const char *
@@ -893,19 +836,20 @@ ethumb_document_page_get(const Ethumb *e)
 EAPI Eina_Bool
 ethumb_file_set(Ethumb *e, const char *path, const char *key)
 {
-   char buf[PATH_MAX];
+   char *sanitized_path;
EINA_SAFETY_ON_NULL_RETURN_VAL(e, 0);
 
eina_stringshare_replace(>thumb_path, NULL);
eina_stringshare_replace(>thumb_key, NULL);
 
-   DBG("ethumb=%p, path=%s, key=%s", e, path ? path : "", key ? key : "");
-   if (path && access(path, R_OK)) return EINA_FALSE;
+   sanitized_path = eina_file_path_sanitize(path);
+   DBG("ethumb=%p, path=%s, key=%s", e, sanitized_path ? sanitized_path : "", 
key ? key : "");
+   if (sanitized_path && access(sanitized_path, R_OK)) return EINA_FALSE;
 
-   path = _ethumb_build_absolute_path(path, buf);
eina_stringshare_replace(>src_hash, NULL);
-   eina_stringshare_replace(>src_path, path);
+   eina_stringshare_replace(>src_path, sanitized_path);
eina_stringshare_replace(>src_key, key);
+   free(sanitized_path);
 
return EINA_TRUE;
 }
@@ -1141,7 +1085,7 @@ ethumb_file_free(Ethumb *e)
 EAPI void
 ethumb_thumb_path_set(Ethumb *e, const char *path, const char *key)
 {
-   char buf[PATH_MAX];
+   char *sanitized_path;
 
EINA_SAFETY_ON_NULL_RETURN(e);
DBG("ethumb=%p, path=%s, key=%s", e, path ? path : "", key ? key : "");
@@ -1153,9 +1097,11 @@ ethumb_thumb_path_set(Ethumb *e, const char *path, const 
char *key)
  }
else
  {
-path = _ethumb_build_absolute_path(path, buf);
-eina_stringshare_replace(>thumb_path, path);
+sanitized_path = eina_file_path_sanitize(path);
+path = eina_file_path_sanitize(path);
+eina_stringshare_replace(>thumb_path, sanitized_path);
 eina_stringshare_replace(>thumb_key, key);
+free(sanitized_path);
  }
 }
 

-- 




[EGIT] [core/efl] master 02/02: ethumb_slave: fix work on Windows

2016-12-09 Thread Andrii Kroitor
lorddrew pushed a commit to branch master.

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

commit 518910990c4ece24e963dc0ded88f6b8c2b2fb8e
Author: Andrii Kroitor <an.kroi...@samsung.com>
Date:   Fri Dec 9 15:59:44 2016 +0200

ethumb_slave: fix work on Windows

Ecore_Fd_Handler doesn't work on Windows as expected.
Replaced it with Ecore_Win32_Handler on Windows.
---
 src/bin/ethumb_client/ethumbd_slave.c | 24 
 1 file changed, 24 insertions(+)

diff --git a/src/bin/ethumb_client/ethumbd_slave.c 
b/src/bin/ethumb_client/ethumbd_slave.c
index 735c8c3..09efff5 100644
--- a/src/bin/ethumb_client/ethumbd_slave.c
+++ b/src/bin/ethumb_client/ethumbd_slave.c
@@ -47,7 +47,12 @@ static int _log_domain = -1;
 
 struct _Ethumbd_Child
 {
+#ifndef _WIN32
Ecore_Fd_Handler *fd_handler;
+#else
+   Ecore_Win32_Handler *fd_handler;
+#endif
+
Ethumb *ethumbt[NETHUMBS];
 };
 
@@ -171,7 +176,13 @@ _ec_free(struct _Ethumbd_Child *ec)
int i;
 
if (ec->fd_handler)
+ {
+#ifndef _WIN32
  ecore_main_fd_handler_del(ec->fd_handler);
+#else
+ ecore_main_win32_handler_del(ec->fd_handler);
+#endif
+ }
 
for (i = 0; i < NETHUMBS; i++)
  {
@@ -694,13 +705,19 @@ _ec_op_setup(struct _Ethumbd_Child *ec)
return 1;
 }
 
+#ifndef _WIN32
 static Eina_Bool
 _ec_fd_handler(void *data, Ecore_Fd_Handler *fd_handler)
+#else
+static Eina_Bool
+_ec_fd_handler(void *data, Ecore_Win32_Handler *fd_handler EINA_UNUSED)
+#endif
 {
struct _Ethumbd_Child *ec = data;
int op_id;
int r;
 
+#ifndef _WIN32
if (ecore_main_fd_handler_active_get(fd_handler, ECORE_FD_ERROR))
  {
ERR("error on pipein! child exiting...");
@@ -708,6 +725,7 @@ _ec_fd_handler(void *data, Ecore_Fd_Handler *fd_handler)
ecore_main_loop_quit();
return 0;
  }
+#endif
 
r = _ec_read_safe(STDIN_FILENO, _id, sizeof(op_id));
if (!r)
@@ -752,9 +770,15 @@ _ec_fd_handler(void *data, Ecore_Fd_Handler *fd_handler)
 static void
 _ec_setup(struct _Ethumbd_Child *ec)
 {
+#ifndef _WIN32
ec->fd_handler = ecore_main_fd_handler_add(
   STDIN_FILENO, ECORE_FD_READ | ECORE_FD_ERROR,
   _ec_fd_handler, ec, NULL, NULL);
+#else
+   ec->fd_handler = ecore_main_win32_handler_add(
+  GetStdHandle(STD_INPUT_HANDLE),
+  _ec_fd_handler, ec);
+#endif
 }
 
 int

-- 




[EGIT] [core/efl] master 01/01: ecore_exe: fix ecore_exe_send on Windows

2016-12-08 Thread Andrii Kroitor
lorddrew pushed a commit to branch master.

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

commit 52d4313bb65f4fc224d3b35e37243b08f5b16234
Author: Andrii Kroitor <an.kroi...@samsung.com>
Date:   Thu Dec 8 15:15:38 2016 +0200

ecore_exe: fix ecore_exe_send on Windows

Do not repeat already sent data.
Remove pipe_write.data_buf because data was sent directly anyway and it was
used only in this method.
---
 src/lib/ecore/ecore_exe_private.h |  2 --
 src/lib/ecore/ecore_exe_win32.c   | 11 +--
 2 files changed, 1 insertion(+), 12 deletions(-)

diff --git a/src/lib/ecore/ecore_exe_private.h 
b/src/lib/ecore/ecore_exe_private.h
index 53e4442..030b046 100644
--- a/src/lib/ecore/ecore_exe_private.h
+++ b/src/lib/ecore/ecore_exe_private.h
@@ -92,8 +92,6 @@ struct _Ecore_Exe_Data
{
   HANDLE child_pipe;
   HANDLE child_pipe_x;
-  void *data_buf;
-  int data_size;
} pipe_write;
 
struct
diff --git a/src/lib/ecore/ecore_exe_win32.c b/src/lib/ecore/ecore_exe_win32.c
index 7b9f41d..67b26fb 100644
--- a/src/lib/ecore/ecore_exe_win32.c
+++ b/src/lib/ecore/ecore_exe_win32.c
@@ -558,19 +558,10 @@ _impl_ecore_exe_send(Ecore_Exe  *obj,
const void *data,
int size)
 {
-   void *buf = NULL;
DWORD num_exe;
BOOL res;
 
-   buf = realloc(exe->pipe_write.data_buf, exe->pipe_write.data_size + size);
-   if (!buf) return EINA_FALSE;
-
-   exe->pipe_write.data_buf = buf;
-   memcpy((char *)exe->pipe_write.data_buf + exe->pipe_write.data_size, data, 
size);
-   exe->pipe_write.data_size += size;
-
-   res = WriteFile(exe->pipe_write.child_pipe_x, buf, 
exe->pipe_write.data_size, _exe, NULL);
-   printf(" ** res : %d\n", res);
+   res = WriteFile(exe->pipe_write.child_pipe_x, data, size, _exe, NULL);
if (!res || num_exe == 0)
  {
 ERR("Ecore_Exe %p stdin is closed! Cannot send %d bytes from %p",

-- 




[EGIT] [core/efl] master 01/01: Revert "exore_exe: fix from @raster"

2016-12-08 Thread Andrii Kroitor
lorddrew pushed a commit to branch master.

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

commit 6f6323d12e7797768098e64b1593f656574b250a
Author: Andrii Kroitor <an.kroi...@samsung.com>
Date:   Thu Dec 8 14:16:38 2016 +0200

Revert "exore_exe: fix from @raster"

This reverts commit c505b754ce43a711024f6bad6150c7294e067046.

Accidentally pushed this with build fix. Sorry :(
This commit is related to T4938 and it's goint to be updated, checked and 
pushed later.
---
 src/lib/ecore/ecore_exe_private.h |  23 +-
 src/lib/ecore/ecore_exe_win32.c   | 665 +++---
 2 files changed, 351 insertions(+), 337 deletions(-)

diff --git a/src/lib/ecore/ecore_exe_private.h 
b/src/lib/ecore/ecore_exe_private.h
index 7551e7d..53e4442 100644
--- a/src/lib/ecore/ecore_exe_private.h
+++ b/src/lib/ecore/ecore_exe_private.h
@@ -80,26 +80,29 @@ struct _Ecore_Exe_Data
Ecore_Win32_Handler *h_close;
Ecore_Exe_Win32_Signal sig;
 
-   Ecore_Thread *th;
-
-   struct {
+   struct
+   {
   HANDLE child_pipe;
+  HANDLE thread;
   void *data_buf;
-  int data_size;
+  DWORD data_size;
} pipe_read;
 
-   struct {
+   struct
+   {
   HANDLE child_pipe;
+  HANDLE child_pipe_x;
   void *data_buf;
   int data_size;
-   } pipe_error;
+   } pipe_write;
 
-   struct {
+   struct
+   {
   HANDLE child_pipe;
-  HANDLE child_pipe_x;
+  HANDLE thread;
   void *data_buf;
-  int data_size;
-   } pipe_write;
+  DWORD data_size;
+   } pipe_error;
 
Eina_Bool close_threads : 1;
Eina_Bool is_suspended : 1;
diff --git a/src/lib/ecore/ecore_exe_win32.c b/src/lib/ecore/ecore_exe_win32.c
index eb7b092..7b9f41d 100644
--- a/src/lib/ecore/ecore_exe_win32.c
+++ b/src/lib/ecore/ecore_exe_win32.c
@@ -40,11 +40,27 @@ static void
 _ecore_exe_threads_terminate(Ecore_Exe *obj)
 {
Ecore_Exe_Data *exe = efl_data_scope_get(obj, ECORE_EXE_CLASS);
+   HANDLE threads[2] = { NULL, NULL };
+   int i = 0;
 
if (!exe) return;
-   if (!exe->th) return;
-   ecore_thread_cancel(exe->th);
-   ecore_thread_wait(exe->th, 0.3);
+   if (exe->pipe_read.thread)
+ {
+threads[i] = exe->pipe_read.thread;
+i++;
+ }
+   if (exe->pipe_error.thread)
+ {
+threads[i] = exe->pipe_error.thread;
+i++;
+ }
+   if (i > 0)
+ {
+exe->close_threads = 1;
+WaitForMultipleObjects(i, threads, TRUE, INFINITE);
+   IF_FN_DEL(CloseHandle, exe->pipe_error.thread);
+   IF_FN_DEL(CloseHandle, exe->pipe_read.thread);
+ }
 }
 
 static Eina_Bool
@@ -65,8 +81,10 @@ _ecore_exe_close_cb(void *data,
/* FIXME : manage the STILL_ACTIVE returned error */
if (!GetExitCodeProcess(exe->process, _code))
  {
-char *msg = evil_last_error_get();
-DBG("%s", msg);
+char *msg;
+
+msg = evil_last_error_get();
+printf("%s\n", msg);
 free(msg);
  }
 
@@ -76,182 +94,154 @@ _ecore_exe_close_cb(void *data,
e->exe = obj;
exe->h_close = NULL; // It's going to get deleted in the next callback.
 
-   ecore_event_add(ECORE_EXE_EVENT_DEL, e, _ecore_exe_event_del_free, NULL);
+   ecore_event_add(ECORE_EXE_EVENT_DEL, e,
+   _ecore_exe_event_del_free, NULL);
 
DBG("Exiting process %s with exit code %d\n", exe->cmd, e->exit_code);
+
return 0;
 }
 
-typedef struct
-{
-   Ecore_Exe  *obj;
-   HANDLE  read_pipe;
-   HANDLE  error_pipe;
-   Eina_Bool   read : 1;
-   Eina_Bool   error : 1;
-} Threaddata;
-
-typedef struct
-{
-   Ecore_Exe *obj;
-   unsigned char *buf;
-   intbuf_size;
-   Eina_Bool  read : 1;
-   Eina_Bool  error : 1;
-} Threadreply;
-
-static void
-_ecore_exe_win32_io_poll_thread(void *data, Ecore_Thread *th)
+static unsigned int __stdcall
+_ecore_exe_pipe_read_thread_cb(void *data)
 {
-   Threaddata *tdat = data;
-   Threadreply *trep;
-   Eina_Bool data_read, data_write;
-   char buf[4096];
-   DWORD size, current_size;
+   char buf[64];
+   Ecore_Exe *obj = data;
+   Ecore_Exe_Data *exe = efl_data_scope_get(obj, ECORE_EXE_CLASS);
+   Ecore_Exe_Event_Data *event_data;
+   char *current_buf = NULL;
+   DWORD size;
+   DWORD current_size = 0;
BOOL res;
 
-   while (EINA_TRUE)
+   if (!exe) return 0;
+   while (1)
  {
-data_read = EINA_FALSE;
-data_write = EINA_FALSE;
+res = PeekNamedPipe(exe->pipe_read.child_pipe,
+buf, sizeof(buf) - 1, , _size, NULL);
+if (!res || (size == 0))
+  {
+ if (exe->close_threads)
+   break;
+
+ Sleep(100);
+ continue;
+  }
 
-if (tdat->read)
+current_buf = (char *)malloc(current_size);
+if (!current_buf)
+  continue;
+
+res = R

[EGIT] [core/efl] master 02/02: evas: fix software_gdi engine compilation

2016-12-08 Thread Andrii Kroitor
lorddrew pushed a commit to branch master.

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

commit 0c9182b970fde73d419aff0973aa7ca176ea7cd7
Author: Andrii Kroitor <an.kroi...@samsung.com>
Date:   Thu Dec 8 14:13:01 2016 +0200

evas: fix software_gdi engine compilation
---
 src/modules/evas/engines/software_gdi/evas_engine.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/modules/evas/engines/software_gdi/evas_engine.c 
b/src/modules/evas/engines/software_gdi/evas_engine.c
index 1e156f7..413d20b 100644
--- a/src/modules/evas/engines/software_gdi/evas_engine.c
+++ b/src/modules/evas/engines/software_gdi/evas_engine.c
@@ -94,7 +94,6 @@ static void *
 eng_setup(void *in, unsigned int w, unsigned int h)
 {
Evas_Engine_Info_Software_Gdi *info;
-   Render_Engine *re;
 
info = (Evas_Engine_Info_Software_Gdi *)in;
return _output_setup(w,
@@ -110,10 +109,12 @@ eng_setup(void *in, unsigned int w, unsigned int h)
 static int
 eng_update(void *data, void *in, unsigned int w, unsigned int h)
 {
+   Evas_Engine_Info_Software_Gdi *info;
Render_Engine *re = data;
Outbuf *ob;
int ponebuf = 0;
 
+   info = (Evas_Engine_Info_Software_Gdi *)in;
ponebuf = re->generic.ob->onebuf;
 
ob = evas_software_gdi_outbuf_setup(w,

-- 




[EGIT] [core/efl] master 01/02: exore_exe: fix from @raster

2016-12-08 Thread Andrii Kroitor
lorddrew pushed a commit to branch master.

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

commit c505b754ce43a711024f6bad6150c7294e067046
Author: Andrii Kroitor <an.kroi...@samsung.com>
Date:   Fri Dec 2 12:01:41 2016 +0200

exore_exe: fix from @raster
---
 src/lib/ecore/ecore_exe_private.h |  23 +-
 src/lib/ecore/ecore_exe_win32.c   | 665 +++---
 2 files changed, 337 insertions(+), 351 deletions(-)

diff --git a/src/lib/ecore/ecore_exe_private.h 
b/src/lib/ecore/ecore_exe_private.h
index 53e4442..7551e7d 100644
--- a/src/lib/ecore/ecore_exe_private.h
+++ b/src/lib/ecore/ecore_exe_private.h
@@ -80,29 +80,26 @@ struct _Ecore_Exe_Data
Ecore_Win32_Handler *h_close;
Ecore_Exe_Win32_Signal sig;
 
-   struct
-   {
+   Ecore_Thread *th;
+
+   struct {
   HANDLE child_pipe;
-  HANDLE thread;
   void *data_buf;
-  DWORD data_size;
+  int data_size;
} pipe_read;
 
-   struct
-   {
+   struct {
   HANDLE child_pipe;
-  HANDLE child_pipe_x;
   void *data_buf;
   int data_size;
-   } pipe_write;
+   } pipe_error;
 
-   struct
-   {
+   struct {
   HANDLE child_pipe;
-  HANDLE thread;
+  HANDLE child_pipe_x;
   void *data_buf;
-  DWORD data_size;
-   } pipe_error;
+  int data_size;
+   } pipe_write;
 
Eina_Bool close_threads : 1;
Eina_Bool is_suspended : 1;
diff --git a/src/lib/ecore/ecore_exe_win32.c b/src/lib/ecore/ecore_exe_win32.c
index 7b9f41d..eb7b092 100644
--- a/src/lib/ecore/ecore_exe_win32.c
+++ b/src/lib/ecore/ecore_exe_win32.c
@@ -40,27 +40,11 @@ static void
 _ecore_exe_threads_terminate(Ecore_Exe *obj)
 {
Ecore_Exe_Data *exe = efl_data_scope_get(obj, ECORE_EXE_CLASS);
-   HANDLE threads[2] = { NULL, NULL };
-   int i = 0;
 
if (!exe) return;
-   if (exe->pipe_read.thread)
- {
-threads[i] = exe->pipe_read.thread;
-i++;
- }
-   if (exe->pipe_error.thread)
- {
-threads[i] = exe->pipe_error.thread;
-i++;
- }
-   if (i > 0)
- {
-exe->close_threads = 1;
-WaitForMultipleObjects(i, threads, TRUE, INFINITE);
-   IF_FN_DEL(CloseHandle, exe->pipe_error.thread);
-   IF_FN_DEL(CloseHandle, exe->pipe_read.thread);
- }
+   if (!exe->th) return;
+   ecore_thread_cancel(exe->th);
+   ecore_thread_wait(exe->th, 0.3);
 }
 
 static Eina_Bool
@@ -81,10 +65,8 @@ _ecore_exe_close_cb(void *data,
/* FIXME : manage the STILL_ACTIVE returned error */
if (!GetExitCodeProcess(exe->process, _code))
  {
-char *msg;
-
-msg = evil_last_error_get();
-printf("%s\n", msg);
+char *msg = evil_last_error_get();
+DBG("%s", msg);
 free(msg);
  }
 
@@ -94,154 +76,182 @@ _ecore_exe_close_cb(void *data,
e->exe = obj;
exe->h_close = NULL; // It's going to get deleted in the next callback.
 
-   ecore_event_add(ECORE_EXE_EVENT_DEL, e,
-   _ecore_exe_event_del_free, NULL);
+   ecore_event_add(ECORE_EXE_EVENT_DEL, e, _ecore_exe_event_del_free, NULL);
 
DBG("Exiting process %s with exit code %d\n", exe->cmd, e->exit_code);
-
return 0;
 }
 
-static unsigned int __stdcall
-_ecore_exe_pipe_read_thread_cb(void *data)
+typedef struct
 {
-   char buf[64];
-   Ecore_Exe *obj = data;
-   Ecore_Exe_Data *exe = efl_data_scope_get(obj, ECORE_EXE_CLASS);
-   Ecore_Exe_Event_Data *event_data;
-   char *current_buf = NULL;
-   DWORD size;
-   DWORD current_size = 0;
+   Ecore_Exe  *obj;
+   HANDLE  read_pipe;
+   HANDLE  error_pipe;
+   Eina_Bool   read : 1;
+   Eina_Bool   error : 1;
+} Threaddata;
+
+typedef struct
+{
+   Ecore_Exe *obj;
+   unsigned char *buf;
+   intbuf_size;
+   Eina_Bool  read : 1;
+   Eina_Bool  error : 1;
+} Threadreply;
+
+static void
+_ecore_exe_win32_io_poll_thread(void *data, Ecore_Thread *th)
+{
+   Threaddata *tdat = data;
+   Threadreply *trep;
+   Eina_Bool data_read, data_write;
+   char buf[4096];
+   DWORD size, current_size;
BOOL res;
 
-   if (!exe) return 0;
-   while (1)
+   while (EINA_TRUE)
  {
-res = PeekNamedPipe(exe->pipe_read.child_pipe,
-buf, sizeof(buf) - 1, , _size, NULL);
-if (!res || (size == 0))
-  {
- if (exe->close_threads)
-   break;
-
- Sleep(100);
- continue;
-  }
+data_read = EINA_FALSE;
+data_write = EINA_FALSE;
 
-current_buf = (char *)malloc(current_size);
-if (!current_buf)
-  continue;
-
-res = ReadFile(exe->pipe_read.child_pipe, current_buf, current_size, 
, NULL);
-if (!res || (size == 0))
-  {
- free(current_buf);
- current_buf = NULL;
- continue;
-  }
-
-current_size = size;
-
-if (!exe->pipe_re

[EGIT] [core/efl] master 01/01: ecore_con: fix work on Windows

2016-11-29 Thread Andrii Kroitor
lorddrew pushed a commit to branch master.

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

commit 03f20efaf045fd93e09cffac06790cf509ee6657
Author: Andrii Kroitor <an.kroi...@samsung.com>
Date:   Tue Nov 29 15:11:55 2016 +0200

ecore_con: fix work on Windows

Per aspera ad astra.
One little missing star was breaking all EFL UI applications.
---
 src/lib/ecore_con/ecore_con_local_win32.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lib/ecore_con/ecore_con_local_win32.c 
b/src/lib/ecore_con/ecore_con_local_win32.c
index b322d9a..4bd0ba4 100644
--- a/src/lib/ecore_con/ecore_con_local_win32.c
+++ b/src/lib/ecore_con/ecore_con_local_win32.c
@@ -552,7 +552,7 @@ ecore_con_local_connect(Ecore_Con_Server *obj,
 {
 #warning "I am pretty sure cb_done should be used."
Efl_Network_Server_Data *svr = efl_data_scope_get(obj, 
EFL_NETWORK_SERVER_CLASS);
-   char buf = NULL;
+   char *buf = NULL;
Ecore_Win32_Handler *handler_read;
Ecore_Win32_Handler *handler_peek;
 

-- 




[EGIT] [tools/eflete] master 01/02: fix build on Windows on efl upstream

2016-11-28 Thread Andrii Kroitor
rimmed pushed a commit to branch master.

http://git.enlightenment.org/tools/eflete.git/commit/?id=db0d054eec7aaae5be064c23701d45a2c5dc8950

commit db0d054eec7aaae5be064c23701d45a2c5dc8950
Author: Andrii Kroitor <an.kroi...@samsung.com>
Date:   Mon Nov 28 11:40:20 2016 +0200

fix build on Windows on efl upstream

Change-Id: Id2669979c0bfed600f3b912c312c2097a282b41d
---
 src/bin/Makefile.am | 2 +-
 src/lib/ewe_ruler.c | 4 
 src/lib/ewe_ruler.h | 7 ---
 3 files changed, 5 insertions(+), 8 deletions(-)

diff --git a/src/bin/Makefile.am b/src/bin/Makefile.am
index ae74630..f792aef 100644
--- a/src/bin/Makefile.am
+++ b/src/bin/Makefile.am
@@ -204,8 +204,8 @@ libete_a_CPPFLAGS = ${eflete_CPPFLAGS} \
 
 eflete_LDADD = \
 libete.a \
-@EFL_LIBS@ \
 ${top_builddir}/src/lib/libewe.a \
+@EFL_LIBS@ \
 @LTLIBINTL@
 
 eflete_exporter_SOURCES = ../../src/bin/exporter/eflete_exporter.c
diff --git a/src/lib/ewe_ruler.c b/src/lib/ewe_ruler.c
index 3e32f0b..95888c0 100644
--- a/src/lib/ewe_ruler.c
+++ b/src/lib/ewe_ruler.c
@@ -15,8 +15,12 @@
  * You should have received a copy of the GNU Lesser General Public License
  * along with this program; If not, see www.gnu.org/licenses/lgpl.html.
  */
+
 #include "ewe_private.h"
 #include "ewe_widget_ruler.h"
+#undef EAPI
+#define EAPI
+#include "ewe_ruler_eo.h"
 
 #define MY_CLASS EWE_RULER_CLASS
 
diff --git a/src/lib/ewe_ruler.h b/src/lib/ewe_ruler.h
index 74376f4..ee52b70 100644
--- a/src/lib/ewe_ruler.h
+++ b/src/lib/ewe_ruler.h
@@ -32,13 +32,6 @@
  */
 
 #include "ewe_ruler_common.h"
-
-#ifdef EFL_EO_API_SUPPORT
-#include "ewe_ruler_eo.h"
-#endif
-
-#ifndef EFL_NOLEGACY_API_SUPPORT
 #include "ewe_ruler_legacy.h"
-#endif
 
 #endif /* EWE_RULER_H */

-- 




[EGIT] [core/efl] master 01/01: elementary_test: fix function name conflict on Windows

2016-11-25 Thread Andrii Kroitor
lorddrew pushed a commit to branch master.

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

commit 47f14b78f45b188fdabaf3a491479a641c7c7e3d
Author: Andrii Kroitor <an.kroi...@samsung.com>
Date:   Fri Nov 25 15:51:10 2016 +0200

elementary_test: fix function name conflict on Windows
---
 src/bin/elementary/test_win_modal.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/bin/elementary/test_win_modal.c 
b/src/bin/elementary/test_win_modal.c
index b844b8a..8775ead 100644
--- a/src/bin/elementary/test_win_modal.c
+++ b/src/bin/elementary/test_win_modal.c
@@ -15,7 +15,7 @@ _parent_win_get(Evas_Object *obj)
 }
 
 static void
-_close(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
+_close_cb(void *data, Evas_Object *obj EINA_UNUSED, void *event_info 
EINA_UNUSED)
 {
Evas_Object *win = data;
 
@@ -66,7 +66,7 @@ test_win_modal(void *data EINA_UNUSED, Evas_Object *obj, void 
*event_info EINA_U
elm_object_text_set(bt, "Close");
evas_object_size_hint_align_set(bt, 0.5, 0.5);
evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, 0);
-   evas_object_smart_callback_add(bt, "clicked", _close, win);
+   evas_object_smart_callback_add(bt, "clicked", _close_cb, win);
elm_box_pack_end(bx, bt);
evas_object_show(bt);
 

-- 




[EGIT] [tools/eflete] master 01/01: managers: fix "Preview" text

2016-11-25 Thread Andrii Kroitor
rimmed pushed a commit to branch master.

http://git.enlightenment.org/tools/eflete.git/commit/?id=778b8a73194835f7e037cf069d82594383c3aa36

commit 778b8a73194835f7e037cf069d82594383c3aa36
Author: Andrii Kroitor <an.kroi...@samsung.com>
Date:   Thu Nov 24 17:11:56 2016 +0200

managers: fix "Preview" text

Change-Id: I9856207fe655d9571ed40af4ae48d0ef2fedbb19
---
 data/themes/tizen/widgets/layouts/manager.edc | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/data/themes/tizen/widgets/layouts/manager.edc 
b/data/themes/tizen/widgets/layouts/manager.edc
index ae36bc3..0691831 100644
--- a/data/themes/tizen/widgets/layouts/manager.edc
+++ b/data/themes/tizen/widgets/layouts/manager.edc
@@ -11,7 +11,9 @@ group { name: "elm/layout/manager/internal";
 text {
font: "Breeze";
size: 13;
+   min: 1 0;
max: 1 0;
+   ellipsis: -1;
 }
 rel1.to_x: "border";
 rel2.to_x: "border";

-- 




[EGIT] [tools/eflete] master 02/02: UTC: fix ewe_ruler tests

2016-11-23 Thread Andrii Kroitor
rimmed pushed a commit to branch master.

http://git.enlightenment.org/tools/eflete.git/commit/?id=99c70042ba0255414571d012f8097eab3e5dcaad

commit 99c70042ba0255414571d012f8097eab3e5dcaad
Author: Andrii Kroitor <an.kroi...@samsung.com>
Date:   Wed Nov 23 14:04:03 2016 +0200

UTC: fix ewe_ruler tests

Change-Id: Ia099d17f0d8fd17c4e2899e2bfea115e4af05099
---
 tests/test_ewe_ruler/ewe_ruler_add.c   | 4 
 tests/test_ewe_ruler/ewe_ruler_format_get.c| 4 
 tests/test_ewe_ruler/ewe_ruler_format_set.c| 4 
 tests/test_ewe_ruler/ewe_ruler_horizontal_get.c| 4 
 tests/test_ewe_ruler/ewe_ruler_horizontal_set.c| 6 ++
 tests/test_ewe_ruler/ewe_ruler_marker_absolute_get.c   | 4 
 tests/test_ewe_ruler/ewe_ruler_marker_absolute_set.c   | 4 
 tests/test_ewe_ruler/ewe_ruler_marker_add.c| 4 
 tests/test_ewe_ruler/ewe_ruler_marker_del.c| 4 
 tests/test_ewe_ruler/ewe_ruler_marker_relative_get.c   | 4 
 tests/test_ewe_ruler/ewe_ruler_marker_relative_set.c   | 4 
 tests/test_ewe_ruler/ewe_ruler_marker_style_get.c  | 4 
 tests/test_ewe_ruler/ewe_ruler_marker_style_set.c  | 4 
 tests/test_ewe_ruler/ewe_ruler_marker_visible_get.c| 4 
 tests/test_ewe_ruler/ewe_ruler_marker_visible_set.c| 4 
 tests/test_ewe_ruler/ewe_ruler_scale_add.c | 4 
 tests/test_ewe_ruler/ewe_ruler_scale_del.c | 4 
 tests/test_ewe_ruler/ewe_ruler_scale_middle_mark_get.c | 4 
 tests/test_ewe_ruler/ewe_ruler_scale_middle_mark_set.c | 4 
 tests/test_ewe_ruler/ewe_ruler_scale_visible_get.c | 4 
 tests/test_ewe_ruler/ewe_ruler_scale_visible_set.c | 4 
 tests/test_ewe_ruler/ewe_ruler_step_get.c  | 4 
 tests/test_ewe_ruler/ewe_ruler_step_set.c  | 4 
 tests/test_ewe_ruler/ewe_ruler_style_get.c | 4 
 tests/test_ewe_ruler/ewe_ruler_style_set.c | 4 
 tests/test_ewe_ruler/ewe_ruler_value_step_get.c| 4 
 tests/test_ewe_ruler/ewe_ruler_value_step_set.c| 4 
 tests/test_ewe_ruler/ewe_ruler_zero_offset_get.c   | 4 
 tests/test_ewe_ruler/ewe_ruler_zero_offset_set.c   | 4 
 29 files changed, 118 insertions(+)

diff --git a/tests/test_ewe_ruler/ewe_ruler_add.c 
b/tests/test_ewe_ruler/ewe_ruler_add.c
index a5cc33a..90e45f9 100644
--- a/tests/test_ewe_ruler/ewe_ruler_add.c
+++ b/tests/test_ewe_ruler/ewe_ruler_add.c
@@ -53,6 +53,7 @@
 EFLETE_TEST(ewe_ruler_add_test_p)
 {
logger_init();
+   elm_init(0, 0);
app_init();
Evas_Object *result, *parent;
parent = elm_win_add(NULL, "test", ELM_WIN_BASIC);
@@ -62,6 +63,7 @@ EFLETE_TEST(ewe_ruler_add_test_p)
 
evas_object_del(parent);
app_shutdown();
+   elm_shutdown();
 }
 END_TEST
 
@@ -89,6 +91,7 @@ END_TEST
 EFLETE_TEST(ewe_ruler_add_test_n)
 {
logger_init();
+   elm_init(0, 0);
app_init();
Evas_Object *result;
 
@@ -96,6 +99,7 @@ EFLETE_TEST(ewe_ruler_add_test_n)
ck_assert_msg(result == NULL, "Not NULL returned");
 
app_shutdown();
+   elm_shutdown();
 }
 END_TEST
 
diff --git a/tests/test_ewe_ruler/ewe_ruler_format_get.c 
b/tests/test_ewe_ruler/ewe_ruler_format_get.c
index 1a1d5be..d26f6b8 100644
--- a/tests/test_ewe_ruler/ewe_ruler_format_get.c
+++ b/tests/test_ewe_ruler/ewe_ruler_format_get.c
@@ -54,6 +54,7 @@
 EFLETE_TEST(ewe_ruler_format_get_test_p)
 {
logger_init();
+   elm_init(0, 0);
app_init();
Evas_Object *win = elm_win_util_standard_add("test", "test");
Evas_Object *ruler = ewe_ruler_add(win);
@@ -63,6 +64,7 @@ EFLETE_TEST(ewe_ruler_format_get_test_p)
 
evas_object_del(win);
app_shutdown();
+   elm_shutdown();
 }
 END_TEST
 
@@ -91,11 +93,13 @@ END_TEST
 EFLETE_TEST(ewe_ruler_format_get_test_n)
 {
logger_init();
+   elm_init(0, 0);
app_init();
 
ck_assert_msg(ewe_ruler_format_get(NULL, NULL) == NULL, "Getted format from 
NULL ruler object");
 
app_shutdown();
+   elm_shutdown();
 }
 END_TEST
 
diff --git a/tests/test_ewe_ruler/ewe_ruler_format_set.c 
b/tests/test_ewe_ruler/ewe_ruler_format_set.c
index 8ec5a5c..5e125ac 100644
--- a/tests/test_ewe_ruler/ewe_ruler_format_set.c
+++ b/tests/test_ewe_ruler/ewe_ruler_format_set.c
@@ -58,6 +58,7 @@
 EFLETE_TEST(ewe_ruler_format_set_test_p)
 {
logger_init();
+   elm_init(0, 0);
app_init();
Evas_Object *win = elm_win_util_standard_add("test", "test");
Evas_Object *ruler = ewe_ruler_add(win);
@@ -70,6 +71,7 @@ EFLETE_TEST(ewe_ruler_format_set_test_p)
 
evas_object_del(win);
app_shutdown();
+   elm_shutdown();
 }
 END_TEST
 
@@ -98,11 +100,13 @@ END_TEST
 EFLETE_TEST(ewe_ruler_format_set_test_n)
 {
logger_init();
+   elm_init(0, 0);
app_init();
 
ck_assert_msg(ewe_ruler_format_set(NULL, NULL, "%f") == EINA_FALSE, "Setted 
format for NULL ruler object&qu

  1   2   3   4   >