[EGIT] [tools/edi] master 01/01: editor: background file changes. Fix editor reload on background file change.

2017-09-07 Thread Al Poole
netstar pushed a commit to branch master.

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

commit d259a776a96a3a03749cc696e0b8f5ad66e4c8a4
Author: Al Poole 
Date:   Thu Sep 7 14:54:50 2017 +0100

editor: background file changes. Fix editor reload on background file 
change.
---
 src/bin/editor/edi_editor.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/bin/editor/edi_editor.c b/src/bin/editor/edi_editor.c
index 463e8db..6373bc6 100644
--- a/src/bin/editor/edi_editor.c
+++ b/src/bin/editor/edi_editor.c
@@ -1107,15 +1107,14 @@ void
 edi_editor_reload(Edi_Editor *editor)
 {
Elm_Code *code;
-   const char *path;
+   char *path;
 
ecore_thread_main_loop_begin();
 
code = elm_code_widget_code_get(editor->entry);
-   path = elm_code_file_path_get(code->file);
+   path = strdup(elm_code_file_path_get(code->file));
elm_code_file_clear(code->file);
code->file = elm_code_file_open(code, path);
-
editor->modified = EINA_FALSE;
editor->save_time = ecore_file_mod_time(path);
 
@@ -1125,6 +1124,7 @@ edi_editor_reload(Edi_Editor *editor)
 editor->save_timer = NULL;
  }
 
+   free(path);
ecore_thread_main_loop_end();
 }
 

-- 




[EGIT] [core/efl] master 01/01: Canvas text: emit missing events during text changes

2017-09-07 Thread Daniel Hirt
herdsman pushed a commit to branch master.

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

commit de3062da8977efdba632fec73ded2480f197fb99
Author: Daniel Hirt 
Date:   Thu Sep 7 16:53:01 2017 +0300

Canvas text: emit missing events during text changes

Some text changes were not picked up by the Ui.Text widget, so no size
evaluation was triggered.
---
 src/lib/evas/canvas/evas_object_textblock.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/lib/evas/canvas/evas_object_textblock.c 
b/src/lib/evas/canvas/evas_object_textblock.c
index b649ad7230..79048e848e 100644
--- a/src/lib/evas/canvas/evas_object_textblock.c
+++ b/src/lib/evas/canvas/evas_object_textblock.c
@@ -10216,7 +10216,7 @@ _efl_canvas_text_efl_text_cursor_cursor_text_insert(Eo 
*eo_obj,
 {
int len = _efl_canvas_text_cursor_text_append(cur, _text);
_evas_textblock_changed(o, eo_obj);
-   efl_event_callback_legacy_call(eo_obj, 
EFL_CANVAS_TEXT_EVENT_CURSOR_CHANGED, NULL);
+   efl_event_callback_call(eo_obj, EFL_CANVAS_TEXT_EVENT_CHANGED, NULL);
return len;
 }
 
@@ -10641,7 +10641,7 @@ EOLIAN static void
 _efl_canvas_text_efl_text_cursor_cursor_char_delete(Eo *eo_obj, 
Efl_Canvas_Text_Data *o EINA_UNUSED, Efl_Text_Cursor_Cursor *cur)
 {
evas_textblock_cursor_char_delete(cur);
-   efl_event_callback_legacy_call(eo_obj, 
EFL_CANVAS_TEXT_EVENT_CURSOR_CHANGED, NULL);
+   efl_event_callback_call(eo_obj, EFL_CANVAS_TEXT_EVENT_CHANGED, NULL);
 }
 
 EAPI void
@@ -10755,6 +10755,7 @@ _efl_canvas_text_range_delete(Eo *eo_obj EINA_UNUSED, 
Efl_Canvas_Text_Data *pd E
  evas_textblock_cursor_copy(cur1, o->cursor);
 
_evas_textblock_changed(o, cur1->obj);
+   efl_event_callback_call(eo_obj, EFL_CANVAS_TEXT_EVENT_CHANGED, NULL);
 }
 
 EOLIAN static Eina_Unicode

-- 




[EGIT] [bindings/python/python-efl] master 01/01: Efl.Ui.Spinner downgraded to Elm.Spinner

2017-09-07 Thread Dave Andreoli
davemds pushed a commit to branch master.

http://git.enlightenment.org/bindings/python/python-efl.git/commit/?id=344da31cebaedd849fb6d14ef310e1c823958cff

commit 344da31cebaedd849fb6d14ef310e1c823958cff
Author: Dave Andreoli 
Date:   Thu Sep 7 19:30:34 2017 +0200

Efl.Ui.Spinner downgraded to Elm.Spinner

#FollowTheWhiteRabbit
---
 efl/elementary/spinner.pxi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/efl/elementary/spinner.pxi b/efl/elementary/spinner.pxi
index 0153cc5..5d80c8b 100644
--- a/efl/elementary/spinner.pxi
+++ b/efl/elementary/spinner.pxi
@@ -410,4 +410,4 @@ cdef class Spinner(LayoutClass):
 self._callback_del("max,reached", func)
 
 
-_object_mapping_register("Efl.Ui.Spinner", Spinner)
+_object_mapping_register("Elm.Spinner", Spinner)

-- 




[EGIT] [core/enlightenment] master 01/04: warp pointer to center of internal dialog on show if dialog has focus

2017-09-07 Thread Mike Blumenkrantz
discomfitor pushed a commit to branch master.

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

commit 8f26d33d11add72428d50378920a704dec240839
Author: Mike Blumenkrantz 
Date:   Thu Sep 7 13:37:24 2017 -0400

warp pointer to center of internal dialog on show if dialog has focus

ensure that pointer-based focus policies do not experience unexpected focus
changes when a dialog changes from basic<->advanced

ref T1931
---
 src/bin/e_dialog.c | 5 +
 1 file changed, 5 insertions(+)

diff --git a/src/bin/e_dialog.c b/src/bin/e_dialog.c
index e3fdc2f06..e78b4ef8e 100644
--- a/src/bin/e_dialog.c
+++ b/src/bin/e_dialog.c
@@ -260,6 +260,11 @@ e_dialog_show(E_Dialog *dia)
 
if (!e_widget_focus_get(dia->box_object))
  e_widget_focus_set(dia->box_object, 1);
+   {
+  E_Client *ec = e_win_client_get(dia->win);
+  if (ec->focused && (e_config->pointer_slide || 
(!e_client_focus_policy_click(ec
+e_client_pointer_warp_to_center_now(ec);
+   }
 }
 
 /* local subsystem functions */

-- 




[EGIT] [core/enlightenment] master 02/04: apply pointer focus to existing config dialogs from settings window

2017-09-07 Thread Mike Blumenkrantz
discomfitor pushed a commit to branch master.

http://git.enlightenment.org/core/enlightenment.git/commit/?id=09952cb5ef759c11e211c9795881b05d5dcc408b

commit 09952cb5ef759c11e211c9795881b05d5dcc408b
Author: Mike Blumenkrantz 
Date:   Thu Sep 7 13:37:24 2017 -0400

apply pointer focus to existing config dialogs from settings window

this should be more consistent with expected behaviors
---
 src/modules/conf/e_conf.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/modules/conf/e_conf.c b/src/modules/conf/e_conf.c
index fa029a037..107e30b89 100644
--- a/src/modules/conf/e_conf.c
+++ b/src/modules/conf/e_conf.c
@@ -81,8 +81,9 @@ e_configure_show(const char *params)
 e_client_desk_set(ec, e_desk_current_get(ec->zone));
 e_client_unshade(ec, ec->shade_dir);
 if ((e_config->focus_setting == E_FOCUS_NEW_DIALOG) ||
-(e_config->focus_setting == E_FOCUS_NEW_WINDOW))
-  evas_object_focus_set(ec->frame, 1);
+(e_config->focus_setting == E_FOCUS_NEW_WINDOW) ||
+(e_config->focus_setting == E_FOCUS_NEW_DIALOG_IF_OWNER_FOCUSED))
+  e_client_focus_set_with_pointer(ec);
 EINA_LIST_FOREACH(e_widget_toolbar_items_get(eco->cat_list), l, it)
   {
  if (e_widget_toolbar_item_label_get(it) == params)

-- 




[EGIT] [core/enlightenment] master 03/04: handle first time desk setting for fullscreen clients without crashing

2017-09-07 Thread Mike Blumenkrantz
discomfitor pushed a commit to branch master.

http://git.enlightenment.org/core/enlightenment.git/commit/?id=72b979ca2b4a8b15248bcc1beb4a8691842b67f5

commit 72b979ca2b4a8b15248bcc1beb4a8691842b67f5
Author: Mike Blumenkrantz 
Date:   Thu Sep 7 13:37:24 2017 -0400

handle first time desk setting for fullscreen clients without crashing

ref T5988
---
 src/bin/e_client.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/bin/e_client.c b/src/bin/e_client.c
index e96e02f14..ef1827a3b 100644
--- a/src/bin/e_client.c
+++ b/src/bin/e_client.c
@@ -2832,7 +2832,8 @@ e_client_desk_set(E_Client *ec, E_Desk *desk)
 
if (ec->fullscreen)
  {
-ec->desk->fullscreen_clients = 
eina_list_remove(ec->desk->fullscreen_clients, ec);
+if (ec->desk)
+  ec->desk->fullscreen_clients = 
eina_list_remove(ec->desk->fullscreen_clients, ec);
 desk->fullscreen_clients = eina_list_append(desk->fullscreen_clients, 
ec);
  }
old_desk = ec->desk;

-- 




[EGIT] [core/enlightenment] master 04/04: remove fullscreen clients from vdesk clients list when toggling sticky state

2017-09-07 Thread Mike Blumenkrantz
discomfitor pushed a commit to branch master.

http://git.enlightenment.org/core/enlightenment.git/commit/?id=378e371e74f2f7de3f65294b6d9a79667abbca46

commit 378e371e74f2f7de3f65294b6d9a79667abbca46
Author: Mike Blumenkrantz 
Date:   Thu Sep 7 13:37:24 2017 -0400

remove fullscreen clients from vdesk clients list when toggling sticky state

fix T5988
---
 src/bin/e_client.c | 4 
 1 file changed, 4 insertions(+)

diff --git a/src/bin/e_client.c b/src/bin/e_client.c
index ef1827a3b..9b74f1fa4 100644
--- a/src/bin/e_client.c
+++ b/src/bin/e_client.c
@@ -4657,6 +4657,8 @@ e_client_stick(E_Client *ec)
if (ec->sticky) return;
desk = ec->desk;
ec->desk = NULL;
+   if (desk && ec->fullscreen)
+ desk->fullscreen_clients = eina_list_remove(desk->fullscreen_clients, ec);
ec->sticky = 1;
ec->hidden = 0;
e_hints_window_sticky_set(ec, 1);
@@ -4711,6 +4713,8 @@ e_client_unstick(E_Client *ec)
/* Set the desk before we unstick the client */
if (!ec->sticky) return;
desk = e_desk_current_get(ec->zone);
+   if (ec->desk && ec->fullscreen)
+ ec->desk->fullscreen_clients = 
eina_list_remove(ec->desk->fullscreen_clients, ec);
ec->desk = NULL;
ec->hidden = ec->sticky = 0;
e_hints_window_sticky_set(ec, 0);

-- 




[EGIT] [core/enlightenment] master 01/01: restore 'application name' remember setting in dialog

2017-09-07 Thread Mike Blumenkrantz
discomfitor pushed a commit to branch master.

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

commit 7fd3e2e79884bad8dda9adf10815b8af40ff2d10
Author: Mike Blumenkrantz 
Date:   Thu Sep 7 14:13:01 2017 -0400

restore 'application name' remember setting in dialog

broken in 6e8070d2261a3986ca2224a831cc954af728a429

fix T5991
---
 src/bin/e_int_client_remember.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/bin/e_int_client_remember.c b/src/bin/e_int_client_remember.c
index 8adfe3016..a20b7ad26 100644
--- a/src/bin/e_int_client_remember.c
+++ b/src/bin/e_int_client_remember.c
@@ -797,7 +797,7 @@ _advanced_create_widgets(E_Config_Dialog *cfd, Evas *evas, 
E_Config_Dialog_Data
e_widget_table_object_append(of, ob, 0, 7, 1, 1, 1, 0, 1, 0);
oc = e_widget_check_add(evas, _("Application file or name (.desktop)"),
&(cfdata->remember.apply_desktop_file));
-   e_widget_table_object_append(of, ob, 0, 8, 1, 1, 1, 0, 1, 0);
+   e_widget_table_object_append(of, oc, 0, 8, 1, 1, 1, 0, 1, 0);
oc = e_widget_check_add(evas, _("Volume"),
&(cfdata->remember.apply_volume));
e_widget_table_object_append(of, oc, 0, 9, 1, 1, 1, 0, 1, 0);

-- 




[EGIT] [core/enlightenment] enlightenment-0.21 04/05: handle first time desk setting for fullscreen clients without crashing

2017-09-07 Thread Mike Blumenkrantz
discomfitor pushed a commit to branch enlightenment-0.21.

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

commit 7af9ab44a63e6a4c86b1f59c8ea39c52962c52f6
Author: Mike Blumenkrantz 
Date:   Thu Sep 7 13:37:24 2017 -0400

handle first time desk setting for fullscreen clients without crashing

ref T5988
---
 src/bin/e_client.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/bin/e_client.c b/src/bin/e_client.c
index 5db62c5d8..ee1f2c7fa 100644
--- a/src/bin/e_client.c
+++ b/src/bin/e_client.c
@@ -2564,7 +2564,8 @@ e_client_desk_set(E_Client *ec, E_Desk *desk)
 
if (ec->fullscreen)
  {
-ec->desk->fullscreen_clients = 
eina_list_remove(ec->desk->fullscreen_clients, ec);
+if (ec->desk)
+  ec->desk->fullscreen_clients = 
eina_list_remove(ec->desk->fullscreen_clients, ec);
 desk->fullscreen_clients = eina_list_append(desk->fullscreen_clients, 
ec);
  }
old_desk = ec->desk;

-- 




[EGIT] [core/enlightenment] enlightenment-0.21 02/05: warp pointer to center of internal dialog on show if dialog has focus

2017-09-07 Thread Mike Blumenkrantz
discomfitor pushed a commit to branch enlightenment-0.21.

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

commit 3fc4c39bb4a105a8e5cf1d56ba8d3b8641fe0bb5
Author: Mike Blumenkrantz 
Date:   Thu Sep 7 13:37:24 2017 -0400

warp pointer to center of internal dialog on show if dialog has focus

ensure that pointer-based focus policies do not experience unexpected focus
changes when a dialog changes from basic<->advanced

ref T1931
---
 src/bin/e_dialog.c | 5 +
 1 file changed, 5 insertions(+)

diff --git a/src/bin/e_dialog.c b/src/bin/e_dialog.c
index 99aaed254..bec1b2fe0 100644
--- a/src/bin/e_dialog.c
+++ b/src/bin/e_dialog.c
@@ -264,6 +264,11 @@ e_dialog_show(E_Dialog *dia)
 
if (!e_widget_focus_get(dia->box_object))
  e_widget_focus_set(dia->box_object, 1);
+   {
+  E_Client *ec = e_win_client_get(dia->win);
+  if (ec->focused && (e_config->pointer_slide || 
(!e_client_focus_policy_click(ec
+e_client_pointer_warp_to_center_now(ec);
+   }
 }
 
 /* local subsystem functions */

-- 




[EGIT] [core/enlightenment] enlightenment-0.21 03/05: apply pointer focus to existing config dialogs from settings window

2017-09-07 Thread Mike Blumenkrantz
discomfitor pushed a commit to branch enlightenment-0.21.

http://git.enlightenment.org/core/enlightenment.git/commit/?id=976ec828b595cb2eea6e1a12ec934a8ccd0f4018

commit 976ec828b595cb2eea6e1a12ec934a8ccd0f4018
Author: Mike Blumenkrantz 
Date:   Thu Sep 7 13:37:24 2017 -0400

apply pointer focus to existing config dialogs from settings window

this should be more consistent with expected behaviors
---
 src/modules/conf/e_conf.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/modules/conf/e_conf.c b/src/modules/conf/e_conf.c
index fa029a037..107e30b89 100644
--- a/src/modules/conf/e_conf.c
+++ b/src/modules/conf/e_conf.c
@@ -81,8 +81,9 @@ e_configure_show(const char *params)
 e_client_desk_set(ec, e_desk_current_get(ec->zone));
 e_client_unshade(ec, ec->shade_dir);
 if ((e_config->focus_setting == E_FOCUS_NEW_DIALOG) ||
-(e_config->focus_setting == E_FOCUS_NEW_WINDOW))
-  evas_object_focus_set(ec->frame, 1);
+(e_config->focus_setting == E_FOCUS_NEW_WINDOW) ||
+(e_config->focus_setting == E_FOCUS_NEW_DIALOG_IF_OWNER_FOCUSED))
+  e_client_focus_set_with_pointer(ec);
 EINA_LIST_FOREACH(e_widget_toolbar_items_get(eco->cat_list), l, it)
   {
  if (e_widget_toolbar_item_label_get(it) == params)

-- 




[EGIT] [core/enlightenment] enlightenment-0.21 05/05: remove fullscreen clients from vdesk clients list when toggling sticky state

2017-09-07 Thread Mike Blumenkrantz
discomfitor pushed a commit to branch enlightenment-0.21.

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

commit e2d35d9b775cc8f86ebcf4987cebce4a12f40c3e
Author: Mike Blumenkrantz 
Date:   Thu Sep 7 13:37:24 2017 -0400

remove fullscreen clients from vdesk clients list when toggling sticky state

fix T5988
---
 src/bin/e_client.c | 4 
 1 file changed, 4 insertions(+)

diff --git a/src/bin/e_client.c b/src/bin/e_client.c
index ee1f2c7fa..9404a6275 100644
--- a/src/bin/e_client.c
+++ b/src/bin/e_client.c
@@ -4293,6 +4293,8 @@ e_client_stick(E_Client *ec)
if (ec->sticky) return;
desk = ec->desk;
ec->desk = NULL;
+   if (desk && ec->fullscreen)
+ desk->fullscreen_clients = eina_list_remove(desk->fullscreen_clients, ec);
ec->sticky = 1;
ec->hidden = 0;
e_hints_window_sticky_set(ec, 1);
@@ -4327,6 +4329,8 @@ e_client_unstick(E_Client *ec)
/* Set the desk before we unstick the client */
if (!ec->sticky) return;
desk = e_desk_current_get(ec->zone);
+   if (ec->desk && ec->fullscreen)
+ ec->desk->fullscreen_clients = 
eina_list_remove(ec->desk->fullscreen_clients, ec);
ec->desk = NULL;
ec->hidden = ec->sticky = 0;
e_hints_window_sticky_set(ec, 0);

-- 




[EGIT] [core/enlightenment] enlightenment-0.21 01/05: block all desk flips during window resize

2017-09-07 Thread Mike Blumenkrantz
discomfitor pushed a commit to branch enlightenment-0.21.

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

commit 92b23f0d6d04222502949d3dd32b2538b7c3429b
Author: Mike Blumenkrantz 
Date:   Wed Sep 6 13:14:13 2017 -0400

block all desk flips during window resize

this breaks *

fix T5984
---
 src/bin/e_actions.c | 1 +
 src/bin/e_desk.c| 1 +
 2 files changed, 2 insertions(+)

diff --git a/src/bin/e_actions.c b/src/bin/e_actions.c
index b6ca4301a..cb25819e2 100644
--- a/src/bin/e_actions.c
+++ b/src/bin/e_actions.c
@@ -1402,6 +1402,7 @@ ACT_FN_GO_EDGE(desk_flip_in_direction, )
int x, y, offset = 25;
 
if (!ev) return;  // with flip on _e_zone_cb_edge_timer we don't have ev!!!
+   if (e_client_action_get() && 
e_client_util_resizing_get(e_client_action_get())) return;
zone = _e_actions_zone_get(obj);
if (!zone) return;
wev = E_NEW(E_Event_Pointer_Warp, 1);
diff --git a/src/bin/e_desk.c b/src/bin/e_desk.c
index dec696afa..61c1573c2 100644
--- a/src/bin/e_desk.c
+++ b/src/bin/e_desk.c
@@ -257,6 +257,7 @@ e_desk_show(E_Desk *desk)
E_OBJECT_CHECK(desk);
E_OBJECT_TYPE_CHECK(desk, E_DESK_TYPE);
if (desk->visible) return;
+   if (e_client_action_get() && 
e_client_util_resizing_get(e_client_action_get())) return;
 
desk2 = e_desk_at_xy_get(desk->zone, desk->zone->desk_x_current, 
desk->zone->desk_y_current);
if ((!starting) && (!desk2->visible)) return;

-- 




[EGIT] [tools/edi] master 01/01: syntax: Fix python syntax by adding a basic provider

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

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

commit 7bb4a7cc24c5d7d06188089dfa42fa8609ee6939
Author: Andy Williams 
Date:   Thu Sep 7 21:00:31 2017 +0100

syntax: Fix python syntax by adding a basic provider
---
 src/bin/language/edi_language_provider.c|  8 +
 src/bin/language/edi_language_provider_python.c | 42 +
 2 files changed, 50 insertions(+)

diff --git a/src/bin/language/edi_language_provider.c 
b/src/bin/language/edi_language_provider.c
index bd5ca7f..b16585a 100644
--- a/src/bin/language/edi_language_provider.c
+++ b/src/bin/language/edi_language_provider.c
@@ -9,6 +9,7 @@
 #include "edi_private.h"
 
 #include "edi_language_provider_c.c"
+#include "edi_language_provider_python.c"
 #include "edi_language_provider_rust.c"
 
 static Edi_Language_Provider _edi_language_provider_registry[] =
@@ -19,6 +20,11 @@ static Edi_Language_Provider 
_edi_language_provider_registry[] =
   _edi_language_c_lookup, _edi_language_c_lookup_doc
},
{
+  "python", _edi_language_python_add, _edi_language_python_refresh, 
_edi_language_python_del,
+  _edi_language_python_mime_name, _edi_language_python_snippet_get,
+  NULL, NULL
+   },
+   {
   "rust", _edi_language_rust_add, _edi_language_rust_refresh, 
_edi_language_rust_del,
   _edi_language_rust_mime_name, _edi_language_rust_snippet_get,
   NULL, NULL
@@ -47,6 +53,8 @@ Edi_Language_Provider 
*edi_language_provider_for_mime_get(const char *mime)
  id = "c";
if (!strcasecmp(mime, "text/rust"))
  id = "rust";
+   if (!strcasecmp(mime, "text/x-python"))
+ id = "python";
 
if (!id)
  return NULL;
diff --git a/src/bin/language/edi_language_provider_python.c 
b/src/bin/language/edi_language_provider_python.c
new file mode 100644
index 000..551780f
--- /dev/null
+++ b/src/bin/language/edi_language_provider_python.c
@@ -0,0 +1,42 @@
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#include 
+
+#include "edi_language_provider.h"
+
+#include "edi_config.h"
+
+#include "edi_private.h"
+
+void
+_edi_language_python_add(Edi_Editor *editor EINA_UNUSED)
+{
+}
+
+void
+_edi_language_python_refresh(Edi_Editor *editor EINA_UNUSED)
+{
+}
+
+void
+_edi_language_python_del(Edi_Editor *editor EINA_UNUSED)
+{
+}
+
+const char *
+_edi_language_python_mime_name(const char *mime)
+{
+   if (!strcasecmp(mime, "text/x-python"))
+ return "Python source";
+
+   return NULL;
+}
+
+const char *
+_edi_language_python_snippet_get(const char *key EINA_UNUSED)
+{
+   return NULL;
+}
+

-- 




[EGIT] [tools/edi] master 01/01: edi_exe: modify method to allow additional data parameter.

2017-09-07 Thread Al Poole
netstar pushed a commit to branch master.

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

commit b19befd089cefc35d853b9fa7aef1d87cef8e136
Author: Al Poole 
Date:   Fri Sep 8 00:16:10 2017 +0100

edi_exe: modify method to allow additional data parameter.

This adds an additional pointer for abritrary data. Have utilised
this to make the notidy on build more verbose without code
duplication.
---
 src/bin/edi_main.c| 21 +
 src/bin/screens/edi_screens.c |  2 +-
 src/lib/edi_exe.c | 24 +++-
 src/lib/edi_exe.h |  3 ++-
 4 files changed, 35 insertions(+), 15 deletions(-)

diff --git a/src/bin/edi_main.c b/src/bin/edi_main.c
index 7e9e3f6..63ead1e 100644
--- a/src/bin/edi_main.c
+++ b/src/bin/edi_main.c
@@ -701,26 +701,31 @@ _edi_launcher_run(Edi_Project_Config_Launch *launch)
 }
 
 static void
-_edi_build_display_status_cb(int status)
+_edi_build_display_status_cb(int status, void *data)
 {
-   Eina_Strbuf *message;
+   Eina_Strbuf *title, *message;
+   const char *name = data;
 
+   title = eina_strbuf_new();
message = eina_strbuf_new();
 
if (status != 0)
- eina_strbuf_append_printf(message, "Build of project %s in %s 
failed with status code %d.", edi_project_name_get(), edi_project_get(), 
status);
+ eina_strbuf_append_printf(message, "%s of project %s in %s failed 
with status code %d.\n", name, edi_project_name_get(), edi_project_get(), 
status);
else
- eina_strbuf_append_printf(message, "Build of project %s in %s was 
successful.", edi_project_name_get(), edi_project_get());
+ eina_strbuf_append_printf(message, "%s of project %s in %s was 
successful.\n", name, edi_project_name_get(), edi_project_get());
 
-   edi_screens_desktop_notify("EDI :: Build Status", 
eina_strbuf_string_get(message));
+   eina_strbuf_append_printf(title, "EDI :: %s Status", name);
 
+   edi_screens_desktop_notify(eina_strbuf_string_get(title), 
eina_strbuf_string_get(message));
+
+   eina_strbuf_free(title);
eina_strbuf_free(message);
 }
 
 static void
 _edi_build_project(void)
 {
-   if (edi_exe_notify_handle("edi_build", _edi_build_display_status_cb))
+   if (edi_exe_notify_handle("edi_build", _edi_build_display_status_cb, 
"Build"))
  {
 edi_consolepanel_show();
 edi_builder_build();
@@ -730,7 +735,7 @@ _edi_build_project(void)
 static void
 _edi_build_clean_project(void)
 {
-   if (edi_exe_notify_handle("edi_build", _edi_build_display_status_cb))
+   if (edi_exe_notify_handle("edi_build", _edi_build_display_status_cb, 
"Clean"))
  {
 edi_consolepanel_show();
 edi_builder_clean();
@@ -740,7 +745,7 @@ _edi_build_clean_project(void)
 static void
 _edi_build_test_project(void)
 {
-   if (edi_exe_notify_handle("edi_build", _edi_build_display_status_cb))
+   if (edi_exe_notify_handle("edi_build", _edi_build_display_status_cb, 
"Test"))
  {
 edi_consolepanel_show();
 edi_builder_test();
diff --git a/src/bin/screens/edi_screens.c b/src/bin/screens/edi_screens.c
index b86ebfa..7e625f4 100644
--- a/src/bin/screens/edi_screens.c
+++ b/src/bin/screens/edi_screens.c
@@ -129,7 +129,7 @@ void edi_screens_desktop_notify(const char *title, const 
char *message)
 
command = eina_strbuf_new();
 
-   eina_strbuf_append_printf(command, "notify-send -t 7000 -i edi '%s' '%s'", 
title, message);
+   eina_strbuf_append_printf(command, "notify-send -t 1 -i edi '%s' '%s'", 
title, message);
 
ecore_exe_run(eina_strbuf_string_get(command), NULL);
 
diff --git a/src/lib/edi_exe.c b/src/lib/edi_exe.c
index c16cedb..0fa16eb 100644
--- a/src/lib/edi_exe.c
+++ b/src/lib/edi_exe.c
@@ -13,33 +13,47 @@
 static Ecore_Event_Handler *_edi_exe_handler = NULL;
 static Ecore_Event_Handler *_edi_exe_notify_handler = NULL;
 
+typedef struct _Edi_Exe_Args {
+   void ((*func)(int, void *));
+   void *data;
+} Edi_Exe_Args;
+
 static Eina_Bool
 _edi_exe_notify_data_cb(void *data, int type EINA_UNUSED, void *event 
EINA_UNUSED)
 {
int *status;
-   void *(*func)(int value);
+   Edi_Exe_Args *args;
Ecore_Con_Event_Client_Data *ev = event;
 
status = ev->data;
-   func = data;
 
-   func(*status);
+   args = data;
+
+   args->func(*status, args->data);
 
ecore_event_handler_del(_edi_exe_notify_handler);
_edi_exe_notify_handler = NULL;
 
+   free(args);
+
return EINA_FALSE;
 }
 
 EAPI Eina_Bool
-edi_exe_notify_handle(const char *name, void ((*func)(int)))
+edi_exe_notify_handle(const char *name, void ((*func)(int, void *)), void 
*data)
 {
+   Edi_Exe_Args *args;
+
if (_edi_exe_notify_handler) return EINA_FALSE;
 
   /* These are UNIX domain sockets, no need to clean up */
ecore_con_server_add(ECORE_CON_LOCAL_USER, name, 0, NULL);
 
-   _edi_exe_notify_handler = 
ecore_event_handler_add(ECORE_CON_EVENT_CLIENT_DATA, (Ecore_Event_Handler_Cb) 
_edi_exe_notify_data_cb, func);
+   args = malloc(sizeof(Edi_E

[EGIT] [core/efl] master 01/02: Evas filters: remove needless check for negative case.

2017-09-07 Thread Sungtaek Hong
jpeg pushed a commit to branch master.

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

commit 89f92af46949ea72b0346472eda8a397ef52
Author: Sungtaek Hong 
Date:   Mon Sep 4 17:47:31 2017 +0900

Evas filters: remove needless check for negative case.

Summary:
Becuse ox is set to 0,
it cannot be negative, so negative check will be needless.

Reviewers: jpeg

Reviewed By: jpeg

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D5155
---
 src/lib/evas/filters/evas_filter_parser.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/lib/evas/filters/evas_filter_parser.c 
b/src/lib/evas/filters/evas_filter_parser.c
index d01299c5bd..cf276b29cd 100644
--- a/src/lib/evas/filters/evas_filter_parser.c
+++ b/src/lib/evas/filters/evas_filter_parser.c
@@ -1686,8 +1686,9 @@ _transform_padding_update(Evas_Filter_Program *pgm 
EINA_UNUSED,
dst = _instruction_param_getbuf(instr, "dst", NULL);
EINA_SAFETY_ON_NULL_RETURN_VAL(dst, 0);
 
-   if (ox < 0) l = (-ox) * 2;
-   else r = ox * 2;
+   //if (ox < 0) l = (-ox) * 2;
+   //else r = ox * 2;
+   r = ox * 2;
 
if (oy < 0) t = (-oy) * 2;
else b = oy * 2;

-- 




[EGIT] [core/efl] master 02/02: edje: Better debug logs for invalid calls to swallow

2017-09-07 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

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

commit ff96e30c7239118b349883f8b1b882e9c64d10c5
Author: Jean-Philippe Andre 
Date:   Wed Sep 6 14:39:22 2017 +0900

edje: Better debug logs for invalid calls to swallow

These error messages will be triggered when efl_part() is used, and the
part is not a swallow part.
---
 src/lib/edje/edje_part.c| 59 ++---
 src/lib/edje/edje_part_helper.h |  1 +
 2 files changed, 44 insertions(+), 16 deletions(-)

diff --git a/src/lib/edje/edje_part.c b/src/lib/edje/edje_part.c
index 7442bab901..6fb1566366 100644
--- a/src/lib/edje/edje_part.c
+++ b/src/lib/edje/edje_part.c
@@ -5,24 +5,12 @@
 PROXY_IMPLEMENTATION(other, MY_CLASS, EINA_FALSE)
 #undef PROXY_IMPLEMENTATION
 
-void
-_part_reuse_error(Efl_Canvas_Layout_Internal_Data *pd)
+const char *
+_part_type_to_string(unsigned char type)
 {
const char *typestr = "UNKNOWN";
-   Edje *ed;
-
-   // TODO: Enable full debug only for eo_debug?
-   // Don't trust pd->ed as it may be invalid now.
-   ed = efl_data_scope_safe_get(pd->obj, EDJE_OBJECT_CLASS);
-   if (!ed)
- {
-ERR("A previous misuse of efl_part has been detected. Handles returned 
"
-"by efl_part() are valid for a single function call. Did you call "
-"a non implemented function? obj: %p has been deleted!", pd->obj);
-return;
- }
 
-   switch (pd->rp->part->type)
+   switch (type)
  {
   case EDJE_PART_TYPE_RECTANGLE: typestr = "RECTANGLE"; break;
   case EDJE_PART_TYPE_TEXT: typestr = "TEXT"; break;
@@ -44,10 +32,29 @@ _part_reuse_error(Efl_Canvas_Layout_Internal_Data *pd)
   default: break;
  }
 
+   return typestr;
+}
+
+void
+_part_reuse_error(Efl_Canvas_Layout_Internal_Data *pd)
+{
+   Edje *ed;
+
+   // TODO: Enable full debug only for eo_debug?
+   // Don't trust pd->ed as it may be invalid now.
+   ed = efl_data_scope_safe_get(pd->obj, EDJE_OBJECT_CLASS);
+   if (!ed)
+ {
+ERR("A previous misuse of efl_part has been detected. Handles returned 
"
+"by efl_part() are valid for a single function call. Did you call "
+"a non implemented function? obj: %p has been deleted!", pd->obj);
+return;
+ }
+
ERR("A previous misuse of efl_part has been detected. Handles returned "
"by efl_part() are valid for a single function call. Did you call "
"a non implemented function? obj: %p group: '%s' part: '%s' type: %s%s",
-   pd->obj, ed->group, pd->part, typestr,
+   pd->obj, ed->group, pd->part, _part_type_to_string(pd->rp->part->type),
ed->delete_me ? ". This object is already deleted." : "");
 }
 
@@ -206,4 +213,24 @@ _efl_canvas_layout_internal_efl_ui_drag_drag_page_move(Eo 
*obj, Efl_Canvas_Layou
RETURN_VAL(_edje_object_part_drag_page(pd->ed, pd->part, dx, dy));
 }
 
+static Eo *
+_edje_invalid_part_efl_content_get(Eo *obj, Efl_Canvas_Layout_Internal_Data 
*pd)
+{
+   ERR("Part '%s' (type: %s) of group '%s' is not a SWALLOW part!", pd->part, 
_part_type_to_string(pd->rp->type), pd->ed->group);
+   RETURN_VAL(NULL);
+}
+
+static Eina_Bool
+_edje_invalid_part_efl_content_set(Eo *obj, Efl_Canvas_Layout_Internal_Data 
*pd, Eo *subobj EINA_UNUSED)
+{
+   ERR("Part '%s' (type: %s) of group '%s' is not a SWALLOW part!", pd->part, 
_part_type_to_string(pd->rp->type), pd->ed->group);
+   RETURN_VAL(EINA_FALSE);
+}
+
+/* Internal EO APIs and hidden overrides */
+
+#define EFL_CANVAS_LAYOUT_INTERNAL_EXTRA_OPS \
+   EFL_OBJECT_OP_FUNC(efl_content_get, _edje_invalid_part_efl_content_get), \
+   EFL_OBJECT_OP_FUNC(efl_content_set, _edje_invalid_part_efl_content_set), \
+
 #include "efl_canvas_layout_internal.eo.c"
diff --git a/src/lib/edje/edje_part_helper.h b/src/lib/edje/edje_part_helper.h
index e872ca30af..f72dadcc65 100644
--- a/src/lib/edje/edje_part_helper.h
+++ b/src/lib/edje/edje_part_helper.h
@@ -21,6 +21,7 @@ struct _Part_Item_Iterator
 };
 
 void _part_reuse_error(Efl_Canvas_Layout_Internal_Data *pd);
+const char * _part_type_to_string(unsigned char type);
 
 #define PROXY_CALL_BEGIN(pd) do { pd->in_call = 1; } while (0)
 #define PROXY_CALL_END(pd) do { pd->in_call = 0; } while (0)

-- 




[EGIT] [core/efl] master 01/01: eo-cxx: Require instantiate keyword for constructors calling efl_add to avoid ambiguity

2017-09-07 Thread Felipe Magno de Almeida
felipealmeida pushed a commit to branch master.

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

commit 48b3c127f7c4e7ffc7dbf66013c3ec2812ae9a5f
Author: Felipe Magno de Almeida 
Date:   Thu Sep 7 18:02:43 2017 +0900

eo-cxx: Require instantiate keyword for constructors calling efl_add to 
avoid ambiguity
---
 src/bindings/cxx/eo_cxx/eo_concrete.hh|   3 +-
 src/bindings/cxx/eo_cxx/eo_cxx_interop.hh |  14 ++-
 src/examples/elementary/Makefile.am   |   2 +
 src/examples/elementary/toolbar_cxx_example_01.cc | 135 ++
 src/lib/eolian_cxx/grammar/class_declaration.hpp  |  12 +-
 src/lib/eolian_cxx/grammar/class_definition.hpp   |  37 --
 src/tests/eina_cxx/eina_cxx_test_iterator.cc  |   8 +-
 src/tests/eolian_cxx/eolian_cxx_test_binding.cc   |  14 +--
 8 files changed, 200 insertions(+), 25 deletions(-)

diff --git a/src/bindings/cxx/eo_cxx/eo_concrete.hh 
b/src/bindings/cxx/eo_cxx/eo_concrete.hh
index 8b978275b9..f02eb0cba0 100644
--- a/src/bindings/cxx/eo_cxx/eo_concrete.hh
+++ b/src/bindings/cxx/eo_cxx/eo_concrete.hh
@@ -31,6 +31,8 @@ namespace efl { namespace eo {
 /// @addtogroup Efl_Cxx_API
 /// @{
 
+struct instantiate_t {} const instantiate = {};
+
 /// @brief Creates concrete versions for Eo wrappers.
 ///
 /// This class creates the concrete version of all C++ Eo wrappers.
@@ -77,7 +79,6 @@ struct concrete
 
concrete(concrete&& other)
{
- if(_eo_raw) detail::unref(_eo_raw);
  _eo_raw = other._eo_raw;
  other._eo_raw = nullptr;
}
diff --git a/src/bindings/cxx/eo_cxx/eo_cxx_interop.hh 
b/src/bindings/cxx/eo_cxx/eo_cxx_interop.hh
index 5a5e8f9535..47b11db1d8 100644
--- a/src/bindings/cxx/eo_cxx/eo_cxx_interop.hh
+++ b/src/bindings/cxx/eo_cxx/eo_cxx_interop.hh
@@ -652,7 +652,8 @@ T& convert_to_return(T* value, tag)
 template 
 T convert_to_return(Eo* value, tag, typename std::enable_if< 
eo::is_eolian_object::value>::type* = 0)
 {
-  return T{value};
+  T v{value};
+  return v;
 }
 template 
 T convert_to_return(Eo const* value, tag, typename 
std::enable_if::value>::type* = 0)
@@ -799,14 +800,17 @@ struct is_callable : std::false_type {};
 template 
 struct is_callable() ())> : std::true_type {};
 
-inline void do_eo_add(Eo*& object, efl::eo::concrete const& parent
-  , Efl_Class const* klass)
+template 
+inline void do_eo_add(Eo*& object, P const& parent
+  , Efl_Class const* klass
+  , typename std::enable_if< 
eo::is_eolian_object::value>::type* = 0)
 {
   object = ::_efl_add_internal_start(__FILE__, __LINE__, klass, 
parent._eo_ptr(), EINA_TRUE, EINA_FALSE);
   object = ::_efl_add_end(object, EINA_FALSE, EINA_FALSE);
 }
-template 
-void do_eo_add(Eo*& object, efl::eo::concrete const& parent, Efl_Class const* 
klass, F f)
+template 
+void do_eo_add(Eo*& object, P const& parent, Efl_Class const* klass, F f
+   , typename std::enable_if< 
eo::is_eolian_object::value>::type* = 0)
 {
   object = ::_efl_add_internal_start(__FILE__, __LINE__, klass, 
parent._eo_ptr(), EINA_TRUE, EINA_FALSE);
   f();
diff --git a/src/examples/elementary/Makefile.am 
b/src/examples/elementary/Makefile.am
index a5d7e2af72..9e235764ca 100644
--- a/src/examples/elementary/Makefile.am
+++ b/src/examples/elementary/Makefile.am
@@ -407,6 +407,7 @@ calendar_cxx_example_04 \
 calendar_cxx_example_05 \
 clock_cxx_example \
 icon_cxx_example_01 \
+toolbar_cxx_example_01 \
 button_cxx_example_00
 # examples_PROGRAMS += \
 # table_cxx_example_02 \
@@ -449,6 +450,7 @@ calendar_cxx_example_01_SOURCES = calendar_cxx_example_01.cc
 bg_cxx_example_02_SOURCES = bg_cxx_example_02.cc
 bg_cxx_example_01_SOURCES = bg_cxx_example_01.cc
 button_cxx_example_00_SOURCES = button_cxx_example_00.cc
+toolbar_cxx_example_01_SOURCES = toolbar_cxx_example_01.cc
 # table_cxx_example_02_SOURCES = table_cxx_example_02.cc
 # table_cxx_example_01_SOURCES = table_cxx_example_01.cc
 # spinner_cxx_example_SOURCES = spinner_cxx_example.cc
diff --git a/src/examples/elementary/toolbar_cxx_example_01.cc 
b/src/examples/elementary/toolbar_cxx_example_01.cc
new file mode 100644
index 00..5d19c4bd2e
--- /dev/null
+++ b/src/examples/elementary/toolbar_cxx_example_01.cc
@@ -0,0 +1,135 @@
+#define ELM_WIDGET_PROTECTED
+#define ELM_WIDGET_CLASS_PROTECTED
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include 
+#include 
+
+EAPI int
+elm_main(int argc, char* argv[])
+{
+   elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_HIDDEN);
+
+   using efl::eo::instantiate;
+  
+   efl::ui::Win win_1
+ (instantiate,
+  [&]
+  {
+win_1.text_set("Toolbar");
+win_1.name_set("toolbar");
+win_1.type_set(EFL_UI_WIN_BASIC);
+  });
+
+   win_1.autodel_set(true);
+   win_1.eo_cxx::efl::Gfx::size_set(320, 300);
+
+   efl::ui::Box box_1(instantiate, win_1);
+   box_1.hint_weight_set(1.0, 1.0);
+   box_1.visible_set(true);
+
+