[EGIT] [core/efl] master 01/01: Evas GL: Actually save the checksum inside the file
jpeg pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=4caad3f4eafa9ae5c80bb55e82985b0f1dccba5e commit 4caad3f4eafa9ae5c80bb55e82985b0f1dccba5e Author: Jean-Philippe AndreDate: Thu Jan 21 10:59:22 2016 +0900 Evas GL: Actually save the checksum inside the file This would be cleaner than adding it as a suffix to the filename. Use simple write and read_direct for simplicity. This is an improvement on 3dcd903a537e29342121c and should make sure everyone is actually using the latest version of the shaders even if they track master or the alpha/beta releases. --- .../evas/engines/gl_common/evas_gl_common.h| 2 +- .../evas/engines/gl_common/evas_gl_context.c | 2 +- .../evas/engines/gl_common/evas_gl_shader.c| 64 ++ 3 files changed, 56 insertions(+), 12 deletions(-) diff --git a/src/modules/evas/engines/gl_common/evas_gl_common.h b/src/modules/evas/engines/gl_common/evas_gl_common.h index eab1c50..e4b14f3 100644 --- a/src/modules/evas/engines/gl_common/evas_gl_common.h +++ b/src/modules/evas/engines/gl_common/evas_gl_common.h @@ -191,7 +191,7 @@ struct _Evas_GL_Shared Eet_File *shaders_cache; Eina_Hash *shaders_hash; - Eina_Stringshare *shaders_cache_name; + Eina_Stringshare *shaders_checksum; #ifdef GL_GLES // FIXME: hack. diff --git a/src/modules/evas/engines/gl_common/evas_gl_context.c b/src/modules/evas/engines/gl_common/evas_gl_context.c index cf38234..6680f44 100644 --- a/src/modules/evas/engines/gl_common/evas_gl_context.c +++ b/src/modules/evas/engines/gl_common/evas_gl_context.c @@ -1041,7 +1041,7 @@ evas_gl_common_context_free(Evas_Engine_GL_Context *gc) eina_hash_free(gc->shared->native_wl_hash); eina_hash_free(gc->shared->native_tbm_hash); eina_hash_free(gc->shared->native_evasgl_hash); -eina_stringshare_del(gc->shared->shaders_cache_name); +eina_stringshare_del(gc->shared->shaders_checksum); free(gc->shared); shared = NULL; } diff --git a/src/modules/evas/engines/gl_common/evas_gl_shader.c b/src/modules/evas/engines/gl_common/evas_gl_shader.c index 61ede1d..88944c2 100644 --- a/src/modules/evas/engines/gl_common/evas_gl_shader.c +++ b/src/modules/evas/engines/gl_common/evas_gl_shader.c @@ -6,6 +6,8 @@ #define SHADER_FLAG_MASKSAM_BITSHIFT 6 #define SHADER_PROG_NAME_FMT "/shader/%08x" #define SHADER_BINARY_EET_COMPRESS 1 +#define SHADER_EET_CHECKSUM "/shader/checksum" +#define SHADER_EET_CACHENAME "binary_shader" #define P(i) ((void*)(intptr_t)i) #define I(p) ((int)(intptr_t)p) @@ -207,17 +209,48 @@ _evas_gl_common_shader_program_binary_save(Evas_GL_Program *p, Eet_File *ef) static void _evas_gl_common_shader_binary_hash(Evas_GL_Shared *shared) { - if (shared->shaders_cache_name) + if (shared->shaders_checksum) return; /* This hash makes it sure that if the shaders code changes, then we * will not reuse the old binaries. */ - shared->shaders_cache_name = eina_stringshare_printf - ("%#x:%#x::binary_shader", + shared->shaders_checksum = eina_stringshare_printf + ("%#x:%#x", eina_hash_superfast(fragment_glsl, strlen(fragment_glsl)), eina_hash_superfast(vertex_glsl, strlen(vertex_glsl))); } +static Eina_Bool +_evas_gl_common_shader_binary_checksum_check(Evas_GL_Shared *shared, Eet_File *ef) +{ + Eina_Bool ret = EINA_FALSE; + const char *old_hash; + int len = 0; + + if (!ef) return EINA_FALSE; + _evas_gl_common_shader_binary_hash(shared); + old_hash = eet_read_direct(ef, SHADER_EET_CHECKSUM, ); + if (old_hash && + (len == (eina_stringshare_strlen(shared->shaders_checksum) + 1)) && + (!strcmp(shared->shaders_checksum, old_hash))) + ret = EINA_TRUE; + + return ret; +} + +static Eina_Bool +_evas_gl_common_shader_binary_checksum_write(Evas_GL_Shared *shared, Eet_File *ef) +{ + int ret, len; + + if (!ef) return EINA_FALSE; + _evas_gl_common_shader_binary_hash(shared); + len = eina_stringshare_strlen(shared->shaders_checksum) + 1; + ret = eet_write(ef, SHADER_EET_CHECKSUM, shared->shaders_checksum, len, 0); + + return (ret == len); +} + static int _evas_gl_common_shader_binary_init(Evas_GL_Shared *shared) { @@ -234,14 +267,14 @@ _evas_gl_common_shader_binary_init(Evas_GL_Shared *shared) if (!evas_gl_common_file_cache_dir_check(bin_dir_path, sizeof(bin_dir_path))) return 0; - _evas_gl_common_shader_binary_hash(shared); - if (!evas_gl_common_file_cache_file_check(bin_dir_path, shared->shaders_cache_name, + if (!evas_gl_common_file_cache_file_check(bin_dir_path, SHADER_EET_CACHENAME, bin_file_path, sizeof(bin_dir_path))) return 0; if (!eet_init()) return 0; ef = eet_open(bin_file_path, EET_FILE_MODE_READ); - if (!ef) goto error; + if
[EGIT] [core/elementary] master 01/01: elm: Replace EO_EV_ by EO_BASE_EVENT_
jpeg pushed a commit to branch master. http://git.enlightenment.org/core/elementary.git/commit/?id=0b70a4e8ce9cd32875b975907c489365681c0cea commit 0b70a4e8ce9cd32875b975907c489365681c0cea Author: Jean-Philippe AndreDate: Thu Jan 21 14:45:05 2016 +0900 elm: Replace EO_EV_ by EO_BASE_EVENT_ EO_EV_ stuff is deprecated --- src/bin/test_application_server.c | 8 src/lib/elm_app_server.c | 6 +++--- src/lib/elm_entry.c | 4 ++-- src/lib/elm_win.c | 4 ++-- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/bin/test_application_server.c b/src/bin/test_application_server.c index 227755f..114f32b 100644 --- a/src/bin/test_application_server.c +++ b/src/bin/test_application_server.c @@ -116,7 +116,7 @@ _create_view_cb(Elm_App_Server *app_server, const Eina_Value *args EINA_UNUSED, eo_event_callback_add(ELM_APP_SERVER_VIEW_EVENT_CLOSED, _close_cb, ctx), eo_event_callback_add(ELM_APP_SERVER_VIEW_EVENT_PAUSED, _pause_cb, ctx), eo_event_callback_add(ELM_APP_SERVER_VIEW_EVENT_RESUMED, _resume_cb, ctx), - eo_event_callback_add(EO_EV_DEL, _view_del_cb, ctx)); + eo_event_callback_add(EO_BASE_EVENT_DEL, _view_del_cb, ctx)); return view; } @@ -163,7 +163,7 @@ test_application_server_common(const char *pkg) eo_event_callback_add(ELM_APP_SERVER_VIEW_EVENT_CLOSED, _close_cb, ctx), eo_event_callback_add(ELM_APP_SERVER_VIEW_EVENT_PAUSED, _pause_cb, ctx), eo_event_callback_add(ELM_APP_SERVER_VIEW_EVENT_RESUMED, _resume_cb, ctx), - eo_event_callback_add(EO_EV_DEL, _view_del_cb, ctx)); + eo_event_callback_add(EO_BASE_EVENT_DEL, _view_del_cb, ctx)); } eina_iterator_free(views_iter); @@ -190,7 +190,7 @@ test_application_server_phone(void *data EINA_UNUSED, } printf("Starting phone\n"); phone_server = test_application_server_common("org.enlightenment.phone"); - eo_do(phone_server, eo_event_callback_add(EO_EV_DEL, _server_del_cb, _server)); + eo_do(phone_server, eo_event_callback_add(EO_BASE_EVENT_DEL, _server_del_cb, _server)); } void @@ -205,5 +205,5 @@ test_application_server_message(void *data EINA_UNUSED, } printf("Starting message\n"); msg_server = test_application_server_common( "org.enlightenment.message"); - eo_do(msg_server, eo_event_callback_add(EO_EV_DEL, _server_del_cb, _server)); + eo_do(msg_server, eo_event_callback_add(EO_BASE_EVENT_DEL, _server_del_cb, _server)); } diff --git a/src/lib/elm_app_server.c b/src/lib/elm_app_server.c index 50e3043..0225449 100644 --- a/src/lib/elm_app_server.c +++ b/src/lib/elm_app_server.c @@ -51,7 +51,7 @@ _view_append(Elm_App_Server_Data *data, Elm_App_Server_View *view) } eina_hash_add(data->views, view_id, view); - eo_do(view, eo_event_callback_add(EO_EV_DEL, _view_del_cb, data)); + eo_do(view, eo_event_callback_add(EO_BASE_EVENT_DEL, _view_del_cb, data)); return EINA_TRUE; } @@ -264,7 +264,7 @@ _elm_app_server_constructor(Eo *obj, Elm_App_Server_Data *data, const char *pkg, elm_app_server_view_icon_set(icon_name), elm_app_server_view_progress_set(progress), elm_app_server_view_new_events_set(new_events), - eo_event_callback_add(EO_EV_DEL, _view_del_cb, data), + eo_event_callback_add(EO_BASE_EVENT_DEL, _view_del_cb, data), elm_app_server_view_shallow()); eina_hash_add(data->views, view_id, view); @@ -434,7 +434,7 @@ _elm_app_server_eo_base_destructor(Eo *obj, Elm_App_Server_Data *data) EINA_ITERATOR_FOREACH(iter, view) { //do not modify hash when iterating -eo_do(view, eo_event_callback_del(EO_EV_DEL, _view_del_cb, data)); +eo_do(view, eo_event_callback_del(EO_BASE_EVENT_DEL, _view_del_cb, data)); eo_del(view); } eina_iterator_free(iter); diff --git a/src/lib/elm_entry.c b/src/lib/elm_entry.c index a2c6d73..6d0e4d7 100644 --- a/src/lib/elm_entry.c +++ b/src/lib/elm_entry.c @@ -3851,8 +3851,8 @@ _elm_entry_eo_base_constructor(Eo *obj, Elm_Entry_Data *_pd EINA_UNUSED) evas_obj_type_set(MY_CLASS_NAME_LEGACY), evas_obj_smart_callbacks_descriptions_set(_smart_callbacks), elm_interface_atspi_accessible_role_set(ELM_ATSPI_ROLE_ENTRY), - eo_event_callback_add(EO_EV_CALLBACK_ADD, _cb_added, NULL), - eo_event_callback_add(EO_EV_CALLBACK_DEL, _cb_deleted, NULL)); + eo_event_callback_add(EO_BASE_EVENT_CALLBACK_ADD, _cb_added, NULL), + eo_event_callback_add(EO_BASE_EVENT_CALLBACK_DEL, _cb_deleted, NULL)); return obj; } diff --git a/src/lib/elm_win.c b/src/lib/elm_win.c index 5f0234c..ad009b0 100644 --- a/src/lib/elm_win.c +++ b/src/lib/elm_win.c @@ -3985,8 +3985,8 @@ _elm_win_finalize_internal(Eo *obj, Elm_Win_Data *sd, const
[EGIT] [core/efl] master 02/02: Eo: Actually mark EO_EV_ as EINA_DEPRECATED
jpeg pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=258639a92e678512c2dd7dc17d24cc6242e2cb58 commit 258639a92e678512c2dd7dc17d24cc6242e2cb58 Author: Jean-Philippe AndreDate: Thu Jan 21 13:10:48 2016 +0900 Eo: Actually mark EO_EV_ as EINA_DEPRECATED This should add compilation warnings whereever they're used. --- src/lib/eo/Eo.h | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/lib/eo/Eo.h b/src/lib/eo/Eo.h index ad70c0c..4eb13cd 100644 --- a/src/lib/eo/Eo.h +++ b/src/lib/eo/Eo.h @@ -1025,9 +1025,12 @@ EAPI const Eo_Event_Description *eo_base_legacy_only_event_description_get(const */ /* XXX: Deprecated, here for compat, DO NOT USE */ -#define EO_EV_CALLBACK_ADD EO_BASE_EVENT_CALLBACK_ADD -#define EO_EV_CALLBACK_DEL EO_BASE_EVENT_CALLBACK_DEL -#define EO_EV_DEL EO_BASE_EVENT_DEL +EINA_DEPRECATED static inline const Eo_Event_Description* _EO_EV_CALLBACK_ADD(void) { return EO_BASE_EVENT_CALLBACK_ADD; } +EINA_DEPRECATED static inline const Eo_Event_Description* _EO_EV_CALLBACK_DEL(void) { return EO_BASE_EVENT_CALLBACK_DEL; } +EINA_DEPRECATED static inline const Eo_Event_Description* _EO_EV_DEL(void) { return EO_BASE_EVENT_DEL; } +#define EO_EV_CALLBACK_ADD _EO_EV_CALLBACK_ADD() +#define EO_EV_CALLBACK_DEL _EO_EV_CALLBACK_DEL() +#define EO_EV_DEL _EO_EV_DEL() /** * @} --
[EGIT] [core/efl] master 01/02: Eo: Replace deprecated EO_EV_ by EO_BASE_EVENT_
jpeg pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=9d76a44b7837a93329e70f6f493f274ffb5acbf0 commit 9d76a44b7837a93329e70f6f493f274ffb5acbf0 Author: Jean-Philippe AndreDate: Thu Jan 21 13:10:05 2016 +0900 Eo: Replace deprecated EO_EV_ by EO_BASE_EVENT_ --- src/lib/eo/eo_base_class.c | 8 src/lib/eo/eo_private.h | 2 +- src/modules/evas/engines/gl_common/evas_gl_preload.c | 4 ++-- src/tests/eo/signals/signals_simple.c| 4 ++-- src/tests/eo/suite/eo_test_general.c | 6 +++--- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/lib/eo/eo_base_class.c b/src/lib/eo/eo_base_class.c index 246bcc2..d27e256 100644 --- a/src/lib/eo/eo_base_class.c +++ b/src/lib/eo/eo_base_class.c @@ -575,7 +575,7 @@ _eo_base_event_callback_priority_add(Eo *obj, Eo_Base_Data *pd, { const Eo_Callback_Array_Item arr[] = { {desc, func}, {NULL, NULL}}; -eo_do(obj, eo_event_callback_call(EO_EV_CALLBACK_ADD, (void *)arr)); +eo_do(obj, eo_event_callback_call(EO_BASE_EVENT_CALLBACK_ADD, (void *)arr)); } } @@ -597,7 +597,7 @@ _eo_base_event_callback_del(Eo *obj, Eo_Base_Data *pd, cb->delete_me = EINA_TRUE; pd->deletions_waiting = EINA_TRUE; _eo_callbacks_clear(pd); - eo_do(obj, eo_event_callback_call(EO_EV_CALLBACK_DEL, (void *)arr); ); + eo_do(obj, eo_event_callback_call(EO_BASE_EVENT_CALLBACK_DEL, (void *)arr); ); return; } } @@ -622,7 +622,7 @@ _eo_base_event_callback_array_priority_add(Eo *obj, Eo_Base_Data *pd, _eo_callbacks_sorted_insert(pd, cb); { -eo_do(obj, eo_event_callback_call(EO_EV_CALLBACK_ADD, (void *)array); ); +eo_do(obj, eo_event_callback_call(EO_BASE_EVENT_CALLBACK_ADD, (void *)array); ); } } @@ -642,7 +642,7 @@ _eo_base_event_callback_array_del(Eo *obj, Eo_Base_Data *pd, pd->deletions_waiting = EINA_TRUE; _eo_callbacks_clear(pd); - eo_do(obj, eo_event_callback_call(EO_EV_CALLBACK_DEL, (void *)array); ); + eo_do(obj, eo_event_callback_call(EO_BASE_EVENT_CALLBACK_DEL, (void *)array); ); return; } } diff --git a/src/lib/eo/eo_private.h b/src/lib/eo/eo_private.h index 135966d..869745c 100644 --- a/src/lib/eo/eo_private.h +++ b/src/lib/eo/eo_private.h @@ -214,7 +214,7 @@ _eo_del_internal(const char *file, int line, _Eo_Object *obj) const _Eo_Class *klass = obj->klass; - eo_do(_eo_id_get(obj), eo_event_callback_call(EO_EV_DEL, NULL)); + eo_do(_eo_id_get(obj), eo_event_callback_call(EO_BASE_EVENT_DEL, NULL)); _eo_condtor_reset(obj); diff --git a/src/modules/evas/engines/gl_common/evas_gl_preload.c b/src/modules/evas/engines/gl_common/evas_gl_preload.c index 5344473..9c3b1357 100644 --- a/src/modules/evas/engines/gl_common/evas_gl_preload.c +++ b/src/modules/evas/engines/gl_common/evas_gl_preload.c @@ -316,7 +316,7 @@ evas_gl_preload_target_register(Evas_GL_Texture *tex, Eo *target) EINA_SAFETY_ON_NULL_RETURN(tex); eo_do(target, - eo_event_callback_add(EO_EV_DEL, _evas_gl_preload_target_die, tex)); + eo_event_callback_add(EO_BASE_EVENT_DEL, _evas_gl_preload_target_die, tex)); tex->targets = eina_list_append(tex->targets, target); tex->references++; } @@ -330,7 +330,7 @@ evas_gl_preload_target_unregister(Evas_GL_Texture *tex, Eo *target) EINA_SAFETY_ON_NULL_RETURN(tex); eo_do(target, - eo_event_callback_del(EO_EV_DEL, _evas_gl_preload_target_die, tex)); + eo_event_callback_del(EO_BASE_EVENT_DEL, _evas_gl_preload_target_die, tex)); EINA_LIST_FOREACH(tex->targets, l, o) if (o == target) diff --git a/src/tests/eo/signals/signals_simple.c b/src/tests/eo/signals/signals_simple.c index 7b55cf8..fd3138d 100644 --- a/src/tests/eo/signals/signals_simple.c +++ b/src/tests/eo/signals/signals_simple.c @@ -65,8 +65,8 @@ _constructor(Eo *obj, void *class_data EINA_UNUSED) { obj = eo_do_super_ret(obj, MY_CLASS, obj, eo_constructor()); - eo_do(obj, eo_event_callback_add(EO_EV_CALLBACK_ADD, _cb_added, NULL)); - eo_do(obj, eo_event_callback_add(EO_EV_CALLBACK_DEL, _cb_deled, NULL)); + eo_do(obj, eo_event_callback_add(EO_BASE_EVENT_CALLBACK_ADD, _cb_added, NULL)); + eo_do(obj, eo_event_callback_add(EO_BASE_EVENT_CALLBACK_DEL, _cb_deled, NULL)); eo_do(obj, eo_key_data_set("cb_count", NULL)); diff --git a/src/tests/eo/suite/eo_test_general.c b/src/tests/eo/suite/eo_test_general.c index 394e9c0..f305027 100644 --- a/src/tests/eo/suite/eo_test_general.c +++ b/src/tests/eo/suite/eo_test_general.c @@ -96,13 +96,13 @@ START_TEST(eo_signals) { EV_A_CHANGED, _eo_signals_a_changed_cb }, { EV_A_CHANGED, _eo_signals_a_changed_cb2 }, { EV_A_CHANGED,
[EGIT] [tools/enventor] master 01/01: autocomp: Fix the count of box.items.item's node list.
jaehyun pushed a commit to branch master. http://git.enlightenment.org/tools/enventor.git/commit/?id=ab32de633758690304fa757b97c8d0eb82ed58d7 commit ab32de633758690304fa757b97c8d0eb82ed58d7 Author: Jaehyun ChoDate: Thu Jan 21 10:01:46 2016 +0900 autocomp: Fix the count of box.items.item's node list. This commit fix the commit cf1e142364ab2b2534414190336eb4bc36f2bbcd Fix the count of part.box.items.item's node list as "span" is removed. --- data/autocomp/autocomp.src | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/autocomp/autocomp.src b/data/autocomp/autocomp.src index 241d3be..d2bcacf 100644 --- a/data/autocomp/autocomp.src +++ b/data/autocomp/autocomp.src @@ -495,7 +495,7 @@ group "lexem" struct { value "cursor_offset" int: 1; value "line_back" int: 0; group "name" var_array { - count 11; + count 10; value "string" string: "align"; value "string" string: "aspect"; value "string" string: "aspect_mode"; --
[EGIT] [tools/eflete] master 01/04: property_group: unset Program Property after program deletion
rimmed pushed a commit to branch master. http://git.enlightenment.org/tools/eflete.git/commit/?id=5965489809bb971024f20e4a1a215e4ff5a079dd commit 5965489809bb971024f20e4a1a215e4ff5a079dd Author: Vitalii VorobiovDate: Tue Jan 19 18:49:34 2016 + property_group: unset Program Property after program deletion @fix #49755 --- src/bin/common/signals.h | 8 src/bin/ui/group_navigator.c | 1 + src/bin/ui/property_group.c | 14 +- 3 files changed, 22 insertions(+), 1 deletion(-) diff --git a/src/bin/common/signals.h b/src/bin/common/signals.h index 00a2cf5..abf3349 100644 --- a/src/bin/common/signals.h +++ b/src/bin/common/signals.h @@ -76,6 +76,14 @@ */ #define SIGNAL_PART_UNSELECTED "SIGNAL_PART_UNSELECTED" +/** + * emited when program is unselected. + * eventinfo - pointer to Resource structure + * + * @ingroup Window + */ +#define SIGNAL_PROGRAM_UNSELECTED "SIGNAL_PROGRAM_UNSELECTED" + typedef struct { const char *old_name; const char *new_name; diff --git a/src/bin/ui/group_navigator.c b/src/bin/ui/group_navigator.c index 07fa3b1..bd43965 100644 --- a/src/bin/ui/group_navigator.c +++ b/src/bin/ui/group_navigator.c @@ -1140,6 +1140,7 @@ _program_del(Part_List *pl, program = elm_object_item_data_get(glit); assert(program != NULL); + evas_object_smart_callback_call(ap.win, SIGNAL_PROGRAM_UNSELECTED, (void *)program); msg = eina_stringshare_printf(_("deleted program \"%s\""), program->name); change = change_add(msg); diff --git a/src/bin/ui/property_group.c b/src/bin/ui/property_group.c index 2e15ca7..d950d2d 100644 --- a/src/bin/ui/property_group.c +++ b/src/bin/ui/property_group.c @@ -601,9 +601,20 @@ _on_program_selected(void *data, Resource *res = event_info; _on_part_selected(data, obj, NULL); - _ui_property_program_unset(property); + if (!res) + { +_ui_property_program_unset(property); +return; + } _ui_property_program_set(property, res->name); } +static void +_on_program_unselected(void *data, +Evas_Object *obj, +void *event_info __UNUSED__) +{ + _on_program_selected(data, obj, NULL); +} static void _on_editor_attribute_changed(void *data, @@ -1060,6 +1071,7 @@ ui_property_group_add(Evas_Object *parent) evas_object_smart_callback_add(ap.win, SIGNAL_PART_UNSELECTED, _on_part_unselected, pd->scroller); evas_object_smart_callback_add(ap.win, SIGNAL_PART_STATE_SELECTED, _on_part_state_selected, pd->scroller); evas_object_smart_callback_add(ap.win, SIGNAL_PROGRAM_SELECTED, _on_program_selected, pd->scroller); + evas_object_smart_callback_add(ap.win, SIGNAL_PROGRAM_UNSELECTED, _on_program_unselected, pd->scroller); evas_object_smart_callback_add(ap.win, SIGNAL_EDITOR_ATTRIBUTE_CHANGED, _on_editor_attribute_changed, pd->scroller); return pd->scroller; --
[EGIT] [tools/eflete] master 02/04: tabs: clear property so when loaded again it won't show last property
rimmed pushed a commit to branch master. http://git.enlightenment.org/tools/eflete.git/commit/?id=ad9e6017735a3337d455c98557979a7859143a73 commit ad9e6017735a3337d455c98557979a7859143a73 Author: Vitalii VorobiovDate: Tue Jan 19 19:13:24 2016 + tabs: clear property so when loaded again it won't show last property @fix #48113 --- src/bin/ui/property.c | 1 + src/bin/ui/property_group.c | 3 ++- src/bin/ui/tabs.c | 3 +++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/bin/ui/property.c b/src/bin/ui/property.c index aadbbe5..354ed9c 100644 --- a/src/bin/ui/property.c +++ b/src/bin/ui/property.c @@ -350,6 +350,7 @@ ui_property_add(Evas_Object *parent) evas_object_smart_callback_add(ap.win, SIGNAL_DEMO_TEXT_PART_CLICKED, _on_text_part_clicked, pd->layout); evas_object_smart_callback_add(ap.win, SIGNAL_DEMO_SWALLOW_PART_CLICKED, _on_swallow_part_clicked, pd->layout); evas_object_smart_callback_add(ap.win, SIGNAL_DIFFERENT_TAB_CLICKED, _on_different_clicked, pd->layout); + evas_object_smart_callback_add(ap.win, SIGNAL_TAB_CLOSE, _on_different_clicked, pd->layout); return pd->layout; } diff --git a/src/bin/ui/property_group.c b/src/bin/ui/property_group.c index d950d2d..26a8f54 100644 --- a/src/bin/ui/property_group.c +++ b/src/bin/ui/property_group.c @@ -1387,10 +1387,11 @@ ui_property_group_unset(Evas_Object *property) _on_clicked, pd); evas_object_hide(pd_group.frame); evas_object_hide(pd_group.shared_check); + _ui_property_program_unset(property); _ui_property_part_unset(property); elm_scroller_policy_set(pd->scroller, ELM_SCROLLER_POLICY_OFF, ELM_SCROLLER_POLICY_OFF); - evas_object_hide(property); + evas_object_hide(property); } #undef pd_group diff --git a/src/bin/ui/tabs.c b/src/bin/ui/tabs.c index 685d813..f19651d 100644 --- a/src/bin/ui/tabs.c +++ b/src/bin/ui/tabs.c @@ -181,6 +181,9 @@ _del_tab(Tabs_Item *item) evas_object_del(item->content); history_del(item->group->history); item->group->history = NULL; + if (item->group->current_part) + item->group->current_part->current_item_name = NULL; + item->group->current_part = NULL; evas_object_smart_callback_call(ap.win, SIGNAL_TAB_CLOSE, item->group); free(item); } --
[EGIT] [tools/eflete] master 03/04: property_group: add program filter
rimmed pushed a commit to branch master. http://git.enlightenment.org/tools/eflete.git/commit/?id=d6fb076ed139ce1326cd1506e2d80562f8af648c commit d6fb076ed139ce1326cd1506e2d80562f8af648c Author: Vitalii VorobiovDate: Tue Jan 19 16:43:19 2016 + property_group: add program filter Would sigsev on history revert to NULL, since edje_edit_..._filter_set would return false, when trying to reset back to NULL --- src/bin/ui/property_group.c | 108 1 file changed, 108 insertions(+) diff --git a/src/bin/ui/property_group.c b/src/bin/ui/property_group.c index 26a8f54..969accd 100644 --- a/src/bin/ui/property_group.c +++ b/src/bin/ui/property_group.c @@ -210,6 +210,7 @@ struct _Group_Prop_Data Evas_Object *after_box; Evas_Object *afters_frame; /* it's a frame */ Evas_Object *in_from, *in_range; + Evas_Object *filter_part, *filter_state; } program; } attributes; }; @@ -366,6 +367,12 @@ prop_program_targets_update(Group_Prop_Data *pd); static void prop_program_afters_update(Group_Prop_Data *pd); +static void +prop_program_filter_part_update(Group_Prop_Data *pd); + +static void +prop_program_filter_state_update(Group_Prop_Data *pd); + static Eina_Bool ui_property_state_obj_area_set(Evas_Object *property); @@ -1036,7 +1043,11 @@ _on_editor_attribute_changed(void *data, case ATTRIBUTE_PROGRAM_TRANSITION_VALUE3: case ATTRIBUTE_PROGRAM_TRANSITION_VALUE4: case ATTRIBUTE_PROGRAM_FILTER_PART: + prop_program_filter_part_update(pd); + break; case ATTRIBUTE_PROGRAM_FILTER_STATE: + prop_program_filter_state_update(pd); + break; case ATTRIBUTE_PROGRAM_API_NAME: case ATTRIBUTE_PROGRAM_API_DESCRIPTION: case ATTRIBUTE_PROGRAM_NAME: @@ -1954,9 +1965,102 @@ prop_program_action_add(Evas_Object *parent, Group_Prop_Data *pd) return item; } +#define PROGRAM_ATTR_1COMBOBOX_CALLBACK(SUB, VALUE, MEMBER, DESCRIPTION, UPDATE) \ +static void \ +_on_##MEMBER##_##VALUE##_change(void *data, \ +Evas_Object *obj __UNUSED__, \ +void *ei) \ +{ \ + Group_Prop_Data *pd = (Group_Prop_Data *)data; \ + Ewe_Combobox_Item *item = ei; \ + Eina_Bool isNone = false; \ + Eina_Stringshare *old_val = edje_edit_##SUB##_##VALUE##_get(pd->group->edit_object \ + PROGRAM_ARGS); \ + if (((item->index != 0) && (item->title == old_val)) /*stringshares*/ || \ + ((item->index == 0) && (old_val == NULL))) \ + { \ + eina_stringshare_del(old_val); \ + return; \ + } \ + eina_stringshare_del(old_val); \ + isNone = !strcmp(item->title, _("None")); \ + Eina_Stringshare *msg = eina_stringshare_printf(DESCRIPTION, isNone ? NULL : item->title); \ + Change *change = change_add(msg); \ + eina_stringshare_del(msg); \ + editor_##SUB##_##VALUE##_set(pd->group->edit_object, change, false PROGRAM_ARGS, \ + isNone ? NULL : item->title); \ + history_change_add(pd->group->history, change); \ + evas_object_smart_callback_call(ap.win, SIGNAL_PROPERTY_ATTRIBUTE_CHANGED, NULL); \ + UPDATE \ +} + PROGRAM_MULTIPLE_COMBOBOX(target, "Previous_Target", _("target can be part or program"), true) PROGRAM_MULTIPLE_COMBOBOX(after, "Previous_After", _("after can be program"), false) +static void +prop_program_filter_part_update(Group_Prop_Data *pd) +{ + Part *part; + Eina_List *l; + Eina_Stringshare *value; + ewe_combobox_items_list_free(pd->attributes.program.filter_part, true); + value = edje_edit_program_filter_part_get(pd->group->edit_object PROGRAM_ARGS); + ewe_combobox_item_add(pd->attributes.program.filter_part, _("None")); + ewe_combobox_text_set(pd->attributes.program.filter_part, value ? value : _("None")); + EINA_LIST_FOREACH(pd->group->parts, l, part) + { +ewe_combobox_item_add(pd->attributes.program.filter_part, part->name); + } + edje_edit_string_free(value); +} + +static void +prop_program_filter_state_update(Group_Prop_Data *pd) +{ + Part *part; + State *state; + Eina_List *l; + Eina_Stringshare *value, *part_name; + ewe_combobox_items_list_free(pd->attributes.program.filter_state, true); + part_name = edje_edit_program_filter_part_get(pd->group->edit_object PROGRAM_ARGS); + if (!part_name) + { +elm_object_disabled_set(pd->attributes.program.filter_state, true); +return; + } + else + elm_object_disabled_set(pd->attributes.program.filter_state, false); + + value = edje_edit_program_filter_state_get(pd->group->edit_object PROGRAM_ARGS); + ewe_combobox_text_set(pd->attributes.program.filter_state, value); + part = pm_resource_unsorted_get(pd->group->parts, part_name); + EINA_LIST_FOREACH(part->states, l, state) + { +ewe_combobox_item_add(pd->attributes.program.filter_state, state->parsed_name);
[EGIT] [tools/eflete] master 04/04: property_group: add forgotten break for program in update
rimmed pushed a commit to branch master. http://git.enlightenment.org/tools/eflete.git/commit/?id=201289c33d70750ab66c5376a90d55bce49640bf commit 201289c33d70750ab66c5376a90d55bce49640bf Author: Vitalii VorobiovDate: Wed Jan 20 11:26:08 2016 + property_group: add forgotten break for program in update --- src/bin/ui/property_group.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/bin/ui/property_group.c b/src/bin/ui/property_group.c index 969accd..1586bcb 100644 --- a/src/bin/ui/property_group.c +++ b/src/bin/ui/property_group.c @@ -1035,8 +1035,10 @@ _on_editor_attribute_changed(void *data, case ATTRIBUTE_PROGRAM_TRANSITION_FROM_CURRENT: case ATTRIBUTE_PROGRAM_IN_FROM: COMMON_1SPINNER_UPDATE(program, in_range, program, double, 1, PROGRAM_ARGS) + break; case ATTRIBUTE_PROGRAM_IN_RANGE: COMMON_1SPINNER_UPDATE(program, in_from, program, double, 1, PROGRAM_ARGS) + break; case ATTRIBUTE_PROGRAM_TRANSITION_TIME: case ATTRIBUTE_PROGRAM_TRANSITION_VALUE1: case ATTRIBUTE_PROGRAM_TRANSITION_VALUE2: --
[EGIT] [apps/ephoto] master 01/01: Ephoto: Remove redundant strlen+strcmp checks.
okra pushed a commit to branch master. http://git.enlightenment.org/apps/ephoto.git/commit/?id=8a183065b7e30ce95ab6eabb62fdbdb607ceaa46 commit 8a183065b7e30ce95ab6eabb62fdbdb607ceaa46 Author: Stephen okra HoustonDate: Wed Jan 20 09:15:39 2016 -0600 Ephoto: Remove redundant strlen+strcmp checks. --- src/bin/ephoto_main.c | 74 ++-- src/bin/ephoto_thumb_browser.c | 153 +++-- 2 files changed, 61 insertions(+), 166 deletions(-) diff --git a/src/bin/ephoto_main.c b/src/bin/ephoto_main.c index 858ed06..cdd3fb6 100644 --- a/src/bin/ephoto_main.c +++ b/src/bin/ephoto_main.c @@ -462,15 +462,12 @@ _monitor_created(void *data, int type EINA_UNUSED, void *event) { Ephoto *ephoto = data; Eio_Monitor_Event *ev = event; - char file[PATH_MAX], dir[PATH_MAX], p[PATH_MAX]; + char file[PATH_MAX], dir[PATH_MAX]; snprintf(file, PATH_MAX, "%s", ev->filename); - snprintf(p, PATH_MAX, "%s", ephoto->config->directory); snprintf(dir, PATH_MAX, "%s", dirname(file)); - if (strlen(p) != strlen(dir)) - return ECORE_CALLBACK_PASS_ON; - if (strcmp(p, dir)) + if (strcmp(ephoto->config->directory, dir)) return ECORE_CALLBACK_PASS_ON; if (!strncmp("image/", efreet_mime_type_get(ev->filename), 6)) @@ -481,16 +478,8 @@ _monitor_created(void *data, int type EINA_UNUSED, void *event) EINA_LIST_FOREACH(ephoto->entries, l, entry) { - char p1[PATH_MAX], p2[PATH_MAX]; - snprintf(p1, PATH_MAX, "%s", entry->path); - snprintf(p2, PATH_MAX, "%s", ev->filename); - if (strlen(p1) == strlen(p2)) - { - if (!strcmp(p1, p2)) -{ - return ECORE_CALLBACK_PASS_ON; -} - } + if (!strcmp(entry->path, ev->filename)) + return ECORE_CALLBACK_PASS_ON; } snprintf(buf, PATH_MAX, "%s", ev->filename); entry = ephoto_entry_new(ephoto, ev->filename, basename(buf), @@ -525,15 +514,12 @@ _monitor_deleted(void *data, int type EINA_UNUSED, void *event) { Ephoto *ephoto = data; Eio_Monitor_Event *ev = event; - char file[PATH_MAX], dir[PATH_MAX], p[PATH_MAX]; + char file[PATH_MAX], dir[PATH_MAX]; snprintf(file, PATH_MAX, "%s", ev->filename); - snprintf(p, PATH_MAX, "%s", ephoto->config->directory); snprintf(dir, PATH_MAX, "%s", dirname(file)); - if (strlen(p) != strlen(dir)) - return ECORE_CALLBACK_PASS_ON; - if (strcmp(p, dir)) + if (strcmp(ephoto->config->directory, dir)) return ECORE_CALLBACK_PASS_ON; if (!strncmp("image/", efreet_mime_type_get(ev->filename), 6)) @@ -543,17 +529,11 @@ _monitor_deleted(void *data, int type EINA_UNUSED, void *event) EINA_LIST_FOREACH(ephoto->entries, l, entry) { - char p1[PATH_MAX], p2[PATH_MAX]; - snprintf(p1, PATH_MAX, "%s", entry->path); - snprintf(p2, PATH_MAX, "%s", ev->filename); - if (strlen(p1) == strlen(p2)) + if (!strcmp(entry->path, ev->filename)) { - if (!strcmp(p1, p2)) -{ - ephoto_thumb_browser_remove(ephoto, entry); - ephoto_entry_free(ephoto, entry); - break; -} + ephoto_thumb_browser_remove(ephoto, entry); + ephoto_entry_free(ephoto, entry); + break; } } } @@ -565,15 +545,12 @@ _monitor_modified(void *data, int type EINA_UNUSED, void *event) { Ephoto *ephoto = data; Eio_Monitor_Event *ev = event; - char file[PATH_MAX], dir[PATH_MAX], p[PATH_MAX]; + char file[PATH_MAX], dir[PATH_MAX]; snprintf(file, PATH_MAX, "%s", ev->filename); - snprintf(p, PATH_MAX, "%s", ephoto->config->directory); snprintf(dir, PATH_MAX, "%s", dirname(file)); - if (strlen(p) != strlen(dir)) - return ECORE_CALLBACK_PASS_ON; - if (strcmp(p, dir)) + if (strcmp(ephoto->config->directory, dir)) return ECORE_CALLBACK_PASS_ON; if (!strncmp("image/", efreet_mime_type_get(ev->filename), 6)) @@ -583,26 +560,19 @@ _monitor_modified(void *data, int type EINA_UNUSED, void *event) EINA_LIST_FOREACH(ephoto->entries, l, entry) { - char p1[PATH_MAX], p2[PATH_MAX]; - - snprintf(p1, PATH_MAX, "%s", entry->path); - snprintf(p2, PATH_MAX, "%s", ev->filename); - if (strlen(p1) == strlen(p2)) + if (!strcmp(entry->path, ev->filename)) { - if (!strcmp(p1, p2)) + if (!ecore_file_exists(entry->path)) { - if (!ecore_file_exists(entry->path)) - { -elm_object_item_del(entry->item);
[EGIT] [core/efl] master 01/01: build: fix some last corner cases for the hyphen dir being set correctly
stefan pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=50a62880848cecec3efbc2377a0170ba62f4d665 commit 50a62880848cecec3efbc2377a0170ba62f4d665 Author: Stefan SchmidtDate: Wed Jan 20 14:11:42 2016 +0100 build: fix some last corner cases for the hyphen dir being set correctly Making sure here that we really define EVAS_DICTS_HYPHEN_DIR after all possible changes have been made to it and we have the final result. --- configure.ac | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 0316e49..dac30ce 100644 --- a/configure.ac +++ b/configure.ac @@ -875,9 +875,10 @@ EINA_CONFIG([MAGIC_DEBUG], [test "x${have_magic_debug}" = "xyes"]) AC_ARG_WITH([xattr-tests-path], [AS_HELP_STRING([--with-xattr-tests-path=DIR],[path of xattr enabled directory to create test files])],[XATTR_TEST_DIR=${withval}][AC_DEFINE_UNQUOTED([XATTR_TEST_DIR],["$withval"], [xattr enabled directory])]) -EVAS_DICTS_HYPHEN_DIR="/usr/share/hyphen/" +evas_dicts_hyphen_dir="/usr/share/hyphen/" AC_ARG_WITH([dictionaries-hyphen-dir], - [AS_HELP_STRING([--with-dictionaries-hyphen-dir=DIR],[path of hunspell-compatible hyphen dictionaries])],[EVAS_DICTS_HYPHEN_DIR=${withval}][AC_DEFINE_UNQUOTED([EVAS_DICTS_HYPHEN_DIR],["$withval"], [Hunspell-compatible hyphen dictionaries install directory])]) + [AS_HELP_STRING([--with-dictionaries-hyphen-dir=DIR],[path of hunspell-compatible hyphen dictionaries])], [evas_dicts_hyphen_dir=$withval]) +AC_DEFINE_UNQUOTED([EVAS_DICTS_HYPHEN_DIR],["$evas_dicts_hyphen_dir"], [Hunspell-compatible hyphen dictionaries install directory]) ### Checks for programs --
[EGIT] [apps/ephoto] master 01/01: Ephoto: Don't clear entries if populating directories only.
okra pushed a commit to branch master. http://git.enlightenment.org/apps/ephoto.git/commit/?id=95c5f41301df919363bbacc349bb470b656845fe commit 95c5f41301df919363bbacc349bb470b656845fe Author: Stephen okra HoustonDate: Wed Jan 20 09:21:27 2016 -0600 Ephoto: Don't clear entries if populating directories only. --- src/bin/ephoto_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bin/ephoto_main.c b/src/bin/ephoto_main.c index cdd3fb6..e12d6f5 100644 --- a/src/bin/ephoto_main.c +++ b/src/bin/ephoto_main.c @@ -438,7 +438,7 @@ _ephoto_populate_entries(Ephoto_Dir_Data *ed) if (ed->thumbs_only) EINA_LIST_FREE(ed->ephoto->entries, entry) ephoto_entry_free(entry->ephoto, entry); - else + else if (!ed->dirs_only) ephoto_entries_free(ed->ephoto); ed->ephoto->ls = --
[EGIT] [core/enlightenment] master 01/01: fix compiler warning about comparison between signed and unsigned ints
devilhorns pushed a commit to branch master. http://git.enlightenment.org/core/enlightenment.git/commit/?id=01ae2a6287fa3f0ca12291fa9c36d45df8a8f111 commit 01ae2a6287fa3f0ca12291fa9c36d45df8a8f111 Author: Chris MichaelDate: Wed Jan 20 15:10:36 2016 -0500 fix compiler warning about comparison between signed and unsigned ints Signed-off-by: Chris Michael --- src/bin/e_xkb.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/bin/e_xkb.c b/src/bin/e_xkb.c index 5e6f3d2..0878593 100644 --- a/src/bin/e_xkb.c +++ b/src/bin/e_xkb.c @@ -35,7 +35,8 @@ _xkb_changed_state(void *data EINA_UNUSED, int type EINA_UNUSED, void *event) { Ecore_X_Event_Xkb *ev = (Ecore_X_Event_Xkb *)event; - if (ev->group < 0 || ev->group >= eina_list_count(e_config->xkb.used_layouts)) + if (ev->group < 0 || + ev->group >= (int)eina_list_count(e_config->xkb.used_layouts)) return ECORE_CALLBACK_PASS_ON; e_config->xkb.cur_group = ev->group; --
[EGIT] [core/enlightenment] master 09/09: remove _e_comp_wl_focus_down_set()
discomfitor pushed a commit to branch master. http://git.enlightenment.org/core/enlightenment.git/commit/?id=d33a12b43459f03dd82d6cbba22789a5b244 commit d33a12b43459f03dd82d6cbba22789a5b244 Author: Mike BlumenkrantzDate: Wed Jan 20 17:02:21 2016 -0500 remove _e_comp_wl_focus_down_set() this function does nothing for wayland clients and never should have been used in this file --- src/bin/e_comp_wl.c | 10 -- 1 file changed, 10 deletions(-) diff --git a/src/bin/e_comp_wl.c b/src/bin/e_comp_wl.c index 9c267a7..73f943d 100644 --- a/src/bin/e_comp_wl.c +++ b/src/bin/e_comp_wl.c @@ -55,16 +55,6 @@ _e_comp_wl_configure_send(E_Client *ec, Eina_Bool edges) } static void -_e_comp_wl_focus_down_set(E_Client *ec) -{ - Ecore_Window win = 0; - - win = e_client_util_pwin_get(ec); - e_bindings_mouse_grab(E_BINDING_CONTEXT_WINDOW, win); - e_bindings_wheel_grab(E_BINDING_CONTEXT_WINDOW, win); -} - -static void _e_comp_wl_focus_check(void) { E_Client *ec; --
[EGIT] [core/enlightenment] master 01/09: add function for wayland compositors to generate (fake) keyboard events
discomfitor pushed a commit to branch master. http://git.enlightenment.org/core/enlightenment.git/commit/?id=40c1e796fe003dd7d364ef0ab496fcf063f64a4b commit 40c1e796fe003dd7d364ef0ab496fcf063f64a4b Author: Mike BlumenkrantzDate: Wed Jan 20 12:38:22 2016 -0500 add function for wayland compositors to generate (fake) keyboard events in automated testing scenarios, being able to generate input events is useful for detecting regressions related to keyboard actions this depends on an xkbcommon function which is expected to be in the 0.6.0 release, so dlsym here in order to make that a runtime dependency for now since this is not going to be a widely-used feature #SamsungFeatures --- src/bin/e_comp_wl_input.c | 66 +++ src/bin/e_comp_wl_input.h | 1 + 2 files changed, 67 insertions(+) diff --git a/src/bin/e_comp_wl_input.c b/src/bin/e_comp_wl_input.c index e430a3b..19338b4 100644 --- a/src/bin/e_comp_wl_input.c +++ b/src/bin/e_comp_wl_input.c @@ -7,6 +7,7 @@ #endif E_API int E_EVENT_TEXT_INPUT_PANEL_VISIBILITY_CHANGE = -1; +static xkb_keycode_t (*_xkb_keymap_key_by_name)(void *, const char *); static void _e_comp_wl_input_update_seat_caps(void) @@ -437,6 +438,8 @@ e_comp_wl_input_init(void) E_EVENT_TEXT_INPUT_PANEL_VISIBILITY_CHANGE = ecore_event_type_new(); + _xkb_keymap_key_by_name = dlsym(NULL, "xkb_keymap_key_by_name"); + return EINA_TRUE; } @@ -678,3 +681,66 @@ e_comp_wl_input_keyboard_modifers_clear(void) e_comp_wl_input_keyboard_modifiers_serialize(); } + +static void +_event_generate(const char *key, const char *keyname, int mods, Eina_Bool up) +{ + Ecore_Event_Key *ev; + int keycode; + + /* "key" here is the platform-specific key name; +* /usr/share/X11/xkb/keycodes/evdev is probably what your system is using +*/ + keycode = _xkb_keymap_key_by_name(e_comp_wl->xkb.keymap, keyname ?: key); + if (!keycode) + { +ERR("no keycode found for key '%s'", key); +return; + } + ev = calloc(1, sizeof(Ecore_Event_Key) + (2 * (strlen(key) + 1))); + + ev->keyname = (char *)(ev + 1); + ev->key = ev->keyname + strlen(key) + 1; + + strcpy((char *)ev->keyname, key); + strcpy((char *)ev->key, key); + + ev->window = e_comp->ee_win; + ev->event_window = e_comp->ee_win; + ev->timestamp = 0; + ev->modifiers = mods; + ev->keycode = keycode; + ecore_event_add(up ? ECORE_EVENT_KEY_UP : ECORE_EVENT_KEY_DOWN, ev, NULL, NULL); +} + +static void +_event_generate_mods(int mods, Eina_Bool up) +{ + if (!mods) return; + if (mods & ECORE_EVENT_MODIFIER_SHIFT) + _event_generate("Shift", "LFSH", mods, up); + if (mods & ECORE_EVENT_MODIFIER_CTRL) + _event_generate("Control_L", "LCTL", mods, up); + if (mods & ECORE_EVENT_MODIFIER_ALT) + _event_generate("Alt_L", "LALT", mods, up); + if (mods & ECORE_EVENT_MODIFIER_WIN) + _event_generate("Super_L", "LWIN", mods, up); + if (mods & ECORE_EVENT_MODIFIER_ALTGR) + _event_generate("Mode_switch", "ALGR", mods, up); +} + +E_API void +e_comp_wl_input_keyboard_event_generate(const char *key, int mods, Eina_Bool up) +{ + if (!_xkb_keymap_key_by_name) + { +ERR("xkbcommon >= 0.6.0 required for keyboard event generation!"); +return; + } + + if (!up) + _event_generate_mods(mods, up); + _event_generate(key, NULL, mods, up); + if (up) + _event_generate_mods(mods, up); +} diff --git a/src/bin/e_comp_wl_input.h b/src/bin/e_comp_wl_input.h index f13d0a1..9691b97 100644 --- a/src/bin/e_comp_wl_input.h +++ b/src/bin/e_comp_wl_input.h @@ -32,5 +32,6 @@ E_API void e_comp_wl_input_touch_enabled_set(Eina_Bool enabled); E_API void e_comp_wl_input_keymap_set(const char *rules, const char *model, const char *layout, struct xkb_context *dflt_ctx, struct xkb_keymap *dflt_map); +E_API void e_comp_wl_input_keyboard_event_generate(const char *key, int mods, Eina_Bool up); # endif #endif --
[EGIT] [core/enlightenment] master 07/09: add render updates for cursor clients if damages exist during set_cursor
discomfitor pushed a commit to branch master. http://git.enlightenment.org/core/enlightenment.git/commit/?id=892c4a44ca6c89f05f5976f3868dafb6fbff7ac5 commit 892c4a44ca6c89f05f5976f3868dafb6fbff7ac5 Author: Mike BlumenkrantzDate: Wed Jan 20 16:23:02 2016 -0500 add render updates for cursor clients if damages exist during set_cursor this indicates a cursor surface which has been committed but could not be rendered due to lack of shell interface and cursor hint --- src/bin/e_comp_wl_input.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/bin/e_comp_wl_input.c b/src/bin/e_comp_wl_input.c index 60ae274..61c29a9 100644 --- a/src/bin/e_comp_wl_input.c +++ b/src/bin/e_comp_wl_input.c @@ -66,6 +66,8 @@ _e_comp_wl_input_pointer_cb_cursor_set(struct wl_client *client, struct wl_resou ec->icccm.title = eina_stringshare_add("noshadow"); evas_object_pass_events_set(ec->frame, 1); evas_object_show(ec->frame); +if (e_comp_object_damage_exists(ec->frame)) + e_comp_object_render_update_add(ec->frame); ec->comp_data->mapped = 1; e_client_focus_stack_set(eina_list_remove(e_client_focus_stack_get(), ec)); EC_CHANGED(ec); --
[EGIT] [core/enlightenment] master 02/09: add wayland-only mouse action for translating a button press to a key
discomfitor pushed a commit to branch master. http://git.enlightenment.org/core/enlightenment.git/commit/?id=ba40fb5cb48fe46014668a1c307fb6b22190be8d commit ba40fb5cb48fe46014668a1c307fb6b22190be8d Author: Mike BlumenkrantzDate: Wed Jan 20 12:42:29 2016 -0500 add wayland-only mouse action for translating a button press to a key in some cases it might be desirable to remap a mouse button to a key. this is not very user-friendly since it requires device-specific key names which need to be translated to/from files such as /usr/share/X11/xkb/keycodes/evdev #SamsungFeatures --- src/bin/e_actions.c | 69 + 1 file changed, 69 insertions(+) diff --git a/src/bin/e_actions.c b/src/bin/e_actions.c index badc1c3..d7c2682 100644 --- a/src/bin/e_actions.c +++ b/src/bin/e_actions.c @@ -2941,6 +2941,52 @@ ACT_FN_GO(kbd_layout_prev, EINA_UNUSED) e_xkb_layout_prev(); } +#ifdef HAVE_WAYLAND +ACT_FN_GO_MOUSE(mouse_to_key, ) +{ + const char *p, *nextp, *key = NULL; + const char *mods[] = + { + "shift", + "ctrl", + "alt", + "win", + "altgr", + NULL + }; + int modifiers = 0, mod = 0; + + if ((!params) || (!params[0]) || (params[0] == '+')) return; + for (p = params; p; p = nextp) + { +const char **m; + +nextp = strchr(p + 1, '+'); +if (!nextp) break; +for (m = mods; *m; m++) + { + if (strncmp(p, *m, nextp - p)) continue; + modifiers |= 1 << (m - mods); + break; + } +key = nextp; + } + if (key) + key++; + else + key = params; + if (!key[0]) return; + + mod |= (ECORE_EVENT_MODIFIER_SHIFT * !!(modifiers & E_BINDING_MODIFIER_SHIFT)); + mod |= (ECORE_EVENT_MODIFIER_CTRL * !!(modifiers & E_BINDING_MODIFIER_CTRL)); + mod |= (ECORE_EVENT_MODIFIER_ALT * !!(modifiers & E_BINDING_MODIFIER_ALT)); + mod |= (ECORE_EVENT_MODIFIER_WIN * !!(modifiers & E_BINDING_MODIFIER_WIN)); + mod |= (ECORE_EVENT_MODIFIER_ALTGR * !!(modifiers & E_BINDING_MODIFIER_ALTGR)); + e_comp_wl_input_keyboard_event_generate(key, mod, 0); + e_comp_wl_input_keyboard_event_generate(key, mod, 1); +} +#endif + ACT_FN_GO(module_enable, ) { E_Module *m; @@ -2999,6 +3045,27 @@ static Eina_List *action_list = NULL; static Eina_List *action_names = NULL; static Eina_List *action_groups = NULL; +static void +_e_actions_post_init(void *d EINA_UNUSED) +{ +#ifdef HAVE_WAYLAND + E_Action *act; + + /* wayland-specific actions */ + if (e_comp->comp_type == E_PIXMAP_TYPE_WL) + { +/* mouse -> key */ +/* "key" here is the platform-specific key name; + * /usr/share/X11/xkb/keycodes/evdev is probably what your system is using + */ +ACT_GO_MOUSE(mouse_to_key); +e_action_predef_name_set(N_("Mouse Remapping"), + N_("Mouse to key"), "mouse_to_key", + NULL, "[AD02] [ctrl+shift+alt+win+altgr+AD02]", 1); + } +#endif +} + /* externally accessible functions */ EINTERN int @@ -3561,6 +3628,8 @@ e_actions_init(void) N_("Previous keyboard layout"), "kbd_layout_prev", NULL, NULL, 0); + ecore_job_add(_e_actions_post_init, NULL); + return 1; } --
[EGIT] [core/enlightenment] master 06/09: remove duplicate visibility setting blocks from wayland surface commit
discomfitor pushed a commit to branch master. http://git.enlightenment.org/core/enlightenment.git/commit/?id=039c08617e6a5049372d2b6e3aa5481c973710fd commit 039c08617e6a5049372d2b6e3aa5481c973710fd Author: Mike BlumenkrantzDate: Wed Jan 20 16:20:41 2016 -0500 remove duplicate visibility setting blocks from wayland surface commit this is already present (and identical) in state commit --- src/bin/e_comp_wl.c | 34 -- 1 file changed, 34 deletions(-) diff --git a/src/bin/e_comp_wl.c b/src/bin/e_comp_wl.c index bcad1f2..7efa6b5 100644 --- a/src/bin/e_comp_wl.c +++ b/src/bin/e_comp_wl.c @@ -2736,44 +2736,10 @@ e_comp_wl_surface_create(struct wl_client *client, int version, uint32_t id) EINTERN Eina_Bool e_comp_wl_surface_commit(E_Client *ec) { - Eina_Bool ignored; - _e_comp_wl_surface_state_commit(ec, >comp_data->pending); if (!e_comp_object_damage_exists(ec->frame)) e_pixmap_image_clear(ec->pixmap, 1); - ignored = ec->ignored; - - if (!e_pixmap_usable_get(ec->pixmap)) - { -if (ec->comp_data->mapped) - { - if ((ec->comp_data->shell.surface) && (ec->comp_data->shell.unmap)) - ec->comp_data->shell.unmap(ec->comp_data->shell.surface); - else if (ec->comp_data->cursor || e_client_has_xwindow(ec)) - { - ec->visible = EINA_FALSE; - evas_object_hide(ec->frame); - ec->comp_data->mapped = 0; - } - } - } - else - { -if (!ec->comp_data->mapped) - { - if ((ec->comp_data->shell.surface) && (ec->comp_data->shell.map)) - ec->comp_data->shell.map(ec->comp_data->shell.surface); - else if (ec->comp_data->cursor || e_client_has_xwindow(ec)) - { - ec->visible = EINA_TRUE; - ec->ignored = 0; - evas_object_show(ec->frame); - ec->comp_data->mapped = 1; - } - } - } - ec->ignored = ignored; return EINA_TRUE; } --
[EGIT] [core/enlightenment] master 03/09: automatically mark wayland cursor surfaces as visible during set_cursor
discomfitor pushed a commit to branch master. http://git.enlightenment.org/core/enlightenment.git/commit/?id=fbedd9dcac120ecb2ae3dc4057ea3f8c3748aad2 commit fbedd9dcac120ecb2ae3dc4057ea3f8c3748aad2 Author: Mike BlumenkrantzDate: Wed Jan 20 15:55:10 2016 -0500 automatically mark wayland cursor surfaces as visible during set_cursor a cursor client should be shown/hidden as needed despite its lack of a shell interface, and having a special flag to identify these types of surfaces makes it easier to do that --- src/bin/e_comp_wl.c | 8 src/bin/e_comp_wl.h | 1 + src/bin/e_comp_wl_input.c | 4 +++- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/bin/e_comp_wl.c b/src/bin/e_comp_wl.c index 686e323..abe4225 100644 --- a/src/bin/e_comp_wl.c +++ b/src/bin/e_comp_wl.c @@ -1070,7 +1070,7 @@ _e_comp_wl_surface_state_commit(E_Client *ec, E_Comp_Wl_Surface_State *state) { if ((ec->comp_data->shell.surface) && (ec->comp_data->shell.unmap)) ec->comp_data->shell.unmap(ec->comp_data->shell.surface); - else if (e_client_has_xwindow(ec)) + else if (ec->comp_data->cursor || e_client_has_xwindow(ec)) { ec->visible = EINA_FALSE; evas_object_hide(ec->frame); @@ -1084,7 +1084,7 @@ _e_comp_wl_surface_state_commit(E_Client *ec, E_Comp_Wl_Surface_State *state) { if ((ec->comp_data->shell.surface) && (ec->comp_data->shell.map)) ec->comp_data->shell.map(ec->comp_data->shell.surface); - else if (e_client_has_xwindow(ec)) + else if (ec->comp_data->cursor || e_client_has_xwindow(ec)) { ec->visible = EINA_TRUE; ec->ignored = 0; @@ -2758,7 +2758,7 @@ e_comp_wl_surface_commit(E_Client *ec) { if ((ec->comp_data->shell.surface) && (ec->comp_data->shell.unmap)) ec->comp_data->shell.unmap(ec->comp_data->shell.surface); - else if (e_client_has_xwindow(ec)) + else if (ec->comp_data->cursor || e_client_has_xwindow(ec)) { ec->visible = EINA_FALSE; evas_object_hide(ec->frame); @@ -2772,7 +2772,7 @@ e_comp_wl_surface_commit(E_Client *ec) { if ((ec->comp_data->shell.surface) && (ec->comp_data->shell.map)) ec->comp_data->shell.map(ec->comp_data->shell.surface); - else if (e_client_has_xwindow(ec)) + else if (ec->comp_data->cursor || e_client_has_xwindow(ec)) { ec->visible = EINA_TRUE; ec->ignored = 0; diff --git a/src/bin/e_comp_wl.h b/src/bin/e_comp_wl.h index a4426e1..d280eb3 100644 --- a/src/bin/e_comp_wl.h +++ b/src/bin/e_comp_wl.h @@ -300,6 +300,7 @@ struct _E_Comp_Wl_Client_Data Eina_Bool set_win_type : 1; Eina_Bool frame_update : 1; Eina_Bool maximize_pre : 1; + Eina_Bool cursor : 1; }; struct _E_Comp_Wl_Output diff --git a/src/bin/e_comp_wl_input.c b/src/bin/e_comp_wl_input.c index 19338b4..60ae274 100644 --- a/src/bin/e_comp_wl_input.c +++ b/src/bin/e_comp_wl_input.c @@ -59,12 +59,14 @@ _e_comp_wl_input_pointer_cb_cursor_set(struct wl_client *client, struct wl_resou ec = wl_resource_get_user_data(surface_resource); if (!ec->re_manage) { -ec->re_manage = 1; +ec->comp_data->cursor = ec->re_manage = 1; ec->ignored = 0; ec->lock_focus_out = ec->layer_block = ec->visible = ec->override = 1; ec->icccm.title = eina_stringshare_add("noshadow"); evas_object_pass_events_set(ec->frame, 1); +evas_object_show(ec->frame); +ec->comp_data->mapped = 1; e_client_focus_stack_set(eina_list_remove(e_client_focus_stack_get(), ec)); EC_CHANGED(ec); } --
[EGIT] [core/enlightenment] master 04/09: do not set focus in wayland client show callback for cursor clients
discomfitor pushed a commit to branch master. http://git.enlightenment.org/core/enlightenment.git/commit/?id=97d8f26724739ee8d91bcf3f14a1bd8ce22dc70a commit 97d8f26724739ee8d91bcf3f14a1bd8ce22dc70a Author: Mike BlumenkrantzDate: Wed Jan 20 16:19:23 2016 -0500 do not set focus in wayland client show callback for cursor clients --- src/bin/e_comp_wl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bin/e_comp_wl.c b/src/bin/e_comp_wl.c index abe4225..c6b8229 100644 --- a/src/bin/e_comp_wl.c +++ b/src/bin/e_comp_wl.c @@ -123,7 +123,7 @@ _e_comp_wl_evas_cb_show(void *data, Evas *evas EINA_UNUSED, Evas_Object *obj EIN if (!ec->override) e_hints_window_visible_set(ec); - if (!ec->ignored) + if ((!ec->ignored) && (!ec->comp_data->cursor)) { if (ec->new_client) ec->take_focus = !starting; --
[EGIT] [apps/ephoto] master 01/01: Ephoto: don't crash when a file is deleted in the current directory.
ajwillia-ms pushed a commit to branch master. http://git.enlightenment.org/apps/ephoto.git/commit/?id=d963bef52686e5a424fdf10766a5453345930f17 commit d963bef52686e5a424fdf10766a5453345930f17 Author: Andy WilliamsDate: Wed Jan 20 23:36:35 2016 + Ephoto: don't crash when a file is deleted in the current directory. mime checks will return NULL if the file doesn't exist --- src/bin/ephoto_main.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/bin/ephoto_main.c b/src/bin/ephoto_main.c index 163eefe..cec54b9 100644 --- a/src/bin/ephoto_main.c +++ b/src/bin/ephoto_main.c @@ -519,6 +519,7 @@ _monitor_deleted(void *data, int type EINA_UNUSED, void *event) Ephoto *ephoto = data; Eio_Monitor_Event *ev = event; char file[PATH_MAX], dir[PATH_MAX]; + const char *mime; snprintf(file, PATH_MAX, "%s", ev->filename); snprintf(dir, PATH_MAX, "%s", ecore_file_dir_get(file)); @@ -526,7 +527,8 @@ _monitor_deleted(void *data, int type EINA_UNUSED, void *event) if (strcmp(ephoto->config->directory, dir)) return ECORE_CALLBACK_PASS_ON; - if (!strncmp("image/", efreet_mime_type_get(ev->filename), 6)) + mime = efreet_mime_type_get(ev->filename); + if (!mime || !strncmp("image/", mime, 6)) { Eina_List *l; Ephoto_Entry *entry; --
[EGIT] [apps/ephoto] master 01/01: Ephoto: Use ecore_file_dir_get consistently instead of dirname and ecore_file_dir_get inconsistently.
okra pushed a commit to branch master. http://git.enlightenment.org/apps/ephoto.git/commit/?id=c421929c547e98fcd9b925cb42c85a7ecd38c8c0 commit c421929c547e98fcd9b925cb42c85a7ecd38c8c0 Author: Stephen okra HoustonDate: Wed Jan 20 16:46:49 2016 -0600 Ephoto: Use ecore_file_dir_get consistently instead of dirname and ecore_file_dir_get inconsistently. --- src/bin/ephoto_main.c | 6 +++--- src/bin/ephoto_single_browser.c | 37 + src/bin/ephoto_thumb_browser.c | 20 ++-- 3 files changed, 34 insertions(+), 29 deletions(-) diff --git a/src/bin/ephoto_main.c b/src/bin/ephoto_main.c index a7ff653..163eefe 100644 --- a/src/bin/ephoto_main.c +++ b/src/bin/ephoto_main.c @@ -469,7 +469,7 @@ _monitor_created(void *data, int type EINA_UNUSED, void *event) char file[PATH_MAX], dir[PATH_MAX]; snprintf(file, PATH_MAX, "%s", ev->filename); - snprintf(dir, PATH_MAX, "%s", dirname(file)); + snprintf(dir, PATH_MAX, "%s", ecore_file_dir_get(file)); if (strcmp(ephoto->config->directory, dir)) return ECORE_CALLBACK_PASS_ON; @@ -521,7 +521,7 @@ _monitor_deleted(void *data, int type EINA_UNUSED, void *event) char file[PATH_MAX], dir[PATH_MAX]; snprintf(file, PATH_MAX, "%s", ev->filename); - snprintf(dir, PATH_MAX, "%s", dirname(file)); + snprintf(dir, PATH_MAX, "%s", ecore_file_dir_get(file)); if (strcmp(ephoto->config->directory, dir)) return ECORE_CALLBACK_PASS_ON; @@ -552,7 +552,7 @@ _monitor_modified(void *data, int type EINA_UNUSED, void *event) char file[PATH_MAX], dir[PATH_MAX]; snprintf(file, PATH_MAX, "%s", ev->filename); - snprintf(dir, PATH_MAX, "%s", dirname(file)); + snprintf(dir, PATH_MAX, "%s", ecore_file_dir_get(file)); if (strcmp(ephoto->config->directory, dir)) return ECORE_CALLBACK_PASS_ON; diff --git a/src/bin/ephoto_single_browser.c b/src/bin/ephoto_single_browser.c index 9c913e0..23fc22b 100644 --- a/src/bin/ephoto_single_browser.c +++ b/src/bin/ephoto_single_browser.c @@ -1200,15 +1200,17 @@ _save_image_as_overwrite(void *data, Evas_Object *obj EINA_UNUSED, { char *dir = ecore_file_dir_get(file); - ephoto_thumb_browser_fsel_clear(sb->ephoto); - ephoto_directory_set(sb->ephoto, dir, NULL, EINA_FALSE, EINA_FALSE); -ephoto_thumb_browser_top_dir_set(sb->ephoto, -sb->ephoto->config->directory); - free(dir); - ephoto_single_browser_path_pending_set(sb->ephoto->single_browser, - file); +if (strcmp(dir, sb->ephoto->config->directory)) + { +ephoto_thumb_browser_fsel_clear(sb->ephoto); +ephoto_directory_set(sb->ephoto, dir, NULL, EINA_FALSE, EINA_FALSE); + ephoto_thumb_browser_top_dir_set(sb->ephoto, + sb->ephoto->config->directory); +free(dir); +ephoto_single_browser_path_pending_set(sb->ephoto->single_browser, +file); + } } - ephoto_single_browser_entry_set(sb->main, sb->entry); evas_object_del(popup); if (sb->event) { @@ -1309,14 +1311,17 @@ _save_image_as_done(void *data, Evas_Object *obj EINA_UNUSED, void *event_info) { char *dir = ecore_file_dir_get(buf); - ephoto_thumb_browser_fsel_clear(sb->ephoto); - ephoto_directory_set(sb->ephoto, dir, NULL, - EINA_FALSE, EINA_FALSE); - ephoto_thumb_browser_top_dir_set(sb->ephoto, - sb->ephoto->config->directory); - free(dir); - ephoto_single_browser_path_pending_set(sb->ephoto-> - single_browser, buf); + if (!strcmp(dir, sb->ephoto->config->directory)) +{ + ephoto_thumb_browser_fsel_clear(sb->ephoto); + ephoto_directory_set(sb->ephoto, dir, NULL, + EINA_FALSE, EINA_FALSE); + ephoto_thumb_browser_top_dir_set(sb->ephoto, + sb->ephoto->config->directory); + free(dir); + ephoto_single_browser_path_pending_set(sb->ephoto-> + single_browser, buf); +} } } } diff --git a/src/bin/ephoto_thumb_browser.c b/src/bin/ephoto_thumb_browser.c index f0f5cfe..230386c 100644 --- a/src/bin/ephoto_thumb_browser.c +++ b/src/bin/ephoto_thumb_browser.c @@ -448,7 +448,7 @@ _monitor_created(void *data, int type EINA_UNUSED, void *event) return ECORE_CALLBACK_PASS_ON; snprintf(file, PATH_MAX, "%s", ev->filename); - snprintf(dir, PATH_MAX, "%s", dirname(file)); + snprintf(dir, PATH_MAX, "%s", ecore_file_dir_get(file)); if (strcmp(entry->path, dir)) return ECORE_CALLBACK_PASS_ON; @@ -533,7 +533,7 @@ _monitor_deleted(void *data, int type
[EGIT] [core/enlightenment] master 08/09: reenable fallthrough surface (un)mapping for subsurfaces during commit
discomfitor pushed a commit to branch master. http://git.enlightenment.org/core/enlightenment.git/commit/?id=9c23679bac665ed2ee5ef92592d36b75f01e2ee1 commit 9c23679bac665ed2ee5ef92592d36b75f01e2ee1 Author: Mike BlumenkrantzDate: Wed Jan 20 16:58:24 2016 -0500 reenable fallthrough surface (un)mapping for subsurfaces during commit subsurfaces have no shell interface and rely upon the map state of parent surfaces to determine whether they are mapped --- src/bin/e_comp_wl.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/bin/e_comp_wl.c b/src/bin/e_comp_wl.c index 7efa6b5..9c267a7 100644 --- a/src/bin/e_comp_wl.c +++ b/src/bin/e_comp_wl.c @@ -1070,7 +1070,8 @@ _e_comp_wl_surface_state_commit(E_Client *ec, E_Comp_Wl_Surface_State *state) { if ((ec->comp_data->shell.surface) && (ec->comp_data->shell.unmap)) ec->comp_data->shell.unmap(ec->comp_data->shell.surface); - else if (ec->comp_data->cursor || e_client_has_xwindow(ec)) + else if (ec->comp_data->cursor || e_client_has_xwindow(ec) || + (ec->comp_data->sub.data && ec->comp_data->sub.data->parent->comp_data->mapped)) { ec->visible = EINA_FALSE; evas_object_hide(ec->frame); @@ -1084,7 +1085,8 @@ _e_comp_wl_surface_state_commit(E_Client *ec, E_Comp_Wl_Surface_State *state) { if ((ec->comp_data->shell.surface) && (ec->comp_data->shell.map)) ec->comp_data->shell.map(ec->comp_data->shell.surface); - else if (ec->comp_data->cursor || e_client_has_xwindow(ec)) + else if (ec->comp_data->cursor || e_client_has_xwindow(ec) || + (ec->comp_data->sub.data && ec->comp_data->sub.data->parent->comp_data->mapped)) { ec->visible = EINA_TRUE; ec->ignored = 0; --
[EGIT] [bindings/python/python-efl] master 01/01: Implemented Genlist filter ability
davemds pushed a commit to branch master. http://git.enlightenment.org/bindings/python/python-efl.git/commit/?id=005dd26f73f0a634d16286362b80ce98e2e277a8 commit 005dd26f73f0a634d16286362b80ce98e2e277a8 Author: Dave AndreoliDate: Wed Jan 20 22:55:43 2016 +0100 Implemented Genlist filter ability It is somehow not perfectly working, see TODO for more info --- TODO | 4 +- doc/elementary/genlist.rst | 1 + efl/elementary/genlist.pxi | 18 +++ efl/elementary/genlist_cdef.pxi| 3 ++ efl/elementary/genlist_item_class.pxi | 27 +- efl/elementary/genlist_widget.pxi | 38 +- examples/elementary/test_genlist_filter.py | 84 ++ 7 files changed, 170 insertions(+), 5 deletions(-) diff --git a/TODO b/TODO index 516d3c5..4e41a98 100644 --- a/TODO +++ b/TODO @@ -3,12 +3,14 @@ BUGS * EdjeEdit: PartState API does not work * Elm.Map: overlays_show segfaults, scrollers in examples are jumpy +* Genlist: "filter,done" event is not always fired (see the genlist_filter.py test) * Elementary: when we use custom function callbacks we usually leak some reference around, some examples: - Fileselector.custom_filter_append() - Multibuttonentry.format_function_set() - Multibuttonentry.filter_append() - Multibuttonentry.filterprepend() + ... maybe do like is done in genlist filter_set() ?? Failing unit tests -- @@ -22,8 +24,6 @@ TODO http://www.freedesktop.org/wiki/Software/DBusBindings (requires fd.org shell account?) * Review the internal functions and name them consistently -* Evas: SmartObject needs testing -* Improve ethumb * edje: complete the unit tests * Initial Evas GL support (for Elm) * Add more documentation for callbacks, events, etc. diff --git a/doc/elementary/genlist.rst b/doc/elementary/genlist.rst index e6cb8d0..1d1b482 100644 --- a/doc/elementary/genlist.rst +++ b/doc/elementary/genlist.rst @@ -348,6 +348,7 @@ Emitted signals - ``item,unfocused`` - When the genlist item has lost focus. (since 1.10) - ``changed`` - Genlist is now changed their items and properties and all calculation is finished. (since 1.16) +- ``filter,done`` - Genlist filter operation is completed.. (since 1.17) Enumerations diff --git a/efl/elementary/genlist.pxi b/efl/elementary/genlist.pxi index 71935a0..d395297 100644 --- a/efl/elementary/genlist.pxi +++ b/efl/elementary/genlist.pxi @@ -80,6 +80,24 @@ cdef Eina_Bool _py_elm_genlist_item_state_get(void *data, Evas_Object *obj, cons return ret if ret is not None else 0 +cdef Eina_Bool _py_elm_genlist_item_filter_get(void *data, Evas_Object *obj, void *key) with gil: +cdef: +GenlistItem item = data +object pykey = key + +func = item.item_class._filter_get_func +if func is None: +return 1 + +try: +o = object_from_instance(obj) +ret = func(o, pykey, item.item_data) +except Exception: +traceback.print_exc() +return 0 + +return 1 if ret else 0 + cdef void _py_elm_genlist_object_item_del(void *data, Evas_Object *obj) with gil: cdef GenlistItem item = data diff --git a/efl/elementary/genlist_cdef.pxi b/efl/elementary/genlist_cdef.pxi index c990620..89779d3 100644 --- a/efl/elementary/genlist_cdef.pxi +++ b/efl/elementary/genlist_cdef.pxi @@ -64,12 +64,14 @@ cdef extern from "Elementary.h": ctypedef char *(*GenlistItemLabelGetFunc) (void *data, Evas_Object *obj, const char *part) ctypedef Evas_Object*(*GenlistItemIconGetFunc) (void *data, Evas_Object *obj, const char *part) ctypedef Eina_Bool (*GenlistItemStateGetFunc) (void *data, Evas_Object *obj, const char *part) +ctypedef Eina_Bool (*GenlistItemFilterGetFunc)(void *data, Evas_Object *obj, void *key) ctypedef void(*GenlistItemDelFunc) (void *data, Evas_Object *obj) ctypedef struct Elm_Genlist_Item_Class_Func: GenlistItemLabelGetFunc text_get GenlistItemIconGetFunc content_get GenlistItemStateGetFunc state_get +GenlistItemFilterGetFunc filter_get GenlistItemDelFunc del_ "del" ctypedef struct Elm_Genlist_Item_Class: @@ -155,3 +157,4 @@ cdef extern from "Elementary.h": Elm_Object_Item * elm_genlist_nth_item_get(const Evas_Object *obj, unsigned int nth) voidelm_genlist_focus_on_selection_set(Evas_Object *obj, Eina_Bool enabled) Eina_Bool elm_genlist_focus_on_selection_get(const Evas_Object *obj) +voidelm_genlist_filter_set(Evas_Object *obj, void *key) diff --git a/efl/elementary/genlist_item_class.pxi b/efl/elementary/genlist_item_class.pxi index 06546ba..68875d3 100644 --- a/efl/elementary/genlist_item_class.pxi +++ b/efl/elementary/genlist_item_class.pxi @@
[EGIT] [core/efl] master 01/01: Evas: Actually fix this 'afill' thing
jpeg pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=bee4e5f47692b2c32f5e071b57651e298bb78516 commit bee4e5f47692b2c32f5e071b57651e298bb78516 Author: Jean-Philippe AndreDate: Wed Jan 20 17:28:49 2016 +0900 Evas: Actually fix this 'afill' thing This mostly reverts 448720fed4da252fa5eefa02ae37c79c5fb63499 After my previous patch, semi-transparent windows would render incorrectly in E. The AFILL flag should make sure the source texture is "opaque" (ie. if it's not marked as having an alpha channel), and masking or color multiply should then be applied later on. Sorry for the mess... --- src/modules/evas/engines/gl_common/evas_gl_shader.c | 13 - src/modules/evas/engines/gl_common/shader/evas_gl_shaders.x | 6 +++--- src/modules/evas/engines/gl_common/shader/fragment.glsl | 8 3 files changed, 11 insertions(+), 16 deletions(-) diff --git a/src/modules/evas/engines/gl_common/evas_gl_shader.c b/src/modules/evas/engines/gl_common/evas_gl_shader.c index 0590e17..c049d9e 100644 --- a/src/modules/evas/engines/gl_common/evas_gl_shader.c +++ b/src/modules/evas/engines/gl_common/evas_gl_shader.c @@ -646,7 +646,7 @@ evas_gl_common_shader_flags_get(Evas_GL_Shared *shared, Shader_Type type, Shader_Sampling *psam, int *pnomul, Shader_Sampling *pmasksam) { Shader_Sampling sam = SHD_SAM11, masksam = SHD_SAM11; - int nomul = 1, bgra = 0, k, noalpha = 1; + int nomul = 1, bgra = 0, k; unsigned int flags = BASEFLAG; // image downscale sampling @@ -717,17 +717,12 @@ evas_gl_common_shader_flags_get(Evas_GL_Shared *shared, Shader_Type type, if (map_points[k].col != 0x) { nomul = 0; -if (A_VAL(_points[k].col) < 255) - noalpha = 0; +break; } } } else - { -if (a < 255) - noalpha = 0; -nomul = 0; - } + nomul = 0; if (nomul) flags |= SHADER_FLAG_NOMUL; @@ -746,7 +741,7 @@ evas_gl_common_shader_flags_get(Evas_GL_Shared *shared, Shader_Type type, if (tex) { flags |= SHADER_FLAG_TEX; -if (!tex->alpha && !mtex && noalpha) +if (!tex->alpha) flags |= SHADER_FLAG_AFILL; } diff --git a/src/modules/evas/engines/gl_common/shader/evas_gl_shaders.x b/src/modules/evas/engines/gl_common/shader/evas_gl_shaders.x index a0132aa..558531a 100644 --- a/src/modules/evas/engines/gl_common/shader/evas_gl_shaders.x +++ b/src/modules/evas/engines/gl_common/shader/evas_gl_shaders.x @@ -146,6 +146,9 @@ static const char fragment_glsl[] = " ma = texture2D(texm, tex_m).a;\n" "# endif\n" "#endif\n" + "#ifdef SHD_AFILL\n" + " c.a = 1.0;\n" + "#endif\n" " gl_FragColor =\n" " c\n" "#ifndef SHD_NOMUL\n" @@ -158,9 +161,6 @@ static const char fragment_glsl[] = " * texture2D(texa, tex_a).r\n" "#endif\n" " ;\n" - "#ifdef SHD_AFILL\n" - " gl_FragColor.a = 1.0;\n" - "#endif\n" "}\n"; static const char vertex_glsl[] = diff --git a/src/modules/evas/engines/gl_common/shader/fragment.glsl b/src/modules/evas/engines/gl_common/shader/fragment.glsl index baa22e3..b534961 100644 --- a/src/modules/evas/engines/gl_common/shader/fragment.glsl +++ b/src/modules/evas/engines/gl_common/shader/fragment.glsl @@ -148,6 +148,10 @@ void main() # endif #endif +#ifdef SHD_AFILL + c.a = 1.0; +#endif + gl_FragColor = c #ifndef SHD_NOMUL @@ -160,9 +164,5 @@ void main() * texture2D(texa, tex_a).r #endif ; - -#ifdef SHD_AFILL - gl_FragColor.a = 1.0; -#endif } --
[EGIT] [core/elementary] master 01/01: elm_widget: cleanup _elm_widget_on_focus function
hermet pushed a commit to branch master. http://git.enlightenment.org/core/elementary.git/commit/?id=2eb95a547736af1445b0a292223ad8973ad24acb commit 2eb95a547736af1445b0a292223ad8973ad24acb Author: Minkyu KangDate: Wed Jan 20 17:06:22 2016 +0900 elm_widget: cleanup _elm_widget_on_focus function Summary: This patch will reduce duplicate codes and code depth for readability Signed-off-by: Minkyu Kang Reviewers: seoz, Hermet, cedric Subscribers: seoz Differential Revision: https://phab.enlightenment.org/D3574 --- src/lib/elm_widget.c | 36 ++-- 1 file changed, 14 insertions(+), 22 deletions(-) diff --git a/src/lib/elm_widget.c b/src/lib/elm_widget.c index 97ef045..11d4ee0 100644 --- a/src/lib/elm_widget.c +++ b/src/lib/elm_widget.c @@ -5743,30 +5743,22 @@ _elm_widget_eo_base_destructor(Eo *obj, Elm_Widget_Smart_Data *sd EINA_UNUSED) EOLIAN static Eina_Bool _elm_widget_on_focus(Eo *obj, Elm_Widget_Smart_Data *sd, Elm_Object_Item *item EINA_UNUSED) { - if (elm_widget_can_focus_get(obj)) - { -if (elm_widget_focus_get(obj)) - { - if (!sd->resize_obj) - evas_object_focus_set(obj, EINA_TRUE); - eo_do(obj, eo_event_callback_call - (ELM_WIDGET_EVENT_FOCUSED, NULL)); - if (_elm_config->atspi_mode && !elm_widget_child_can_focus_get(obj)) - elm_interface_atspi_accessible_state_changed_signal_emit(obj, ELM_ATSPI_STATE_FOCUSED, EINA_TRUE); - } -else - { - if (!sd->resize_obj) - evas_object_focus_set(obj, EINA_FALSE); - eo_do(obj, eo_event_callback_call - (ELM_WIDGET_EVENT_UNFOCUSED, NULL)); - if (_elm_config->atspi_mode && !elm_widget_child_can_focus_get(obj)) - elm_interface_atspi_accessible_state_changed_signal_emit(obj, ELM_ATSPI_STATE_FOCUSED, EINA_FALSE); -} - } - else + Eina_Bool focused; + const Eo_Event_Description *desc; + + if (!elm_widget_can_focus_get(obj)) return EINA_FALSE; + focused = elm_widget_focus_get(obj); + desc = focused ? ELM_WIDGET_EVENT_FOCUSED : ELM_WIDGET_EVENT_UNFOCUSED; + + if (!sd->resize_obj) + evas_object_focus_set(obj, focused); + eo_do(obj, eo_event_callback_call(desc, NULL)); + + if (_elm_config->atspi_mode && !elm_widget_child_can_focus_get(obj)) + elm_interface_atspi_accessible_state_changed_signal_emit(obj, ELM_ATSPI_STATE_FOCUSED, focused); + return EINA_TRUE; } --
[EGIT] [core/efl] master 01/03: Ector: Fix warning on Windows (use PRIx64 to print uint64_t)
jpeg pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=3fc6e48c8ac70c1d4566c5eec45a92c4eac75890 commit 3fc6e48c8ac70c1d4566c5eec45a92c4eac75890 Author: Jean-Philippe AndreDate: Wed Jan 20 19:54:44 2016 +0900 Ector: Fix warning on Windows (use PRIx64 to print uint64_t) Thanks @vtorri for pointing this out. --- src/lib/ector/gl/ector_gl_shader.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/ector/gl/ector_gl_shader.c b/src/lib/ector/gl/ector_gl_shader.c index 10b5a88..159d8eb 100644 --- a/src/lib/ector/gl/ector_gl_shader.c +++ b/src/lib/ector/gl/ector_gl_shader.c @@ -126,7 +126,7 @@ _ector_gl_shader_glsl_link(uint64_t flags, if (!ok) { gl_compile_link_error(prg, "link fragment and vertex shaders", EINA_FALSE); -ERR("Abort compile of shader (flags: %16lx)", flags); +ERR("Abort compile of shader (flags: %16" PRIx64 ")", flags); GL.glDeleteProgram(prg); prg = 0; goto on_error; --
[EGIT] [core/efl] master 02/03: Evas: Discard shaders cache when the code changed
jpeg pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=ebc3b88d099e10bd1cef8aa07ad0875c364101bb commit ebc3b88d099e10bd1cef8aa07ad0875c364101bb Author: Jean-Philippe AndreDate: Wed Jan 20 20:24:20 2016 +0900 Evas: Discard shaders cache when the code changed Since we now have only two shader strings, this is trivial to do: hash the strings and add them to the cache filename. This will allow people using 1.17.0-alpha, etc... to discard their old shaders cache automagically and use the latest version of the shaders (because alpha is not in the filename). If we end up adding more runtime generated shaders, we might need a better strategy, but this should be good enough for now. --- .../evas/engines/gl_common/evas_gl_common.h| 1 + .../evas/engines/gl_common/evas_gl_context.c | 1 + .../evas/engines/gl_common/evas_gl_shader.c| 24 ++ 3 files changed, 22 insertions(+), 4 deletions(-) diff --git a/src/modules/evas/engines/gl_common/evas_gl_common.h b/src/modules/evas/engines/gl_common/evas_gl_common.h index 93e30f4..eab1c50 100644 --- a/src/modules/evas/engines/gl_common/evas_gl_common.h +++ b/src/modules/evas/engines/gl_common/evas_gl_common.h @@ -191,6 +191,7 @@ struct _Evas_GL_Shared Eet_File *shaders_cache; Eina_Hash *shaders_hash; + Eina_Stringshare *shaders_cache_name; #ifdef GL_GLES // FIXME: hack. diff --git a/src/modules/evas/engines/gl_common/evas_gl_context.c b/src/modules/evas/engines/gl_common/evas_gl_context.c index caf1619..cf38234 100644 --- a/src/modules/evas/engines/gl_common/evas_gl_context.c +++ b/src/modules/evas/engines/gl_common/evas_gl_context.c @@ -1041,6 +1041,7 @@ evas_gl_common_context_free(Evas_Engine_GL_Context *gc) eina_hash_free(gc->shared->native_wl_hash); eina_hash_free(gc->shared->native_tbm_hash); eina_hash_free(gc->shared->native_evasgl_hash); +eina_stringshare_del(gc->shared->shaders_cache_name); free(gc->shared); shared = NULL; } diff --git a/src/modules/evas/engines/gl_common/evas_gl_shader.c b/src/modules/evas/engines/gl_common/evas_gl_shader.c index c049d9e..ebee588 100644 --- a/src/modules/evas/engines/gl_common/evas_gl_shader.c +++ b/src/modules/evas/engines/gl_common/evas_gl_shader.c @@ -204,6 +204,20 @@ _evas_gl_common_shader_program_binary_save(Evas_GL_Program *p, Eet_File *ef) return 1; } +static void +_evas_gl_common_shader_binary_hash(Evas_GL_Shared *shared) +{ + if (shared->shaders_cache_name) + return; + + /* This hash makes it sure that if the shaders code changes, then we +* will not reuse the old binaries. */ + shared->shaders_cache_name = eina_stringshare_printf + ("%#x:%#x::binary_shader", + eina_hash_superfast(fragment_glsl, strlen(fragment_glsl)), + eina_hash_superfast(vertex_glsl, strlen(vertex_glsl))); +} + static int _evas_gl_common_shader_binary_init(Evas_GL_Shared *shared) { @@ -220,8 +234,9 @@ _evas_gl_common_shader_binary_init(Evas_GL_Shared *shared) if (!evas_gl_common_file_cache_dir_check(bin_dir_path, sizeof(bin_dir_path))) return 0; - if (!evas_gl_common_file_cache_file_check(bin_dir_path, "binary_shader", bin_file_path, - sizeof(bin_dir_path))) + _evas_gl_common_shader_binary_hash(shared); + if (!evas_gl_common_file_cache_file_check(bin_dir_path, shared->shaders_cache_name, + bin_file_path, sizeof(bin_dir_path))) return 0; if (!eet_init()) return 0; @@ -259,8 +274,9 @@ _evas_gl_common_shader_binary_save(Evas_GL_Shared *shared) return 0; /* we can't make directory */ } - copy = evas_gl_common_file_cache_file_check(bin_dir_path, "binary_shader", bin_file_path, - sizeof(bin_dir_path)); + _evas_gl_common_shader_binary_hash(shared); + copy = evas_gl_common_file_cache_file_check(bin_dir_path, shared->shaders_cache_name, + bin_file_path, sizeof(bin_dir_path)); /* use mkstemp for writing */ snprintf(tmp_file_name, sizeof(tmp_file_name), "%s.XX.cache", bin_file_path); --
[EGIT] [core/efl] master 02/02: build: sane default setting for hyphen dir
stefan pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=ac45e9e9af6d917529cde636d93e52f16fab92c0 commit ac45e9e9af6d917529cde636d93e52f16fab92c0 Author: Stefan SchmidtDate: Wed Jan 20 11:16:58 2016 +0100 build: sane default setting for hyphen dir Without this compilation would fail with undefinded EVAS_DICTS_HYPHEN_DIR if --with-xattr-tests-path was not given but hyphen enabled. Use a sane default (/usr/share/hyphen/) to avoid this. Customization is still possible. --- configure.ac | 1 + 1 file changed, 1 insertion(+) diff --git a/configure.ac b/configure.ac index 1b92b6c..0316e49 100644 --- a/configure.ac +++ b/configure.ac @@ -875,6 +875,7 @@ EINA_CONFIG([MAGIC_DEBUG], [test "x${have_magic_debug}" = "xyes"]) AC_ARG_WITH([xattr-tests-path], [AS_HELP_STRING([--with-xattr-tests-path=DIR],[path of xattr enabled directory to create test files])],[XATTR_TEST_DIR=${withval}][AC_DEFINE_UNQUOTED([XATTR_TEST_DIR],["$withval"], [xattr enabled directory])]) +EVAS_DICTS_HYPHEN_DIR="/usr/share/hyphen/" AC_ARG_WITH([dictionaries-hyphen-dir], [AS_HELP_STRING([--with-dictionaries-hyphen-dir=DIR],[path of hunspell-compatible hyphen dictionaries])],[EVAS_DICTS_HYPHEN_DIR=${withval}][AC_DEFINE_UNQUOTED([EVAS_DICTS_HYPHEN_DIR],["$withval"], [Hunspell-compatible hyphen dictionaries install directory])]) --
[EGIT] [core/efl] master 01/02: build: add hyphen as evas feature to be displayed in summary
stefan pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=d793dfc51c4725f95e5e3b590208ea1337f83176 commit d793dfc51c4725f95e5e3b590208ea1337f83176 Author: Stefan SchmidtDate: Wed Jan 20 10:44:05 2016 +0100 build: add hyphen as evas feature to be displayed in summary Having it as a feature for evas here makes sure we can see if it is enabled or disabled on the configure summary output. --- configure.ac | 1 + 1 file changed, 1 insertion(+) diff --git a/configure.ac b/configure.ac index 5acbb2e..1b92b6c 100644 --- a/configure.ac +++ b/configure.ac @@ -2430,6 +2430,7 @@ EFL_ADD_FEATURE([EVAS], [harfbuzz]) EFL_ADD_FEATURE([EVAS], [cserve], [${want_evas_cserve2}]) EFL_ADD_FEATURE([EVAS], [tile-rotate]) EFL_ADD_FEATURE([EVAS], [dither-mask], [${build_evas_dither_mask}]) +EFL_ADD_FEATURE([EVAS], [hyphen]) EFL_LIB_END([Evas]) End of Evas --
[EGIT] [core/efl] master 01/01: Revert "edje_cc: fix detecting missing part for insert_before/after"
raster pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=8b11d04dedf4477221b663f0407d0b7519eaaebe commit 8b11d04dedf4477221b663f0407d0b7519eaaebe Author: Carsten Haitzler (Rasterman)Date: Wed Jan 20 21:23:22 2016 +0900 Revert "edje_cc: fix detecting missing part for insert_before/after" This reverts commit 2ca99b8b68bd52ce187c2da54944144f12afb0b6. This breaks elm compile: EDJ default.edj edje_cc: Critical. In group "genlist_arrow": Unable to find part "sel_bevel" for insert_after in part "arrow_img_l". --- src/bin/edje/edje_cc.h | 1 + src/bin/edje/edje_cc_handlers.c | 12 +++-- src/bin/edje/edje_cc_out.c | 58 +++-- 3 files changed, 49 insertions(+), 22 deletions(-) diff --git a/src/bin/edje/edje_cc.h b/src/bin/edje/edje_cc.h index b4da941..aa49caa 100644 --- a/src/bin/edje/edje_cc.h +++ b/src/bin/edje/edje_cc.h @@ -240,6 +240,7 @@ char *mem_strdup(const char *s); #define SZ sizeof voidusing_file(const char *filename, const char type); +Eina_Bool needed_part_exists(Edje_Part_Collection *pc, const char *name); voiderror_and_abort(Eet_File *ef, const char *fmt, ...); diff --git a/src/bin/edje/edje_cc_handlers.c b/src/bin/edje/edje_cc_handlers.c index 5e31e85..9b348f3 100644 --- a/src/bin/edje/edje_cc_handlers.c +++ b/src/bin/edje/edje_cc_handlers.c @@ -5982,12 +5982,16 @@ st_collections_group_parts_part_physics_body(void) static void st_collections_group_parts_part_insert_before(void) { + /* Edje_Part_Collection *pc; */ Edje_Part_Parser *epp; + char *name; check_arg_count(1); + /* pc = eina_list_data_get(eina_list_last(edje_collections)); */ + name = parse_str(0); epp = (Edje_Part_Parser *)current_part; - epp->reorder.insert_before = parse_str(0); + epp->reorder.insert_before = name; } /** @@ -6006,12 +6010,16 @@ st_collections_group_parts_part_insert_before(void) static void st_collections_group_parts_part_insert_after(void) { + /* Edje_Part_Collection *pc; */ Edje_Part_Parser *epp; + char *name; check_arg_count(1); + /* pc = eina_list_data_get(eina_list_last(edje_collections)); */ + name = parse_str(0); epp = (Edje_Part_Parser *)current_part; - epp->reorder.insert_after = parse_str(0); + epp->reorder.insert_after = name; } /** diff --git a/src/bin/edje/edje_cc_out.c b/src/bin/edje/edje_cc_out.c index 5023862..cc11fad 100644 --- a/src/bin/edje/edje_cc_out.c +++ b/src/bin/edje/edje_cc_out.c @@ -2595,8 +2595,7 @@ reorder_parts(void) { ep = (Edje_Part_Parser *)pc->parts[i]; if (ep->reorder.insert_before && ep->reorder.insert_after) - error_and_abort(NULL, "In group \"%s\": Unable to use together insert_before and insert_after in part \"%s\".", - pc->part, pc->parts[i]->name); + ERR("Unable to use together insert_before and insert_after in part \"%s\".", pc->parts[i]->name); if (ep->reorder.done) { @@ -2610,13 +2609,15 @@ reorder_parts(void) if (ep->reorder.insert_before && !strcmp(ep->reorder.insert_before, pc->parts[j]->name)) { +needed_part_exists(pc, ep->reorder.insert_before); + ep2 = (Edje_Part_Parser *)pc->parts[j]; if (ep2->reorder.after) - error_and_abort(NULL, "In group \"%s\": The part \"%s\" is ambiguous ordered part.", - pc->part, pc->parts[i]->name); + ERR("The part \"%s\" is ambiguous ordered part.", + pc->parts[i]->name); if (ep2->reorder.linked_prev) - error_and_abort(NULL, "In group \"%s\": Unable to insert two or more parts in same part \"%s\".", - pc->part, pc->parts[j]->name); + ERR("Unable to insert two or more parts in same part \"%s\".", + pc->parts[j]->name); /* Need it to be able to insert an element before the first */ if (j == 0) k = 0; else k = j - 1; @@ -2633,13 +2634,13 @@ reorder_parts(void) else if (ep->reorder.insert_after && !strcmp(ep->reorder.insert_after, pc->parts[j]->name)) { +needed_part_exists(pc, ep->reorder.insert_after); + ep2 = (Edje_Part_Parser *)pc->parts[j]; if (ep2->reorder.before) - error_and_abort(NULL, "In group \"%s\": The part \"%s\"
[EGIT] [core/elementary] master 01/01: elm_hoversel: fix calculation to make items fit to dropdown box
hermet pushed a commit to branch master. http://git.enlightenment.org/core/elementary.git/commit/?id=6160e8bcd6d8ad38574bbde9445c6be2cd6bb956 commit 6160e8bcd6d8ad38574bbde9445c6be2cd6bb956 Author: Jee-Yong UmDate: Wed Jan 20 21:29:12 2016 +0900 elm_hoversel: fix calculation to make items fit to dropdown box Summary: While applying scroller on hoversel, several lines for item size calculation were added, but they failed to have item get proper size. Now redundant codes are removed and some are fixed, and hoversel will be shown more well-ordered. Test Plan: elementary_test hoversel Reviewers: jpeg, raster, cedric Differential Revision: https://phab.enlightenment.org/D3589 --- data/themes/edc/elm/hover.edc | 10 +++--- src/lib/elc_hoversel.c| 45 +-- 2 files changed, 20 insertions(+), 35 deletions(-) diff --git a/data/themes/edc/elm/hover.edc b/data/themes/edc/elm/hover.edc index cce316a..74757f8 100644 --- a/data/themes/edc/elm/hover.edc +++ b/data/themes/edc/elm/hover.edc @@ -607,7 +607,9 @@ group { name: "elm/hover/base/hoversel_vertical/default"; rel1.offset: 0 -1; rel2.to: "elm.swallow.slot.middle"; rel2.relative: 1.0 0.0; -rel2.offset: -1 -1; +/* set negative offset along x axis not to make + "select_line" part exceed parent's width */ +rel2.offset: -9 -1; } description { state: "visible" 0.0; inherit: "default" 0.0; @@ -636,10 +638,12 @@ group { name: "elm/hover/base/hoversel_vertical/default"; align: 0.0 1.0; rel1.to: "elm.swallow.slot.middle"; rel1.relative: 0.0 1.0; -rel1.offset: 0 2; +rel1.offset: 0 0; rel2.to: "elm.swallow.slot.middle"; rel2.relative: 1.0 1.0; -rel2.offset: -1 2; +/* set negative offset along x axis not to make + "select_line" part exceed parent's width */ +rel2.offset: -9 2; } description { state: "visible" 0.0; inherit: "default" 0.0; diff --git a/src/lib/elc_hoversel.c b/src/lib/elc_hoversel.c index 175e1fb..eaa760b 100644 --- a/src/lib/elc_hoversel.c +++ b/src/lib/elc_hoversel.c @@ -202,9 +202,13 @@ _create_scroller(Evas_Object *obj, Elm_Hoversel_Data *sd) { //table sd->tbl = elm_table_add(obj); + evas_object_size_hint_align_set(sd->tbl, EVAS_HINT_FILL, EVAS_HINT_FILL); + evas_object_size_hint_weight_set(sd->tbl, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); //spacer sd->spacer = evas_object_rectangle_add(evas_object_evas_get(obj)); + evas_object_size_hint_align_set(sd->spacer, EVAS_HINT_FILL, EVAS_HINT_FILL); + evas_object_size_hint_weight_set(sd->spacer, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); evas_object_color_set(sd->spacer, 0, 0, 0, 0); elm_table_pack(sd->tbl, sd->spacer, 0, 0, 1, 1); @@ -232,44 +236,17 @@ _create_scroller(Evas_Object *obj, Elm_Hoversel_Data *sd) static void _resizing_eval(Evas_Object *obj, Elm_Hoversel_Data *sd) { - Evas_Object *bx = NULL; const char *max_size_str; int max_size = 0; char buf[128]; Evas_Coord box_w = -1, box_h = -1; - Evas_Coord x, y, w, h, xx, yy, ww, hh, vw = 0, vh = 0; - double align_x; - Eina_List *l; - Evas_Object *it; - Evas_Coord obj_x, obj_y, obj_w, obj_h, it_w, it_h; - - if (sd->scr) - bx = elm_object_content_get(sd->scr); - - if ((!sd->expanded) || (!bx)) return; - - edje_object_size_min_calc(elm_layout_edje_get(sd->scr), , ); - evas_object_geometry_get(obj, _x, _y, _w, _h); - - evas_object_size_hint_align_get(obj, _x, NULL); - if (!sd->horizontal && align_x == EVAS_HINT_FILL) - { -l = elm_box_children_get(bx); -EINA_LIST_FREE(l, it) - { - edje_object_size_min_calc(elm_layout_edje_get(it), _w, _h); - if ((obj_w - vw) > it_w) - evas_object_size_hint_min_set(it, (obj_w - vw), it_h); - else - evas_object_size_hint_min_set(it, it_w, it_h); - } - } + Evas_Coord x, y, w, h, xx, yy, ww, hh; + Evas_Coord obj_x, obj_y, obj_w; - elm_box_recalculate(bx); - evas_object_size_hint_min_get(bx, _w, _h); + if ((!sd->expanded) || (!sd->bx)) return; - box_w += vw; - box_h += vh; + elm_box_recalculate(sd->bx); + evas_object_size_hint_min_get(sd->bx, _w, _h); max_size_str = elm_layout_data_get(sd->hover, "max_size"); if (max_size_str) @@ -311,6 +288,8 @@ _resizing_eval(Evas_Object *obj, Elm_Hoversel_Data *sd) xx += x; yy += y; + evas_object_geometry_get(obj, _x, _y, _w, NULL); + if (sd->horizontal) { if (xx < obj_x) @@ -445,6 +424,8 @@ _activate(Evas_Object *obj) sd->bx = elm_box_add(sd->hover); elm_box_homogeneous_set(sd->bx, EINA_TRUE); elm_box_horizontal_set(sd->bx,
[EGIT] [apps/epour] master 01/01: add Korean translation for the epour
hermet pushed a commit to branch master. http://git.enlightenment.org/apps/epour.git/commit/?id=8d4c67cb4b408b5782c990c831822d41f9f92a5f commit 8d4c67cb4b408b5782c990c831822d41f9f92a5f Author: Seong-ho ChoDate: Wed Jan 20 22:04:31 2016 +0900 add Korean translation for the epour Summary: before, merge this into the master branch, Korean developer/user would better to review. Reviewers: seoz, maeryo Differential Revision: https://phab.enlightenment.org/D3250 --- po/ko.po | 593 +++ 1 file changed, 593 insertions(+) diff --git a/po/ko.po b/po/ko.po new file mode 100644 index 000..2172c42 --- /dev/null +++ b/po/ko.po @@ -0,0 +1,593 @@ +# Korean translation of epour.master. +# Copyright (C) 2015 epour translators. +# This file is distributed under the same license as the epour package. +# Seong-ho Cho , 2015. +# +msgid "" +msgstr "" +"Project-Id-Version: epour.master\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2015-04-22 09:05+0300\n" +"PO-Revision-Date: 2015-10-29 21:05+0900\n" +"Last-Translator: Seong-ho Cho \n" +"Language-Team: Enlightenment Korea\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 1.5.5\n" +"Plural-Forms: nplurals=1; plural=0;\n" +"Language: ko\n" +"X-Poedit-SourceCharset: UTF-8\n" + +#: ../epour/gui/Widgets.py:106 +msgid "Close" +msgstr "닫기" + +#: ../epour/gui/Widgets.py:119 +msgid "OK" +msgstr "확인" + +#: ../epour/gui/Widgets.py:128 +msgid "Confirm exit" +msgstr "나가기 확인" + +#: ../epour/gui/Widgets.py:129 +msgid "Are you sure you wish to exit Epour?" +msgstr "정말로 Epour에서 빠져나가시겠습니까?" + +#: ../epour/gui/Widgets.py:131 +msgid "Yes" +msgstr "예" + +#: ../epour/gui/Widgets.py:135 +msgid "No" +msgstr "아니요" + +#: ../epour/gui/TorrentProps.py:87 +msgid "Enable/disable file download" +msgstr "파일 다운로드 활성/비활성" + +#: ../epour/gui/TorrentProps.py:121 +msgid "Invalid torrent handle." +msgstr "잘못된 토렌트 핸들입니다." + +#: ../epour/gui/TorrentProps.py:146 +msgid "Torrent info" +msgstr "토렌트 정보" + +#: ../epour/gui/TorrentProps.py:154 +msgid "Torrent settings" +msgstr "토렌트 설정" + +#: ../epour/gui/TorrentProps.py:162 +msgid "Torrent status" +msgstr "토렌트 상태" + +#: ../epour/gui/TorrentProps.py:171 +msgid "Magnet URI" +msgstr "마그넷 URI" + +#: ../epour/gui/TorrentProps.py:179 +msgid "Copy" +msgstr "복사" + +#: ../epour/gui/TorrentProps.py:206 +#, python-format +msgid "Epour - Files for torrent: %s" +msgstr "epour - 토렌트용 파일: %s" + +#: ../epour/gui/TorrentProps.py:248 +msgid "Select all" +msgstr "전체 선택" + +#: ../epour/gui/TorrentProps.py:252 +msgid "Select none" +msgstr "모두 선택 안함" + +#: ../epour/gui/TorrentProps.py:391 +msgid "Private" +msgstr "비공개" + +#: ../epour/gui/TorrentProps.py:442 +msgid "Storage path" +msgstr "저장소 경로" + +#: ../epour/gui/TorrentProps.py:448 +msgid "Select" +msgstr "선택" + +#: ../epour/gui/TorrentProps.py:500 +msgid "disabled" +msgstr "비활성" + +#: ../epour/gui/TorrentProps.py:536 ../epour/gui/__init__.py:428 +msgid "Queued" +msgstr "대기열에 있음" + +#: ../epour/gui/TorrentProps.py:536 ../epour/gui/__init__.py:428 +msgid "Checking" +msgstr "검사 중" + +#: ../epour/gui/TorrentProps.py:536 ../epour/gui/__init__.py:428 +msgid "Downloading metadata" +msgstr "메타데이터 다운로드 중" + +#: ../epour/gui/TorrentProps.py:536 ../epour/gui/__init__.py:429 +msgid "Downloading" +msgstr "다운로드 중" + +#: ../epour/gui/TorrentProps.py:537 ../epour/gui/__init__.py:429 +msgid "Finished" +msgstr "완료" + +#: ../epour/gui/TorrentProps.py:537 ../epour/gui/__init__.py:429 +msgid "Seeding" +msgstr "배포 중" + +#: ../epour/gui/TorrentProps.py:537 ../epour/gui/__init__.py:429 +msgid "Allocating" +msgstr "할당 중" + +#: ../epour/gui/TorrentProps.py:537 ../epour/gui/__init__.py:430 +msgid "Checking resume data" +msgstr "복귀 데이터 검사 중" + +#: ../epour/gui/__init__.py:90 +msgid "Add torrent" +msgstr "토렌트 추가" + +#: ../epour/gui/__init__.py:103 +msgid "Pause Session" +msgstr "세션 일시 정지" + +#: ../epour/gui/__init__.py:107 +msgid "Resume Session" +msgstr "세션 재개" + +#: ../epour/gui/__init__.py:123 +msgid "Preferences" +msgstr "기본 설정" + +#: ../epour/gui/__init__.py:126 +msgid "General" +msgstr "일반" + +#: ../epour/gui/__init__.py:130 +msgid "Proxy" +msgstr "프록시" + +#: ../epour/gui/__init__.py:134 ../epour/gui/__init__.py:335 +msgid "Session" +msgstr "세션" + +#: ../epour/gui/__init__.py:138 +msgid "Exit" +msgstr "나가기" + +#: ../epour/gui/__init__.py:222 +msgid "Torrent {} has finished downloading." +msgstr "{} 토렌트에서 다운로드를 끝냈습니다." + +#: ../epour/gui/__init__.py:366 +msgid "Peer connections" +msgstr "피어 연결" + +#: ../epour/gui/__init__.py:374 +msgid "Upload slots" +msgstr "업로드 슬롯" + +#: ../epour/gui/__init__.py:383 +msgid "Listening" +msgstr "감청 중..." + +#: ../epour/gui/__init__.py:450 +msgid "Invalid torrent" +msgstr "잘못된 토렌트" + +#: ../epour/gui/__init__.py:456 +msgid "{:.0%} complete, ETA: {} (Down: {}/s Up: {}/s Queue pos: {})"
[EGIT] [apps/epour] master 01/01: improve korean translate
hermet pushed a commit to branch master. http://git.enlightenment.org/apps/epour.git/commit/?id=8bf8f56dcbe9bb506935c1bb2c58000d193f5042 commit 8bf8f56dcbe9bb506935c1bb2c58000d193f5042 Author: Hermet ParkDate: Wed Jan 20 22:39:36 2016 +0900 improve korean translate --- po/epour.pot | 201 ++- po/ko.po | 55 2 files changed, 128 insertions(+), 128 deletions(-) diff --git a/po/epour.pot b/po/epour.pot index ade5380..ac0dff1 100644 --- a/po/epour.pot +++ b/po/epour.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2015-04-22 09:05+0300\n" +"POT-Creation-Date: 2016-01-20 22:04+0900\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -17,280 +17,281 @@ msgstr "" "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" -#: ../epour/gui/Widgets.py:106 -msgid "Close" -msgstr "" - -#: ../epour/gui/Widgets.py:119 -msgid "OK" -msgstr "" - -#: ../epour/gui/Widgets.py:128 -msgid "Confirm exit" -msgstr "" - -#: ../epour/gui/Widgets.py:129 -msgid "Are you sure you wish to exit Epour?" -msgstr "" - -#: ../epour/gui/Widgets.py:131 -msgid "Yes" -msgstr "" - -#: ../epour/gui/Widgets.py:135 -msgid "No" -msgstr "" - -#: ../epour/gui/TorrentProps.py:87 +#: ../epour/gui/TorrentProps.py:90 msgid "Enable/disable file download" msgstr "" -#: ../epour/gui/TorrentProps.py:121 +#: ../epour/gui/TorrentProps.py:124 msgid "Invalid torrent handle." msgstr "" -#: ../epour/gui/TorrentProps.py:146 +#: ../epour/gui/TorrentProps.py:149 msgid "Torrent info" msgstr "" -#: ../epour/gui/TorrentProps.py:154 +#: ../epour/gui/TorrentProps.py:157 msgid "Torrent settings" msgstr "" -#: ../epour/gui/TorrentProps.py:162 +#: ../epour/gui/TorrentProps.py:165 msgid "Torrent status" msgstr "" -#: ../epour/gui/TorrentProps.py:171 +#: ../epour/gui/TorrentProps.py:174 msgid "Magnet URI" msgstr "" -#: ../epour/gui/TorrentProps.py:179 +#: ../epour/gui/TorrentProps.py:182 msgid "Copy" msgstr "" -#: ../epour/gui/TorrentProps.py:206 +#: ../epour/gui/TorrentProps.py:209 #, python-format msgid "Epour - Files for torrent: %s" msgstr "" -#: ../epour/gui/TorrentProps.py:248 +#: ../epour/gui/TorrentProps.py:251 msgid "Select all" msgstr "" -#: ../epour/gui/TorrentProps.py:252 +#: ../epour/gui/TorrentProps.py:255 msgid "Select none" msgstr "" -#: ../epour/gui/TorrentProps.py:391 +#: ../epour/gui/TorrentProps.py:394 msgid "Private" msgstr "" -#: ../epour/gui/TorrentProps.py:442 +#: ../epour/gui/TorrentProps.py:445 msgid "Storage path" msgstr "" -#: ../epour/gui/TorrentProps.py:448 +#: ../epour/gui/TorrentProps.py:451 msgid "Select" msgstr "" -#: ../epour/gui/TorrentProps.py:500 +#: ../epour/gui/TorrentProps.py:503 msgid "disabled" msgstr "" -#: ../epour/gui/TorrentProps.py:536 ../epour/gui/__init__.py:428 +#: ../epour/gui/TorrentProps.py:539 ../epour/gui/__init__.py:432 msgid "Queued" msgstr "" -#: ../epour/gui/TorrentProps.py:536 ../epour/gui/__init__.py:428 +#: ../epour/gui/TorrentProps.py:539 ../epour/gui/__init__.py:432 msgid "Checking" msgstr "" -#: ../epour/gui/TorrentProps.py:536 ../epour/gui/__init__.py:428 +#: ../epour/gui/TorrentProps.py:539 ../epour/gui/__init__.py:432 msgid "Downloading metadata" msgstr "" -#: ../epour/gui/TorrentProps.py:536 ../epour/gui/__init__.py:429 +#: ../epour/gui/TorrentProps.py:539 ../epour/gui/__init__.py:433 msgid "Downloading" msgstr "" -#: ../epour/gui/TorrentProps.py:537 ../epour/gui/__init__.py:429 +#: ../epour/gui/TorrentProps.py:540 ../epour/gui/__init__.py:433 msgid "Finished" msgstr "" -#: ../epour/gui/TorrentProps.py:537 ../epour/gui/__init__.py:429 +#: ../epour/gui/TorrentProps.py:540 ../epour/gui/__init__.py:433 msgid "Seeding" msgstr "" -#: ../epour/gui/TorrentProps.py:537 ../epour/gui/__init__.py:429 +#: ../epour/gui/TorrentProps.py:540 ../epour/gui/__init__.py:433 msgid "Allocating" msgstr "" -#: ../epour/gui/TorrentProps.py:537 ../epour/gui/__init__.py:430 +#: ../epour/gui/TorrentProps.py:540 ../epour/gui/__init__.py:434 msgid "Checking resume data" msgstr "" -#: ../epour/gui/__init__.py:90 +#: ../epour/gui/Widgets.py:109 +msgid "Close" +msgstr "" + +#: ../epour/gui/Widgets.py:122 +msgid "OK" +msgstr "" + +#: ../epour/gui/Widgets.py:131 +msgid "Confirm exit" +msgstr "" + +#: ../epour/gui/Widgets.py:132 +msgid "Are you sure you wish to exit Epour?" +msgstr "" + +#: ../epour/gui/Widgets.py:134 +msgid "Yes" +msgstr "" + +#: ../epour/gui/Widgets.py:138 +msgid "No" +msgstr "" + +#: ../epour/gui/__init__.py:93 msgid "Add torrent" msgstr "" -#: ../epour/gui/__init__.py:103 +#: ../epour/gui/__init__.py:106 msgid "Pause Session" msgstr "" -#: ../epour/gui/__init__.py:107 +#: ../epour/gui/__init__.py:110 msgid "Resume Session"