[EGIT] [core/efl] master 01/01: edje_cc out: fix div by 0 correctly

2017-07-23 Thread Amitesh Singh
ami pushed a commit to branch master.

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

commit 4b4564c85776edafde9ae6407a3abc7a67910cf6
Author: Amitesh Singh 
Date:   Mon Jul 24 09:50:05 2017 +0900

edje_cc out: fix div by 0 correctly
---
 src/bin/edje/edje_cc_out.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/bin/edje/edje_cc_out.c b/src/bin/edje/edje_cc_out.c
index 1f4315cef7..99f46bf564 100644
--- a/src/bin/edje/edje_cc_out.c
+++ b/src/bin/edje/edje_cc_out.c
@@ -2529,7 +2529,7 @@ data_thread_license(void *data, Ecore_Thread *thread 
EINA_UNUSED)
  {
 double fsize = eina_file_size_get(f);
 
-if (fsize < 0.0) fsize = 0.0;
+if (fsize <= 0.0) fsize = 1.0;
 INF("Wrote %9i bytes (%4iKb) for \"%s\" license entry compress: [real: 
%2.1f%%]",
 bytes, (bytes + 512) / 1024, license,
 100.0 - ((100.0 * (double)bytes) / fsize));
@@ -2617,7 +2617,7 @@ data_thread_authors(void *data, Ecore_Thread *thread 
EINA_UNUSED)
  {
 double fsize = eina_file_size_get(f);
 
-if (fsize < 0.0) fsize = 0.0;
+if (fsize <= 0.0) fsize = 1.0;
 INF("Wrote %9i bytes (%4iKb) for \"%s\" authors entry compress: [real: 
%2.1f%%]",
 bytes, (bytes + 512) / 1024, license,
 100.0 - ((100.0 * (double)bytes) / fsize));

-- 




[EGIT] [tools/edi] master 01/01: add open files in new tab.

2017-07-23 Thread Al Poole
ajwillia-ms pushed a commit to branch master.

http://git.enlightenment.org/tools/edi.git/commit/?id=be333dee6fc79cfe42ac3570e73927db6e108271

commit be333dee6fc79cfe42ac3570e73927db6e108271
Author: Al Poole 
Date:   Sun Jul 23 21:54:47 2017 +0100

add open files in new tab.

Summary: focus chanegs on click of tab in panel. closing last tab closes 
panel. Exit and open remembers tabs. etc.

Reviewers: ajwillia.ms

Reviewed By: ajwillia.ms

Differential Revision: https://phab.enlightenment.org/D5034
---
 src/bin/Makefile.am|   2 +
 src/bin/edi_config.c   |   5 +-
 src/bin/edi_config.h   |   3 +-
 src/bin/edi_filepanel.c|  17 +
 src/bin/edi_main.c |  80 +-
 src/bin/mainview/edi_mainview.c| 849 +
 src/bin/mainview/edi_mainview.h|  13 +-
 src/bin/mainview/edi_mainview_item.c   |  17 +
 src/bin/mainview/edi_mainview_item.h   |   3 +
 .../{edi_mainview.c => edi_mainview_panel.c}   | 842 
 src/bin/mainview/edi_mainview_panel.h  | 290 +++
 11 files changed, 904 insertions(+), 1217 deletions(-)

diff --git a/src/bin/Makefile.am b/src/bin/Makefile.am
index d4fd2d8..75ca66b 100644
--- a/src/bin/Makefile.am
+++ b/src/bin/Makefile.am
@@ -35,6 +35,7 @@ edi_searchpanel.h \
 edi_consolepanel.h \
 edi_debugpanel.h \
 mainview/edi_mainview_item.h \
+mainview/edi_mainview_panel.h \
 mainview/edi_mainview.h
 
 edi_SOURCES = \
@@ -58,6 +59,7 @@ edi_searchpanel.c \
 edi_consolepanel.c \
 edi_debugpanel.c \
 mainview/edi_mainview_item.c \
+mainview/edi_mainview_panel.c \
 mainview/edi_mainview.c \
 edi_main.c \
 edi_private.h
diff --git a/src/bin/edi_config.c b/src/bin/edi_config.c
index 4ae8549..f1fcaa7 100644
--- a/src/bin/edi_config.c
+++ b/src/bin/edi_config.c
@@ -234,6 +234,7 @@ _edi_config_init(void)
EDI_CONFIG_VAL(D, T, path, EET_T_STRING);
EDI_CONFIG_VAL(D, T, type, EET_T_STRING);
EDI_CONFIG_VAL(D, T, windowed, EET_T_UCHAR);
+   EDI_CONFIG_VAL(D, T, panel_id, EET_T_INT);
 
_edi_proj_cfg_edd = EDI_CONFIG_DD_NEW("Project_Config", Edi_Project_Config);
#undef T
@@ -504,7 +505,7 @@ _edi_project_config_save()
 
 void
 _edi_project_config_tab_add(const char *path, const char *type,
-Eina_Bool windowed)
+Eina_Bool windowed, int panel_id)
 {
Edi_Project_Config_Tab *tab;
Eina_List *list, *next;
@@ -525,6 +526,8 @@ _edi_project_config_tab_add(const char *path, const char 
*type,
 
tab->type = eina_stringshare_add(type);
tab->windowed = windowed;
+   tab->panel_id = panel_id;
+
_edi_project_config->tabs = eina_list_append(_edi_project_config->tabs, 
tab);
_edi_project_config_save_no_notify();
 }
diff --git a/src/bin/edi_config.h b/src/bin/edi_config.h
index 249f0b6..d5d709e 100644
--- a/src/bin/edi_config.h
+++ b/src/bin/edi_config.h
@@ -50,6 +50,7 @@ struct _Edi_Project_Config_Tab
const char *path;
const char *type;
Eina_Bool windowed;
+   int panel_id;
 };
 
 struct _Edi_Project_Config_Launch
@@ -114,7 +115,7 @@ void _edi_project_config_load(void);
 void _edi_project_config_save(void);
 
 void _edi_project_config_tab_add(const char *path, const char *type,
- Eina_Bool windowed);
+ Eina_Bool windowed, int panel_id);
 void _edi_project_config_tab_remove(const char *path);
 
 #ifdef __cplusplus
diff --git a/src/bin/edi_filepanel.c b/src/bin/edi_filepanel.c
index bc4f15a..fdcfccc 100644
--- a/src/bin/edi_filepanel.c
+++ b/src/bin/edi_filepanel.c
@@ -135,6 +135,20 @@ _item_menu_open_as_image_cb(void *data, Evas_Object *obj 
EINA_UNUSED,
 }
 
 static void
+_item_menu_open_panel_cb(void *data, Evas_Object *obj EINA_UNUSED,
+void *event_info EINA_UNUSED)
+{
+   Edi_Mainview_Panel *panel;
+   Edi_Path_Options *options;
+   Edi_Dir_Data *sd = data;
+
+   options = edi_path_options_create(sd->path);
+   panel = edi_mainview_panel_append();
+
+   edi_mainview_panel_open(panel, options);
+}
+
+static void
 _item_menu_rename_cb(void *data, Evas_Object *obj EINA_UNUSED,
   void *event_info EINA_UNUSED)
 {
@@ -224,11 +238,14 @@ _item_menu_create(Evas_Object *win, Edi_Dir_Data *sd)
 
menu_it = elm_menu_item_add(menu, NULL, "gtk-execute", "open external",
_item_menu_xdgopen_cb, sd);
+
menu_it = elm_menu_item_add(menu, NULL, NULL, "open as", NULL, NULL);
_item_menu_filetype_create(menu, menu_it, "text", 
_item_menu_open_as_text_cb, sd);
_item_menu_filetype_create(menu, menu_it, "code", 
_item_menu_open_as_code_cb, sd);
_item_menu_filetype_create(menu, menu_it, "image", 
_item_menu_open_as_image_cb, sd);
 
+   menu_it = elm_menu_item_add(menu, NULL, NULL, 

[EGIT] [core/efl] master 01/01: elm_code: Fix crash with long lines

2017-07-23 Thread Andy Williams
ajwillia-ms pushed a commit to branch master.

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

commit 292e9e9ecf456cda79b287fe65c16d90f14da325
Author: Andy Williams 
Date:   Sun Jul 23 21:30:35 2017 +0100

elm_code: Fix crash with long lines

Also fixes issue where widget would sometimes blank when scrolling
@fix
---
 src/lib/elementary/elm_code_widget.c  | 31 ---
 src/lib/elementary/elm_code_widget_text.c |  9 +++--
 2 files changed, 15 insertions(+), 25 deletions(-)

diff --git a/src/lib/elementary/elm_code_widget.c 
b/src/lib/elementary/elm_code_widget.c
index c0b4da73ff..04f20edcd6 100644
--- a/src/lib/elementary/elm_code_widget.c
+++ b/src/lib/elementary/elm_code_widget.c
@@ -1890,28 +1890,11 @@ _elm_code_widget_resize(Elm_Code_Widget *widget, 
Elm_Code_Line *newline)
w = 0;
h = elm_code_file_lines_get(pd->code->file);
 
-   if (newline)
+   EINA_LIST_FOREACH(pd->code->file->lines, item, line)
  {
-line = eina_list_data_get(pd->code->file->lines);
-if (line)
-  {
- line_width = elm_code_widget_line_text_column_width_get(widget, 
newline);
- w = (int) line_width + gutter + 1;
-  }
 line_width = elm_code_widget_line_text_column_width_get(widget, line);
 if ((int) line_width + gutter + 1 > w)
-  {
- w = (int) line_width + gutter + 1;
-  }
- }
-   else
- {
-EINA_LIST_FOREACH(pd->code->file->lines, item, line)
-  {
- line_width = elm_code_widget_line_text_column_width_get(widget, 
line);
- if ((int) line_width + gutter + 1 > w)
-   w = (int) line_width + gutter + 1;
-  }
+  w = (int) line_width + gutter + 1;
  }
 
_elm_code_widget_ensure_n_grid_rows(widget, h);
@@ -1920,13 +1903,16 @@ _elm_code_widget_resize(Elm_Code_Widget *widget, 
Elm_Code_Line *newline)
  ww = w*cw;
if (h*ch > wh)
  wh = h*ch;
-   if (cw > 0)
- pd->col_count = ww/cw + 1;
+
+   if (cw > 0 && ww/cw > w)
+ pd->col_count = ww/cw;
+   else
+ pd->col_count = w;
 
EINA_LIST_FOREACH(pd->grids, item, grid)
  {
 evas_object_textgrid_size_set(grid, pd->col_count, 1);
-evas_object_size_hint_min_set(grid, w*cw, ch);
+evas_object_size_hint_min_set(grid, ww, ch);
  }
 
if (!newline)
@@ -1940,7 +1926,6 @@ _elm_code_widget_resize(Elm_Code_Widget *widget, 
Elm_Code_Line *newline)
 
 return;
  }
-   _elm_code_widget_fill_line(widget, line);
 
if (pd->gravity_x == 1.0 || pd->gravity_y == 1.0)
  _elm_code_widget_scroll_by(widget,
diff --git a/src/lib/elementary/elm_code_widget_text.c 
b/src/lib/elementary/elm_code_widget_text.c
index 879a0a7ecf..43cce43a97 100644
--- a/src/lib/elementary/elm_code_widget_text.c
+++ b/src/lib/elementary/elm_code_widget_text.c
@@ -199,14 +199,21 @@ static void
 _elm_code_widget_text_insert_single(Elm_Code_Widget *widget, Elm_Code *code,
 unsigned int col, unsigned int row, const 
char *text, unsigned int len)
 {
+   Elm_Code_Widget_Data *pd;
Elm_Code_Line *line;
unsigned int position, newcol;
 
+   pd = efl_data_scope_get(widget, ELM_CODE_WIDGET_CLASS);
line = elm_code_file_line_get(code->file, row);
position = elm_code_widget_line_text_position_for_column_get(widget, line, 
col);
elm_code_line_text_insert(line, position, text, len);
 
newcol = elm_code_widget_line_text_column_width_to_position(widget, line, 
position + len);
+
+   // if we are making a line longer than before then we need to resize
+   if (newcol > pd->col_count)
+ _elm_code_widget_resize(widget, line);
+
elm_obj_code_widget_cursor_position_set(widget, row, newcol);
 }
 
@@ -286,8 +293,6 @@ _elm_code_widget_text_at_cursor_insert_do(Elm_Code_Widget 
*widget, const char *t
  _elm_code_widget_text_insert_multi(widget, code, col, row, text, length);
elm_obj_code_widget_cursor_position_get(widget, _row, _col);
 
-   // a workaround for when the cursor position would be off the line width
-   _elm_code_widget_resize(widget, line);
efl_event_callback_legacy_call(widget, 
ELM_OBJ_CODE_WIDGET_EVENT_CHANGED_USER, NULL);
 
if (undo)

-- 




[EGIT] [apps/terminology] master 01/01: teamwork: remove the feature since it's no longer supported in elm

2017-07-23 Thread Boris Faure
billiob pushed a commit to branch master.

http://git.enlightenment.org/apps/terminology.git/commit/?id=bbb72729102f113e30f3f12faa383f51d18b7bcc

commit bbb72729102f113e30f3f12faa383f51d18b7bcc
Author: Boris Faure 
Date:   Sun Jul 23 17:41:20 2017 +0200

teamwork: remove the feature since it's no longer supported in elm
---
 configure.ac | 20 
 src/bin/termio.c | 13 -
 src/bin/win.c|  3 ---
 3 files changed, 36 deletions(-)

diff --git a/configure.ac b/configure.ac
index fb10bf0..7b104c4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -111,26 +111,6 @@ AC_LINK_IFELSE(
  AC_MSG_RESULT([no])
]
 )
-AC_MSG_CHECKING([for elm_win_teamwork])
-AC_LINK_IFELSE(
-   [
-AC_LANG_PROGRAM(
-  [[
-   #include 
-  ]],
- [[
-elm_win_teamwork_uri_show(NULL);
- ]])
-   ],
-   [
- AC_MSG_RESULT([yes])
- AC_DEFINE([HAVE_ELM_WIN_TEAMWORK], [1], [define to 1 if
-elm_win_teamwork_uri_show is available])
-   ],
-   [
- AC_MSG_RESULT([no])
-   ]
-)
 CFLAGS=$orig_cflags
 
 EFL_WITH_BIN([edje], [edje-cc], [edje_cc])
diff --git a/src/bin/termio.c b/src/bin/termio.c
index 6e3d797..6c49100 100644
--- a/src/bin/termio.c
+++ b/src/bin/termio.c
@@ -1224,13 +1224,6 @@ _update_link(Evas_Object *obj, Termio *sd,
  return;
 
popup_exists = main_term_popup_exists(sd->term);
-   if ((!popup_exists) &&
-   ((sd->link.string[0] == '/') || (link_is_url(sd->link.string
- {
-#ifdef HAVE_ELM_WIN_TEAMWORK
-elm_win_teamwork_uri_show(win_evas_object_get(term_win_get(sd->term)), 
sd->link.string);
-#endif
- }
for (y = sd->link.y1; y <= sd->link.y2; y++)
  {
 o = elm_layout_add(sd->win);
@@ -1287,9 +1280,6 @@ _remove_links(Termio *sd, Evas_Object *obj)
 
if (sd->link.string)
  {
-#ifdef HAVE_ELM_WIN_TEAMWORK
-elm_win_teamwork_uri_hide(win_evas_object_get(term_win_get(sd->term)));
-#endif
 free(sd->link.string);
 sd->link.string = NULL;
  }
@@ -4504,9 +4494,6 @@ _smart_cb_mouse_out(void *data,
if (sd->ctxpopup) return; /* ctxp triggers mouse out we should ignore */
 
termio_mouseover_suspend_pushpop(data, 1);
-#ifdef HAVE_ELM_WIN_TEAMWORK
-   elm_win_teamwork_uri_hide(win_evas_object_get(term_win_get(sd->term)));
-#endif
if ((ev->canvas.x == 0) || (ev->canvas.y == 0))
  {
 sd->mouse.cx = -1;
diff --git a/src/bin/win.c b/src/bin/win.c
index 67ed42a..1dbc2e0 100644
--- a/src/bin/win.c
+++ b/src/bin/win.c
@@ -3305,9 +3305,6 @@ _popmedia_show(Term *term, const char *src, Media_Type 
type)
Config *config = termio_config_get(term->termio);
 
EINA_SAFETY_ON_NULL_RETURN(config);
-#ifdef HAVE_ELM_WIN_TEAMWORK
-   elm_win_teamwork_uri_hide(term->wn->win);
-#endif
if (term->popmedia)
  {
 const char *s;

-- 




[EGIT] [apps/terminology] master 01/01: sizing: use 1px step when having visible tabs.

2017-07-23 Thread Boris Faure
billiob pushed a commit to branch master.

http://git.enlightenment.org/apps/terminology.git/commit/?id=0844d8689279cb1298bdbf643b5c64a8f2aad965

commit 0844d8689279cb1298bdbf643b5c64a8f2aad965
Author: Boris Faure 
Date:   Sun Jul 23 17:33:24 2017 +0200

sizing: use 1px step when having visible tabs.

Closes T5421
---
 src/bin/win.c | 8 
 1 file changed, 8 insertions(+)

diff --git a/src/bin/win.c b/src/bin/win.c
index 476f9c4..67ed42a 100644
--- a/src/bin/win.c
+++ b/src/bin/win.c
@@ -2280,12 +2280,20 @@ _tabs_size_eval(Term_Container *container, Sizeinfo 
*info)
 {
Tabs *tabs;
Term_Container *tc;
+   Config *config;
 
assert (container->type == TERM_CONTAINER_TYPE_TABS);
tabs = (Tabs*)container;
 
tc = tabs->current->tc;
+   config = tc->wn->config;
tc->size_eval(tc, info);
+   /* Current sizing code does not take the tab area correctly into account */
+   if (!config->notabs)
+ {
+info->step_x = 1;
+info->step_y = 1;
+ }
 }
 
 static Eina_List *

-- 




[EGIT] [core/efl] master 10/18: ecore main - fix division to remain a double/float as expected

2017-07-23 Thread Carsten Haitzler
raster pushed a commit to branch master.

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

commit 8a80005f254caf314e77ee1139ef3f4a4c73123e
Author: Carsten Haitzler (Rasterman) 
Date:   Sun Jul 23 19:12:32 2017 +0900

ecore main - fix division to remain a double/float as expected

1/60 != 1.0/60.0 ... the first is an integer which is 0... the second
is 0.01666  a float/double. fix CID 1377532
---
 src/lib/ecore/ecore_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lib/ecore/ecore_main.c b/src/lib/ecore/ecore_main.c
index 868fc4ccf5..d3671260f0 100644
--- a/src/lib/ecore/ecore_main.c
+++ b/src/lib/ecore/ecore_main.c
@@ -2897,7 +2897,7 @@ _check_event_catcher_add(void *data, const Efl_Event 
*event)
   // of the main loop for better energy efficiency, I guess.
   pd->poll_high = efl_add(EFL_LOOP_TIMER_CLASS, event->object,
   efl_event_callback_add(efl_added, 
EFL_LOOP_TIMER_EVENT_TICK, _poll_trigger, EFL_LOOP_EVENT_POLL_HIGH),
-  
efl_loop_timer_interval_set(efl_added, 1/60));
+  
efl_loop_timer_interval_set(efl_added, 1.0/60.0));
}
  ++pd->pollers.high;
   }

-- 




[EGIT] [core/efl] master 17/18: edje_cc out ... fix theoretical div by zero...

2017-07-23 Thread Carsten Haitzler
raster pushed a commit to branch master.

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

commit d62f7d72e6d1e25654b4b3b7aace95e3e18e0ce0
Author: Carsten Haitzler (Rasterman) 
Date:   Sun Jul 23 19:46:17 2017 +0900

edje_cc out ... fix theoretical div by zero...

if files size was 0... which would basically make a lot fail before...
it could be a divide by zero. fix and just assume minimum size of 1.

fix CID 1371127
---
 src/bin/edje/edje_cc_out.c | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/bin/edje/edje_cc_out.c b/src/bin/edje/edje_cc_out.c
index b083b25c6c..be78606141 100644
--- a/src/bin/edje/edje_cc_out.c
+++ b/src/bin/edje/edje_cc_out.c
@@ -2612,9 +2612,12 @@ data_thread_authors(void *data, Ecore_Thread *thread 
EINA_UNUSED)
  }
else
  {
+double fsize = eina_file_size_get(f);
+
+if (fsize < 0.0) fsize = 0.0;
 INF("Wrote %9i bytes (%4iKb) for \"%s\" authors entry compress: [real: 
%2.1f%%]",
 bytes, (bytes + 512) / 1024, license,
-100 - (100 * (double)bytes) / ((double)(eina_file_size_get(f;
+100.0 - ((100.0 * (double)bytes) / fsize));
  }
 
eina_file_map_free(f, m);

-- 




[EGIT] [core/efl] master 02/18: efreetd cache - fix leak of strbuf when error conditions abort save

2017-07-23 Thread Carsten Haitzler
raster pushed a commit to branch master.

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

commit fceb86c865d6157677955dc41199d78a64a314c6
Author: Carsten Haitzler (Rasterman) 
Date:   Sun Jul 23 18:11:26 2017 +0900

efreetd cache - fix leak of strbuf when error conditions abort save

fix CID 1374951
---
 src/bin/efreet/efreetd_cache.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/bin/efreet/efreetd_cache.c b/src/bin/efreet/efreetd_cache.c
index 2e70ff0eee..f0c27ae1a4 100644
--- a/src/bin/efreet/efreetd_cache.c
+++ b/src/bin/efreet/efreetd_cache.c
@@ -183,14 +183,14 @@ subdir_cache_save(void)
Eina_Tmpstr *tmpstr = NULL;
int tmpfd;
 
-   buf = eina_strbuf_new();
-   if (!buf) return;
-
// only if subdirs need saving... and we have subdirs.
if (!subdir_need_save) return;
if (!subdir_cache) return;
if (!subdir_cache->dirs) return;
 
+   buf = eina_strbuf_new();
+   if (!buf) return;
+
// save to tmp file first
eina_strbuf_append_printf(buf, "%s/efreet/subdirs_%s.eet.XX.cache",
  efreet_cache_home_get(), efreet_hostname_get());

-- 




[EGIT] [core/efl] master 11/18: add comment about poll high/medium/low implementation of events

2017-07-23 Thread Carsten Haitzler
raster pushed a commit to branch master.

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

commit 144f5f73e08503af6dad75105c2fad7612454d41
Author: Carsten Haitzler (Rasterman) 
Date:   Sun Jul 23 19:18:55 2017 +0900

add comment about poll high/medium/low implementation of events

not brilliant as it stands. :(
---
 src/lib/ecore/ecore_main.c | 9 +
 1 file changed, 9 insertions(+)

diff --git a/src/lib/ecore/ecore_main.c b/src/lib/ecore/ecore_main.c
index d3671260f0..4bf3dc546d 100644
--- a/src/lib/ecore/ecore_main.c
+++ b/src/lib/ecore/ecore_main.c
@@ -2889,6 +2889,15 @@ _check_event_catcher_add(void *data, const Efl_Event 
*event)
   {
  ++pd->idlers;
   }
+// XXX: all the below are kind of bad. ecore_pollers were special.
+// they all woke up at the SAME time based on interval, (all pollers
+// of interval 1 woke up together, those with 2 woke up when 1 and
+// 2 woke up, 4 woke up together along with 1 and 2 etc.
+// the below means they will just go off whenever but at a pre
+// defined interval - 1/60th, 6 and 66 seconds. not really great
+// pollers probably should be less frequent that 1/60th even on poll
+// high, medium probably down to 1-2 sec and low - yes maybe 30 or 60
+// sec... still - not timed to wake up together. :(
 else if (array[i].desc == EFL_LOOP_EVENT_POLL_HIGH)
   {
  if (!pd->poll_high)

-- 




[EGIT] [core/efl] master 14/18: edje_cc out - double check list element ptr to make coverity happy

2017-07-23 Thread Carsten Haitzler
raster pushed a commit to branch master.

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

commit 4df92f88d0ebf0fe31c486d2d869eeec81ac41dd
Author: Carsten Haitzler (Rasterman) 
Date:   Sun Jul 23 19:33:58 2017 +0900

edje_cc out - double check list element ptr to make coverity happy

fix CID 1374483
---
 src/bin/edje/edje_cc_out.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/bin/edje/edje_cc_out.c b/src/bin/edje/edje_cc_out.c
index 08465b5269..85210b27d4 100644
--- a/src/bin/edje/edje_cc_out.c
+++ b/src/bin/edje/edje_cc_out.c
@@ -3610,7 +3610,7 @@ _data_model_id_update(Eina_List *models_unused_list)
 #define PART_DESC_MODEL_ID_UPDATE \
EINA_LIST_FOREACH(models_unused_list, l3, iui) \
  { \
-if (part_desc_mesh_node->mesh_node.mesh.id == iui->old_id) \
+if ((iui) && (part_desc_mesh_node->mesh_node.mesh.id == iui->old_id)) \
   { \
  part_desc_mesh_node->mesh_node.mesh.id = iui->new_id; \
  break; \

-- 




[EGIT] [core/efl] master 03/18: evas module load add comments pointing out this is intentional ptr loss

2017-07-23 Thread Carsten Haitzler
raster pushed a commit to branch master.

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

commit 60d2bd233b1ad2a56f9107c5e664b2d28594fd1d
Author: Carsten Haitzler (Rasterman) 
Date:   Sun Jul 23 18:29:57 2017 +0900

evas module load add comments pointing out this is intentional ptr loss
---
 src/lib/evas/file/evas_module.c | 6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/lib/evas/file/evas_module.c b/src/lib/evas/file/evas_module.c
index 31bceec120..003c84c75a 100644
--- a/src/lib/evas/file/evas_module.c
+++ b/src/lib/evas/file/evas_module.c
@@ -593,7 +593,11 @@ evas_module_find_type(Evas_Module_Type type, const char 
*name)
  eina_module_free(en);
  continue;
   }
-
+// this is intentional. the above module load if it succeeds
+// registers the evas module below in the table that we then
+// lookup in the hash... and then load that as a 2nd stage.
+// since we will never unload a module once used it doesnt matter
+// what happens to the handle anyway.
 em = eina_hash_find(evas_modules[type], name);
 if (em)
   {

-- 




[EGIT] [core/efl] master 16/18: efl ui grid - handle invalid 0x0 fully if the grid size fails to do it

2017-07-23 Thread Carsten Haitzler
raster pushed a commit to branch master.

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

commit 17d33c71381a6a8cf92fc4146c2ea611bb322ec2
Author: Carsten Haitzler (Rasterman) 
Date:   Sun Jul 23 19:42:06 2017 +0900

efl ui grid - handle invalid 0x0 fully if the grid size fails to do it

if efl_pack_grid_size_set is overridden and somehow allows 0x0 to
still happen then handle this caase and skip the layout.

fix CID 1374317
---
 src/lib/elementary/efl_ui_grid_static.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/lib/elementary/efl_ui_grid_static.c 
b/src/lib/elementary/efl_ui_grid_static.c
index 352d5c58e7..77485180cc 100644
--- a/src/lib/elementary/efl_ui_grid_static.c
+++ b/src/lib/elementary/efl_ui_grid_static.c
@@ -48,6 +48,7 @@ _efl_ui_grid_static_efl_pack_layout_layout_update(Eo *obj, 
void *_pd EINA_UNUSED
  {
 WRN("Grid.Static size must be set before using! Default to 100x100.");
 efl_pack_grid_size_set(obj, 100, 100);
+if (!gd->req_cols || !gd->req_rows) goto err;
  }
vwl = gd->req_cols;
vhl = gd->req_rows;
@@ -71,7 +72,7 @@ _efl_ui_grid_static_efl_pack_layout_layout_update(Eo *obj, 
void *_pd EINA_UNUSED
 efl_gfx_position_set(gi->object, x1, y1);
 efl_gfx_size_set(gi->object, x2 - x1, y2 - y1);
  }
-
+err:
efl_event_thaw(e);
 }
 

-- 




[EGIT] [core/efl] master 08/18: elm cnp - check if selbuf is null or not and skip copying if null

2017-07-23 Thread Carsten Haitzler
raster pushed a commit to branch master.

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

commit b2809026bbafc228d437aa4654208f2399cbc4b7
Author: Carsten Haitzler (Rasterman) 
Date:   Sun Jul 23 18:56:43 2017 +0900

elm cnp - check if selbuf is null or not and skip copying if null

this should fix CID 1377536
---
 src/lib/elementary/elm_cnp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lib/elementary/elm_cnp.c b/src/lib/elementary/elm_cnp.c
index 80e95e9649..b600e90d0e 100644
--- a/src/lib/elementary/elm_cnp.c
+++ b/src/lib/elementary/elm_cnp.c
@@ -4431,7 +4431,7 @@ _local_elm_cnp_selection_set(Evas_Object *obj EINA_UNUSED,
free(_local_selinfo[selection].sel.buf);
_local_selinfo[selection].format = format;
_local_selinfo[selection].sel.buf = malloc(buflen + 1);
-   if (_local_selinfo[selection].sel.buf)
+   if ((_local_selinfo[selection].sel.buf) && (selbuf))
  {
 memcpy(_local_selinfo[selection].sel.buf, selbuf, buflen);
 _local_selinfo[selection].sel.buf[buflen] = 0;

-- 




[EGIT] [core/efl] master 01/18: efreetd cache - handle queue case leaking strbuf

2017-07-23 Thread Carsten Haitzler
raster pushed a commit to branch master.

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

commit 91878f72f1ef9cfc790be19f0d5cc8dcdece02a3
Author: Carsten Haitzler (Rasterman) 
Date:   Sun Jul 23 18:09:39 2017 +0900

efreetd cache - handle queue case leaking strbuf

fix CID 1374954
---
 src/bin/efreet/efreetd_cache.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/bin/efreet/efreetd_cache.c b/src/bin/efreet/efreetd_cache.c
index 410e333f47..2e70ff0eee 100644
--- a/src/bin/efreet/efreetd_cache.c
+++ b/src/bin/efreet/efreetd_cache.c
@@ -389,7 +389,7 @@ icon_cache_update_cache_cb(void *data EINA_UNUSED)
 static Eina_Bool
 desktop_cache_update_cache_cb(void *data EINA_UNUSED)
 {
-   Eina_Strbuf *file = eina_strbuf_new();
+   Eina_Strbuf *file;
 
desktop_cache_timer = NULL;
 
@@ -399,6 +399,7 @@ desktop_cache_update_cache_cb(void *data EINA_UNUSED)
 return ECORE_CALLBACK_CANCEL;
  }
desktop_queue = EINA_FALSE;
+   file = eina_strbuf_new();
 
if (desktop_change_monitors) eina_hash_free(desktop_change_monitors);
if (desktop_change_monitors_mon) 
eina_hash_free(desktop_change_monitors_mon);

-- 




[EGIT] [core/efl] master 15/18: edje_cc out ... check more iui list element ptrs to help coverity

2017-07-23 Thread Carsten Haitzler
raster pushed a commit to branch master.

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

commit a91d0b2ea4fc0dc0136405a70f623dde50d6cc82
Author: Carsten Haitzler (Rasterman) 
Date:   Sun Jul 23 19:36:41 2017 +0900

edje_cc out ... check more iui list element ptrs to help coverity

fix CID 1374482 ... and others i hope.
---
 src/bin/edje/edje_cc_out.c | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/bin/edje/edje_cc_out.c b/src/bin/edje/edje_cc_out.c
index 85210b27d4..b083b25c6c 100644
--- a/src/bin/edje/edje_cc_out.c
+++ b/src/bin/edje/edje_cc_out.c
@@ -3519,7 +3519,7 @@ _data_image_id_update(Eina_List *images_unused_list)
 #define PART_DESC_IMAGE_ID_UPDATE \
EINA_LIST_FOREACH(images_unused_list, l3, iui) \
  { \
-if (part_desc_image->image.id == iui->old_id) \
+if ((iui) && (part_desc_image->image.id == iui->old_id)) \
   { \
  part_desc_image->image.id = iui->new_id; \
  break; \
@@ -3530,7 +3530,7 @@ _data_image_id_update(Eina_List *images_unused_list)
 tween_id = part_desc_image->image.tweens[desc_it]; \
 EINA_LIST_FOREACH(images_unused_list, l3, iui) \
   { \
- if (tween_id->id == iui->old_id) \
+ if ((iui) && (tween_id->id == iui->old_id)) \
{ \
   tween_id->id = iui->new_id; \
   break; \
@@ -3541,7 +3541,7 @@ _data_image_id_update(Eina_List *images_unused_list)
 #define PART_DESC_PROXY_ID_UPDATE \
EINA_LIST_FOREACH(images_unused_list, l3, iui) \
  { \
-if (part_desc_mesh_node->mesh_node.texture.id == iui->old_id) \
+if ((iui) && (part_desc_mesh_node->mesh_node.texture.id == 
iui->old_id)) \
   { \
  part_desc_mesh_node->mesh_node.texture.id = iui->new_id; \
  break; \
@@ -3586,7 +3586,7 @@ _data_image_id_update(Eina_List *images_unused_list)
   {
  EINA_LIST_FOREACH(images_unused_list, l3, iui)
{
-  if (entry->id == iui->old_id)
+  if ((iui) && (entry->id == iui->old_id))
 {
entry->id = iui->new_id;
break;

-- 




[EGIT] [core/efl] master 13/18: evas seat focus add - handle other case where layer may be null

2017-07-23 Thread Carsten Haitzler
raster pushed a commit to branch master.

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

commit 3826f21a295cd16888b5b7bfa4230be24b77f7f9
Author: Carsten Haitzler (Rasterman) 
Date:   Sun Jul 23 19:30:31 2017 +0900

evas seat focus add - handle other case where layer may be null

fix CID 1377522
---
 src/lib/evas/canvas/evas_focus.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/lib/evas/canvas/evas_focus.c b/src/lib/evas/canvas/evas_focus.c
index 65df3183af..6fc1ebaad2 100644
--- a/src/lib/evas/canvas/evas_focus.c
+++ b/src/lib/evas/canvas/evas_focus.c
@@ -246,7 +246,8 @@ _efl_canvas_object_seat_focus_add(Eo *eo_obj,
 
_evas_focus_dispatch_event(obj, seat, EINA_TRUE);
  end:
-   _evas_post_event_callback_call(obj->layer->evas->evas, obj->layer->evas, 
event_id);
+   if (obj->layer)
+ _evas_post_event_callback_call(obj->layer->evas->evas, obj->layer->evas, 
event_id);
return EINA_TRUE;
 }
 

-- 




[EGIT] [core/efl] master 18/18: edje_cc out - fix theoretical div by 0

2017-07-23 Thread Carsten Haitzler
raster pushed a commit to branch master.

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

commit 83a249baa1743399f97cfe03e0d4f83aec787199
Author: Carsten Haitzler (Rasterman) 
Date:   Sun Jul 23 19:48:16 2017 +0900

edje_cc out - fix theoretical div by 0

fixes CID 1371125
---
 src/bin/edje/edje_cc_out.c | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/bin/edje/edje_cc_out.c b/src/bin/edje/edje_cc_out.c
index be78606141..1f4315cef7 100644
--- a/src/bin/edje/edje_cc_out.c
+++ b/src/bin/edje/edje_cc_out.c
@@ -2527,9 +2527,12 @@ data_thread_license(void *data, Ecore_Thread *thread 
EINA_UNUSED)
  }
else
  {
+double fsize = eina_file_size_get(f);
+
+if (fsize < 0.0) fsize = 0.0;
 INF("Wrote %9i bytes (%4iKb) for \"%s\" license entry compress: [real: 
%2.1f%%]",
 bytes, (bytes + 512) / 1024, license,
-100 - (100 * (double)bytes) / ((double)(eina_file_size_get(f;
+100.0 - ((100.0 * (double)bytes) / fsize));
  }
 
eina_file_map_free(f, m);

-- 




[EGIT] [core/efl] master 12/18: eina debug timer - handle fail wakeup write with error complaint

2017-07-23 Thread Carsten Haitzler
raster pushed a commit to branch master.

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

commit bb7e8456c4102ea05140d16c6d3e8154f2f74401
Author: Carsten Haitzler (Rasterman) 
Date:   Sun Jul 23 19:26:56 2017 +0900

eina debug timer - handle fail wakeup write with error complaint

fix CID 1377528
---
 src/lib/eina/eina_debug_timer.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/lib/eina/eina_debug_timer.c b/src/lib/eina/eina_debug_timer.c
index fa3fd1a549..fb1d632188 100644
--- a/src/lib/eina/eina_debug_timer.c
+++ b/src/lib/eina/eina_debug_timer.c
@@ -78,7 +78,8 @@ end:
t->rel_time = t->timeout - prev_time;
if (!t2) _timers = eina_list_append(_timers, t);
else _timers = eina_list_prepend_relative(_timers, t, t2);
-   write(pipeToThread[1], , 1);
+   if (write(pipeToThread[1], , 1) != 1)
+ e_debug("EINA DEBUG ERROR: Can't wake up thread for debug timer");
 }
 
 static void *

-- 




[EGIT] [core/efl] master 04/18: efl canvas image - dbug ingo get - dont get if no root dbg info supplied

2017-07-23 Thread Carsten Haitzler
raster pushed a commit to branch master.

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

commit 409516538560391fbcc53e90f1985b0d699d5be0
Author: Carsten Haitzler (Rasterman) 
Date:   Sun Jul 23 18:36:44 2017 +0900

efl canvas image - dbug ingo get - dont get if no root dbg info supplied

if root dbg info is null we'll leak and not have anything useful
stored somewhere for fetching anyway.

this should fix CID 1365656
---
 src/lib/evas/canvas/efl_canvas_image.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/lib/evas/canvas/efl_canvas_image.c 
b/src/lib/evas/canvas/efl_canvas_image.c
index f6f0456dbd..b4a52ac32a 100644
--- a/src/lib/evas/canvas/efl_canvas_image.c
+++ b/src/lib/evas/canvas/efl_canvas_image.c
@@ -854,7 +854,8 @@ _efl_canvas_image_efl_object_dbg_info_get(Eo *obj, void *pd 
EINA_UNUSED, Efl_Dbg
 {
efl_dbg_info_get(efl_super(obj, MY_CLASS), root);
 
-   if (efl_image_load_error_get(obj) != EFL_IMAGE_LOAD_ERROR_NONE)
+   if ((efl_image_load_error_get(obj) != EFL_IMAGE_LOAD_ERROR_NONE) &&
+   (root))
  {
 Efl_Dbg_Info *group = EFL_DBG_INFO_LIST_APPEND(root, MY_CLASS_NAME);
 Evas_Load_Error error = EVAS_LOAD_ERROR_GENERIC;

-- 




[EGIT] [core/efl] master 09/18: eina debug - don't try and collect stats on more than a million threads

2017-07-23 Thread Carsten Haitzler
raster pushed a commit to branch master.

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

commit 758e7d35629e01589a23cef085d940dd7bfee5d5
Author: Carsten Haitzler (Rasterman) 
Date:   Sun Jul 23 19:09:11 2017 +0900

eina debug - don't try and collect stats on more than a million threads

sanity check... just in case.
---
 src/lib/eina/eina_debug_bt.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/lib/eina/eina_debug_bt.c b/src/lib/eina/eina_debug_bt.c
index e3e56badaf..c9bf23c541 100644
--- a/src/lib/eina/eina_debug_bt.c
+++ b/src/lib/eina/eina_debug_bt.c
@@ -232,6 +232,8 @@ _trace_cb(void *data EINA_UNUSED)
 
// take a lock on grabbing thread debug info like backtraces
eina_spinlock_take(&_eina_debug_thread_lock);
+   // too many threads (over 1 million) 
+   if (_eina_debug_thread_active_num > (1024 * 1024)) goto err;
// reset our "stack" of memory se use to dump thread info into
_eina_debug_chunk_tmp_reset();
// get an array of pointers for the backtrace array for main + th

-- 




[EGIT] [core/efl] master 06/18: eina debug - add comments to cpu debug using locks to pause sysmon

2017-07-23 Thread Carsten Haitzler
raster pushed a commit to branch master.

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

commit 6a65cb2f3c294e49dfe6dc895519eb08873bdb2b
Author: Carsten Haitzler (Rasterman) 
Date:   Sun Jul 23 18:43:58 2017 +0900

eina debug - add comments to cpu debug using locks to pause sysmon

this is intended so leave comments saying so. coverity doesn't like it
with CID 1377549
---
 src/lib/eina/eina_debug_cpu.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/lib/eina/eina_debug_cpu.c b/src/lib/eina/eina_debug_cpu.c
index f7cb2cce79..0f25b4bfbd 100644
--- a/src/lib/eina/eina_debug_cpu.c
+++ b/src/lib/eina/eina_debug_cpu.c
@@ -261,6 +261,7 @@ _cpufreq_on_cb(Eina_Debug_Session *session EINA_UNUSED, int 
cid EINA_UNUSED, voi
  {
 _eina_debug_sysmon_reset = 1;
 _eina_debug_sysmon_active = 1;
+// this is intended. taking this lock allows sysmon to run
 eina_lock_release(&_sysmon_lock);
  }
return EINA_TRUE;
@@ -271,6 +272,7 @@ _cpufreq_off_cb(Eina_Debug_Session *session EINA_UNUSED, 
int cid EINA_UNUSED, vo
 {
if (_eina_debug_sysmon_active)
  {
+// this is intended. taking this lock blocks sysmod from running
 eina_lock_take(&_sysmon_lock);
 _eina_debug_sysmon_active = 0;
  }

-- 




[EGIT] [core/efl] master 07/18: evas callbacks - check if obj->events is valid because it's cow alloced

2017-07-23 Thread Carsten Haitzler
raster pushed a commit to branch master.

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

commit b3b0411a05165b121da46ef9718e8a1d628a76bd
Author: Carsten Haitzler (Rasterman) 
Date:   Sun Jul 23 18:53:46 2017 +0900

evas callbacks - check if obj->events is valid because it's cow alloced

it COULD be null and we do have other checks for it being not-null and
we dont check if the alloc fails...  so check. this SHOULD fix
CID 1377547
---
 src/lib/evas/canvas/evas_callbacks.c | 8 +---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/lib/evas/canvas/evas_callbacks.c 
b/src/lib/evas/canvas/evas_callbacks.c
index 33d1e76aca..a6f3ee419e 100644
--- a/src/lib/evas/canvas/evas_callbacks.c
+++ b/src/lib/evas/canvas/evas_callbacks.c
@@ -436,13 +436,15 @@ evas_object_event_callback_call(Evas_Object *eo_obj, 
Evas_Object_Protected_Data
 nothing_here:
if (!obj->no_propagate)
  {
-if ((obj->smart.parent || obj->events->parent) && (type != 
EVAS_CALLBACK_FREE) &&
-  (type <= EVAS_CALLBACK_KEY_UP))
+if ((obj->smart.parent || ((obj->events) && obj->events->parent)) &&
+(type != EVAS_CALLBACK_FREE) &&
+(type <= EVAS_CALLBACK_KEY_UP))
   {
  Evas_Object_Protected_Data *parent_obj;
  Eo *parent;
 
- parent = obj->events->parent ?: obj->smart.parent;
+ parent = ((obj->events) && obj->events->parent) ?
+   obj->events->parent: obj->smart.parent;
  parent_obj = efl_data_scope_get(parent, EFL_CANVAS_OBJECT_CLASS);
  evas_object_event_callback_call(parent, parent_obj, type, 
event_info, event_id, efl_event_desc);
   }

-- 




[EGIT] [core/efl] master 05/18: eina debug - check return value of syscall for errors

2017-07-23 Thread Carsten Haitzler
raster pushed a commit to branch master.

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

commit c69f9d2837d41ba494097d076107ad11e4829c18
Author: Carsten Haitzler (Rasterman) 
Date:   Sun Jul 23 18:40:04 2017 +0900

eina debug - check return value of syscall for errors

this should fix CID 1377550
---
 src/lib/eina/eina_debug.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lib/eina/eina_debug.c b/src/lib/eina/eina_debug.c
index 4175b87155..9df67f3f49 100644
--- a/src/lib/eina/eina_debug.c
+++ b/src/lib/eina/eina_debug.c
@@ -458,7 +458,7 @@ eina_debug_remote_connect(int port)
 
//Prepare the sockaddr_in structure
server.sin_family = AF_INET;
-   inet_pton(AF_INET, "127.0.0.1", _addr.s_addr);
+   if (inet_pton(AF_INET, "127.0.0.1", _addr.s_addr) != 1) goto err;
server.sin_port = htons(port);
 
if (connect(fd, (struct sockaddr *), sizeof(server)) < 0)

-- 




[EGIT] [core/enlightenment] master 01/01: e powerrsave sleep - add fd get

2017-07-23 Thread Carsten Haitzler
raster pushed a commit to branch master.

http://git.enlightenment.org/core/enlightenment.git/commit/?id=358f154b830c76e0435096799dc40d1967994d94

commit 358f154b830c76e0435096799dc40d1967994d94
Author: Carsten Haitzler (Rasterman) 
Date:   Sun Jul 23 17:28:53 2017 +0900

e powerrsave sleep - add fd get

i could have sworn i added this... i swear i remember adding the fd
get line... how did it not make it? this is odd. well add it and fix
my spining cpu issue after moving to select to fix pipe wait not being
threadsafe.
---
 src/bin/e_powersave.c | 6 ++
 1 file changed, 6 insertions(+)

diff --git a/src/bin/e_powersave.c b/src/bin/e_powersave.c
index aada9cc6d..51a53329f 100644
--- a/src/bin/e_powersave.c
+++ b/src/bin/e_powersave.c
@@ -141,6 +141,12 @@ e_powersave_sleeper_new(void)
 
sleeper = E_NEW(E_Powersave_Sleeper, 1);
sleeper->pipe = ecore_pipe_add(_e_powersave_sleeper_cb_dummy, NULL);
+   if (!sleeper->pipe)
+ {
+eina_freeq_ptr_add(eina_freeq_main_get(), sleeper, free, 
sizeof(*sleeper));
+return NULL;
+ }
+   sleeper->fd = ecore_pipe_read_fd(sleeper->pipe);
ecore_pipe_freeze(sleeper->pipe);
powersave_sleepers = eina_list_append(powersave_sleepers, sleeper);
return (E_Powersave_Sleeper *)sleeper;

-- 




[EGIT] [core/enlightenment] master 01/01: e meson build - fix PACKAGE_DATA_DIR to include project name at end

2017-07-23 Thread Carsten Haitzler
raster pushed a commit to branch master.

http://git.enlightenment.org/core/enlightenment.git/commit/?id=241d42ccf2cbc57361d78d8f2517a272d4631541

commit 241d42ccf2cbc57361d78d8f2517a272d4631541
Author: Carsten Haitzler (Rasterman) 
Date:   Sun Jul 23 16:39:11 2017 +0900

e meson build - fix PACKAGE_DATA_DIR to include project name at end

it used to include it with autofoo... it should continue to include
it. don't break things. is /usr/local/share/enlightenment  is what
PKG_DATA_DIR would be defined as (assuming default prefix).
---
 meson.build | 28 +++-
 1 file changed, 15 insertions(+), 13 deletions(-)

diff --git a/meson.build b/meson.build
index f89d314ba..9bd19d47e 100644
--- a/meson.build
+++ b/meson.build
@@ -4,7 +4,9 @@ project('enlightenment', 'c',
default_options: [ 'c_std=gnu99', 'warning_level=2' ],
meson_version: '>= 0.40.0')
 
-chmod = join_paths(meson.source_root(), 'meson-chmod.sh')
+proj = meson.project_name()
+ver  = meson.project_version()
+chmod= join_paths(meson.source_root(), 'meson-chmod.sh')
 
 clean_check = run_command('meson/clean_check.sh')
 if clean_check.returncode() == 0
@@ -35,10 +37,10 @@ dir_bin = join_paths(dir_prefix, get_option('bindir'))
 dir_sysconf = get_option('sysconfdir')
 dir_data = join_paths(dir_prefix, get_option('datadir'))
 dir_include = join_paths(dir_prefix, get_option('includedir'))
-dir_include_e = join_paths(dir_include, 'enlightenment')
+dir_include_e = join_paths(dir_include, proj)
 dir_lib = join_paths(dir_prefix, get_option('libdir'))
-dir_module_e = join_paths(dir_lib, 'enlightenment/modules')
-dir_util_e = join_paths(dir_lib, 'enlightenment/utils')
+dir_module_e = join_paths(dir_lib, proj, 'modules')
+dir_util_e = join_paths(dir_lib, proj, 'utils')
 dir_pc = join_paths(dir_data, 'pkgconfig')
 
 suid_exes = []
@@ -123,21 +125,21 @@ endif
 module_arch = '@0@-@1@-@2@'.format(host_os, host_machine.cpu_family(), release)
 config_h.set_quoted('MODULE_ARCH', module_arch)
 
-config_h.set_quoted('PACKAGE', 'enlightenment')
+config_h.set_quoted('PACKAGE', proj)
 config_h.set_quoted('PACKAGE_VERSION', e_version_rev)
 config_h.set_quoted('VERSION', e_version_rev)
 
 add_global_arguments('-DPACKAGE_BIN_DIR="@0@"'.format(dir_bin), language: 'c')
 add_global_arguments('-DPACKAGE_LIB_DIR="@0@"'.format(dir_lib), language: 'c')
-add_global_arguments('-DPACKAGE_DATA_DIR="@0@"'.format(dir_data), language: 
'c')
+add_global_arguments('-DPACKAGE_DATA_DIR="@0@"'.format(join_paths(dir_data, 
proj)), language: 'c')
 add_global_arguments('-DPACKAGE_SYSCONF_DIR="@0@"'.format(dir_sysconf), 
language: 'c')
 
 config_h.set_quoted('LOCALE_DIR', join_paths([dir_prefix, 'share/locale']))
 config_h.set_quoted('PACKAGE_URL', 'https://www.enlightenment.org')
-config_h.set_quoted('PACKAGE_TARNAME', 'enlightenment')
+config_h.set_quoted('PACKAGE_TARNAME', proj)
 config_h.set_quoted('PACKAGE_BUGREPORT', 
'enlightenment-devel@lists.sourceforge.net')
-config_h.set_quoted('PACKAGE_STRING', 'enlightenment '.join([e_version_rev]))
-config_h.set_quoted('PACKAGE_NAME', 'enlightenment')
+config_h.set_quoted('PACKAGE_STRING', proj + ' ' + e_version_rev)
+config_h.set_quoted('PACKAGE_NAME', proj)
 
 config_h.set_quoted('BINDIR', dir_bin)
 config_h.set_quoted('DATADIR', dir_data)
@@ -483,10 +485,10 @@ meson.add_install_script('meson/meson_inst.sh', suid_exes)
 meson.add_install_script('meson/meson_modules.sh', module_files)
 configure_file(output: 'config.h', install: false, configuration: config_h)
 pkgconfig.generate(
-   name: 'enlightenment',
+   name: proj,
description: 'Enlightenment Window Manager',
-   filebase: 'enlightenment',
-   subdirs: 'enlightenment',
+   filebase: proj,
+   subdirs: proj,
#requires: deps_e,
requires: requires_e,
version: e_version_rev,
@@ -497,7 +499,7 @@ pkgconfig.generate(
'datarootdir=@0@'.format(dir_data),
'datadir=${datarootdir}',
'modules=@0@/enlightenment/modules'.format(dir_lib),
-   'pkgdatadir=${datarootdir}/enlightenment/data',
+   'pkgdatadir=${datarootdir}/'+ proj + '/data',
'themes=${pkgdatadir}/themes',
'backgrounds=${pkgdatadir}/backgrounds',
'release=@0@'.format(release)

--