[EGIT] [core/efl] master 01/01: evas: fix compilation error
ami pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=16819d37d24bdfba2b6b9842d4198c1764382231 commit 16819d37d24bdfba2b6b9842d4198c1764382231 Author: Amitesh Singh Date: Tue Oct 13 09:01:26 2015 +0530 evas: fix compilation error This is introduced in 5c02935a866a5c14 --- src/modules/evas/engines/gl_x11/evas_engine.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/evas/engines/gl_x11/evas_engine.c b/src/modules/evas/engines/gl_x11/evas_engine.c index 883b2db..3d4dd12 100644 --- a/src/modules/evas/engines/gl_x11/evas_engine.c +++ b/src/modules/evas/engines/gl_x11/evas_engine.c @@ -2181,7 +2181,7 @@ _native_yinvert_cb(void *data, void *image) #else glXGetFBConfigAttrib(eng_get_ob(re)->disp, n->config, GLX_Y_INVERTED_EXT, &val); -if (val == TRUE) yinvert = 1; +if (val == 1) yinvert = 1; #endif } else if (n->ns.type == EVAS_NATIVE_SURFACE_OPENGL) @@ -2539,7 +2539,7 @@ eng_image_native_set(void *data, void *image, void *native) } glXGetFBConfigAttrib(eng_get_ob(re)->disp, configs[j], GLX_Y_INVERTED_EXT, &val); -if (val == TRUE) yinvert = 1; +if (val == 1) yinvert = 1; glXGetFBConfigAttrib(eng_get_ob(re)->disp, configs[j], GLX_BIND_TO_TEXTURE_TARGETS_EXT, &val); --
[EGIT] [core/elementary] master 01/01: image: remove unused variables
ami pushed a commit to branch master. http://git.enlightenment.org/core/elementary.git/commit/?id=0e5a08b3e7e3ad6819714d97a5bd3d499e6bfd81 commit 0e5a08b3e7e3ad6819714d97a5bd3d499e6bfd81 Author: Amitesh Singh Date: Tue Oct 13 09:08:01 2015 +0530 image: remove unused variables --- src/lib/elm_image.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/lib/elm_image.c b/src/lib/elm_image.c index 5cfc046..c6d9850 100644 --- a/src/lib/elm_image.c +++ b/src/lib/elm_image.c @@ -1395,8 +1395,6 @@ _elm_image_efl_image_load_size_get(Eo *obj EINA_UNUSED, Elm_Image_Data *sd, int EOLIAN static void _elm_image_orient_set(Eo *obj, Elm_Image_Data *sd, Elm_Image_Orient orient) { - int iw, ih; - if (sd->edje) return; if (sd->orient == orient) return; --
[EGIT] [website/www-content] master 01/01: Wiki page image_objects changed with summary [change image size to 160000] by Amitesh Singh
WWW-www.enlightenment.org pushed a commit to branch master. http://git.enlightenment.org/website/www-content.git/commit/?id=a263590f1d4534abcf50261bf75abc206f8d9949 commit a263590f1d4534abcf50261bf75abc206f8d9949 Author: Amitesh Singh Date: Tue Oct 13 01:15:44 2015 -0700 Wiki page image_objects changed with summary [change image size to 16] by Amitesh Singh --- pages/program_guide/evas/image_objects.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/program_guide/evas/image_objects.txt b/pages/program_guide/evas/image_objects.txt index 4a6652c..d4339a6 100644 --- a/pages/program_guide/evas/image_objects.txt +++ b/pages/program_guide/evas/image_objects.txt @@ -265,7 +265,7 @@ Users can set raw data to the image object manually using the ''evas_object_image_data_set()'' function instead of setting an image file as the data source. The image data should be in raw data form. In case of an 200x200 sized image with alpha channel enabled (32 bits per pixel), the size -of the image data is 14000 (=200*200*4) bytes. +of the image data is 16 (=200*200*4) bytes. void evas_object_image_data_set(Evas_Object * obj, --
[EGIT] [core/efl] master 01/01: eina: util - set tmp to NULL to fix compilation warning
ami pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=b8ab388710ddb8a4135ceaa010364bd4c683ef15 commit b8ab388710ddb8a4135ceaa010364bd4c683ef15 Author: Amitesh Singh Date: Wed Oct 14 09:18:01 2015 +0530 eina: util - set tmp to NULL to fix compilation warning lib/eina/eina_util.c: In function 'eina_environment_tmp_get': lib/eina/eina_util.c:96:7: warning: 'tmp' may be used uninitialized in this function [-Wmaybe-uninitialized] if (!tmp) tmp = "/tmp"; ^ --- src/lib/eina/eina_util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/eina/eina_util.c b/src/lib/eina/eina_util.c index ad31475..0adc412 100644 --- a/src/lib/eina/eina_util.c +++ b/src/lib/eina/eina_util.c @@ -75,7 +75,7 @@ eina_environment_home_get(void) EAPI const char * eina_environment_tmp_get(void) { - char *tmp; + char *tmp = NULL; #ifdef _WIN32 tmp = getenv("TMP"); --
[EGIT] [core/elementary] master 01/01: example: glview - use delete to deallocate memory
ami pushed a commit to branch master. http://git.enlightenment.org/core/elementary.git/commit/?id=af77941e73f330561217124faa6f71fc761c9ba6 commit af77941e73f330561217124faa6f71fc761c9ba6 Author: Amitesh Singh Date: Wed Oct 14 20:27:57 2015 +0530 example: glview - use delete to deallocate memory CID: 1327363 --- src/examples/glview_cxx_example_01.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/examples/glview_cxx_example_01.cc b/src/examples/glview_cxx_example_01.cc index f8b7101..bcf44d9 100644 --- a/src/examples/glview_cxx_example_01.cc +++ b/src/examples/glview_cxx_example_01.cc @@ -42,7 +42,7 @@ load_shader(GLData *gld, GLenum type, const char *shader_src ) gl->glGetShaderInfoLog(shader, info_len, NULL, info_log); printf("Error compiling shader:\n%s\n==\n%s\n==\n", info_log, shader_src ); - free(info_log); + delete [] info_log; } gl->glDeleteShader(shader); return 0; --
[EGIT] [core/elementary] master 01/01: example: glview - use delete to deallocate memory
ami pushed a commit to branch master. http://git.enlightenment.org/core/elementary.git/commit/?id=80a76aa93b310dec00c7e7d57a48747d690101af commit 80a76aa93b310dec00c7e7d57a48747d690101af Author: Amitesh Singh Date: Wed Oct 14 20:32:51 2015 +0530 example: glview - use delete to deallocate memory CID: 1327362 --- src/examples/glview_cxx_example_01.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/examples/glview_cxx_example_01.cc b/src/examples/glview_cxx_example_01.cc index bcf44d9..b94d8c2 100644 --- a/src/examples/glview_cxx_example_01.cc +++ b/src/examples/glview_cxx_example_01.cc @@ -98,7 +98,7 @@ init_shaders(GLData *gld) gl->glGetProgramInfoLog(gld->program, info_len, NULL, info_log); printf("Error linking program:\n%s\n", info_log); - free(info_log); + delete [] info_log; } gl->glDeleteProgram(gld->program); return 0; --
[EGIT] [core/elementary] master 01/01: example: genlist - intialize buffer array to 0
ami pushed a commit to branch master. http://git.enlightenment.org/core/elementary.git/commit/?id=4dccb16ed10e5f9e96bb7ccce60af4e9c1492d55 commit 4dccb16ed10e5f9e96bb7ccce60af4e9c1492d55 Author: Amitesh Singh Date: Wed Oct 14 20:42:39 2015 +0530 example: genlist - intialize buffer array to 0 CID: 1327346 --- src/examples/genlist_example_05.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/examples/genlist_example_05.c b/src/examples/genlist_example_05.c index d36503c..e15da74 100644 --- a/src/examples/genlist_example_05.c +++ b/src/examples/genlist_example_05.c @@ -20,7 +20,7 @@ static int nitems = 0; static char * _item_label_get(void *data, Evas_Object *obj, const char *part) { - char buf[256]; + char buf[256] = {0}; Node_Data *d = data; if (!strcmp(part, "elm.text")) --
[EGIT] [core/elementary] master 01/01: example: genlist - intialize buffer array to 0
ami pushed a commit to branch master. http://git.enlightenment.org/core/elementary.git/commit/?id=65f9dcf0b8bc5b3f5ccab78e6ab7961ccfa24b61 commit 65f9dcf0b8bc5b3f5ccab78e6ab7961ccfa24b61 Author: Amitesh Singh Date: Wed Oct 14 20:47:46 2015 +0530 example: genlist - intialize buffer array to 0 CID: 1327347 --- src/examples/genlist_example_05.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/examples/genlist_example_05.c b/src/examples/genlist_example_05.c index e15da74..48fe589 100644 --- a/src/examples/genlist_example_05.c +++ b/src/examples/genlist_example_05.c @@ -75,7 +75,7 @@ _parent_content_get(void *data, Evas_Object *obj, const char *part) static char * _favorite_label_get(void *data, Evas_Object *obj, const char *part) { - char buf[256]; + char buf[256] = {0}; Node_Data *d = data; if (!strcmp(part, "elm.text")) --
[EGIT] [core/efl] master 01/01: evas filter: silent coverity on self assignment
ami pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=63634ccd30229e678b3b8451f49a63b71712a119 commit 63634ccd30229e678b3b8451f49a63b71712a119 Author: Amitesh Singh Date: Wed Oct 14 21:04:52 2015 +0530 evas filter: silent coverity on self assignment This is a false alarm. Just to make coverity happy, use eo_do instead of eo_do_ret CID: 1316017 --- src/lib/evas/canvas/evas_filter_mixin.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/evas/canvas/evas_filter_mixin.c b/src/lib/evas/canvas/evas_filter_mixin.c index 2722a48..e93fa70 100644 --- a/src/lib/evas/canvas/evas_filter_mixin.c +++ b/src/lib/evas/canvas/evas_filter_mixin.c @@ -293,7 +293,7 @@ _evas_filter_efl_gfx_filter_program_set(Eo *eo_obj, Evas_Filter_Data *pd, eina_stringshare_replace(&fcow->name, name); if (code) { - alpha = eo_do_ret(eo_obj, alpha, evas_filter_input_alpha()); + eo_do(eo_obj, alpha = evas_filter_input_alpha()); pgm = evas_filter_program_new(fcow->name, alpha); evas_filter_program_source_set_all(pgm, fcow->sources); evas_filter_program_data_set_all(pgm, fcow->data); --
[EGIT] [core/enlightenment] master 01/01: pulseaudio: pass big data as pass by reference
ami pushed a commit to branch master. http://git.enlightenment.org/core/enlightenment.git/commit/?id=de740b2520fc49a7505ef2fb8b1aca89b452db1a commit de740b2520fc49a7505ef2fb8b1aca89b452db1a Author: Amitesh Singh Date: Wed Oct 14 21:51:00 2015 +0530 pulseaudio: pass big data as pass by reference CID: 1308394 --- src/modules/mixer/lib/backends/pulseaudio/pulse.c | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/modules/mixer/lib/backends/pulseaudio/pulse.c b/src/modules/mixer/lib/backends/pulseaudio/pulse.c index a00ffb0..9122735 100644 --- a/src/modules/mixer/lib/backends/pulseaudio/pulse.c +++ b/src/modules/mixer/lib/backends/pulseaudio/pulse.c @@ -64,12 +64,12 @@ _emix_volume_convert(const Emix_Volume volume) } static Emix_Volume -_pa_cvolume_convert(const pa_cvolume volume) +_pa_cvolume_convert(const pa_cvolume *volume) { Emix_Volume vol; int i; - vol.volumes = calloc(volume.channels, sizeof(int)); + vol.volumes = calloc(volume->channels, sizeof(int)); if (!vol.volumes) { WRN("Could not allocate memory for volume"); @@ -77,9 +77,9 @@ _pa_cvolume_convert(const pa_cvolume volume) return vol; } - vol.channel_count = volume.channels; - for (i = 0; i < volume.channels; i++) - vol.volumes[i] = PA_VOLUME_TO_INT(volume.values[i]); + vol.channel_count = volume->channels; + for (i = 0; i < volume->channels; i++) + vol.volumes[i] = PA_VOLUME_TO_INT(volume->values[i]); return vol; } @@ -148,7 +148,7 @@ _sink_cb(pa_context *c EINA_UNUSED, const pa_sink_info *info, int eol, sink = calloc(1, sizeof(Sink)); sink->idx = info->index; sink->base.name = eina_stringshare_add(info->description); - sink->base.volume = _pa_cvolume_convert(info->volume); + sink->base.volume = _pa_cvolume_convert(&info->volume); sink->base.mute = !!info->mute; for (i = 0; i < info->n_ports; i++) @@ -210,7 +210,7 @@ _sink_changed_cb(pa_context *c EINA_UNUSED, const pa_sink_info *info, int eol, EINA_SAFETY_ON_NULL_RETURN(sink); sink->base.name = eina_stringshare_add(info->description); - sink->base.volume = _pa_cvolume_convert(info->volume); + sink->base.volume = _pa_cvolume_convert(&info->volume); sink->base.mute = !!info->mute; if (sink->base.ports) @@ -328,7 +328,7 @@ _sink_input_cb(pa_context *c EINA_UNUSED, const pa_sink_input_info *info, input->idx = info->index; input->base.name = eina_stringshare_add(info->name); - input->base.volume = _pa_cvolume_convert(info->volume); + input->base.volume = _pa_cvolume_convert(&info->volume); input->base.mute = !!info->mute; EINA_LIST_FOREACH(ctx->sinks, l, s) { @@ -382,7 +382,7 @@ _sink_input_changed_cb(pa_context *c EINA_UNUSED, ctx->inputs = eina_list_append(ctx->inputs, input); } input->idx = info->index; - input->base.volume = _pa_cvolume_convert(info->volume); + input->base.volume = _pa_cvolume_convert(&info->volume); input->base.mute = !!info->mute; if (ctx->cb) @@ -439,7 +439,7 @@ _source_cb(pa_context *c EINA_UNUSED, const pa_source_info *info, source->idx = info->index; source->base.name = eina_stringshare_add(info->name); - source->base.volume = _pa_cvolume_convert(info->volume); + source->base.volume = _pa_cvolume_convert(&info->volume); source->base.mute = !!info->mute; ctx->sources = eina_list_append(ctx->sources, source); @@ -487,7 +487,7 @@ _source_changed_cb(pa_context *c EINA_UNUSED, ctx->sources = eina_list_append(ctx->sources, source); } source->idx= info->index; - source->base.volume = _pa_cvolume_convert(info->volume); + source->base.volume = _pa_cvolume_convert(&info->volume); source->base.mute = !!info->mute; if (ctx->cb) --
[EGIT] [core/enlightenment] master 01/01: e_flowlayout: typecast return value to int
discomfitor pushed a commit to branch master. http://git.enlightenment.org/core/enlightenment.git/commit/?id=71f77206697bf6a6d856fe43b901c7dcb932e928 commit 71f77206697bf6a6d856fe43b901c7dcb932e928 Author: Amitesh Singh Date: Wed Oct 14 14:02:07 2015 -0400 e_flowlayout: typecast return value to int Summary: return value is small enough, so there is no risk in casting from unsigned int to signed int. CID: 1267211 Reviewers: devilhorns, raster, cedric, zmike Subscribers: seoz, sachin.dev Differential Revision: https://phab.enlightenment.org/D3179 --- src/bin/e_flowlayout.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/bin/e_flowlayout.c b/src/bin/e_flowlayout.c index 1463164..c1b0a4e 100644 --- a/src/bin/e_flowlayout.c +++ b/src/bin/e_flowlayout.c @@ -233,7 +233,7 @@ e_flowlayout_pack_end(Evas_Object *obj, Evas_Object *child) sd->items = eina_list_append(sd->items, child); sd->changed = 1; if (sd->frozen <= 0) _e_flowlayout_smart_reconfigure(sd); - return eina_list_count(sd->items) - 1; + return (int)(eina_list_count(sd->items) - 1); } E_API int @@ -290,7 +290,7 @@ e_flowlayout_pack_count_get(Evas_Object *obj) if (evas_object_smart_smart_get(obj) != _e_smart) SMARTERR(0); sd = evas_object_smart_data_get(obj); if (!sd) return 0; - return eina_list_count(sd->items); + return (int)eina_list_count(sd->items); } E_API Evas_Object * --
[EGIT] [core/efl] master 02/02: edje: load - use evas_object_clipees_has instead of evas_object_clipees_get
ami pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=048b5f70e5d5324d6b3966a4ce59af79afa5504b commit 048b5f70e5d5324d6b3966a4ce59af79afa5504b Author: Amitesh Singh Date: Thu Oct 15 15:04:23 2015 +0530 edje: load - use evas_object_clipees_has instead of evas_object_clipees_get evas_object_clipees_has is far cheaper than evas_object_clipees_get in case of checking if clipees exist or not. This should improve the performance in case of large set of clipees. @fix --- src/lib/edje/edje_load.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/edje/edje_load.c b/src/lib/edje/edje_load.c index 13ad301..f79072c 100644 --- a/src/lib/edje/edje_load.c +++ b/src/lib/edje/edje_load.c @@ -950,7 +950,7 @@ _edje_object_file_set_internal(Evas_Object *obj, const Eina_File *file, const ch #ifdef EDJE_CALC_CACHE ed->all_part_change = EINA_TRUE; #endif - if ((evas_object_clipees_get(ed->base->clipper)) && + if ((evas_object_clipees_has(ed->base->clipper)) && (evas_object_visible_get(obj))) evas_object_show(ed->base->clipper); --
[EGIT] [core/efl] master 01/02: evas: render - use evas_object_clipees_has instead of evas_object_clipees_get
ami pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=8e87e56a7cdb28bad1251435e0f2085ca08b9411 commit 8e87e56a7cdb28bad1251435e0f2085ca08b9411 Author: Amitesh Singh Date: Thu Oct 15 15:00:11 2015 +0530 evas: render - use evas_object_clipees_has instead of evas_object_clipees_get evas_object_clipees_has is far cheaper than evas_object_clipees_get in case of checking if clipees exist or not. This should improve the performance in case of large set of clipees. @fix --- src/lib/evas/canvas/evas_render.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/evas/canvas/evas_render.c b/src/lib/evas/canvas/evas_render.c index c5848c3..721a420 100644 --- a/src/lib/evas/canvas/evas_render.c +++ b/src/lib/evas/canvas/evas_render.c @@ -2541,7 +2541,7 @@ evas_render_updates_internal(Evas *eo_e, evas_object_clip_set(obj->object, e->framespace.clip); } } -if (!evas_object_clipees_get(e->framespace.clip)) +if (!evas_object_clipees_has(e->framespace.clip)) evas_object_hide(e->framespace.clip); evas_event_thaw(eo_e); } --
[EGIT] [core/elementary] master 01/01: test_genlist: set focus on popup's button
ami pushed a commit to branch master. http://git.enlightenment.org/core/elementary.git/commit/?id=6e0e10148ab28e079f4281495e278af92df886b7 commit 6e0e10148ab28e079f4281495e278af92df886b7 Author: Amitesh Singh Date: Sat Oct 17 00:50:17 2015 +0530 test_genlist: set focus on popup's button --- src/bin/test_genlist.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/bin/test_genlist.c b/src/bin/test_genlist.c index 3f686a1..6f3f7a2 100644 --- a/src/bin/test_genlist.c +++ b/src/bin/test_genlist.c @@ -4205,6 +4205,7 @@ _gl_focus_sel_popup_create(Evas_Object *parent) // popup show should be called after adding all the contents and the buttons // of popup to set the focus into popup's contents correctly. evas_object_show(popup); + elm_object_focus_set(btn, EINA_TRUE); } static void --
[EGIT] [core/elementary] master 01/01: image: use eo_isa for checking object types instead of string comparison
ami pushed a commit to branch master. http://git.enlightenment.org/core/elementary.git/commit/?id=55373e799a797ac48a94ff5ecf1e112924641eed commit 55373e799a797ac48a94ff5ecf1e112924641eed Author: Amitesh Singh Date: Thu Oct 22 22:14:40 2015 +0530 image: use eo_isa for checking object types instead of string comparison --- src/lib/elm_image.c | 12 ++-- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/src/lib/elm_image.c b/src/lib/elm_image.c index c6d9850..f76eb9a 100644 --- a/src/lib/elm_image.c +++ b/src/lib/elm_image.c @@ -122,17 +122,13 @@ static void _elm_image_internal_sizing_eval(Evas_Object *obj, Elm_Image_Data *sd) { Evas_Coord x, y, w, h; - const char *type; if (!sd->img) return; w = sd->img_w; h = sd->img_h; - type = evas_object_type_get(sd->img); - if (!type) return; - - if (!strcmp(type, "edje")) + if (eo_isa(sd->img, EDJE_OBJECT_CLASS)) { x = sd->img_x; y = sd->img_y; @@ -1268,15 +1264,11 @@ _elm_image_object_size_get(Eo *obj EINA_UNUSED, Elm_Image_Data *sd, int *w, int { int tw, th; int cw = 0, ch = 0; - const char *type; if (w) *w = 0; if (h) *h = 0; - type = evas_object_type_get(sd->img); - if (!type) return; - - if (!strcmp(type, "edje")) + if (eo_isa(sd->img, EDJE_OBJECT_CLASS)) edje_object_size_min_get(sd->img, &tw, &th); else evas_object_image_size_get(sd->img, &tw, &th); --
[EGIT] [core/elementary] master 01/01: flip: use eo_isa for checking object types
ami pushed a commit to branch master. http://git.enlightenment.org/core/elementary.git/commit/?id=7245bc20dc235b4463c21dd8eced6f5f0d98d6fd commit 7245bc20dc235b4463c21dd8eced6f5f0d98d6fd Author: Amitesh Singh Date: Thu Oct 22 22:36:01 2015 +0530 flip: use eo_isa for checking object types --- src/lib/elm_flip.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/lib/elm_flip.c b/src/lib/elm_flip.c index e9b54f5..820a822 100644 --- a/src/lib/elm_flip.c +++ b/src/lib/elm_flip.c @@ -933,11 +933,10 @@ static void _map_uv_set(Evas_Object *obj, Evas_Map *map) { Evas_Coord x, y, w, h; - const char *type = evas_object_type_get(obj); // FIXME: only handles filled obj - if ((type) && (!strcmp(type, "image") && - !evas_object_image_source_get(obj))) + if (eo_isa(obj, EVAS_IMAGE_CLASS) && + !evas_object_image_source_get(obj)) { int iw, ih; evas_object_image_size_get(obj, &iw, &ih); --
[EGIT] [core/elementary] master 01/01: test_gesture_layer: use bigger font size for entry
ami pushed a commit to branch master. http://git.enlightenment.org/core/elementary.git/commit/?id=a01bd0c078adf03d26badb9fa4ac9d520b86ffc8 commit a01bd0c078adf03d26badb9fa4ac9d520b86ffc8 Author: Amitesh Singh Date: Fri Oct 30 10:17:01 2015 +0530 test_gesture_layer: use bigger font size for entry --- src/bin/test_gesture_layer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/bin/test_gesture_layer.c b/src/bin/test_gesture_layer.c index 53a9053..8179267 100644 --- a/src/bin/test_gesture_layer.c +++ b/src/bin/test_gesture_layer.c @@ -382,8 +382,8 @@ test_gesture_layer(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, photo_array[ind++] = photo_object_add(win, NULL, buf, 40, 300, 365, 400, 45); Evas_Object *en = elm_entry_add(win); - elm_object_text_set(en, "You can use whatever object you want, " - "even entries like this."); + elm_object_text_set(en, "You can use whatever object you want, " + "even entries like this."); elm_entry_line_wrap_set(en, ELM_WRAP_MIXED); Evas_Object *postit = elm_layout_add(win); --
[EGIT] [core/efl] master 01/01: evas box: don't allow duplicate child append
ami pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=7ff30befd11834df04adfdb1b5777cfc3cfdec1f commit 7ff30befd11834df04adfdb1b5777cfc3cfdec1f Author: Amitesh Singh Date: Fri Oct 30 13:44:04 2015 +0530 evas box: don't allow duplicate child append Add check for duplicate child addition and return null. --- src/lib/evas/canvas/evas_object_box.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/evas/canvas/evas_object_box.c b/src/lib/evas/canvas/evas_object_box.c index 3510fb0..74f9a6c 100644 --- a/src/lib/evas/canvas/evas_object_box.c +++ b/src/lib/evas/canvas/evas_object_box.c @@ -1693,7 +1693,7 @@ _evas_box_append(Eo *o, Evas_Object_Box_Data *priv, Evas_Object *child) { Evas_Object_Box_Option *opt = NULL; - if (!child) + if (!child || (evas_object_smart_parent_get(child) == o)) return NULL; eo_do(o, opt = evas_obj_box_internal_append(child)); --
[EGIT] [core/elementary] master 01/01: test_explode: use evas_object_clipees_has instead
ami pushed a commit to branch master. http://git.enlightenment.org/core/elementary.git/commit/?id=63131ef30e237567adbb84d627f2f6de48613482 commit 63131ef30e237567adbb84d627f2f6de48613482 Author: Amitesh Singh Date: Mon Nov 2 08:57:51 2015 +0530 test_explode: use evas_object_clipees_has instead fixes memory leak and better performance --- src/bin/test_explode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bin/test_explode.c b/src/bin/test_explode.c index 30f572d..63b1b46 100644 --- a/src/bin/test_explode.c +++ b/src/bin/test_explode.c @@ -88,7 +88,7 @@ explode_obj(Evas_Object *obj, int n) EINA_LIST_FREE(children, o) { if (!evas_object_visible_get(o)) continue; - if (evas_object_clipees_get(o)) continue; + if (evas_object_clipees_has(o)) continue; n = explode_obj(o, n); } --
[EGIT] [website/www-content] master 01/01: Wiki page ecore_events changed with summary [] by Amitesh Singh
WWW-www.enlightenment.org pushed a commit to branch master. http://git.enlightenment.org/website/www-content.git/commit/?id=4e349eba5e0247383fb07065be94bcbc1d4d97ac commit 4e349eba5e0247383fb07065be94bcbc1d4d97ac Author: Amitesh Singh Date: Wed Nov 4 02:39:35 2015 -0800 Wiki page ecore_events changed with summary [] by Amitesh Singh --- pages/program_guide/event_effect/ecore_events.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/program_guide/event_effect/ecore_events.txt b/pages/program_guide/event_effect/ecore_events.txt index c4ac0fe..eff5717 100644 --- a/pages/program_guide/event_effect/ecore_events.txt +++ b/pages/program_guide/event_effect/ecore_events.txt @@ -227,7 +227,7 @@ _key_down_cb(void *data __UNUSED__, int type __UNUSED__, void *ev) Ecore_Event_Key *event = ev; // Test whether the key that is pressed is Ctrl. - if (!strcmp("Control_L", event->key)) + if (!strcmp("Control_L", event->key)) { // If it is, store that piece of information ctrl_pressed = EINA_TRUE; --
[EGIT] [core/elementary] master 01/01: notify: fix broken timeout feature in elm_notify
ami pushed a commit to branch master. http://git.enlightenment.org/core/elementary.git/commit/?id=e14c12ca6b838622c1607d5a9ed56c94f8d7a8ca commit e14c12ca6b838622c1607d5a9ed56c94f8d7a8ca Author: Amitesh Singh Date: Fri Nov 20 14:26:36 2015 +0530 notify: fix broken timeout feature in elm_notify Add missing signal "elm,action,hide,finished" in notify theme and hide the notify object when hide is finished. fixes T2853 @fix --- data/themes/edc/elm/notify.edc | 4 src/lib/elm_notify.c | 1 + 2 files changed, 5 insertions(+) diff --git a/data/themes/edc/elm/notify.edc b/data/themes/edc/elm/notify.edc index 533ecc7..3c8448b 100644 --- a/data/themes/edc/elm/notify.edc +++ b/data/themes/edc/elm/notify.edc @@ -71,6 +71,10 @@ group { name: "elm/notify/top/default"; target: "clip"; target: "base"; transition: DECELERATE 0.5; + after: "hide_finish"; + } + program { name: "hide_finish"; + action: SIGNAL_EMIT "elm,action,hide,finished" "elm"; } } } diff --git a/src/lib/elm_notify.c b/src/lib/elm_notify.c index 82f98d3..3e78ad9 100644 --- a/src/lib/elm_notify.c +++ b/src/lib/elm_notify.c @@ -431,6 +431,7 @@ _hide_finished_cb(void *data, sd->had_hidden = EINA_TRUE; evas_object_hide(sd->notify); if (!sd->allow_events) evas_object_hide(sd->block_events); + evas_object_hide(data); } EOLIAN static void --
[EGIT] [core/elementary] elementary-1.16 01/01: notify: fix broken timeout feature in elm_notify
ami pushed a commit to branch elementary-1.16. http://git.enlightenment.org/core/elementary.git/commit/?id=81b5ee7e16c37f96e2ac11d13893720bdd637e5c commit 81b5ee7e16c37f96e2ac11d13893720bdd637e5c Author: Amitesh Singh Date: Fri Nov 20 14:26:36 2015 +0530 notify: fix broken timeout feature in elm_notify Add missing signal "elm,action,hide,finished" in notify theme and hide the notify object when hide is finished. fixes T2853 @fix --- data/themes/edc/elm/notify.edc | 4 src/lib/elm_notify.c | 1 + 2 files changed, 5 insertions(+) diff --git a/data/themes/edc/elm/notify.edc b/data/themes/edc/elm/notify.edc index 533ecc7..3c8448b 100644 --- a/data/themes/edc/elm/notify.edc +++ b/data/themes/edc/elm/notify.edc @@ -71,6 +71,10 @@ group { name: "elm/notify/top/default"; target: "clip"; target: "base"; transition: DECELERATE 0.5; + after: "hide_finish"; + } + program { name: "hide_finish"; + action: SIGNAL_EMIT "elm,action,hide,finished" "elm"; } } } diff --git a/src/lib/elm_notify.c b/src/lib/elm_notify.c index 82f98d3..3e78ad9 100644 --- a/src/lib/elm_notify.c +++ b/src/lib/elm_notify.c @@ -431,6 +431,7 @@ _hide_finished_cb(void *data, sd->had_hidden = EINA_TRUE; evas_object_hide(sd->notify); if (!sd->allow_events) evas_object_hide(sd->block_events); + evas_object_hide(data); } EOLIAN static void --
[EGIT] [core/elementary] master 01/01: notify: fix hide animation
ami pushed a commit to branch master. http://git.enlightenment.org/core/elementary.git/commit/?id=1b41b5d096b8847da98e463f625d11fc3fe75671 commit 1b41b5d096b8847da98e463f625d11fc3fe75671 Author: Amitesh Singh Date: Fri Nov 20 16:41:30 2015 +0530 notify: fix hide animation This feature has been added long time ago but it never worked before. I delayed the parent object hide call when hide signal is present in theme. Test: 1. elementary_test -to notify 2. Click Left and wait for timer to expire 3. Click Left and click "close" button on notify. Now hide animation happens when notify hides. @fix --- src/lib/elm_notify.c | 16 +++- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/src/lib/elm_notify.c b/src/lib/elm_notify.c index 3e78ad9..cec6104 100644 --- a/src/lib/elm_notify.c +++ b/src/lib/elm_notify.c @@ -247,7 +247,6 @@ _elm_notify_evas_object_smart_move(Eo *obj, Elm_Notify_Data *sd EINA_UNUSED, Eva static Eina_Bool _timer_cb(void *data) { - const char *hide_signal; Evas_Object *obj = data; ELM_NOTIFY_DATA_GET(obj, sd); @@ -255,16 +254,7 @@ _timer_cb(void *data) sd->timer = NULL; if (!evas_object_visible_get(obj)) goto end; - hide_signal = edje_object_data_get(sd->notify, "hide_finished_signal"); - if ((hide_signal) && (!strcmp(hide_signal, "on"))) - { -sd->in_timeout = EINA_TRUE; -edje_object_signal_emit(sd->notify, "elm,state,hide", "elm"); - } - else //for backport supporting: edc without emitting hide finished signal - { -evas_object_hide(obj); - } + evas_object_hide(obj); eo_do(obj, eo_event_callback_call(ELM_NOTIFY_EVENT_TIMEOUT, NULL)); end: @@ -302,7 +292,6 @@ _elm_notify_evas_object_smart_hide(Eo *obj, Elm_Notify_Data *sd) if (sd->had_hidden && !sd->in_timeout) return; - eo_do_super(obj, MY_CLASS, evas_obj_smart_hide()); hide_signal = edje_object_data_get(sd->notify, "hide_finished_signal"); if ((hide_signal) && (!strcmp(hide_signal, "on"))) @@ -312,6 +301,7 @@ _elm_notify_evas_object_smart_hide(Eo *obj, Elm_Notify_Data *sd) } else //for backport supporting: edc without emitting hide finished signal { +eo_do_super(obj, MY_CLASS, evas_obj_smart_hide()); evas_object_hide(sd->notify); if (sd->allow_events) evas_object_hide(sd->block_events); } @@ -431,7 +421,7 @@ _hide_finished_cb(void *data, sd->had_hidden = EINA_TRUE; evas_object_hide(sd->notify); if (!sd->allow_events) evas_object_hide(sd->block_events); - evas_object_hide(data); + eo_do_super(data, MY_CLASS, evas_obj_smart_hide()); } EOLIAN static void --
[EGIT] [core/elementary] elementary-1.16 01/01: notify: fix hide animation
ami pushed a commit to branch elementary-1.16. http://git.enlightenment.org/core/elementary.git/commit/?id=112abbf507561363a70541d416310b287c138a74 commit 112abbf507561363a70541d416310b287c138a74 Author: Amitesh Singh Date: Fri Nov 20 16:41:30 2015 +0530 notify: fix hide animation This feature has been added long time ago but it never worked before. I delayed the parent object hide call when hide signal is present in theme. Test: 1. elementary_test -to notify 2. Click Left and wait for timer to expire 3. Click Left and click "close" button on notify. Now hide animation happens when notify hides. @fix --- src/lib/elm_notify.c | 16 +++- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/src/lib/elm_notify.c b/src/lib/elm_notify.c index 3e78ad9..cec6104 100644 --- a/src/lib/elm_notify.c +++ b/src/lib/elm_notify.c @@ -247,7 +247,6 @@ _elm_notify_evas_object_smart_move(Eo *obj, Elm_Notify_Data *sd EINA_UNUSED, Eva static Eina_Bool _timer_cb(void *data) { - const char *hide_signal; Evas_Object *obj = data; ELM_NOTIFY_DATA_GET(obj, sd); @@ -255,16 +254,7 @@ _timer_cb(void *data) sd->timer = NULL; if (!evas_object_visible_get(obj)) goto end; - hide_signal = edje_object_data_get(sd->notify, "hide_finished_signal"); - if ((hide_signal) && (!strcmp(hide_signal, "on"))) - { -sd->in_timeout = EINA_TRUE; -edje_object_signal_emit(sd->notify, "elm,state,hide", "elm"); - } - else //for backport supporting: edc without emitting hide finished signal - { -evas_object_hide(obj); - } + evas_object_hide(obj); eo_do(obj, eo_event_callback_call(ELM_NOTIFY_EVENT_TIMEOUT, NULL)); end: @@ -302,7 +292,6 @@ _elm_notify_evas_object_smart_hide(Eo *obj, Elm_Notify_Data *sd) if (sd->had_hidden && !sd->in_timeout) return; - eo_do_super(obj, MY_CLASS, evas_obj_smart_hide()); hide_signal = edje_object_data_get(sd->notify, "hide_finished_signal"); if ((hide_signal) && (!strcmp(hide_signal, "on"))) @@ -312,6 +301,7 @@ _elm_notify_evas_object_smart_hide(Eo *obj, Elm_Notify_Data *sd) } else //for backport supporting: edc without emitting hide finished signal { +eo_do_super(obj, MY_CLASS, evas_obj_smart_hide()); evas_object_hide(sd->notify); if (sd->allow_events) evas_object_hide(sd->block_events); } @@ -431,7 +421,7 @@ _hide_finished_cb(void *data, sd->had_hidden = EINA_TRUE; evas_object_hide(sd->notify); if (!sd->allow_events) evas_object_hide(sd->block_events); - evas_object_hide(data); + eo_do_super(data, MY_CLASS, evas_obj_smart_hide()); } EOLIAN static void --
[EGIT] [core/elementary] master 01/01: notify: remove duplicate call of _sizing_eval.
ami pushed a commit to branch master. http://git.enlightenment.org/core/elementary.git/commit/?id=8eff7ce777b30097e5d135efe5d96ce822d80dfe commit 8eff7ce777b30097e5d135efe5d96ce822d80dfe Author: Amitesh Singh Date: Tue Nov 24 16:28:01 2015 +0530 notify: remove duplicate call of _sizing_eval. we are already calling _sizing_eval() inside _calc(). --- src/lib/elm_notify.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/lib/elm_notify.c b/src/lib/elm_notify.c index cec6104..5014585 100644 --- a/src/lib/elm_notify.c +++ b/src/lib/elm_notify.c @@ -382,7 +382,6 @@ _elm_notify_elm_container_content_set(Eo *obj, Elm_Notify_Data *sd, const char * edje_object_part_swallow(sd->notify, "elm.swallow.content", content); } - _sizing_eval(obj); _calc(obj); return EINA_TRUE; @@ -515,7 +514,6 @@ _elm_notify_elm_widget_parent_set(Eo *obj, Elm_Notify_Data *sd, Evas_Object *par (parent, EVAS_CALLBACK_DEL, _parent_del_cb, obj); evas_object_event_callback_add (parent, EVAS_CALLBACK_HIDE, _parent_hide_cb, obj); -_sizing_eval(obj); } _calc(obj); --
[EGIT] [core/efl] master 01/01: evas_gl_shader: refractor shader/program compile check code.
jpeg pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=cb227cb5fb2c5faba171e923df6c40e5d186c5ec commit cb227cb5fb2c5faba171e923df6c40e5d186c5ec Author: Amitesh Singh Date: Wed Dec 2 16:47:27 2015 +0900 evas_gl_shader: refractor shader/program compile check code. Summary: Call respective shader/program functions on shader/program target only. Reviewers: cedric, raster, wonsik, spacegrapher, jpeg Reviewed By: jpeg Subscribers: alok25, sachin.dev, cedric, seoz Differential Revision: https://phab.enlightenment.org/D3388 --- .../evas/engines/gl_common/evas_gl_shader.c| 33 +- 1 file changed, 13 insertions(+), 20 deletions(-) diff --git a/src/modules/evas/engines/gl_common/evas_gl_shader.c b/src/modules/evas/engines/gl_common/evas_gl_shader.c index 3b7986d..53f045b 100644 --- a/src/modules/evas/engines/gl_common/evas_gl_shader.c +++ b/src/modules/evas/engines/gl_common/evas_gl_shader.c @@ -66,32 +66,25 @@ static const char *_shader_flags[SHADER_FLAG_COUNT] = { static Eina_Bool compiler_released = EINA_FALSE; static void -gl_compile_link_error(GLuint target, const char *action) +gl_compile_link_error(GLuint target, const char *action, Eina_Bool is_shader) { int loglen = 0, chars = 0; char *logtxt; - /* Shader info log */ - glGetShaderiv(target, GL_INFO_LOG_LENGTH, &loglen); - if (loglen > 0) - { -logtxt = calloc(loglen, sizeof(char)); -if (logtxt) - { - glGetShaderInfoLog(target, loglen, &chars, logtxt); - ERR("Failed to %s: %s", action, logtxt); - free(logtxt); - } - } + if (is_shader) + /* Shader info log */ + glGetShaderiv(target, GL_INFO_LOG_LENGTH, &loglen); + else + /* Program info log */ + glGetProgramiv(target, GL_INFO_LOG_LENGTH, &loglen); - /* Program info log */ - glGetProgramiv(target, GL_INFO_LOG_LENGTH, &loglen); if (loglen > 0) { logtxt = calloc(loglen, sizeof(char)); if (logtxt) { - glGetProgramInfoLog(target, loglen, &chars, logtxt); + if (is_shader) glGetShaderInfoLog(target, loglen, &chars, logtxt); + else glGetProgramInfoLog(target, loglen, &chars, logtxt); ERR("Failed to %s: %s", action, logtxt); free(logtxt); } @@ -155,7 +148,7 @@ _evas_gl_common_shader_program_binary_load(Eet_File *ef, unsigned int flags) glGetProgramiv(prg, GL_LINK_STATUS, &ok); if (!ok) { -gl_compile_link_error(prg, "load a program object"); +gl_compile_link_error(prg, "load a program object", EINA_FALSE); ERR("Abort load of program (%s)", pname); glDeleteProgram(prg); glDeleteShader(vtx); @@ -381,7 +374,7 @@ evas_gl_common_shader_compile(unsigned int flags, const char *vertex, glGetShaderiv(vtx, GL_COMPILE_STATUS, &ok); if (!ok) { -gl_compile_link_error(vtx, "compile vertex shader"); +gl_compile_link_error(vtx, "compile vertex shader", EINA_TRUE); ERR("Abort compile of vertex shader:\n%s", vertex); glDeleteShader(vtx); return NULL; @@ -393,7 +386,7 @@ evas_gl_common_shader_compile(unsigned int flags, const char *vertex, glGetShaderiv(frg, GL_COMPILE_STATUS, &ok); if (!ok) { -gl_compile_link_error(frg, "compile fragment shader"); +gl_compile_link_error(frg, "compile fragment shader", EINA_TRUE); ERR("Abort compile of fragment shader:\n%s", fragment); glDeleteShader(vtx); glDeleteShader(frg); @@ -423,7 +416,7 @@ evas_gl_common_shader_compile(unsigned int flags, const char *vertex, glGetProgramiv(prg, GL_LINK_STATUS, &ok); if (!ok) { -gl_compile_link_error(prg, "link fragment and vertex shaders"); +gl_compile_link_error(prg, "link fragment and vertex shaders", EINA_FALSE); ERR("Abort compile of shader (flags: %08x)", flags); glDeleteShader(vtx); glDeleteShader(frg); --
[EGIT] [core/efl] master 01/01: edje: fix edje RTL description in case of custom state of a part
ami pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=59681c331139e4d5424e77ff1614dc47fa8ddd8e commit 59681c331139e4d5424e77ff1614dc47fa8ddd8e Author: Amitesh Singh Date: Thu Dec 3 11:26:10 2015 +0530 edje: fix edje RTL description in case of custom state of a part Summary: In case of RTL, the "custom" state properties does not apply. It happened because we don't copy the latest src to dst in set_state(PART:.., "custom", 0.0); in case of dst is already populated. We should copy the updated src to dst whenever we set the new custom description. @fix Reviewers: cedric, raster, jpeg, zmike, jaehwan Subscribers: kimcinoo, seoz, jpeg Differential Revision: https://phab.enlightenment.org/D3394 --- src/lib/edje/edje_calc.c | 50 ++-- 1 file changed, 48 insertions(+), 2 deletions(-) diff --git a/src/lib/edje/edje_calc.c b/src/lib/edje/edje_calc.c index 763c67b..3eae7e0 100644 --- a/src/lib/edje/edje_calc.c +++ b/src/lib/edje/edje_calc.c @@ -271,6 +271,52 @@ _edje_part_make_rtl(Edje_Part_Description_Common *desc) desc->rel2.id_x = i; } +static Edje_Part_Description_Common * +_edje_get_custom_description_by_orientation(Edje *ed, Edje_Part_Description_Common *src, Edje_Part_Description_Common **dst, unsigned char type) +{ + Edje_Part_Description_Common *ret; + size_t memsize = 0; + + if (!(*dst)) + { +ret = _edje_get_description_by_orientation(ed, src, dst, type); +return ret; + } + +#define POPULATE_MEMSIZE_RTL(Short, Type)\ +case EDJE_PART_TYPE_##Short: \ +{ \ + memsize = sizeof(Edje_Part_Description_##Type);\ + break; \ +} + + switch (type) + { +POPULATE_MEMSIZE_RTL(RECTANGLE, Common); +POPULATE_MEMSIZE_RTL(SNAPSHOT, Snapshot); +POPULATE_MEMSIZE_RTL(SWALLOW, Common); +POPULATE_MEMSIZE_RTL(GROUP, Common); +POPULATE_MEMSIZE_RTL(SPACER, Common); +POPULATE_MEMSIZE_RTL(TEXT, Text); +POPULATE_MEMSIZE_RTL(TEXTBLOCK, Text); +POPULATE_MEMSIZE_RTL(IMAGE, Image); +POPULATE_MEMSIZE_RTL(PROXY, Proxy); +POPULATE_MEMSIZE_RTL(BOX, Box); +POPULATE_MEMSIZE_RTL(TABLE, Table); +POPULATE_MEMSIZE_RTL(EXTERNAL, External); +POPULATE_MEMSIZE_RTL(CAMERA, Camera); +POPULATE_MEMSIZE_RTL(LIGHT, Light); +POPULATE_MEMSIZE_RTL(MESH_NODE, Mesh_Node); + } +#undef POPULATE_MEMSIZE_RTL + + ret = *dst; + memcpy(ret, src, memsize); + _edje_part_make_rtl(ret); + + return ret; +} + /** * Returns part description * @@ -398,8 +444,8 @@ _edje_part_description_find(Edje *ed, Edje_Real_Part *rp, const char *state_name if (!strcmp(state_name, "custom")) return rp->custom ? -_edje_get_description_by_orientation(ed, rp->custom->description, - &rp->custom->description_rtl, ep->type) : NULL; +_edje_get_custom_description_by_orientation(ed, rp->custom->description, + &rp->custom->description_rtl, ep->type) : NULL; if (!strcmp(state_name, "default") && approximate) { --
[EGIT] [core/efl] efl-1.16 01/01: edje: fix edje RTL description in case of custom state of a part
ami pushed a commit to branch efl-1.16. http://git.enlightenment.org/core/efl.git/commit/?id=54afdec666e279fcd8aa8f37d6c6b0195f64e55b commit 54afdec666e279fcd8aa8f37d6c6b0195f64e55b Author: Amitesh Singh Date: Thu Dec 3 11:26:10 2015 +0530 edje: fix edje RTL description in case of custom state of a part Summary: In case of RTL, the "custom" state properties does not apply. It happened because we don't copy the latest src to dst in set_state(PART:.., "custom", 0.0); in case of dst is already populated. We should copy the updated src to dst whenever we set the new custom description. @fix Reviewers: cedric, raster, jpeg, zmike, jaehwan Subscribers: kimcinoo, seoz, jpeg Differential Revision: https://phab.enlightenment.org/D3394 --- src/lib/edje/edje_calc.c | 50 ++-- 1 file changed, 48 insertions(+), 2 deletions(-) diff --git a/src/lib/edje/edje_calc.c b/src/lib/edje/edje_calc.c index 763c67b..3eae7e0 100644 --- a/src/lib/edje/edje_calc.c +++ b/src/lib/edje/edje_calc.c @@ -271,6 +271,52 @@ _edje_part_make_rtl(Edje_Part_Description_Common *desc) desc->rel2.id_x = i; } +static Edje_Part_Description_Common * +_edje_get_custom_description_by_orientation(Edje *ed, Edje_Part_Description_Common *src, Edje_Part_Description_Common **dst, unsigned char type) +{ + Edje_Part_Description_Common *ret; + size_t memsize = 0; + + if (!(*dst)) + { +ret = _edje_get_description_by_orientation(ed, src, dst, type); +return ret; + } + +#define POPULATE_MEMSIZE_RTL(Short, Type)\ +case EDJE_PART_TYPE_##Short: \ +{ \ + memsize = sizeof(Edje_Part_Description_##Type);\ + break; \ +} + + switch (type) + { +POPULATE_MEMSIZE_RTL(RECTANGLE, Common); +POPULATE_MEMSIZE_RTL(SNAPSHOT, Snapshot); +POPULATE_MEMSIZE_RTL(SWALLOW, Common); +POPULATE_MEMSIZE_RTL(GROUP, Common); +POPULATE_MEMSIZE_RTL(SPACER, Common); +POPULATE_MEMSIZE_RTL(TEXT, Text); +POPULATE_MEMSIZE_RTL(TEXTBLOCK, Text); +POPULATE_MEMSIZE_RTL(IMAGE, Image); +POPULATE_MEMSIZE_RTL(PROXY, Proxy); +POPULATE_MEMSIZE_RTL(BOX, Box); +POPULATE_MEMSIZE_RTL(TABLE, Table); +POPULATE_MEMSIZE_RTL(EXTERNAL, External); +POPULATE_MEMSIZE_RTL(CAMERA, Camera); +POPULATE_MEMSIZE_RTL(LIGHT, Light); +POPULATE_MEMSIZE_RTL(MESH_NODE, Mesh_Node); + } +#undef POPULATE_MEMSIZE_RTL + + ret = *dst; + memcpy(ret, src, memsize); + _edje_part_make_rtl(ret); + + return ret; +} + /** * Returns part description * @@ -398,8 +444,8 @@ _edje_part_description_find(Edje *ed, Edje_Real_Part *rp, const char *state_name if (!strcmp(state_name, "custom")) return rp->custom ? -_edje_get_description_by_orientation(ed, rp->custom->description, - &rp->custom->description_rtl, ep->type) : NULL; +_edje_get_custom_description_by_orientation(ed, rp->custom->description, + &rp->custom->description_rtl, ep->type) : NULL; if (!strcmp(state_name, "default") && approximate) { --
[EGIT] [core/efl] master 01/01: edje: calc - remove pointer comparison while finding part desc
ami pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=c892a1cb714fed496cbf5568c4d43880b6fb67b2 commit c892a1cb714fed496cbf5568c4d43880b6fb67b2 Author: Amitesh Singh Date: Wed Dec 9 15:46:41 2015 +0530 edje: calc - remove pointer comparison while finding part desc Only strcmp comparision is realiable. @fix --- src/lib/edje/edje_calc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/lib/edje/edje_calc.c b/src/lib/edje/edje_calc.c index b0742cf..c06e3ac 100644 --- a/src/lib/edje/edje_calc.c +++ b/src/lib/edje/edje_calc.c @@ -460,8 +460,7 @@ _edje_part_description_find(Edje *ed, Edje_Real_Part *rp, const char *state_name { d = ep->other.desc[i]; -if (d->state.name && (d->state.name == state_name || - !strcmp(d->state.name, state_name))) +if (d->state.name && (!strcmp(d->state.name, state_name))) { if (!approximate) { --
[EGIT] [core/efl] master 01/01: edje: calc - add curly braces to avoid ambiguous 'if'
ami pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=4cebfc526fb845ea1484763f190bd99786722232 commit 4cebfc526fb845ea1484763f190bd99786722232 Author: Amitesh Singh Date: Wed Dec 9 15:55:59 2015 +0530 edje: calc - add curly braces to avoid ambiguous 'if' merge two if conditions into one also. --- src/lib/edje/edje_calc.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/lib/edje/edje_calc.c b/src/lib/edje/edje_calc.c index c06e3ac..ff2146d 100644 --- a/src/lib/edje/edje_calc.c +++ b/src/lib/edje/edje_calc.c @@ -432,11 +432,12 @@ _edje_part_description_find(Edje *ed, Edje_Real_Part *rp, const char *state_name unsigned int i; /* RTL flag is set, return RTL description */ - if (edje_object_mirrored_get(ed->obj)) - if (!ep->other.desc_rtl) - ep->other.desc_rtl = (Edje_Part_Description_Common **) - calloc(ep->other.desc_count, -sizeof (Edje_Part_Description_Common *)); + if (edje_object_mirrored_get(ed->obj) && !ep->other.desc_rtl) + { +ep->other.desc_rtl = (Edje_Part_Description_Common **) + calloc(ep->other.desc_count, + sizeof (Edje_Part_Description_Common *)); + } if (!strcmp(state_name, "default") && state_val == 0.0) return _edje_get_description_by_orientation(ed, --
[EGIT] [core/efl] master 01/01: Revert "edje: calc - remove pointer comparison while finding part desc"
ami pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=18b66a319211e47265094c9466eda4c816db38e5 commit 18b66a319211e47265094c9466eda4c816db38e5 Author: Amitesh Singh Date: Wed Dec 9 21:29:42 2015 +0530 Revert "edje: calc - remove pointer comparison while finding part desc" This reverts commit c892a1cb714fed496cbf5568c4d43880b6fb67b2. --- src/lib/edje/edje_calc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lib/edje/edje_calc.c b/src/lib/edje/edje_calc.c index ff2146d..0505580 100644 --- a/src/lib/edje/edje_calc.c +++ b/src/lib/edje/edje_calc.c @@ -461,7 +461,8 @@ _edje_part_description_find(Edje *ed, Edje_Real_Part *rp, const char *state_name { d = ep->other.desc[i]; -if (d->state.name && (!strcmp(d->state.name, state_name))) +if (d->state.name && (d->state.name == state_name || + !strcmp(d->state.name, state_name))) { if (!approximate) { --
[EGIT] [core/elementary] master 01/01: theme: popup - use aliases instead for subpopup groups
ami pushed a commit to branch master. http://git.enlightenment.org/core/elementary.git/commit/?id=b9750b79e047d838ec2de5af12b7140b6d4bc256 commit b9750b79e047d838ec2de5af12b7140b6d4bc256 Author: Amitesh Singh Date: Fri Jul 17 22:11:20 2015 +0530 theme: popup - use aliases instead for subpopup groups Use aliases for subpopup's content,buttons{1,2,3} groups and it reduces theme file size by 4Kb (default.edj, 5680kb to 5676Kb). --- data/themes/edc/elm/popup.edc | 20 +--- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/data/themes/edc/elm/popup.edc b/data/themes/edc/elm/popup.edc index 298c470..2ac2594 100644 --- a/data/themes/edc/elm/popup.edc +++ b/data/themes/edc/elm/popup.edc @@ -366,6 +366,7 @@ group { name: "elm/popup/base/default"; group { name: "elm/popup/content/popup/default"; alias: "elm/popup/content/popup/transparent"; + alias: "elm/popup/content/popup/subpopup"; parts { part { name:"elm.swallow.content"; type: SWALLOW; description { state: "default" 0.0; @@ -377,6 +378,7 @@ group { name: "elm/popup/content/popup/default"; group { name: "elm/popup/buttons1/popup/default"; alias: "elm/popup/buttons1/popup/transparent"; + alias: "elm/popup/buttons1/popup/subpopup"; data.item: "action_area_height" "80"; parts { part { name:"elm.swallow.content.button1"; type: SWALLOW; @@ -388,6 +390,7 @@ group { name: "elm/popup/buttons1/popup/default"; group { name: "elm/popup/buttons2/popup/default"; alias: "elm/popup/buttons2/popup/transparent"; + alias: "elm/popup/buttons2/popup/subpopup"; data.item: "action_area_height" "80"; parts{ part{ name:"elm.swallow.content.button1"; type: SWALLOW; @@ -404,7 +407,8 @@ group { name: "elm/popup/buttons2/popup/default"; } group { name: "elm/popup/buttons3/popup/default"; - alias: "elm/popup/buttons3/popup/transparent"; + alias: "elm/popup/buttons3/popup/transparent"; + alias: "elm/popup/buttons3/popup/subpopup"; data.item: "action_area_height" "80"; parts{ part{ name:"elm.swallow.content.button1"; type: SWALLOW; @@ -484,17 +488,3 @@ group { name: "elm/popup/base/subpopup"; } } } - -group { name: "elm/popup/content/popup/subpopup"; - inherit: "elm/popup/content/popup/default"; -} - -group { name: "elm/popup/buttons1/popup/subpopup"; - inherit: "elm/popup/buttons1/popup/default"; -} -group { name: "elm/popup/buttons2/popup/subpopup"; - inherit: "elm/popup/buttons2/popup/default"; -} -group { name: "elm/popup/buttons3/popup/subpopup"; - inherit: "elm/popup/buttons3/popup/default"; -} --
[EGIT] [core/elementary] master 01/01: popup: fix title icon to show up.
ami pushed a commit to branch master. http://git.enlightenment.org/core/elementary.git/commit/?id=2f70b4f5e5e299e66df2f69dbd030efe5ad3edbf commit 2f70b4f5e5e299e66df2f69dbd030efe5ad3edbf Author: Amitesh Singh Date: Sat Jul 18 14:58:25 2015 +0530 popup: fix title icon to show up. Title icon of popup is not getting shown. steps to reproduce: 1. elementary_test -to "popup" 2. click "popup bottom title + text + 3 buttons" In the test popup example, the initial parent of icon is popup. The title_icon is reset to null while adjusting elm parent from popup to main_layout (elm_widget_sub_object_add which calls sub_object_del of popup) on swallowing icon to main_layout. Resolves: T2581 @fix --- src/lib/elc_popup.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/lib/elc_popup.c b/src/lib/elc_popup.c index 12331fd..e48ab0f 100644 --- a/src/lib/elc_popup.c +++ b/src/lib/elc_popup.c @@ -439,7 +439,6 @@ _elm_popup_elm_widget_sub_object_del(Eo *obj, Elm_Popup_Data *sd, Evas_Object *s if (sobj == sd->title_icon) { elm_layout_signal_emit(sd->main_layout, "elm,state,title,icon,hidden", "elm"); -sd->title_icon = NULL; } else if ((it = evas_object_data_get(sobj, "_popup_icon_parent_item")) != NULL) --
[EGIT] [core/elementary] master 01/01: test_popup: include icon text in title-icon example
ami pushed a commit to branch master. http://git.enlightenment.org/core/elementary.git/commit/?id=fb6096ca306d7c5d38fb944d928f835043fcba35 commit fb6096ca306d7c5d38fb944d928f835043fcba35 Author: Amitesh Singh Date: Sat Jul 18 15:49:48 2015 +0530 test_popup: include icon text in title-icon example --- src/bin/test_popup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bin/test_popup.c b/src/bin/test_popup.c index fec2abb..b919545 100644 --- a/src/bin/test_popup.c +++ b/src/bin/test_popup.c @@ -757,7 +757,7 @@ test_popup(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, "popup-center-title + text (block,clicked handling with parent)", NULL, NULL, _popup_center_title_text_block_clicked_event_with_parent_cb, win); - elm_list_item_append(list, "popup-bottom-title + text + 3 buttons", NULL, + elm_list_item_append(list, "popup-bottom-title-icon + text + 3 buttons", NULL, NULL, _popup_bottom_title_text_3button_cb, win); elm_list_item_append(list, "popup-center-title + content + 3 buttons", NULL, NULL, _popup_center_title_content_3button_cb, win); --
[EGIT] [website/www-content] master 01/01: Wiki page docs changed with summary [] by Amitesh Singh
WWW-www.enlightenment.org pushed a commit to branch master. http://git.enlightenment.org/website/www-content.git/commit/?id=82915f073d137ef9d7dad7937dd50076ee9ed550 commit 82915f073d137ef9d7dad7937dd50076ee9ed550 Author: Amitesh Singh Date: Sat Jul 18 08:12:15 2015 -0700 Wiki page docs changed with summary [] by Amitesh Singh --- pages/docs.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pages/docs.txt b/pages/docs.txt index c6fad00..7572f1a 100644 --- a/pages/docs.txt +++ b/pages/docs.txt @@ -45,6 +45,7 @@ Go check the current available version of EFL on each distro/platform: * [[tutorial/panes_tutorial|Panes Tutorial]] * [[tutorial/form_tutorial|Form Tutorial]] * [[tutorial/naviframe_tutorial|Naviframe Tutorial]] + * [[tutorial/popup_tutorial|Popup Tutorial]] @@ -63,4 +64,4 @@ improving our API references a lot. * [[https://build.enlightenment.org/job/nightly_efl_gcc_x86_64/lastSuccessfulBuild/artifact/doc/html/index.html|EFL]] * [[https://build.enlightenment.org/job/nightly_elm_gcc_x86_64/lastSuccessfulBuild/artifact/doc/html/index.html|Elementary]] - * [[https://build.enlightenment.org/job/base_pyefl_build/lastSuccessfulBuild/artifact/build/sphinx/html/index.html|Python Bindings]] + * [[https://build.enlightenment.org/job/base_pyefl_build/lastSuccessfulBuild/artifact/build/sphinx/html/index.html|Python Bindings]] \ No newline at end of file --
[EGIT] [website/www-content] master 01/01: Wiki page popup_tutorial changed with summary [created] by Amitesh Singh
WWW-www.enlightenment.org pushed a commit to branch master. http://git.enlightenment.org/website/www-content.git/commit/?id=276f5ae69c9ccc3f526afb236b79fdc608cb9da1 commit 276f5ae69c9ccc3f526afb236b79fdc608cb9da1 Author: Amitesh Singh Date: Sat Jul 18 08:21:49 2015 -0700 Wiki page popup_tutorial changed with summary [created] by Amitesh Singh --- pages/tutorial/popup_tutorial.txt | 248 ++ 1 file changed, 248 insertions(+) diff --git a/pages/tutorial/popup_tutorial.txt b/pages/tutorial/popup_tutorial.txt new file mode 100644 index 000..c15d6d5 --- /dev/null +++ b/pages/tutorial/popup_tutorial.txt @@ -0,0 +1,248 @@ +~~Title: Popup Tutorial~~ + Popup Tutorial + +This tutorial explains how to use Popup in the application. + +=== Table of Contents === + + * [[#Initializing_the_Application|Initializing the Application]] + * [[#Creating_a_Popup_Widget|Creating a Popup Widget]] + +A popup example : {{ :panes.png?direct |list}} + +//**__The whole code__ : **//{{/code_c/tutorial/popup/popup.c}} + + +=== Initializing the Application === + +The code below shows a typical elementary application that creates a window +entitled "Popup Tutorial" and a button which opens up popup on click. + +#include + +EAPI_MAIN int +elm_main(int argc, char **argv) +{ + Evas_Object *win, *btn; + + win = elm_win_util_standard_add("Popup", "Popup Tutorial"); + elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED); + elm_win_autodel_set(win, EINA_TRUE); + //win 400x400 px + evas_object_resize(win, 400, 400); + + btn = elm_button_add(win); + elm_object_text_set(btn, "popup"); + evas_object_resize(btn, 100, 50); + evas_object_move(btn, 150, 150); + evas_object_show(btn); + evas_object_smart_callback_add(btn, "clicked", _btn_click_cb, win); + + evas_object_show(win); + elm_run(); + return 0; +} +ELM_MAIN() + + +=== Creating a popup Widget === + +The elm_panes widget adds a draggable bar between two contents. When dragged, +this bar resizes the contents. To create a new Panes into an Elementary +object, use the ''elm_panes_add()'' function: + + +// Add an elm_panes +Evas_Object *panes; +panes = elm_panes_add(win); +evas_object_size_hint_weight_set(panes, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); +elm_win_resize_object_add(win, panes); +evas_object_show(panes); + + +=== Configure the Panes === + +By default, the orientation of the Panes is vertical. To modify the +orientation, use the ''elm_panes_horizontal_set()'' function. + + +Evas_Object *panes_h; +// Add a horizontal elm_panes +panes_h = elm_panes_add(win); +elm_panes_horizontal_set(panes_h, EINA_TRUE); + + +The code above creates another Panes object and sets the horizontal +orientation. To add content in a panes, use the +''elm_object_part_content_set()'' function. Here we add the horizontal Panes +''panes_h'' to the "left" part of the first Panes ''panes'' created. + + +elm_object_part_content_set(panes, "left", panes_h); + + +This is how to set a button object to the "right" side of our vertical Panes +widget. + + +// Create a button object +bt = elm_button_add(win); +elm_object_text_set(bt, "Right"); +evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); +evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL); +evas_object_show(bt); + +// and set it to the "right" part of the vertical Panes +elm_object_part_content_set(panes, "right", bt); + + +The content of the horizontal Panes is set with two button objects (up and +down). When populating a vertically displayed Panes, the left content is +placed at the top, and the right content is placed at the bottom. + + +// Create a "Up" button +bt = elm_button_add(win); +elm_object_text_set(bt, "Up"); +evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); +evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL); +evas_object_show(bt); +elm_object_part_content_set(panes_h, "left", bt); + +// Create a "Down" button +bt = elm_button_add(win); +elm_object_text_set(bt, "Down"); +evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); +evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL); +evas_object_show(bt); +elm_object_part_content_set(panes_h, "right", bt); + + +The elm_panes can be dragged with the mouse but the proportion can also be set +with the ''elm_panes_content_left_size_set()'' and +''elm_panes_content_right_size_set()'' functions. As an example, this is how to +set the left size of both panes to 80%. + + +// Set the proportion of the panes to 80% +elm_panes_content_left_size_set(panes, 0.8); +elm_panes_content_l
[EGIT] [website/www-content] master 01/01: Wiki page popup_tutorial changed with summary [] by Amitesh Singh
WWW-www.enlightenment.org pushed a commit to branch master. http://git.enlightenment.org/website/www-content.git/commit/?id=1ab2d2dac481ff6135e588cc546a609f55fbc07e commit 1ab2d2dac481ff6135e588cc546a609f55fbc07e Author: Amitesh Singh Date: Sat Jul 18 08:40:42 2015 -0700 Wiki page popup_tutorial changed with summary [] by Amitesh Singh --- pages/tutorial/popup_tutorial.txt | 217 -- 1 file changed, 23 insertions(+), 194 deletions(-) diff --git a/pages/tutorial/popup_tutorial.txt b/pages/tutorial/popup_tutorial.txt index c15d6d5..979491d 100644 --- a/pages/tutorial/popup_tutorial.txt +++ b/pages/tutorial/popup_tutorial.txt @@ -8,7 +8,7 @@ This tutorial explains how to use Popup in the application. * [[#Initializing_the_Application|Initializing the Application]] * [[#Creating_a_Popup_Widget|Creating a Popup Widget]] -A popup example : {{ :panes.png?direct |list}} +A popup example : {{ :popup.png?direct |list}} //**__The whole code__ : **//{{/code_c/tutorial/popup/popup.c}} @@ -20,6 +20,13 @@ entitled "Popup Tutorial" and a button which opens up popup on click. #include +static void +_btn_click_cb(void *data, Evas_Object *objEINA_UNUSED, + void *event_info EINA_UNUSED) +{ + //popup code here +} + EAPI_MAIN int elm_main(int argc, char **argv) { @@ -46,203 +53,25 @@ ELM_MAIN() === Creating a popup Widget === - -The elm_panes widget adds a draggable bar between two contents. When dragged, -this bar resizes the contents. To create a new Panes into an Elementary -object, use the ''elm_panes_add()'' function: +This widget is an enhancement of Notify. In addition to content area, there are two optional sections, namely title area and action area. -// Add an elm_panes -Evas_Object *panes; -panes = elm_panes_add(win); -evas_object_size_hint_weight_set(panes, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); -elm_win_resize_object_add(win, panes); -evas_object_show(panes); - + // Add an elm popup + Evas_Object *popup; + Evas_Object *btn; -=== Configure the Panes === + popup = elm_popup_add(data); + elm_object_text_set(popup, "This Popup has content area and " + "action area set, action area has one button Close"); -By default, the orientation of the Panes is vertical. To modify the -orientation, use the ''elm_panes_horizontal_set()'' function. + // popup buttons + btn = elm_button_add(popup); + elm_object_text_set(btn, "Close"); + elm_object_part_content_set(popup, "button1", btn); + evas_object_smart_callback_add(btn, "clicked", _popup_close_cb, popup); - -Evas_Object *panes_h; -// Add a horizontal elm_panes -panes_h = elm_panes_add(win); -elm_panes_horizontal_set(panes_h, EINA_TRUE); - - -The code above creates another Panes object and sets the horizontal -orientation. To add content in a panes, use the -''elm_object_part_content_set()'' function. Here we add the horizontal Panes -''panes_h'' to the "left" part of the first Panes ''panes'' created. - - -elm_object_part_content_set(panes, "left", panes_h); - - -This is how to set a button object to the "right" side of our vertical Panes -widget. - - -// Create a button object -bt = elm_button_add(win); -elm_object_text_set(bt, "Right"); -evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); -evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL); -evas_object_show(bt); - -// and set it to the "right" part of the vertical Panes -elm_object_part_content_set(panes, "right", bt); - - -The content of the horizontal Panes is set with two button objects (up and -down). When populating a vertically displayed Panes, the left content is -placed at the top, and the right content is placed at the bottom. - - -// Create a "Up" button -bt = elm_button_add(win); -elm_object_text_set(bt, "Up"); -evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); -evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL); -evas_object_show(bt); -elm_object_part_content_set(panes_h, "left", bt); - -// Create a "Down" button -bt = elm_button_add(win); -elm_object_text_set(bt, "Down"); -evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); -evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL); -evas_object_show(bt); -elm_object_part_content_set(panes_h, "right", bt); - - -The elm_panes can be dragged with the mouse but the proportion can also be set -with the ''elm_panes_content_left_size_set()'' and -''elm_panes_content_right_size_set()'' functions. As an example, this is how to -set the left size of both panes to 80%. - - -// Set the proportion
[EGIT] [website/www-content] master 01/01: Wiki page popup_tutorial changed with summary [] by Amitesh Singh
WWW-www.enlightenment.org pushed a commit to branch master. http://git.enlightenment.org/website/www-content.git/commit/?id=62ee5d6e5c9f5d07bea01d838bf8b326e0936276 commit 62ee5d6e5c9f5d07bea01d838bf8b326e0936276 Author: Amitesh Singh Date: Sat Jul 18 08:45:36 2015 -0700 Wiki page popup_tutorial changed with summary [] by Amitesh Singh --- pages/tutorial/popup_tutorial.txt | 15 ++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/pages/tutorial/popup_tutorial.txt b/pages/tutorial/popup_tutorial.txt index 979491d..b6d249d 100644 --- a/pages/tutorial/popup_tutorial.txt +++ b/pages/tutorial/popup_tutorial.txt @@ -21,7 +21,7 @@ entitled "Popup Tutorial" and a button which opens up popup on click. #include static void -_btn_click_cb(void *data, Evas_Object *objEINA_UNUSED, +_btn_click_cb(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED) { //popup code here @@ -56,6 +56,19 @@ ELM_MAIN() This widget is an enhancement of Notify. In addition to content area, there are two optional sections, namely title area and action area. +static void +_popup_close_cb(void *data, Evas_Object *obj EINA_UNUSED, +void *event_info EINA_UNUSED) +{ + Evas_Object *popup = data; + //delete popup + evas_object_del(popup); +} + +static void +_btn_click_cb(void *data, Evas_Object *obj EINA_UNUSED, + void *event_info EINA_UNUSED) +{ // Add an elm popup Evas_Object *popup; Evas_Object *btn; --
[EGIT] [website/www-content] master 01/01: Wiki page popup_tutorial changed with summary [] by Amitesh Singh
WWW-www.enlightenment.org pushed a commit to branch master. http://git.enlightenment.org/website/www-content.git/commit/?id=79550d0c5b2ac7a2cc338d32186da28d9dfbad5d commit 79550d0c5b2ac7a2cc338d32186da28d9dfbad5d Author: Amitesh Singh Date: Sat Jul 18 08:49:20 2015 -0700 Wiki page popup_tutorial changed with summary [] by Amitesh Singh --- pages/tutorial/popup_tutorial.txt | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pages/tutorial/popup_tutorial.txt b/pages/tutorial/popup_tutorial.txt index b6d249d..4ee77e1 100644 --- a/pages/tutorial/popup_tutorial.txt +++ b/pages/tutorial/popup_tutorial.txt @@ -7,6 +7,7 @@ This tutorial explains how to use Popup in the application. * [[#Initializing_the_Application|Initializing the Application]] * [[#Creating_a_Popup_Widget|Creating a Popup Widget]] + * [[#Creating_a_Custom_Popup|Creating a Custop Popup]] A popup example : {{ :popup.png?direct |list}} @@ -52,7 +53,7 @@ elm_main(int argc, char **argv) ELM_MAIN() -=== Creating a popup Widget === +=== Creating a Popup Widget === This widget is an enhancement of Notify. In addition to content area, there are two optional sections, namely title area and action area. @@ -88,3 +89,7 @@ _btn_click_cb(void *data, Evas_Object *obj EINA_UNUSED, evas_object_show(popup); } + +=== Creating a Custom Popup === + +TODO \ No newline at end of file --
[EGIT] [website/www-content] master 01/01: popup tutorial: added sample code.
ami pushed a commit to branch master. http://git.enlightenment.org/website/www-content.git/commit/?id=1ab8ecde0289c2c423191b95ccaeccf14cdfa36a commit 1ab8ecde0289c2c423191b95ccaeccf14cdfa36a Author: Amitesh Singh Date: Sat Jul 18 21:38:24 2015 +0530 popup tutorial: added sample code. --- media/code_c/tutorial/popup/popup.c | 57 + 1 file changed, 57 insertions(+) diff --git a/media/code_c/tutorial/popup/popup.c b/media/code_c/tutorial/popup/popup.c new file mode 100644 index 000..896397b --- /dev/null +++ b/media/code_c/tutorial/popup/popup.c @@ -0,0 +1,57 @@ +#include + +static void +_popup_close_cb(void *data, Evas_Object *obj EINA_UNUSED, +void *event_info EINA_UNUSED) +{ + Evas_Object *popup = data; + //delete popup + evas_object_del(popup); +} + +static void +_btn_click_cb(void *data, Evas_Object *obj EINA_UNUSED, + void *event_info EINA_UNUSED) +{ + // Add an elm popup + Evas_Object *popup; + Evas_Object *btn; + + popup = elm_popup_add(data); + elm_object_text_set(popup, "This Popup has content area and " + "action area set, action area has one button Close"); + + // popup buttons + btn = elm_button_add(popup); + elm_object_text_set(btn, "Close"); + elm_object_part_content_set(popup, "button1", btn); + evas_object_smart_callback_add(btn, "clicked", _popup_close_cb, popup); + + // popup show should be called after adding all the contents and the buttons + // of popup to set the focus into popup's contents correctly. + evas_object_show(popup); +} + +EAPI_MAIN int +elm_main(int argc, char **argv) +{ + Evas_Object *win, *btn; + + win = elm_win_util_standard_add("Popup", "Popup Tutorial"); + elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED); + elm_win_autodel_set(win, EINA_TRUE); + //win 400x400 px + evas_object_resize(win, 400, 400); + + btn = elm_button_add(win); + elm_object_text_set(btn, "popup"); + evas_object_resize(btn, 100, 50); + evas_object_move(btn, 150, 150); + evas_object_show(btn); + evas_object_smart_callback_add(btn, "clicked", _btn_click_cb, win); + + evas_object_show(win); + elm_run(); + return 0; +} +ELM_MAIN() --
[EGIT] [website/www-content] master 01/01: popup tutorial: push popup screenshot image.
ami pushed a commit to branch master. http://git.enlightenment.org/website/www-content.git/commit/?id=25430abfb5433aec2684743cc9977eab284fa984 commit 25430abfb5433aec2684743cc9977eab284fa984 Author: Amitesh Singh Date: Sat Jul 18 21:59:06 2015 +0530 popup tutorial: push popup screenshot image. --- media/popup.png | Bin 0 -> 4612 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/media/popup.png b/media/popup.png new file mode 100644 index 000..e6b1137 Binary files /dev/null and b/media/popup.png differ --
[EGIT] [website/www-content] master 01/01: Wiki page popup_tutorial changed with summary [] by Amitesh Singh
WWW-www.enlightenment.org pushed a commit to branch master. http://git.enlightenment.org/website/www-content.git/commit/?id=6f3083c092a2d84f450e1ca6a2bafb2a3f925765 commit 6f3083c092a2d84f450e1ca6a2bafb2a3f925765 Author: Amitesh Singh Date: Sat Jul 18 21:23:19 2015 -0700 Wiki page popup_tutorial changed with summary [] by Amitesh Singh --- pages/tutorial/popup_tutorial.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pages/tutorial/popup_tutorial.txt b/pages/tutorial/popup_tutorial.txt index 4ee77e1..ec62ee5 100644 --- a/pages/tutorial/popup_tutorial.txt +++ b/pages/tutorial/popup_tutorial.txt @@ -7,7 +7,7 @@ This tutorial explains how to use Popup in the application. * [[#Initializing_the_Application|Initializing the Application]] * [[#Creating_a_Popup_Widget|Creating a Popup Widget]] - * [[#Creating_a_Custom_Popup|Creating a Custop Popup]] + * [[#Creating_a_Custom_Popup|Creating a Custom Popup]] A popup example : {{ :popup.png?direct |list}} @@ -70,10 +70,10 @@ static void _btn_click_cb(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED) { - // Add an elm popup Evas_Object *popup; Evas_Object *btn; - + + // Add an elm popup popup = elm_popup_add(data); elm_object_text_set(popup, "This Popup has content area and " "action area set, action area has one button Close"); --
[EGIT] [core/elementary] master 01/01: tooltip: no need to show content object of tooltip
ami pushed a commit to branch master. http://git.enlightenment.org/core/elementary.git/commit/?id=9b707c6db8e6fd9ffc38cbe10331d0a0f97d1f5b commit 9b707c6db8e6fd9ffc38cbe10331d0a0f97d1f5b Author: Amitesh Singh Date: Mon Jul 20 20:55:35 2015 +0530 tooltip: no need to show content object of tooltip content object visibility will be controlled by tooltip edje object. --- src/lib/els_tooltip.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/lib/els_tooltip.c b/src/lib/els_tooltip.c index 939366a..9b0193e 100644 --- a/src/lib/els_tooltip.c +++ b/src/lib/els_tooltip.c @@ -366,7 +366,6 @@ _elm_tooltip_reconfigure(Elm_Tooltip *tt) tt->tooltip = NULL; return; } -evas_object_show(tt->content); evas_object_pass_events_set(tt->content, EINA_TRUE); edje_object_part_swallow (tt->tooltip, "elm.swallow.content", tt->content); --
[EGIT] [core/elementary] master 01/01: test: elm_prefs_cc - use eina_environment_tmp_get() instead of getenv("TMPDIR")
ami pushed a commit to branch master. http://git.enlightenment.org/core/elementary.git/commit/?id=161516b055488913cb47598a882728b0c0d8edc5 commit 161516b055488913cb47598a882728b0c0d8edc5 Author: Amitesh Singh Date: Wed Jul 22 22:52:39 2015 +0530 test: elm_prefs_cc - use eina_environment_tmp_get() instead of getenv("TMPDIR") --- src/bin/elm_prefs_cc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bin/elm_prefs_cc.c b/src/bin/elm_prefs_cc.c index 3888b67..5abccec 100644 --- a/src/bin/elm_prefs_cc.c +++ b/src/bin/elm_prefs_cc.c @@ -102,7 +102,7 @@ main(int argc, char **argv) progname = ecore_file_file_get(argv[0]); eina_log_print_cb_set(_elm_prefs_cc_log_cb, NULL); - tmp_dir = getenv("TMPDIR"); + tmp_dir = eina_environment_tmp_get(); for (i = 1; i < argc; i++) { --
[EGIT] [core/elementary] master 01/01: hoversel: use elm_object_focus_set to set focus on subobjects.
ami pushed a commit to branch master. http://git.enlightenment.org/core/elementary.git/commit/?id=1087d34a1a8aaadc8cb131100c34300b08ecf9aa commit 1087d34a1a8aaadc8cb131100c34300b08ecf9aa Author: Amitesh Singh Date: Thu Jul 30 16:10:47 2015 +0530 hoversel: use elm_object_focus_set to set focus on subobjects. We should steal the focus while setting focus to subobjects from parent. This issue is reproducable in case of setting focus on one of items of hoversel on expanded cb of hoversel. @fix --- src/lib/elc_hoversel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/elc_hoversel.c b/src/lib/elc_hoversel.c index 393be05..d49dce2 100644 --- a/src/lib/elc_hoversel.c +++ b/src/lib/elc_hoversel.c @@ -284,7 +284,7 @@ _elm_hoversel_item_elm_widget_item_focus_set(Eo *eo_it EINA_UNUSED, Elm_Hoversel_Item_Data *it, Eina_Bool focused) { - elm_widget_focus_set(VIEW(it), focused); + elm_object_focus_set(VIEW(it), focused); } EOLIAN static Eina_Bool --
[EGIT] [core/elementary] master 01/01: test_hoversel: add example of setting focus to item
ami pushed a commit to branch master. http://git.enlightenment.org/core/elementary.git/commit/?id=644b4b5318fc2c2259fbf7d1806bbe12e1ed76e4 commit 644b4b5318fc2c2259fbf7d1806bbe12e1ed76e4 Author: Amitesh Singh Date: Fri Jul 31 09:18:23 2015 +0530 test_hoversel: add example of setting focus to item --- src/bin/test_hoversel.c | 16 ++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/src/bin/test_hoversel.c b/src/bin/test_hoversel.c index c638838..9e35332 100644 --- a/src/bin/test_hoversel.c +++ b/src/bin/test_hoversel.c @@ -292,11 +292,21 @@ _item_unfocused_cb(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *e printf("item,unfocused: %p\n", it); } +static void +_hoversel_expanded_cb2(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED) +{ + Elm_Object_Item *it = data; + + printf("expanded\n"); + elm_object_item_focus_set(it, EINA_TRUE); + printf("focus set to item: %p\n", it); +} void test_hoversel_focus(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED) { Evas_Object *win, *bx, *hoversel; + Elm_Object_Item *it; win = elm_win_util_standard_add("hoversel focus", "Hoversel Focus"); elm_win_focus_highlight_enabled_set(win, EINA_TRUE); @@ -347,8 +357,8 @@ test_hoversel_focus(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void * elm_object_text_set(hoversel, "Icons"); elm_hoversel_item_add(hoversel, "Item 1", "apps", ELM_ICON_STANDARD, NULL, NULL); - elm_hoversel_item_add(hoversel, "Item 2", "arrow_down", ELM_ICON_STANDARD, - NULL, NULL); + it = elm_hoversel_item_add(hoversel, "Item 2", "arrow_down", ELM_ICON_STANDARD, + NULL, NULL); elm_hoversel_item_add(hoversel, "Item 3", "home", ELM_ICON_STANDARD, NULL, NULL); elm_hoversel_item_add(hoversel, "Item 4", "close", ELM_ICON_STANDARD, NULL, @@ -357,6 +367,8 @@ test_hoversel_focus(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void * evas_object_show(hoversel); evas_object_smart_callback_add(hoversel, "item,focused", _item_focused_cb, NULL); evas_object_smart_callback_add(hoversel, "item,unfocused", _item_unfocused_cb, NULL); + evas_object_smart_callback_add(hoversel, "expanded", + _hoversel_expanded_cb2, it); evas_object_resize(win, 320, 500); evas_object_show(win); --
[EGIT] [core/elementary] master 01/01: cnp: use ELM_SAFE_FREE
ami pushed a commit to branch master. http://git.enlightenment.org/core/elementary.git/commit/?id=5e32c6927a583b7e4ebd412dfd9b9e123d01d1c3 commit 5e32c6927a583b7e4ebd412dfd9b9e123d01d1c3 Author: Amitesh Singh Date: Fri Jul 31 11:12:53 2015 +0530 cnp: use ELM_SAFE_FREE --- src/lib/elm_cnp.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/lib/elm_cnp.c b/src/lib/elm_cnp.c index 0557928..7c08b3f 100644 --- a/src/lib/elm_cnp.c +++ b/src/lib/elm_cnp.c @@ -3693,8 +3693,7 @@ _elm_cnp_shutdown(void) if (--_elm_cnp_init_count > 0) return EINA_TRUE; eina_stringshare_del(text_uri); text_uri = NULL; - eina_hash_free(_types_hash); - _types_hash = NULL; + ELM_SAFE_FREE(_types_hash, eina_hash_free); return EINA_TRUE; } --
[EGIT] [core/elementary] master 01/01: test_disable: rename window name & title according to test name
ami pushed a commit to branch master. http://git.enlightenment.org/core/elementary.git/commit/?id=f67fdc3d1b949349122ac7cad0889ff5c55b321c commit f67fdc3d1b949349122ac7cad0889ff5c55b321c Author: Amitesh Singh Date: Sat Aug 1 23:40:19 2015 +0530 test_disable: rename window name & title according to test name --- src/bin/test_disable.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bin/test_disable.c b/src/bin/test_disable.c index 0dc9774..3d5c6a8 100644 --- a/src/bin/test_disable.c +++ b/src/bin/test_disable.c @@ -17,7 +17,7 @@ test_box_disable(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *eve Evas_Object *win, *bx, *bt, *bx_out, *fr, *lb; Evas_Object *btn[4]; - win = elm_win_util_standard_add("box-transition", "Box Transition"); + win = elm_win_util_standard_add("box-enable/disable", "Box Enable/Disable"); elm_win_autodel_set(win, EINA_TRUE); bx_out = elm_box_add(win); --
[EGIT] [core/elementary] master 01/01: popup: fix resize issue when action area and title area is absent.
tasn pushed a commit to branch master. http://git.enlightenment.org/core/elementary.git/commit/?id=62d9fd187d2a25942dcf82014f69dfb3112f9598 commit 62d9fd187d2a25942dcf82014f69dfb3112f9598 Author: Amitesh Singh Date: Mon Aug 3 10:28:55 2015 +0100 popup: fix resize issue when action area and title area is absent. Summary: set scroller size in content_set. Resolves: T2623 @fix Test Plan: 1. run ecrire 2. Add some text in newfile 3. Close ecrire 4. a almost zero size popup. Reviewers: tasn, herdsman, raster, SanghyeonLee, stefan_schmidt Reviewed By: stefan_schmidt Subscribers: stefan_schmidt, herb, seoz Maniphest Tasks: T2623 Differential Revision: https://phab.enlightenment.org/D2901 --- src/lib/elc_popup.c | 18 -- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/src/lib/elc_popup.c b/src/lib/elc_popup.c index e48ab0f..5dbd1ba 100644 --- a/src/lib/elc_popup.c +++ b/src/lib/elc_popup.c @@ -1001,8 +1001,6 @@ _title_icon_set(Evas_Object *obj, elm_layout_signal_emit(sd->main_layout, "elm,state,title,icon,visible", "elm"); if (title_visibility_old != title_visibility_current) _visuals_set(obj); - elm_layout_sizing_eval(obj); - return EINA_TRUE; } @@ -1030,7 +1028,6 @@ _content_set(Evas_Object *obj, evas_object_event_callback_add (content, EVAS_CALLBACK_DEL, _on_content_del, obj); } - elm_layout_sizing_eval(obj); return EINA_TRUE; } @@ -1095,9 +1092,6 @@ _action_button_set(Evas_Object *obj, snprintf(buf, sizeof(buf), "elm.swallow.content.button%i", idx + 1); elm_object_part_content_set (sd->action_area, buf, sd->buttons[idx]->btn); - - _scroller_size_calc(obj); - elm_layout_sizing_eval(obj); } EOLIAN static Eina_Bool @@ -1105,11 +1099,12 @@ _elm_popup_elm_container_content_set(Eo *obj, Elm_Popup_Data *_pd EINA_UNUSED, c { Eina_Bool tmp; unsigned int i; + Eina_Bool ret = EINA_TRUE; if (!part || !strcmp(part, "default")) - return _content_set(obj, content); + ret = _content_set(obj, content); else if (!strcmp(part, "title,icon")) - return _title_icon_set(obj, content); + ret = _title_icon_set(obj, content); else if (!strncmp(part, "button", 6)) { i = atoi(part + 6) - 1; @@ -1123,9 +1118,12 @@ _elm_popup_elm_container_content_set(Eo *obj, Elm_Popup_Data *_pd EINA_UNUSED, c _action_button_set(obj, content, i); } else - return eo_do_ret(_pd->main_layout, tmp, elm_obj_container_content_set(part, content)); + ret = eo_do_ret(_pd->main_layout, tmp, elm_obj_container_content_set(part, content)); - return EINA_TRUE; + _scroller_size_calc(obj); + elm_layout_sizing_eval(obj); + + return ret; } static Evas_Object * --
[EGIT] [core/elementary] master 01/01: test_cnp: remove explicit type castings.
ami pushed a commit to branch master. http://git.enlightenment.org/core/elementary.git/commit/?id=904de9707ecd09bb90bd0bd2897894182f4fc676 commit 904de9707ecd09bb90bd0bd2897894182f4fc676 Author: Amitesh Singh Date: Mon Aug 3 21:34:09 2015 +0530 test_cnp: remove explicit type castings. In C, the explicit typecasting is not required. --- src/bin/test_cnp.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/bin/test_cnp.c b/src/bin/test_cnp.c index 512fc3a..8019d91 100644 --- a/src/bin/test_cnp.c +++ b/src/bin/test_cnp.c @@ -8,7 +8,7 @@ static Evas_Object *glb; static void _bt_copy_clicked(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED) { - Evas_Object *en = (Evas_Object*)(data); + Evas_Object *en = data; const char *txt = elm_object_text_get(en); elm_object_text_set(glb, txt); @@ -19,7 +19,7 @@ _bt_copy_clicked(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA static void _bt_paste_clicked(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED) { - Evas_Object *en = (Evas_Object*)(data); + Evas_Object *en = data; elm_cnp_selection_get(en, ELM_SEL_TYPE_CLIPBOARD, ELM_SEL_FORMAT_TEXT, NULL, NULL); @@ -28,7 +28,7 @@ _bt_paste_clicked(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EIN static void _bt_clear_clicked(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED) { - Evas_Object *en = (Evas_Object*)(data); + Evas_Object *en = data; elm_object_text_set(glb, ""); elm_object_cnp_selection_clear(elm_object_parent_widget_get(en), ELM_SEL_TYPE_CLIPBOARD); --
[EGIT] [core/elementary] master 01/01: test_popup: add popup with content area only example
ami pushed a commit to branch master. http://git.enlightenment.org/core/elementary.git/commit/?id=8cac65ec7e0e8cc8feb11b8e5ac6e0340ee8511a commit 8cac65ec7e0e8cc8feb11b8e5ac6e0340ee8511a Author: Amitesh Singh Date: Mon Aug 3 22:55:51 2015 +0530 test_popup: add popup with content area only example --- src/bin/test_popup.c | 60 ++-- 1 file changed, 58 insertions(+), 2 deletions(-) diff --git a/src/bin/test_popup.c b/src/bin/test_popup.c index b919545..32712ac 100644 --- a/src/bin/test_popup.c +++ b/src/bin/test_popup.c @@ -678,10 +678,9 @@ _popup_center_title_genlist_content_1button_cb(void *data, Evas_Object *obj EINA evas_object_show(popup); } - static void _subpopup_cb(void *data, Evas_Object *obj EINA_UNUSED, -void *event_info EINA_UNUSED) + void *event_info EINA_UNUSED) { Evas_Object *popup; Evas_Object *btn, *btnclose; @@ -714,6 +713,60 @@ _subpopup_cb(void *data, Evas_Object *obj EINA_UNUSED, } static void +_popup_content_only_cb(void *data, Evas_Object *obj EINA_UNUSED, + void *event_info EINA_UNUSED) +{ + Evas_Object *popup, *bx, *hbx, *lbl, *btn; + Evas_Object *win = data; + + popup = elm_popup_add(win); + + bx = elm_box_add(popup); + evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + evas_object_size_hint_align_set(bx, EVAS_HINT_FILL, 0.0); + elm_object_content_set(popup, bx); + + lbl = elm_label_add(popup); + elm_object_text_set(lbl, + "This popup contains content area only." + "The buttons below are the part of content area, not action area"); + evas_object_size_hint_weight_set(lbl, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + evas_object_size_hint_align_set(lbl, EVAS_HINT_FILL, 0.0); + elm_box_pack_end(bx, lbl); + evas_object_show(lbl); + + hbx = elm_box_add(bx); + elm_box_horizontal_set(hbx, EINA_TRUE); + evas_object_size_hint_weight_set(hbx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + evas_object_size_hint_align_set(hbx, EVAS_HINT_FILL, 0.0); + elm_box_pack_end(bx, hbx); + evas_object_show(hbx); + + btn = elm_button_add(hbx); + elm_object_text_set(btn, "Save"); + evas_object_smart_callback_add(btn, "clicked", _popup_close_cb, popup); + elm_box_pack_end(hbx, btn); + evas_object_show(btn); + + btn = elm_button_add(hbx); + elm_object_text_set(btn, "Discard"); + evas_object_smart_callback_add(btn, "clicked", _popup_close_cb, popup); + elm_box_pack_end(hbx, btn); + evas_object_show(btn); + + btn = elm_button_add(hbx); + elm_object_text_set(btn, "Cancel"); + evas_object_smart_callback_add(btn, "clicked", _popup_close_cb, popup); + elm_box_pack_end(hbx, btn); + evas_object_show(btn); + + // popup show should be called after adding all the contents and the buttons + // of popup to set the focus into popup's contents correctly. + evas_object_show(popup); + elm_object_focus_set(btn, EINA_TRUE); +} + +static void _focus_changed_cb(void *data, Evas_Object *obj, void *event_info EINA_UNUSED) { Eina_Bool check = elm_check_state_get(obj); @@ -782,6 +835,9 @@ test_popup(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, elm_list_item_append(list, "subpopup + X button", NULL, NULL, _subpopup_cb, win); + elm_list_item_append(list, "popup with content only", +NULL, NULL, _popup_content_only_cb, +win); elm_list_go(list); evas_object_show(list); --
[EGIT] [core/elementary] master 08/17: genlist: port "changed" evas smart callback to Eo.
cedric pushed a commit to branch master. http://git.enlightenment.org/core/elementary.git/commit/?id=6420fce66caffc9a569fba5fb8eb61fd5bd2e746 commit 6420fce66caffc9a569fba5fb8eb61fd5bd2e746 Author: Amitesh Singh Date: Fri Jul 31 09:28:24 2015 +0530 genlist: port "changed" evas smart callback to Eo. --- src/lib/elm_genlist.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lib/elm_genlist.c b/src/lib/elm_genlist.c index f628fa0..b8395e2 100644 --- a/src/lib/elm_genlist.c +++ b/src/lib/elm_genlist.c @@ -2438,7 +2438,8 @@ _elm_genlist_pan_evas_object_smart_calculate(Eo *obj, Elm_Genlist_Pan_Data *psd) evas_event_thaw(evas_object_evas_get(obj)); evas_event_thaw_eval(evas_object_evas_get(obj)); - evas_object_smart_callback_call(sd->obj, SIG_CHANGED, NULL); + eo_do(psd->wobj, eo_event_callback_call + (ELM_INTERFACE_SCROLLABLE_EVENT_CHANGED, NULL)); } EOLIAN static void --
[EGIT] [core/elementary] master 01/01: popup: fix resize issue in case of custom part text set
ami pushed a commit to branch master. http://git.enlightenment.org/core/elementary.git/commit/?id=ceec9e8ccdd9aa481a48f313a9e64f0362db4993 commit ceec9e8ccdd9aa481a48f313a9e64f0362db4993 Author: Amitesh Singh Date: Tue Aug 4 21:21:32 2015 +0530 popup: fix resize issue in case of custom part text set @fix --- src/lib/elc_popup.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/lib/elc_popup.c b/src/lib/elc_popup.c index 5dbd1ba..90488d1 100644 --- a/src/lib/elc_popup.c +++ b/src/lib/elc_popup.c @@ -862,9 +862,6 @@ _title_text_set(Evas_Object *obj, if (title_visibility_old != title_visibility_current) _visuals_set(obj); - _scroller_size_calc(obj); - elm_layout_sizing_eval(obj); - return EINA_TRUE; } @@ -926,9 +923,6 @@ _content_text_set(Evas_Object *obj, } end: - _scroller_size_calc(obj); - elm_layout_sizing_eval(obj); - return EINA_TRUE; } @@ -944,6 +938,9 @@ _elm_popup_elm_layout_text_set(Eo *obj, Elm_Popup_Data *_pd, const char *part, c else int_ret = elm_layout_text_set(_pd->main_layout, part, label); + _scroller_size_calc(obj); + elm_layout_sizing_eval(obj); + return int_ret; } --
[EGIT] [core/elementary] master 01/01: test_popup: set popup content correctly
ami pushed a commit to branch master. http://git.enlightenment.org/core/elementary.git/commit/?id=3b25de322fa82be9525850cd4f5676bd4643ff2d commit 3b25de322fa82be9525850cd4f5676bd4643ff2d Author: Amitesh Singh Date: Wed Aug 5 15:04:30 2015 +0530 test_popup: set popup content correctly internal object content_area was not swallowed into popup since elm_object_part_content_set() was used. Steps to reproduce: 1. clouseau elementary_test -to popup 2. open subpopup example. 3. observe orphan content_area object in clouseau widget list. --- src/bin/test_popup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bin/test_popup.c b/src/bin/test_popup.c index 32712ac..a2e576c 100644 --- a/src/bin/test_popup.c +++ b/src/bin/test_popup.c @@ -692,7 +692,7 @@ _subpopup_cb(void *data, Evas_Object *obj EINA_UNUSED, // button as a popup content btn = elm_button_add(popup); elm_object_text_set(btn, "content"); - elm_object_part_content_set(popup, "elm.swallow.content", btn); + elm_object_content_set(popup, btn); // popup buttons btn = elm_button_add(popup); --
[EGIT] [core/elementary] elementary-1.15 01/01: intf scroll: handle wheel logic in post event cb.
hermet pushed a commit to branch elementary-1.15. http://git.enlightenment.org/core/elementary.git/commit/?id=66437e05d035e0d330d2203d3b5d3173d43785f1 commit 66437e05d035e0d330d2203d3b5d3173d43785f1 Author: Amitesh Singh Date: Fri Aug 7 17:27:30 2015 +0900 intf scroll: handle wheel logic in post event cb. Summary: @Fix Resolves: T2216 Reviewers: seoz, raster, JackDanielZ, Hermet Reviewed By: Hermet Subscribers: cedric, eagleeye, SanghyeonLee, seoz, sachin.dev Maniphest Tasks: T2216 Differential Revision: https://phab.enlightenment.org/D2393 Conflicts: src/lib/elm_interface_scrollable.c --- src/lib/elm_interface_scrollable.c | 73 -- src/lib/elm_interface_scrollable.h | 1 + 2 files changed, 47 insertions(+), 27 deletions(-) diff --git a/src/lib/elm_interface_scrollable.c b/src/lib/elm_interface_scrollable.c index 594685b..5bc5509 100644 --- a/src/lib/elm_interface_scrollable.c +++ b/src/lib/elm_interface_scrollable.c @@ -1858,46 +1858,29 @@ _elm_scroll_wanted_region_set(Evas_Object *obj) eo_do(obj, elm_interface_scrollable_content_region_set(wx, sid->wy, ww, wh)); } -static void -_elm_scroll_wheel_event_cb(void *data, - Evas *e EINA_UNUSED, - Evas_Object *obj EINA_UNUSED, - void *event_info) + +static Eina_Bool +_scroll_wheel_post_event_cb(void *data, Evas *e EINA_UNUSED) { - Elm_Scrollable_Smart_Interface_Data *sid; - Evas_Event_Mouse_Wheel *ev; + Elm_Scrollable_Smart_Interface_Data *sid = data; + Evas_Event_Mouse_Wheel *ev = sid->event_info; + Evas_Coord x = 0, y = 0, vw = 0, vh = 0, cw = 0, ch = 0; - int direction = 0; int pagenumber_h = 0, pagenumber_v = 0; int mx = 0, my = 0, minx = 0, miny = 0; Evas_Coord pwx, pwy; double t; + int direction; - sid = data; - ev = event_info; direction = ev->direction; - if (direction) - { -if (sid->block & ELM_SCROLLER_MOVEMENT_BLOCK_HORIZONTAL) return; - } - else - { -if (sid->block & ELM_SCROLLER_MOVEMENT_BLOCK_VERTICAL) return; - } - pwx = sid->wx; pwy = sid->wy; - if (ev->event_flags & EVAS_EVENT_FLAG_ON_HOLD) return; - if ((evas_key_modifier_is_set(ev->modifiers, "Control")) || - (evas_key_modifier_is_set(ev->modifiers, "Alt")) || - (evas_key_modifier_is_set(ev->modifiers, "Meta")) || - (evas_key_modifier_is_set(ev->modifiers, "Hyper")) || - (evas_key_modifier_is_set(ev->modifiers, "Super"))) - return; - else if (evas_key_modifier_is_set(ev->modifiers, "Shift")) + if (ev->event_flags & EVAS_EVENT_FLAG_ON_HOLD) return EINA_FALSE; + if (evas_key_modifier_is_set(ev->modifiers, "Shift")) direction = !direction; + eo_do(sid->obj, elm_interface_scrollable_content_pos_get(&x, &y)); if (sid->scrollto.x.animator) x = sid->scrollto.x.end; if (sid->scrollto.y.animator) y = sid->scrollto.y.end; @@ -2012,6 +1995,42 @@ _elm_scroll_wheel_event_cb(void *data, else sid->down.last_hold_y_wheel = EINA_FALSE; sid->down.last_time_y_wheel = t; } + + return EINA_TRUE; +} + +static void +_elm_scroll_wheel_event_cb(void *data, + Evas *e, + Evas_Object *obj EINA_UNUSED, + void *event_info) +{ + Elm_Scrollable_Smart_Interface_Data *sid; + Evas_Event_Mouse_Wheel *ev; + int direction; + + sid = data; + ev = event_info; + sid->event_info = event_info; + direction = ev->direction; + + if (ev->event_flags & EVAS_EVENT_FLAG_ON_HOLD) return; + if ((evas_key_modifier_is_set(ev->modifiers, "Control")) || + (evas_key_modifier_is_set(ev->modifiers, "Alt")) || + (evas_key_modifier_is_set(ev->modifiers, "Meta")) || + (evas_key_modifier_is_set(ev->modifiers, "Hyper")) || + (evas_key_modifier_is_set(ev->modifiers, "Super"))) + return; + if (direction) + { +if (sid->block & ELM_SCROLLER_MOVEMENT_BLOCK_HORIZONTAL) return; + } + else + { +if (sid->block & ELM_SCROLLER_MOVEMENT_BLOCK_VERTICAL) return; + } + + evas_post_event_callback_push(e, _scroll_wheel_post_event_cb, sid); } static Eina_Bool diff --git a/src/lib/elm_interface_scrollable.h b/src/lib/elm_interface_scrollable.h index 748a9ca..4038eb9 100644 --- a/src/lib/elm_interface_scrollable.h +++ b/src/lib/elm_interface_scrollable.h @@ -193,6 +193,7 @@ struct _Elm_Scrollable_Smart_Interface_Data unsigned char size_adjust_recurse; unsigned char size_count; + void *event_info; Eina_Bool size_adjust_recurse_abort : 1; Eina_Bool momentum_animator_disabled : 1; --
[EGIT] [core/elementary] master 01/01: intf scroll: handle wheel logic in post event cb.
hermet pushed a commit to branch master. http://git.enlightenment.org/core/elementary.git/commit/?id=2e73e2224a970f023ae217bdfc606d3ddd397374 commit 2e73e2224a970f023ae217bdfc606d3ddd397374 Author: Amitesh Singh Date: Fri Aug 7 17:27:30 2015 +0900 intf scroll: handle wheel logic in post event cb. Summary: @Fix Resolves: T2216 Reviewers: seoz, raster, JackDanielZ, Hermet Reviewed By: Hermet Subscribers: cedric, eagleeye, SanghyeonLee, seoz, sachin.dev Maniphest Tasks: T2216 Differential Revision: https://phab.enlightenment.org/D2393 Conflicts: src/lib/elm_interface_scrollable.c --- src/lib/elm_interface_scrollable.c | 73 -- src/lib/elm_interface_scrollable.h | 1 + 2 files changed, 47 insertions(+), 27 deletions(-) diff --git a/src/lib/elm_interface_scrollable.c b/src/lib/elm_interface_scrollable.c index 594685b..5bc5509 100644 --- a/src/lib/elm_interface_scrollable.c +++ b/src/lib/elm_interface_scrollable.c @@ -1858,46 +1858,29 @@ _elm_scroll_wanted_region_set(Evas_Object *obj) eo_do(obj, elm_interface_scrollable_content_region_set(wx, sid->wy, ww, wh)); } -static void -_elm_scroll_wheel_event_cb(void *data, - Evas *e EINA_UNUSED, - Evas_Object *obj EINA_UNUSED, - void *event_info) + +static Eina_Bool +_scroll_wheel_post_event_cb(void *data, Evas *e EINA_UNUSED) { - Elm_Scrollable_Smart_Interface_Data *sid; - Evas_Event_Mouse_Wheel *ev; + Elm_Scrollable_Smart_Interface_Data *sid = data; + Evas_Event_Mouse_Wheel *ev = sid->event_info; + Evas_Coord x = 0, y = 0, vw = 0, vh = 0, cw = 0, ch = 0; - int direction = 0; int pagenumber_h = 0, pagenumber_v = 0; int mx = 0, my = 0, minx = 0, miny = 0; Evas_Coord pwx, pwy; double t; + int direction; - sid = data; - ev = event_info; direction = ev->direction; - if (direction) - { -if (sid->block & ELM_SCROLLER_MOVEMENT_BLOCK_HORIZONTAL) return; - } - else - { -if (sid->block & ELM_SCROLLER_MOVEMENT_BLOCK_VERTICAL) return; - } - pwx = sid->wx; pwy = sid->wy; - if (ev->event_flags & EVAS_EVENT_FLAG_ON_HOLD) return; - if ((evas_key_modifier_is_set(ev->modifiers, "Control")) || - (evas_key_modifier_is_set(ev->modifiers, "Alt")) || - (evas_key_modifier_is_set(ev->modifiers, "Meta")) || - (evas_key_modifier_is_set(ev->modifiers, "Hyper")) || - (evas_key_modifier_is_set(ev->modifiers, "Super"))) - return; - else if (evas_key_modifier_is_set(ev->modifiers, "Shift")) + if (ev->event_flags & EVAS_EVENT_FLAG_ON_HOLD) return EINA_FALSE; + if (evas_key_modifier_is_set(ev->modifiers, "Shift")) direction = !direction; + eo_do(sid->obj, elm_interface_scrollable_content_pos_get(&x, &y)); if (sid->scrollto.x.animator) x = sid->scrollto.x.end; if (sid->scrollto.y.animator) y = sid->scrollto.y.end; @@ -2012,6 +1995,42 @@ _elm_scroll_wheel_event_cb(void *data, else sid->down.last_hold_y_wheel = EINA_FALSE; sid->down.last_time_y_wheel = t; } + + return EINA_TRUE; +} + +static void +_elm_scroll_wheel_event_cb(void *data, + Evas *e, + Evas_Object *obj EINA_UNUSED, + void *event_info) +{ + Elm_Scrollable_Smart_Interface_Data *sid; + Evas_Event_Mouse_Wheel *ev; + int direction; + + sid = data; + ev = event_info; + sid->event_info = event_info; + direction = ev->direction; + + if (ev->event_flags & EVAS_EVENT_FLAG_ON_HOLD) return; + if ((evas_key_modifier_is_set(ev->modifiers, "Control")) || + (evas_key_modifier_is_set(ev->modifiers, "Alt")) || + (evas_key_modifier_is_set(ev->modifiers, "Meta")) || + (evas_key_modifier_is_set(ev->modifiers, "Hyper")) || + (evas_key_modifier_is_set(ev->modifiers, "Super"))) + return; + if (direction) + { +if (sid->block & ELM_SCROLLER_MOVEMENT_BLOCK_HORIZONTAL) return; + } + else + { +if (sid->block & ELM_SCROLLER_MOVEMENT_BLOCK_VERTICAL) return; + } + + evas_post_event_callback_push(e, _scroll_wheel_post_event_cb, sid); } static Eina_Bool diff --git a/src/lib/elm_interface_scrollable.h b/src/lib/elm_interface_scrollable.h index 748a9ca..4038eb9 100644 --- a/src/lib/elm_interface_scrollable.h +++ b/src/lib/elm_interface_scrollable.h @@ -193,6 +193,7 @@ struct _Elm_Scrollable_Smart_Interface_Data unsigned char size_adjust_recurse; unsigned char size_count; + void *event_info; Eina_Bool size_adjust_recurse_abort : 1; Eina_Bool momentum_animator_disabled : 1; --
[EGIT] [core/elementary] master 01/01: entry: fix since tag for entry_input_panel_show_on_demand_set()
ami pushed a commit to branch master. http://git.enlightenment.org/core/elementary.git/commit/?id=0c502c735f52d93a0a2fbd9af1cc52247299addd commit 0c502c735f52d93a0a2fbd9af1cc52247299addd Author: Amitesh Singh Date: Wed Aug 12 23:43:29 2015 +0530 entry: fix since tag for entry_input_panel_show_on_demand_set() --- src/lib/elm_entry.eo | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/lib/elm_entry.eo b/src/lib/elm_entry.eo index 33819e1..9dd9e36 100644 --- a/src/lib/elm_entry.eo +++ b/src/lib/elm_entry.eo @@ -124,6 +124,8 @@ class Elm.Entry (Elm.Layout, Elm_Interface_Scrollable, Evas.Clickable_Interface, set { [[Set the attribute to show the input panel in case of only an user's explicit Mouse Up event. It doesn't request to show the input panel even though it has focus. + + @since 1.9 ]] } get { @@ -135,8 +137,7 @@ class Elm.Entry (Elm.Layout, Elm_Interface_Scrollable, Evas.Clickable_Interface, values { ondemand: bool; [[If true, the input panel will be shown in case of only Mouse up event. (Focus event will be ignored.) - -@since 1.9.]] +]] } } @property context_menu_disabled { --
[EGIT] [core/efl] master 01/01: edje: set file permission back to 644
ami pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=2710f1fabbbe89c1902becb2c275c4d740e4b3f3 commit 2710f1fabbbe89c1902becb2c275c4d740e4b3f3 Author: Amitesh Singh Date: Fri Aug 14 15:28:58 2015 +0530 edje: set file permission back to 644 --- src/lib/edje/edje_object.eo | 0 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/src/lib/edje/edje_object.eo b/src/lib/edje/edje_object.eo old mode 100755 new mode 100644 --
[EGIT] [core/elementary] master 02/02: list: fix crash while setting nearest item in viewport
ami pushed a commit to branch master. http://git.enlightenment.org/core/elementary.git/commit/?id=40dad8578e64b51a09b914afe2bdea72f16965b9 commit 40dad8578e64b51a09b914afe2bdea72f16965b9 Author: Amitesh Singh Date: Sat Aug 15 22:46:51 2015 +0530 list: fix crash while setting nearest item in viewport This is an example of classic code copy and paste mistake. Probably inspired from similar code in genlist/gengrid. We were actually deleting the other items (except selected one) in viewport in _elm_list_nearest_visible_item_get() which results into crash while deleting the list object. @fix Resolves: T2662 --- src/lib/elm_list.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/lib/elm_list.c b/src/lib/elm_list.c index 739df22..7b4 100644 --- a/src/lib/elm_list.c +++ b/src/lib/elm_list.c @@ -1233,7 +1233,6 @@ _elm_list_nearest_visible_item_get(Evas_Object *obj, Elm_List_Item_Data *it) if (ELM_RECTS_INCLUDE(vx, vy, vw, vh, cx, cy, cw, ch) && !elm_object_item_disabled_get(EO_OBJ(item))) { - eina_list_free(item_list); return item; } } @@ -1248,12 +1247,10 @@ _elm_list_nearest_visible_item_get(Evas_Object *obj, Elm_List_Item_Data *it) if (ELM_RECTS_INCLUDE(vx, vy, vw, vh, cx, cy, cw, ch) && !elm_object_item_disabled_get(EO_OBJ(item))) { - eina_list_free(item_list); return item; } } } - eina_list_free(item_list); return it; } --
[EGIT] [core/elementary] master 01/02: popup: make scroller optional in popup
ami pushed a commit to branch master. http://git.enlightenment.org/core/elementary.git/commit/?id=0891ac5cfc2710d0c890340515aa5dbbe1f20466 commit 0891ac5cfc2710d0c890340515aa5dbbe1f20466 Author: Amitesh Singh Date: Sat Aug 15 21:02:33 2015 +0530 popup: make scroller optional in popup Summary: @feature Resolves: T2651 Test Plan: 1. elementary_test -to "popup" 2. Enable/disable checkbox named "Enable popup scoller" Reviewers: raster, herb, herdsman, SanghyeonLee, tasn, simotek, cedric, jeffhoogland Subscribers: seoz Differential Revision: https://phab.enlightenment.org/D2945 --- data/themes/edc/elm/popup.edc| 17 +++- data/themes/edc/elm/scroller.edc | 3 +- src/bin/test_popup.c | 43 + src/lib/elc_popup.c | 182 ++- src/lib/elm_popup.eo | 21 + src/lib/elm_widget_popup.h | 2 + 6 files changed, 225 insertions(+), 43 deletions(-) diff --git a/data/themes/edc/elm/popup.edc b/data/themes/edc/elm/popup.edc index 2ac2594..e49 100644 --- a/data/themes/edc/elm/popup.edc +++ b/data/themes/edc/elm/popup.edc @@ -367,11 +367,26 @@ group { name: "elm/popup/base/default"; group { name: "elm/popup/content/popup/default"; alias: "elm/popup/content/popup/transparent"; alias: "elm/popup/content/popup/subpopup"; + data.item: "scroller_enable" "on"; parts { part { name:"elm.swallow.content"; type: SWALLOW; description { state: "default" 0.0; - min: 240 0; } + description { state: "scroll" 0.0; +min: 240 0; + } + } + } + programs { + program { + signal: "elm,scroll,enable"; source: "elm"; + action: STATE_SET "scroll" 0.0; + target: "elm.swallow.content"; + } + program { + signal: "elm,scroll,disable"; source: "elm"; + action: STATE_SET "default" 0.0; + target: "elm.swallow.content"; } } } diff --git a/data/themes/edc/elm/scroller.edc b/data/themes/edc/elm/scroller.edc index cf1cb99..2f3d699 100644 --- a/data/themes/edc/elm/scroller.edc +++ b/data/themes/edc/elm/scroller.edc @@ -1308,8 +1308,7 @@ group { name: "elm/scroller/contents/default"; group { name: "elm/scroller/base/popup/no_inset_shadow"; inherit: "elm/scroller/base/default"; parts { - part { name: "elm.swallow.content"; - type: SWALLOW; + part { name: "elm.swallow.content"; type: SWALLOW; description { state: "default" 0.0; rel1.offset: 0 0; rel2.offset: 0 0; diff --git a/src/bin/test_popup.c b/src/bin/test_popup.c index a2e576c..dcfba0e 100644 --- a/src/bin/test_popup.c +++ b/src/bin/test_popup.c @@ -13,6 +13,7 @@ typedef struct static Evas_Object *g_popup = NULL; static int times = 0; +static Eina_Bool is_popup_scroll; static Evas_Rel_Coord_Point _popup_point[POPUP_POINT_MAX] = { { 0.01, 0.01 }, @@ -122,6 +123,7 @@ _popup_center_text_cb(void *data, Evas_Object *obj EINA_UNUSED, Evas_Object *popup; popup = elm_popup_add(data); + elm_popup_scrollable_set(popup, is_popup_scroll); elm_object_text_set(popup, "This Popup has content area and " "timeout value is 3 seconds"); elm_popup_timeout_set(popup, 3.0); @@ -142,6 +144,7 @@ _popup_center_text_1button_cb(void *data, Evas_Object *obj EINA_UNUSED, Evas_Object *btn; popup = elm_popup_add(data); + elm_popup_scrollable_set(popup, is_popup_scroll); elm_object_text_set(popup, "This Popup has content area and " "action area set, action area has one button Close"); @@ -164,6 +167,7 @@ _popup_center_title_text_1button_cb(void *data, Evas_Object *obj EINA_UNUSED, Evas_Object *btn; popup = elm_popup_add(data); + elm_popup_scrollable_set(popup, is_popup_scroll); // popup text elm_object_text_set(popup, "This Popup has title area, content area and " @@ -190,6 +194,7 @@ _popup_center_title_text_block_clicked_event_cb(void *data, Evas_Object *popup; popup = elm_popup_add(data); + elm_popup_scrollable_set(popup, is_popup_scroll); evas_object_smart_callback_add(popup, "block,clicked", _block_clicked_cb, NULL); @@ -219,6 +224,7 @@ _popup_center_title_text_block_clicked_event_with_parent_cb(void *data, evas_object_show(bg); popup = elm_popup_add(bg); + elm_popup_scrollable_set(popup, is_popup_scroll); evas_object_smart_callback_add(popup, "block,clicked", _block_
[EGIT] [core/elementary] master 01/01: popup: fix content_area resize in case of custom theme
ami pushed a commit to branch master. http://git.enlightenment.org/core/elementary.git/commit/?id=24a7851807ac5ddd813837c58bc16145cdc8261e commit 24a7851807ac5ddd813837c58bc16145cdc8261e Author: Amitesh Singh Date: Sun Aug 16 00:23:44 2015 +0530 popup: fix content_area resize in case of custom theme Send elm,scroll,enable/disable signals in theme_apply. It is a fix of 0891ac5cfc2710d0c89034 Thanks to Dave for reporting this issue. --- src/lib/elc_popup.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/lib/elc_popup.c b/src/lib/elc_popup.c index cbcab3c..12558f0 100644 --- a/src/lib/elc_popup.c +++ b/src/lib/elc_popup.c @@ -377,10 +377,14 @@ _elm_popup_elm_widget_theme_apply(Eo *obj, Elm_Popup_Data *sd) elm_layout_signal_emit(sd->main_layout, "elm,state,title,icon,visible", "elm"); _populate_theme_scroll(sd); - if (!sd->theme_scroll && sd->scroll) + if (sd->scroll && !sd->theme_scroll) sd->max_sc_w = 240 * elm_config_scale_get() * elm_object_scale_get(obj); else sd->max_sc_w = 0; + if (!sd->scroll && sd->theme_scroll) + elm_layout_signal_emit(sd->content_area, "elm,scroll,disable", "elm"); + else if (sd->scroll && sd->theme_scroll) + elm_layout_signal_emit(sd->content_area, "elm,scroll,enable", "elm"); _visuals_set(obj); _scroller_size_calc(obj); --
[EGIT] [core/elementary] elementary-1.15 01/01: list: fix crash while setting nearest item in viewport
ami pushed a commit to branch elementary-1.15. http://git.enlightenment.org/core/elementary.git/commit/?id=d8d78a708769773d02f96222d3e772edbe536942 commit d8d78a708769773d02f96222d3e772edbe536942 Author: Amitesh Singh Date: Sat Aug 15 22:46:51 2015 +0530 list: fix crash while setting nearest item in viewport This is an example of classic code copy and paste mistake. Probably inspired from similar code in genlist/gengrid. We were actually deleting the other items (except selected one) in viewport in _elm_list_nearest_visible_item_get() which results into crash while deleting the list object. @fix Resolves: T2662 --- src/lib/elm_list.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/lib/elm_list.c b/src/lib/elm_list.c index 7c9d086..dc325da 100644 --- a/src/lib/elm_list.c +++ b/src/lib/elm_list.c @@ -1233,7 +1233,6 @@ _elm_list_nearest_visible_item_get(Evas_Object *obj, Elm_List_Item_Data *it) if (ELM_RECTS_INCLUDE(vx, vy, vw, vh, cx, cy, cw, ch) && !elm_object_item_disabled_get(EO_OBJ(item))) { - eina_list_free(item_list); return item; } } @@ -1248,12 +1247,10 @@ _elm_list_nearest_visible_item_get(Evas_Object *obj, Elm_List_Item_Data *it) if (ELM_RECTS_INCLUDE(vx, vy, vw, vh, cx, cy, cw, ch) && !elm_object_item_disabled_get(EO_OBJ(item))) { - eina_list_free(item_list); return item; } } } - eina_list_free(item_list); return it; } --
[EGIT] [core/elementary] elementary-1.14 01/01: list: fix crash while setting nearest item in viewport
stefan pushed a commit to branch elementary-1.14. http://git.enlightenment.org/core/elementary.git/commit/?id=91db102d209437c68d4af336da0d0c3de7291dd7 commit 91db102d209437c68d4af336da0d0c3de7291dd7 Author: Amitesh Singh Date: Sat Aug 15 22:46:51 2015 +0530 list: fix crash while setting nearest item in viewport This is an example of classic code copy and paste mistake. Probably inspired from similar code in genlist/gengrid. We were actually deleting the other items (except selected one) in viewport in _elm_list_nearest_visible_item_get() which results into crash while deleting the list object. @fix Resolves: T2662 --- src/lib/elm_list.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/lib/elm_list.c b/src/lib/elm_list.c index 1cd1560..604d3d7 100644 --- a/src/lib/elm_list.c +++ b/src/lib/elm_list.c @@ -1233,7 +1233,6 @@ _elm_list_nearest_visible_item_get(Evas_Object *obj, Elm_List_Item_Data *it) if (ELM_RECTS_INCLUDE(vx, vy, vw, vh, cx, cy, cw, ch) && !elm_object_item_disabled_get(EO_OBJ(item))) { - eina_list_free(item_list); return item; } } @@ -1248,12 +1247,10 @@ _elm_list_nearest_visible_item_get(Evas_Object *obj, Elm_List_Item_Data *it) if (ELM_RECTS_INCLUDE(vx, vy, vw, vh, cx, cy, cw, ch) && !elm_object_item_disabled_get(EO_OBJ(item))) { - eina_list_free(item_list); return item; } } } - eina_list_free(item_list); return it; } --
[EGIT] [core/elementary] elementary-1.15 02/05: popup: fix content_area resize in case of custom theme
ami pushed a commit to branch elementary-1.15. http://git.enlightenment.org/core/elementary.git/commit/?id=5aa13939e22adc6767eeb5a3b80b48d1e9ab9cf8 commit 5aa13939e22adc6767eeb5a3b80b48d1e9ab9cf8 Author: Amitesh Singh Date: Sun Aug 16 00:23:44 2015 +0530 popup: fix content_area resize in case of custom theme Send elm,scroll,enable/disable signals in theme_apply. It is a fix of 0891ac5cfc2710d0c89034 Thanks to Dave for reporting this issue. --- src/lib/elc_popup.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/lib/elc_popup.c b/src/lib/elc_popup.c index 9f6e119..4022671 100644 --- a/src/lib/elc_popup.c +++ b/src/lib/elc_popup.c @@ -377,10 +377,14 @@ _elm_popup_elm_widget_theme_apply(Eo *obj, Elm_Popup_Data *sd) elm_layout_signal_emit(sd->main_layout, "elm,state,title,icon,visible", "elm"); _populate_theme_scroll(sd); - if (!sd->theme_scroll && sd->scroll) + if (sd->scroll && !sd->theme_scroll) sd->max_sc_w = 240 * elm_config_scale_get() * elm_object_scale_get(obj); else sd->max_sc_w = 0; + if (!sd->scroll && sd->theme_scroll) + elm_layout_signal_emit(sd->content_area, "elm,scroll,disable", "elm"); + else if (sd->scroll && sd->theme_scroll) + elm_layout_signal_emit(sd->content_area, "elm,scroll,enable", "elm"); _visuals_set(obj); _scroller_size_calc(obj); --
[EGIT] [core/elementary] elementary-1.15 01/05: popup: make scroller optional in popup
ami pushed a commit to branch elementary-1.15. http://git.enlightenment.org/core/elementary.git/commit/?id=c0bb755269da986df4255a6b8c8e7d99f10fb3a1 commit c0bb755269da986df4255a6b8c8e7d99f10fb3a1 Author: Amitesh Singh Date: Sat Aug 15 21:02:33 2015 +0530 popup: make scroller optional in popup Summary: @feature Resolves: T2651 Test Plan: 1. elementary_test -to "popup" 2. Enable/disable checkbox named "Enable popup scoller" Reviewers: raster, herb, herdsman, SanghyeonLee, tasn, simotek, cedric, jeffhoogland Subscribers: seoz Differential Revision: https://phab.enlightenment.org/D2945 --- data/themes/edc/elm/popup.edc| 17 +++- data/themes/edc/elm/scroller.edc | 3 +- src/bin/test_popup.c | 43 + src/lib/elc_popup.c | 182 ++- src/lib/elm_popup.eo | 21 + src/lib/elm_widget_popup.h | 2 + 6 files changed, 225 insertions(+), 43 deletions(-) diff --git a/data/themes/edc/elm/popup.edc b/data/themes/edc/elm/popup.edc index 2ac2594..e49 100644 --- a/data/themes/edc/elm/popup.edc +++ b/data/themes/edc/elm/popup.edc @@ -367,11 +367,26 @@ group { name: "elm/popup/base/default"; group { name: "elm/popup/content/popup/default"; alias: "elm/popup/content/popup/transparent"; alias: "elm/popup/content/popup/subpopup"; + data.item: "scroller_enable" "on"; parts { part { name:"elm.swallow.content"; type: SWALLOW; description { state: "default" 0.0; - min: 240 0; } + description { state: "scroll" 0.0; +min: 240 0; + } + } + } + programs { + program { + signal: "elm,scroll,enable"; source: "elm"; + action: STATE_SET "scroll" 0.0; + target: "elm.swallow.content"; + } + program { + signal: "elm,scroll,disable"; source: "elm"; + action: STATE_SET "default" 0.0; + target: "elm.swallow.content"; } } } diff --git a/data/themes/edc/elm/scroller.edc b/data/themes/edc/elm/scroller.edc index cf1cb99..2f3d699 100644 --- a/data/themes/edc/elm/scroller.edc +++ b/data/themes/edc/elm/scroller.edc @@ -1308,8 +1308,7 @@ group { name: "elm/scroller/contents/default"; group { name: "elm/scroller/base/popup/no_inset_shadow"; inherit: "elm/scroller/base/default"; parts { - part { name: "elm.swallow.content"; - type: SWALLOW; + part { name: "elm.swallow.content"; type: SWALLOW; description { state: "default" 0.0; rel1.offset: 0 0; rel2.offset: 0 0; diff --git a/src/bin/test_popup.c b/src/bin/test_popup.c index 32712ac..d7c9799 100644 --- a/src/bin/test_popup.c +++ b/src/bin/test_popup.c @@ -13,6 +13,7 @@ typedef struct static Evas_Object *g_popup = NULL; static int times = 0; +static Eina_Bool is_popup_scroll; static Evas_Rel_Coord_Point _popup_point[POPUP_POINT_MAX] = { { 0.01, 0.01 }, @@ -122,6 +123,7 @@ _popup_center_text_cb(void *data, Evas_Object *obj EINA_UNUSED, Evas_Object *popup; popup = elm_popup_add(data); + elm_popup_scrollable_set(popup, is_popup_scroll); elm_object_text_set(popup, "This Popup has content area and " "timeout value is 3 seconds"); elm_popup_timeout_set(popup, 3.0); @@ -142,6 +144,7 @@ _popup_center_text_1button_cb(void *data, Evas_Object *obj EINA_UNUSED, Evas_Object *btn; popup = elm_popup_add(data); + elm_popup_scrollable_set(popup, is_popup_scroll); elm_object_text_set(popup, "This Popup has content area and " "action area set, action area has one button Close"); @@ -164,6 +167,7 @@ _popup_center_title_text_1button_cb(void *data, Evas_Object *obj EINA_UNUSED, Evas_Object *btn; popup = elm_popup_add(data); + elm_popup_scrollable_set(popup, is_popup_scroll); // popup text elm_object_text_set(popup, "This Popup has title area, content area and " @@ -190,6 +194,7 @@ _popup_center_title_text_block_clicked_event_cb(void *data, Evas_Object *popup; popup = elm_popup_add(data); + elm_popup_scrollable_set(popup, is_popup_scroll); evas_object_smart_callback_add(popup, "block,clicked", _block_clicked_cb, NULL); @@ -219,6 +224,7 @@ _popup_center_title_text_block_clicked_event_with_parent_cb(void *data, evas_object_show(bg); popup = elm_popup_add(bg); + elm_popup_scrollable_set(popup, is_popup_scroll); evas_object_smart_callback_add(popup, "block,clicked", _block_
[EGIT] [core/elementary] master 01/01: genlist: remove unnecessary bracket
ami pushed a commit to branch master. http://git.enlightenment.org/core/elementary.git/commit/?id=1d42d78c935da6131dd7e89e13619ffadf45d40e commit 1d42d78c935da6131dd7e89e13619ffadf45d40e Author: Amitesh Singh Date: Wed Aug 19 10:11:53 2015 +0530 genlist: remove unnecessary bracket --- src/lib/elm_genlist.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/elm_genlist.c b/src/lib/elm_genlist.c index 38ce5d4..6e1563e 100644 --- a/src/lib/elm_genlist.c +++ b/src/lib/elm_genlist.c @@ -2579,7 +2579,7 @@ _item_single_select_down(Elm_Genlist_Data *sd) next = eo_data_scope_get(eo_next, ELM_GENLIST_ITEM_CLASS); } - while ((next)) + while (next) { if ((!_is_no_select(next)) && (!elm_object_item_disabled_get(EO_OBJ(next --
[EGIT] [core/elementary] elementary-1.15 01/01: genlist: remove unnecessary bracket
ami pushed a commit to branch elementary-1.15. http://git.enlightenment.org/core/elementary.git/commit/?id=15e969145a3374d3ba7686b2d3d0592fe1bf07d2 commit 15e969145a3374d3ba7686b2d3d0592fe1bf07d2 Author: Amitesh Singh Date: Wed Aug 19 10:11:53 2015 +0530 genlist: remove unnecessary bracket --- src/lib/elm_genlist.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/elm_genlist.c b/src/lib/elm_genlist.c index b284117..97e5576 100644 --- a/src/lib/elm_genlist.c +++ b/src/lib/elm_genlist.c @@ -2580,7 +2580,7 @@ _item_single_select_down(Elm_Genlist_Data *sd) next = eo_data_scope_get(eo_next, ELM_GENLIST_ITEM_CLASS); } - while ((next)) + while (next) { if ((!_is_no_select(next)) && (!elm_object_item_disabled_get(EO_OBJ(next --
[EGIT] [website/www-content] master 01/01: Wiki page popup_tutorial changed with summary [remove TODOs] by Amitesh Singh
WWW-www.enlightenment.org pushed a commit to branch master. http://git.enlightenment.org/website/www-content.git/commit/?id=507a27631ea8955bdd6ee4a315958876ceb184ff commit 507a27631ea8955bdd6ee4a315958876ceb184ff Author: Amitesh Singh Date: Thu Aug 20 08:16:55 2015 -0700 Wiki page popup_tutorial changed with summary [remove TODOs] by Amitesh Singh --- pages/tutorial/popup_tutorial.txt | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/pages/tutorial/popup_tutorial.txt b/pages/tutorial/popup_tutorial.txt index ec62ee5..7654fa0 100644 --- a/pages/tutorial/popup_tutorial.txt +++ b/pages/tutorial/popup_tutorial.txt @@ -7,7 +7,6 @@ This tutorial explains how to use Popup in the application. * [[#Initializing_the_Application|Initializing the Application]] * [[#Creating_a_Popup_Widget|Creating a Popup Widget]] - * [[#Creating_a_Custom_Popup|Creating a Custom Popup]] A popup example : {{ :popup.png?direct |list}} @@ -88,8 +87,4 @@ _btn_click_cb(void *data, Evas_Object *obj EINA_UNUSED, // of popup to set the focus into popup's contents correctly. evas_object_show(popup); } - - -=== Creating a Custom Popup === - -TODO \ No newline at end of file + \ No newline at end of file --
[EGIT] [core/elementary] master 01/01: test_genlist: fix a typo
ami pushed a commit to branch master. http://git.enlightenment.org/core/elementary.git/commit/?id=f77962cd18025806d5942d8623fd5736c267f42a commit f77962cd18025806d5942d8623fd5736c267f42a Author: Amitesh Singh Date: Fri Aug 21 09:32:45 2015 +0530 test_genlist: fix a typo --- src/bin/test_genlist.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bin/test_genlist.c b/src/bin/test_genlist.c index 9114665..8b2c9cb 100644 --- a/src/bin/test_genlist.c +++ b/src/bin/test_genlist.c @@ -127,7 +127,7 @@ gl_text_get1(void *data, Evas_Object *obj EINA_UNUSED, const char *part EINA_UNU int num = (int)(uintptr_t)data; if (num == 5) - snprintf(buf, sizeof(buf), "Item # %i (Genlist Cleear on Select)", num); + snprintf(buf, sizeof(buf), "Item # %i (Genlist Clear on Select)", num); else snprintf(buf, sizeof(buf), "Item # %i", num); --
[EGIT] [core/elementary] elementary-1.15 01/01: test_genlist: fix a typo
ami pushed a commit to branch elementary-1.15. http://git.enlightenment.org/core/elementary.git/commit/?id=45fce21cf7b11a62085de2377a3ae75ac9bbb4e1 commit 45fce21cf7b11a62085de2377a3ae75ac9bbb4e1 Author: Amitesh Singh Date: Fri Aug 21 09:32:45 2015 +0530 test_genlist: fix a typo --- src/bin/test_genlist.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bin/test_genlist.c b/src/bin/test_genlist.c index e519681..7bc64f6 100644 --- a/src/bin/test_genlist.c +++ b/src/bin/test_genlist.c @@ -127,7 +127,7 @@ gl_text_get1(void *data, Evas_Object *obj EINA_UNUSED, const char *part EINA_UNU int num = (int)(uintptr_t)data; if (num == 5) - snprintf(buf, sizeof(buf), "Item # %i (Genlist Cleear on Select)", num); + snprintf(buf, sizeof(buf), "Item # %i (Genlist Clear on Select)", num); else snprintf(buf, sizeof(buf), "Item # %i", num); --
[EGIT] [core/elementary] master 01/01: scroller: fix memory leak on keys traversal
ami pushed a commit to branch master. http://git.enlightenment.org/core/elementary.git/commit/?id=56e469f51f610ffb2c9e993f886bc57756b650ff commit 56e469f51f610ffb2c9e993f886bc57756b650ff Author: Amitesh Singh Date: Tue Aug 25 09:35:05 2015 +0530 scroller: fix memory leak on keys traversal @fix --- src/lib/elm_scroller.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/src/lib/elm_scroller.c b/src/lib/elm_scroller.c index 4d45fd4..e041a44 100644 --- a/src/lib/elm_scroller.c +++ b/src/lib/elm_scroller.c @@ -144,6 +144,7 @@ _key_action_move(Evas_Object *obj, const char *params) if (cur_weight == 0.0) { elm_widget_focus_steal(cur); + eina_list_free(can_focus_list); return EINA_TRUE; } cur_weight = 1.0 / cur_weight; @@ -157,6 +158,7 @@ _key_action_move(Evas_Object *obj, const char *params) if (new_focus) { elm_widget_focus_steal(new_focus); + eina_list_free(can_focus_list); return EINA_TRUE; } } @@ -189,10 +191,14 @@ _key_action_move(Evas_Object *obj, const char *params) if (ELM_RECTS_INTERSECT(x, y, v_w, v_h, l_x, l_y, l_w, l_h)) { elm_widget_focus_steal(new_focus); + eina_list_free(can_focus_list); return EINA_TRUE; } } } + + eina_list_free(can_focus_list); + if (!strcmp(dir, "left")) { if ((x <= 0) && (!sd->loop_h)) return EINA_FALSE; --
[EGIT] [admin/devs] master 01/01: switch to edDSA
ami pushed a commit to branch master. http://git.enlightenment.org/admin/devs.git/commit/?id=afaa9c082326eedc244636181be81ae17ec5fea1 commit afaa9c082326eedc244636181be81ae17ec5fea1 Author: Amitesh Singh Date: Tue Aug 25 14:58:35 2015 +0530 switch to edDSA --- developers/ami/id_ed25519.pub | 1 + 1 file changed, 1 insertion(+) diff --git a/developers/ami/id_ed25519.pub b/developers/ami/id_ed25519.pub new file mode 100644 index 000..26c9920 --- /dev/null +++ b/developers/ami/id_ed25519.pub @@ -0,0 +1 @@ +ssh-ed25519 C3NzaC1lZDI1NTE5IL6WSwKR1i6dHNDhQbe1eq42zvIKrw3yyCJtLwI+wATO ami@ami-Samsung-DeskTop-System --
[EGIT] [core/elementary] elementary-1.15 01/01: scroller: fix memory leak on keys traversal
ami pushed a commit to branch elementary-1.15. http://git.enlightenment.org/core/elementary.git/commit/?id=40e0ea58e1d268383b47459cdd3279203f0b60f0 commit 40e0ea58e1d268383b47459cdd3279203f0b60f0 Author: Amitesh Singh Date: Tue Aug 25 09:35:05 2015 +0530 scroller: fix memory leak on keys traversal @fix --- src/lib/elm_scroller.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/src/lib/elm_scroller.c b/src/lib/elm_scroller.c index 4d45fd4..e041a44 100644 --- a/src/lib/elm_scroller.c +++ b/src/lib/elm_scroller.c @@ -144,6 +144,7 @@ _key_action_move(Evas_Object *obj, const char *params) if (cur_weight == 0.0) { elm_widget_focus_steal(cur); + eina_list_free(can_focus_list); return EINA_TRUE; } cur_weight = 1.0 / cur_weight; @@ -157,6 +158,7 @@ _key_action_move(Evas_Object *obj, const char *params) if (new_focus) { elm_widget_focus_steal(new_focus); + eina_list_free(can_focus_list); return EINA_TRUE; } } @@ -189,10 +191,14 @@ _key_action_move(Evas_Object *obj, const char *params) if (ELM_RECTS_INTERSECT(x, y, v_w, v_h, l_x, l_y, l_w, l_h)) { elm_widget_focus_steal(new_focus); + eina_list_free(can_focus_list); return EINA_TRUE; } } } + + eina_list_free(can_focus_list); + if (!strcmp(dir, "left")) { if ((x <= 0) && (!sd->loop_h)) return EINA_FALSE; --
[EGIT] [tools/clouseau] master 01/01: increase the genlist scroll height a bit
ami pushed a commit to branch master. http://git.enlightenment.org/tools/clouseau.git/commit/?id=a56abd48aba795e3b82859a357b458589def481d commit a56abd48aba795e3b82859a357b458589def481d Author: Amitesh Singh Date: Wed Aug 26 09:41:58 2015 +0530 increase the genlist scroll height a bit Genlist scrolls when no. items are higher than eight. --- src/bin/clouseau_client.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/bin/clouseau_client.c b/src/bin/clouseau_client.c index cbce09b..5155201 100644 --- a/src/bin/clouseau_client.c +++ b/src/bin/clouseau_client.c @@ -2006,7 +2006,7 @@ _calc_list(Gui_Elements *g) eina_list_free(realized_items); -if (count < 6) +if (count < 8) { elm_scroller_policy_set(g->hover.dd_list, ELM_SCROLLER_POLICY_OFF, ELM_SCROLLER_POLICY_OFF); @@ -2016,7 +2016,7 @@ _calc_list(Gui_Elements *g) { elm_scroller_policy_set(g->hover.dd_list, ELM_SCROLLER_POLICY_ON, ELM_SCROLLER_POLICY_ON); - evas_object_size_hint_min_set(g->hover.resize_rect, w, h * 5); + evas_object_size_hint_min_set(g->hover.resize_rect, w, h * 8); } } --
[EGIT] [core/elementary] master 01/01: gengrid: add curly braces to avoid ambiguous 'if'
ami pushed a commit to branch master. http://git.enlightenment.org/core/elementary.git/commit/?id=a7108c9b5ac1dd8432dc814785dd12f5ff8528de commit a7108c9b5ac1dd8432dc814785dd12f5ff8528de Author: Amitesh Singh Date: Wed Aug 26 14:34:58 2015 +0530 gengrid: add curly braces to avoid ambiguous 'if' --- src/lib/elm_gengrid.c | 20 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/src/lib/elm_gengrid.c b/src/lib/elm_gengrid.c index 4d47952..e734399 100644 --- a/src/lib/elm_gengrid.c +++ b/src/lib/elm_gengrid.c @@ -2445,10 +2445,12 @@ _elm_gengrid_item_edge_check(Elm_Object_Item *eo_it, if ((sd->horizontal) && (ix == cx) && (iy > cy)) return EINA_FALSE; else if ((!sd->horizontal) && (iy == cy)) - if ((!mirrored && (ix >cx)) || (mirrored && (ix < cx))) - return EINA_FALSE; - else - return EINA_TRUE; + { + if ((!mirrored && (ix > cx)) || (mirrored && (ix < cx))) +return EINA_FALSE; + else +return EINA_TRUE; + } else return EINA_TRUE; } @@ -2471,10 +2473,12 @@ _elm_gengrid_item_edge_check(Elm_Object_Item *eo_it, if ((sd->horizontal) && (ix == cx) && (iy < cy)) return EINA_FALSE; else if ((!sd->horizontal) && (iy == cy)) - if ((!mirrored && (ix < cx)) || (mirrored && (ix > cx))) - return EINA_FALSE; - else - return EINA_TRUE; + { + if ((!mirrored && (ix < cx)) || (mirrored && (ix > cx))) +return EINA_FALSE; + else +return EINA_TRUE; + } else return EINA_TRUE; } --
[EGIT] [core/elementary] master 01/01: gengrid: fix item focus movement in case of horizontal mode
ami pushed a commit to branch master. http://git.enlightenment.org/core/elementary.git/commit/?id=d47cb3ef50239ad7e5d42f77c62285db48237f23 commit d47cb3ef50239ad7e5d42f77c62285db48237f23 Author: Amitesh Singh Date: Wed Aug 26 15:35:47 2015 +0530 gengrid: fix item focus movement in case of horizontal mode Steps to reproduce: 1. elementary -> gengrid focus 2. change mode to horizontal 3. set focus to one of item in 2nd column. 4. Press Left direction key issue: focus moves out of gengrid. @fix --- src/lib/elm_gengrid.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/lib/elm_gengrid.c b/src/lib/elm_gengrid.c index e734399..a863799 100644 --- a/src/lib/elm_gengrid.c +++ b/src/lib/elm_gengrid.c @@ -2495,14 +2495,16 @@ _elm_gengrid_item_edge_check(Elm_Object_Item *eo_it, { row = cvh / sd->item_height; if (row <= 0) row = 1; - if (tmp->position <= row) + col = tmp->position / row; + if (col == 0) return EINA_TRUE; } else if (sd->item_width > 0) { col = cvw / sd->item_width; if (col <= 0) col = 1; - if (tmp->position <= col) + row = tmp->position / col; + if (row == 0) return EINA_TRUE; } } --
[EGIT] [core/elementary] master 01/01: gengrid: no need to loop in case of reorder mode is enabled
ami pushed a commit to branch master. http://git.enlightenment.org/core/elementary.git/commit/?id=a8afaebf3109f1cb8e397e29ce9dbac599f75c4e commit a8afaebf3109f1cb8e397e29ce9dbac599f75c4e Author: Amitesh Singh Date: Wed Aug 26 20:43:39 2015 +0530 gengrid: no need to loop in case of reorder mode is enabled There is no need to loop when reorder mode is enabled. This looks ugly and nobody wants it. This fault was introduced in 7aaa5c8d0a4a5714b4f1bf79e This patch also fixes following crash 1. elementary_test -to "Gengrid 2". 2. Enable all the options available. 3. Do reorder of item via keys. 4. Observe segv on reordering edge items. @fix --- src/lib/elm_gengrid.c | 24 +--- 1 file changed, 5 insertions(+), 19 deletions(-) diff --git a/src/lib/elm_gengrid.c b/src/lib/elm_gengrid.c index a863799..6fc0550 100644 --- a/src/lib/elm_gengrid.c +++ b/src/lib/elm_gengrid.c @@ -3062,10 +3062,7 @@ _key_action_move(Evas_Object *obj, const char *params) if (_elm_gengrid_item_edge_check(sd->focused_item, ELM_FOCUS_LEFT)) { if (sd->item_loop_enable) -{ - if (_item_horizontal_loop(obj, ELM_FOCUS_RIGHT)) - return EINA_TRUE; -} +return EINA_TRUE; return EINA_FALSE; } if (!sd->horizontal) @@ -3083,10 +3080,7 @@ _key_action_move(Evas_Object *obj, const char *params) if (_elm_gengrid_item_edge_check(sd->focused_item, ELM_FOCUS_LEFT)) { if (sd->item_loop_enable) -{ - if (_item_horizontal_loop(obj, ELM_FOCUS_RIGHT)) - return EINA_TRUE; -} +return EINA_TRUE; return EINA_FALSE; } if (!_elm_config->item_select_on_focus_disable) @@ -3143,16 +3137,8 @@ _key_action_move(Evas_Object *obj, const char *params) if (_elm_gengrid_item_edge_check(sd->focused_item, ELM_FOCUS_RIGHT)) { - if (sd->item_loop_enable && !sd->horizontal) -{ - if (_item_horizontal_loop(obj, ELM_FOCUS_LEFT)) - return EINA_TRUE; -} - else if (sd->item_loop_enable) -{ - if (_item_horizontal_loop(obj, ELM_FOCUS_UP)) - return EINA_TRUE; -} + if (sd->item_loop_enable) +return EINA_TRUE; return EINA_FALSE; } if (!sd->horizontal) @@ -3173,7 +3159,7 @@ _key_action_move(Evas_Object *obj, const char *params) { if (_item_horizontal_loop(obj, ELM_FOCUS_UP)) return EINA_TRUE; -} +} } if (!_elm_config->item_select_on_focus_disable) { --
[EGIT] [core/elementary] master 01/01: toolbar: fix issue of focus not coming to item on mouse click
ami pushed a commit to branch master. http://git.enlightenment.org/core/elementary.git/commit/?id=7ff06acf35ebfa275302ee054a0e2ccf1623614b commit 7ff06acf35ebfa275302ee054a0e2ccf1623614b Author: Amitesh Singh Date: Wed Aug 26 22:30:02 2015 +0530 toolbar: fix issue of focus not coming to item on mouse click resize object was not getting focused in case of mouse click. Steps to reproduce: 1. elementary_test -to "toolbar focus". 2. set focus to toolbar item via mouse. 3. focus does not come to toolbar. fixes T2697 @fix --- src/lib/elm_toolbar.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/lib/elm_toolbar.c b/src/lib/elm_toolbar.c index d2797bc..0061934 100644 --- a/src/lib/elm_toolbar.c +++ b/src/lib/elm_toolbar.c @@ -752,8 +752,11 @@ _elm_toolbar_elm_widget_on_focus(Eo *obj, Elm_Toolbar_Data *sd) if (!int_ret) return EINA_FALSE; if (!sd->items) return EINA_FALSE; - if (elm_widget_focus_get(obj) && !sd->mouse_down) + if (elm_widget_focus_get(obj)) { +evas_object_focus_set(wd->resize_obj, EINA_TRUE); +if (sd->mouse_down) return EINA_TRUE; + if (sd->last_focused_item) eo_it = sd->last_focused_item; else if (_elm_config->first_item_focus_on_first_focus_in && @@ -767,7 +770,6 @@ _elm_toolbar_elm_widget_on_focus(Eo *obj, Elm_Toolbar_Data *sd) eo_it = _elm_toolbar_nearest_visible_item_get(obj, eo_it); if (eo_it) _elm_toolbar_item_focused(eo_it); } -evas_object_focus_set(wd->resize_obj, EINA_TRUE); } else { --
[EGIT] [core/elementary] master 01/01: config: revert first_item_focus_on_first_focus_in to 0
ami pushed a commit to branch master. http://git.enlightenment.org/core/elementary.git/commit/?id=ffafa42e301100a5bd2afddaf6ee5eb83f5e80d7 commit ffafa42e301100a5bd2afddaf6ee5eb83f5e80d7 Author: Amitesh Singh Date: Thu Aug 27 10:00:39 2015 +0530 config: revert first_item_focus_on_first_focus_in to 0 This fixes a behavioural change introduced in D1135. Steps to reproduce: 1. elementary_test -> genlist/list/gengrid 2. scroll dragging the scroll-bar 3. an item nearest to viewport gets selected when you release the mouse button Most of the time, we don't want item to be selected or focused on dragging scroll-bar via mouse. Revert config flag to 0 to have old behaviour before D1135. fixes: T2662 @fix --- config/default/base.src.in | 2 +- config/mobile/base.src.in | 2 +- config/standard/base.src.in | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/config/default/base.src.in b/config/default/base.src.in index f3b741e..83cff05 100644 --- a/config/default/base.src.in +++ b/config/default/base.src.in @@ -48,7 +48,7 @@ group "Elm_Config" struct { value "focus_highlight_animate" uchar: 0; value "focus_highlight_clip_disable" uchar: 0; value "item_select_on_focus_disable" uchar: 0; - value "first_item_focus_on_first_focus_in" uchar: 1; + value "first_item_focus_on_first_focus_in" uchar: 0; value "focus_move_policy" uchar: 0; value "toolbar_shrink_mode" int: 3; value "fileselector_expand_enable" uchar: 0; diff --git a/config/mobile/base.src.in b/config/mobile/base.src.in index 8c65a8b..8be5652 100644 --- a/config/mobile/base.src.in +++ b/config/mobile/base.src.in @@ -48,7 +48,7 @@ group "Elm_Config" struct { value "focus_highlight_animate" uchar: 0; value "focus_highlight_clip_disable" uchar: 0; value "item_select_on_focus_disable" uchar: 0; - value "first_item_focus_on_first_focus_in" uchar: 1; + value "first_item_focus_on_first_focus_in" uchar: 0; value "focus_move_policy" uchar: 0; value "toolbar_shrink_mode" int: 3; value "fileselector_expand_enable" uchar: 0; diff --git a/config/standard/base.src.in b/config/standard/base.src.in index 38a9fb5..1b1cb84 100644 --- a/config/standard/base.src.in +++ b/config/standard/base.src.in @@ -48,7 +48,7 @@ group "Elm_Config" struct { value "focus_highlight_animate" uchar: 0; value "focus_highlight_clip_disable" uchar: 1; value "item_select_on_focus_disable" uchar: 0; - value "first_item_focus_on_first_focus_in" uchar: 1; + value "first_item_focus_on_first_focus_in" uchar: 0; value "focus_move_policy" uchar: 0; value "toolbar_shrink_mode" int: 3; value "fileselector_expand_enable" uchar: 1; --
[EGIT] [core/elementary] master 01/01: gengrid: fix item looping in case of horizontal mode
ami pushed a commit to branch master. http://git.enlightenment.org/core/elementary.git/commit/?id=88d7577a1ba72142d0691312d47905d6d50663f9 commit 88d7577a1ba72142d0691312d47905d6d50663f9 Author: Amitesh Singh Date: Fri Aug 28 10:34:52 2015 +0530 gengrid: fix item looping in case of horizontal mode This mistake is done in a8afaebf3109f1cb8e397e29 --- src/lib/elm_gengrid.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/lib/elm_gengrid.c b/src/lib/elm_gengrid.c index 6fc0550..acdd04d 100644 --- a/src/lib/elm_gengrid.c +++ b/src/lib/elm_gengrid.c @@ -3080,7 +3080,10 @@ _key_action_move(Evas_Object *obj, const char *params) if (_elm_gengrid_item_edge_check(sd->focused_item, ELM_FOCUS_LEFT)) { if (sd->item_loop_enable) -return EINA_TRUE; +{ + if (_item_horizontal_loop(obj, ELM_FOCUS_RIGHT)) + return EINA_TRUE; +} return EINA_FALSE; } if (!_elm_config->item_select_on_focus_disable) --
[EGIT] [core/elementary] master 01/01: test_gengrid: add item_select_on_focus_disabled option in gengrid2 test
ami pushed a commit to branch master. http://git.enlightenment.org/core/elementary.git/commit/?id=330c21b836c12021234a0cc071643d862360e76f commit 330c21b836c12021234a0cc071643d862360e76f Author: Amitesh Singh Date: Fri Aug 28 13:54:50 2015 +0530 test_gengrid: add item_select_on_focus_disabled option in gengrid2 test --- src/bin/test_gengrid.c | 29 - 1 file changed, 20 insertions(+), 9 deletions(-) diff --git a/src/bin/test_gengrid.c b/src/bin/test_gengrid.c index 1de161a..e41f212 100644 --- a/src/bin/test_gengrid.c +++ b/src/bin/test_gengrid.c @@ -775,6 +775,15 @@ _size_changed(void *data, Evas_Object *obj, void *event_info EINA_UNUSED) elm_gengrid_item_size_set(grid, ELM_SCALE_SIZE(size), ELM_SCALE_SIZE(size)); } +static void +_gg_focus_item_select_on_focus_disable_changed_cb(void *data EINA_UNUSED, + Evas_Object *obj, + void *event_info + EINA_UNUSED) +{ + elm_config_item_select_on_focus_disabled_set(elm_check_state_get(obj)); +} + void test_gengrid2(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED) { @@ -872,6 +881,17 @@ test_gengrid2(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_ elm_box_pack_end(hbx, ck); evas_object_show(ck); + ck = elm_check_add(hbx); + elm_object_text_set(ck, "Item Select on Focus disable"); + elm_check_state_set(ck, elm_config_item_select_on_focus_disabled_get()); + evas_object_size_hint_weight_set(ck, EVAS_HINT_EXPAND, 0.0); + evas_object_smart_callback_add(ck, "changed", + _gg_focus_item_select_on_focus_disable_changed_cb, + NULL); + elm_box_pack_end(hbx, ck); + evas_object_show(ck); + + gic = elm_gengrid_item_class_new(); gic->item_style = "default"; gic->func.text_get = grid_text_get; @@ -1669,15 +1689,6 @@ _grid_reorder_mode(void *data, Evas_Object *obj, } static void -_gg_focus_item_select_on_focus_disable_changed_cb(void *data EINA_UNUSED, - Evas_Object *obj, - void *event_info - EINA_UNUSED) -{ - elm_config_item_select_on_focus_disabled_set(elm_check_state_get(obj)); -} - -static void _gg_first_item_focus_on_first_focus_in_cb(void *data EINA_UNUSED, Evas_Object *obj, void *event_info EINA_UNUSED) { --
[EGIT] [core/elementary] elementary-1.15 01/01: toolbar: fix issue of focus not coming to item on mouse click
ami pushed a commit to branch elementary-1.15. http://git.enlightenment.org/core/elementary.git/commit/?id=ec672ab1135f154dd61741f0ff29ebe4f51f5d6b commit ec672ab1135f154dd61741f0ff29ebe4f51f5d6b Author: Amitesh Singh Date: Wed Aug 26 22:30:02 2015 +0530 toolbar: fix issue of focus not coming to item on mouse click resize object was not getting focused in case of mouse click. Steps to reproduce: 1. elementary_test -to "toolbar focus". 2. set focus to toolbar item via mouse. 3. focus does not come to toolbar. fixes T2697 @fix --- src/lib/elm_toolbar.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/lib/elm_toolbar.c b/src/lib/elm_toolbar.c index d2797bc..0061934 100644 --- a/src/lib/elm_toolbar.c +++ b/src/lib/elm_toolbar.c @@ -752,8 +752,11 @@ _elm_toolbar_elm_widget_on_focus(Eo *obj, Elm_Toolbar_Data *sd) if (!int_ret) return EINA_FALSE; if (!sd->items) return EINA_FALSE; - if (elm_widget_focus_get(obj) && !sd->mouse_down) + if (elm_widget_focus_get(obj)) { +evas_object_focus_set(wd->resize_obj, EINA_TRUE); +if (sd->mouse_down) return EINA_TRUE; + if (sd->last_focused_item) eo_it = sd->last_focused_item; else if (_elm_config->first_item_focus_on_first_focus_in && @@ -767,7 +770,6 @@ _elm_toolbar_elm_widget_on_focus(Eo *obj, Elm_Toolbar_Data *sd) eo_it = _elm_toolbar_nearest_visible_item_get(obj, eo_it); if (eo_it) _elm_toolbar_item_focused(eo_it); } -evas_object_focus_set(wd->resize_obj, EINA_TRUE); } else { --
[EGIT] [core/elementary] elementary-1.15 01/01: config: revert first_item_focus_on_first_focus_in to 0
ami pushed a commit to branch elementary-1.15. http://git.enlightenment.org/core/elementary.git/commit/?id=a401b83cad0851dcbc4f32c09d482dae581c6da5 commit a401b83cad0851dcbc4f32c09d482dae581c6da5 Author: Amitesh Singh Date: Thu Aug 27 10:00:39 2015 +0530 config: revert first_item_focus_on_first_focus_in to 0 This fixes a behavioural change introduced in D1135. Steps to reproduce: 1. elementary_test -> genlist/list/gengrid 2. scroll dragging the scroll-bar 3. an item nearest to viewport gets selected when you release the mouse button Most of the time, we don't want item to be selected or focused on dragging scroll-bar via mouse. Revert config flag to 0 to have old behaviour before D1135. fixes: T2662 @fix --- config/default/base.src.in | 2 +- config/mobile/base.src.in | 2 +- config/standard/base.src.in | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/config/default/base.src.in b/config/default/base.src.in index 40550d8..a0f42b1 100644 --- a/config/default/base.src.in +++ b/config/default/base.src.in @@ -48,7 +48,7 @@ group "Elm_Config" struct { value "focus_highlight_animate" uchar: 0; value "focus_highlight_clip_disable" uchar: 0; value "item_select_on_focus_disable" uchar: 0; - value "first_item_focus_on_first_focus_in" uchar: 1; + value "first_item_focus_on_first_focus_in" uchar: 0; value "focus_move_policy" uchar: 0; value "toolbar_shrink_mode" int: 3; value "fileselector_expand_enable" uchar: 0; diff --git a/config/mobile/base.src.in b/config/mobile/base.src.in index 772aca0..92af08a 100644 --- a/config/mobile/base.src.in +++ b/config/mobile/base.src.in @@ -48,7 +48,7 @@ group "Elm_Config" struct { value "focus_highlight_animate" uchar: 0; value "focus_highlight_clip_disable" uchar: 0; value "item_select_on_focus_disable" uchar: 0; - value "first_item_focus_on_first_focus_in" uchar: 1; + value "first_item_focus_on_first_focus_in" uchar: 0; value "focus_move_policy" uchar: 0; value "toolbar_shrink_mode" int: 3; value "fileselector_expand_enable" uchar: 0; diff --git a/config/standard/base.src.in b/config/standard/base.src.in index af5ab67..bcd4c1e 100644 --- a/config/standard/base.src.in +++ b/config/standard/base.src.in @@ -48,7 +48,7 @@ group "Elm_Config" struct { value "focus_highlight_animate" uchar: 0; value "focus_highlight_clip_disable" uchar: 1; value "item_select_on_focus_disable" uchar: 0; - value "first_item_focus_on_first_focus_in" uchar: 1; + value "first_item_focus_on_first_focus_in" uchar: 0; value "focus_move_policy" uchar: 0; value "toolbar_shrink_mode" int: 3; value "fileselector_expand_enable" uchar: 1; --
[EGIT] [core/elementary] elementary-1.15 03/03: gengrid: fix item looping in case of horizontal mode
ami pushed a commit to branch elementary-1.15. http://git.enlightenment.org/core/elementary.git/commit/?id=8a54819e27dbad9bc9c0e2ed3d2d971acd557982 commit 8a54819e27dbad9bc9c0e2ed3d2d971acd557982 Author: Amitesh Singh Date: Fri Aug 28 10:34:52 2015 +0530 gengrid: fix item looping in case of horizontal mode This mistake is done in a8afaebf3109f1cb8e397e29 --- src/lib/elm_gengrid.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/lib/elm_gengrid.c b/src/lib/elm_gengrid.c index 7414ca9..4b98b53 100644 --- a/src/lib/elm_gengrid.c +++ b/src/lib/elm_gengrid.c @@ -3075,7 +3075,10 @@ _key_action_move(Evas_Object *obj, const char *params) if (_elm_gengrid_item_edge_check(sd->focused_item, ELM_FOCUS_LEFT)) { if (sd->item_loop_enable) -return EINA_TRUE; +{ + if (_item_horizontal_loop(obj, ELM_FOCUS_RIGHT)) + return EINA_TRUE; +} return EINA_FALSE; } if (!_elm_config->item_select_on_focus_disable) --
[EGIT] [core/elementary] elementary-1.15 01/03: gengrid: fix item focus movement in case of horizontal mode
ami pushed a commit to branch elementary-1.15. http://git.enlightenment.org/core/elementary.git/commit/?id=5c091504987b66eb2ee068cdc20d635a2c73950a commit 5c091504987b66eb2ee068cdc20d635a2c73950a Author: Amitesh Singh Date: Wed Aug 26 15:35:47 2015 +0530 gengrid: fix item focus movement in case of horizontal mode Steps to reproduce: 1. elementary -> gengrid focus 2. change mode to horizontal 3. set focus to one of item in 2nd column. 4. Press Left direction key issue: focus moves out of gengrid. @fix --- src/lib/elm_gengrid.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/lib/elm_gengrid.c b/src/lib/elm_gengrid.c index cca3a0e..5eca39e 100644 --- a/src/lib/elm_gengrid.c +++ b/src/lib/elm_gengrid.c @@ -2493,14 +2493,16 @@ _elm_gengrid_item_edge_check(Elm_Object_Item *eo_it, { row = cvh / sd->item_height; if (row <= 0) row = 1; - if (tmp->position <= row) + col = tmp->position / row; + if (col == 0) return EINA_TRUE; } else if (sd->item_width > 0) { col = cvw / sd->item_width; if (col <= 0) col = 1; - if (tmp->position <= col) + row = tmp->position / col; + if (row == 0) return EINA_TRUE; } } --
[EGIT] [core/elementary] elementary-1.15 02/03: gengrid: no need to loop in case of reorder mode is enabled
ami pushed a commit to branch elementary-1.15. http://git.enlightenment.org/core/elementary.git/commit/?id=4da16f3d5ddc941cc5308e16a3d4eb0498add1b2 commit 4da16f3d5ddc941cc5308e16a3d4eb0498add1b2 Author: Amitesh Singh Date: Wed Aug 26 20:43:39 2015 +0530 gengrid: no need to loop in case of reorder mode is enabled There is no need to loop when reorder mode is enabled. This looks ugly and nobody wants it. This fault was introduced in 7aaa5c8d0a4a5714b4f1bf79e This patch also fixes following crash 1. elementary_test -to "Gengrid 2". 2. Enable all the options available. 3. Do reorder of item via keys. 4. Observe segv on reordering edge items. @fix --- src/lib/elm_gengrid.c | 24 +--- 1 file changed, 5 insertions(+), 19 deletions(-) diff --git a/src/lib/elm_gengrid.c b/src/lib/elm_gengrid.c index 5eca39e..7414ca9 100644 --- a/src/lib/elm_gengrid.c +++ b/src/lib/elm_gengrid.c @@ -3057,10 +3057,7 @@ _key_action_move(Evas_Object *obj, const char *params) if (_elm_gengrid_item_edge_check(sd->focused_item, ELM_FOCUS_LEFT)) { if (sd->item_loop_enable) -{ - if (_item_horizontal_loop(obj, ELM_FOCUS_RIGHT)) - return EINA_TRUE; -} +return EINA_TRUE; return EINA_FALSE; } if (!sd->horizontal) @@ -3078,10 +3075,7 @@ _key_action_move(Evas_Object *obj, const char *params) if (_elm_gengrid_item_edge_check(sd->focused_item, ELM_FOCUS_LEFT)) { if (sd->item_loop_enable) -{ - if (_item_horizontal_loop(obj, ELM_FOCUS_RIGHT)) - return EINA_TRUE; -} +return EINA_TRUE; return EINA_FALSE; } if (!_elm_config->item_select_on_focus_disable) @@ -3138,16 +3132,8 @@ _key_action_move(Evas_Object *obj, const char *params) if (_elm_gengrid_item_edge_check(sd->focused_item, ELM_FOCUS_RIGHT)) { - if (sd->item_loop_enable && !sd->horizontal) -{ - if (_item_horizontal_loop(obj, ELM_FOCUS_LEFT)) - return EINA_TRUE; -} - else if (sd->item_loop_enable) -{ - if (_item_horizontal_loop(obj, ELM_FOCUS_UP)) - return EINA_TRUE; -} + if (sd->item_loop_enable) +return EINA_TRUE; return EINA_FALSE; } if (!sd->horizontal) @@ -3168,7 +3154,7 @@ _key_action_move(Evas_Object *obj, const char *params) { if (_item_horizontal_loop(obj, ELM_FOCUS_UP)) return EINA_TRUE; -} +} } if (!_elm_config->item_select_on_focus_disable) { --
[EGIT] [core/efl] master 01/01: eina: cpu - fix a typo in eina_cpu_count API doc
ami pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=eab2b5af840afe71784b0d24c1d0bb10743cb04d commit eab2b5af840afe71784b0d24c1d0bb10743cb04d Author: Amitesh Singh Date: Sat Aug 29 08:01:10 2015 +0530 eina: cpu - fix a typo in eina_cpu_count API doc --- src/lib/eina/eina_cpu.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/eina/eina_cpu.h b/src/lib/eina/eina_cpu.h index e871774..bb7082b 100644 --- a/src/lib/eina/eina_cpu.h +++ b/src/lib/eina/eina_cpu.h @@ -73,7 +73,7 @@ EAPI extern Eina_Cpu_Features eina_cpu_features; EAPI Eina_Cpu_Features eina_cpu_features_get(void); /** - * @brief Get the current number of precessors + * @brief Get the current number of processors * * @return the number of processors that are online, that * is available when the function is called. --
[EGIT] [core/elementary] master 01/01: genlist: fix indentation & remove whitespaces
ami pushed a commit to branch master. http://git.enlightenment.org/core/elementary.git/commit/?id=b6a1685adfe1dfb4881f6c322cb194153087b095 commit b6a1685adfe1dfb4881f6c322cb194153087b095 Author: Amitesh Singh Date: Tue Sep 1 08:45:38 2015 +0530 genlist: fix indentation & remove whitespaces --- src/lib/elm_genlist.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/lib/elm_genlist.c b/src/lib/elm_genlist.c index 687040f..e620c47 100644 --- a/src/lib/elm_genlist.c +++ b/src/lib/elm_genlist.c @@ -3204,14 +3204,14 @@ _elm_genlist_elm_widget_on_focus(Eo *obj, Elm_Genlist_Data *sd) eo_it = elm_genlist_first_item_get(obj); is_sel = EINA_TRUE; } - + while (eo_it) -{ - ELM_GENLIST_ITEM_DATA_GET(eo_it, it); - if ((!_is_no_select(it)) && (!elm_object_item_disabled_get(eo_it))) - break; - eo_it = EO_OBJ(ELM_GEN_ITEM_FROM_INLIST(EINA_INLIST_GET(it)->next)); -} + { + ELM_GENLIST_ITEM_DATA_GET(eo_it, it); + if ((!_is_no_select(it)) && (!elm_object_item_disabled_get(eo_it))) + break; + eo_it = EO_OBJ(ELM_GEN_ITEM_FROM_INLIST(EINA_INLIST_GET(it)->next)); + } if (eo_it) { --
[EGIT] [core/elementary] master 01/01: fix typos in APIs doc
ami pushed a commit to branch master. http://git.enlightenment.org/core/elementary.git/commit/?id=5db028a32de71ce167851e75b221499593d7cd89 commit 5db028a32de71ce167851e75b221499593d7cd89 Author: Amitesh Singh Date: Sat Sep 19 09:13:09 2015 +0530 fix typos in APIs doc --- src/lib/elm_app_server.eo | 2 +- src/lib/elm_widget_item.eo | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib/elm_app_server.eo b/src/lib/elm_app_server.eo index 4cd82ea..fe82edc 100644 --- a/src/lib/elm_app_server.eo +++ b/src/lib/elm_app_server.eo @@ -53,7 +53,7 @@ class Elm_App_Server (Eo.Base) legacy: null; params { @in packageid: const(char)*; [[package of application]] -@in create_view_cb: Elm_App_Server_Create_View_Cb; [[callback to be called when user whants to open some application view]] +@in create_view_cb: Elm_App_Server_Create_View_Cb; [[callback to be called when user wants to open some application view]] } } close_all { diff --git a/src/lib/elm_widget_item.eo b/src/lib/elm_widget_item.eo index 1f61b96..48f4e44 100644 --- a/src/lib/elm_widget_item.eo +++ b/src/lib/elm_widget_item.eo @@ -385,7 +385,7 @@ class Elm.Widget_Item(Eo.Base, Elm_Interface_Atspi_Accessible, [[This returns track object of the item. Note: This gets a rectangle object that represents the object item's internal - object. If you wanna check the geometry, visibility of the item, you + object. If you want to check the geometry, visibility of the item, you can call the evas apis such as evas_object_geometry_get(), evas_object_visible_get() to the track object. Note that all of the widget items may/may not have the internal object so this api may @@ -424,7 +424,7 @@ class Elm.Widget_Item(Eo.Base, Elm_Interface_Atspi_Accessible, Note: This gets the reference count for the track object. Whenever you call the @.track, the reference count will be increased by - one. Likely the referece count will be decreased again when you call + one. Likely the reference count will be decreased again when you call the @.untrack. Unless the reference count reaches to zero, the track object won't be deleted. So please be sure to call @.untrack() paired to the elm_object_item_track call --
[EGIT] [core/efl] master 01/01: fix typos in API doc
ami pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=86993e172a0c8407aa2d2381fc5cf08d32eaa5bd commit 86993e172a0c8407aa2d2381fc5cf08d32eaa5bd Author: Amitesh Singh Date: Sat Sep 19 09:24:58 2015 +0530 fix typos in API doc --- src/lib/edje/edje_object.eo| 2 +- src/lib/efl/interfaces/efl_file.eo | 4 ++-- src/lib/efl/interfaces/efl_gfx_shape.eo| 2 +- src/lib/eo/eo_base.eo | 4 ++-- src/lib/evas/canvas/evas_canvas3d_material.eo | 2 +- src/lib/evas/canvas/evas_canvas3d_mesh.eo | 2 +- src/lib/evas/canvas/evas_canvas3d_primitive.eo | 8 src/lib/evas/canvas/evas_textgrid.eo | 2 +- 8 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/lib/edje/edje_object.eo b/src/lib/edje/edje_object.eo index 2641ea8..31e4aff 100644 --- a/src/lib/edje/edje_object.eo +++ b/src/lib/edje/edje_object.eo @@ -1259,7 +1259,7 @@ class Edje.Object (Evas.Smart_Clipped, Efl.File) part_text_unescaped_set { [[Sets the raw (non escaped) text for an object part. - This funciton will not do escape for you if it is a TEXTBLOCK part, that is, + This function will not do escape for you if it is a TEXTBLOCK part, that is, if text contain tags, these tags will not be interpreted/parsed by TEXTBLOCK. See also @.part_text_unescaped_get().]] diff --git a/src/lib/efl/interfaces/efl_file.eo b/src/lib/efl/interfaces/efl_file.eo index bac1722..517c5d6 100644 --- a/src/lib/efl/interfaces/efl_file.eo +++ b/src/lib/efl/interfaces/efl_file.eo @@ -127,11 +127,11 @@ interface Efl.File { [[Block and wait until all asynchronous operations are completed. Unless the async flag was set on this object, this method has no effect.]] - return: bool;[[$false if an error occured, else $true]] + return: bool;[[$false if an error occurred, else $true]] } } events { async,opened; [[The file was successfully opened asynchronously]] - async,error; [[Error occured in asynchronous file operation]] + async,error; [[Error occurred in asynchronous file operation]] } } diff --git a/src/lib/efl/interfaces/efl_gfx_shape.eo b/src/lib/efl/interfaces/efl_gfx_shape.eo index d8a926c..959b413 100644 --- a/src/lib/efl/interfaces/efl_gfx_shape.eo +++ b/src/lib/efl/interfaces/efl_gfx_shape.eo @@ -107,7 +107,7 @@ mixin Efl.Gfx.Shape set { [[Sets the join style to be used for stroking the path. The join style will be used for joining the two line segment - while stroking teh path. + while stroking the path. See also \@ref Efl_Gfx_Join. diff --git a/src/lib/eo/eo_base.eo b/src/lib/eo/eo_base.eo index d0b919c..73223e6 100644 --- a/src/lib/eo/eo_base.eo +++ b/src/lib/eo/eo_base.eo @@ -258,7 +258,7 @@ abstract Eo.Base () params { @in comp_obj: Eo.Base *; [[the object that will be used to composite the parent.]] } - return: bool; [[$true if successfull. $false otherwise.]] + return: bool; [[$true if successful. $false otherwise.]] } composite_detach @beta { [[Detach a composite object from another object. @@ -270,7 +270,7 @@ abstract Eo.Base () params { @in comp_obj: Eo.Base *; [[the object that will be removed from the parent.]] } - return: bool; [[$true if successfull. $false otherwise.]] + return: bool; [[$true if successful. $false otherwise.]] } composite_part_is @beta { [[Check if an object is part of a composite object. diff --git a/src/lib/evas/canvas/evas_canvas3d_material.eo b/src/lib/evas/canvas/evas_canvas3d_material.eo index 839da7e..9d072c0 100644 --- a/src/lib/evas/canvas/evas_canvas3d_material.eo +++ b/src/lib/evas/canvas/evas_canvas3d_material.eo @@ -7,7 +7,7 @@ class Evas.Canvas3D.Material (Evas.Canvas3D.Object, Evas.Common_Interface) [[Set the material attribute color of the given material. Material color is used also when texture map is enabled. The colors - will be modulated (multiplied). To controll the color contribution + will be modulated (multiplied). To control the color contribution of a material attribute, use gray color. Setting color value for normal attribute has no effect. diff --git a/src/lib/evas/canvas/evas_canvas3d_mesh.eo b/src/lib/evas/canvas/evas_canvas3d_mesh.eo index 0196736..d0faf59 100644 --- a/src/lib/evas/canvas/evas_canvas3d_mesh.eo +++ b/src/lib/evas/canvas/evas_canvas3d_mesh.eo @@ -105,7 +105,7 @@ class Evas.Canvas3D.Mesh (Evas.Canvas3D.Object, Evas.Common_Interface, Efl.File) buffer. This function allocates internal index buffer any copy data from - the given buffer. Futher modifications
[EGIT] [core/elementary] master 01/01: gengrid: fix duplicate edje signal (elm, state, focused) to item on focus
ami pushed a commit to branch master. http://git.enlightenment.org/core/elementary.git/commit/?id=544d2a078ddd59a750aa28fff7768dc31d006cfe commit 544d2a078ddd59a750aa28fff7768dc31d006cfe Author: Amitesh Singh Date: Wed Sep 23 12:20:05 2015 +0530 gengrid: fix duplicate edje signal (elm,state,focused) to item on focus @fix --- src/lib/elm_gengrid.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/lib/elm_gengrid.c b/src/lib/elm_gengrid.c index c55fd3f..50d901c 100644 --- a/src/lib/elm_gengrid.c +++ b/src/lib/elm_gengrid.c @@ -2020,7 +2020,6 @@ _elm_gengrid_item_focused(Elm_Object_Item *eo_it) sd->focused_item = eo_it; - if (it->realized) _elm_gengrid_item_focus_raise(it); eo_do(obj, eo_event_callback_call(ELM_GENGRID_EVENT_ITEM_FOCUSED, eo_it)); if (_elm_config->atspi_mode) elm_interface_atspi_accessible_state_changed_signal_emit(eo_it, ELM_ATSPI_STATE_FOCUSED, EINA_TRUE); --
[EGIT] [core/elementary] master 01/01: gengrid: move item focus related code to internal _elm_gengrid_item_focused()
ami pushed a commit to branch master. http://git.enlightenment.org/core/elementary.git/commit/?id=138ee71589bb610cd4d6f4eb5f40619fc9e8fcdf commit 138ee71589bb610cd4d6f4eb5f40619fc9e8fcdf Author: Amitesh Singh Date: Wed Sep 23 12:36:15 2015 +0530 gengrid: move item focus related code to internal _elm_gengrid_item_focused() --- src/lib/elm_gengrid.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/lib/elm_gengrid.c b/src/lib/elm_gengrid.c index 50d901c..d9cf9b3 100644 --- a/src/lib/elm_gengrid.c +++ b/src/lib/elm_gengrid.c @@ -2020,6 +2020,15 @@ _elm_gengrid_item_focused(Elm_Object_Item *eo_it) sd->focused_item = eo_it; + /* If item is not realized state, widget couldn't get focus_highlight data. */ + if (it->realized) + { +_elm_gengrid_item_focus_raise(it); +_elm_widget_item_highlight_in_theme(obj, eo_it); +_elm_widget_highlight_in_theme_update(obj); +_elm_widget_focus_highlight_start(obj); + } + eo_do(obj, eo_event_callback_call(ELM_GENGRID_EVENT_ITEM_FOCUSED, eo_it)); if (_elm_config->atspi_mode) elm_interface_atspi_accessible_state_changed_signal_emit(eo_it, ELM_ATSPI_STATE_FOCUSED, EINA_TRUE); @@ -4012,15 +4021,6 @@ _elm_gengrid_item_elm_widget_item_focus_set(Eo *eo_it, Elm_Gen_Item *it, Eina_Bo if (sd->focused_item) _elm_gengrid_item_unfocused(sd->focused_item); _elm_gengrid_item_focused(eo_it); - - /* If item is not realized state, widget couldn't get focus_highlight data. */ - if (it->realized) - { - _elm_gengrid_item_focus_raise(it); - _elm_widget_item_highlight_in_theme(obj, eo_it); - _elm_widget_highlight_in_theme_update(obj); - _elm_widget_focus_highlight_start(obj); - } } } else --
[EGIT] [core/elementary] master 01/01: gengrid: rename function _elm_gengrid_item_focus_raise to _elm_gengrid_item_focus_update
ami pushed a commit to branch master. http://git.enlightenment.org/core/elementary.git/commit/?id=5c45fb0a054b8884330f23a7f9d37d05b1e9b157 commit 5c45fb0a054b8884330f23a7f9d37d05b1e9b157 Author: Amitesh Singh Date: Wed Sep 23 12:45:56 2015 +0530 gengrid: rename function _elm_gengrid_item_focus_raise to _elm_gengrid_item_focus_update In function _elm_gengrid_item_focus_raise, we are doing more than just focus_raise. Rename it to something more meaningful. --- src/lib/elm_gengrid.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib/elm_gengrid.c b/src/lib/elm_gengrid.c index d9cf9b3..d5983e4 100644 --- a/src/lib/elm_gengrid.c +++ b/src/lib/elm_gengrid.c @@ -1286,7 +1286,7 @@ _access_widget_item_register(Elm_Gen_Item *it) } static void -_elm_gengrid_item_focus_raise(Elm_Gen_Item *it) +_elm_gengrid_item_focus_update(Elm_Gen_Item *it) { const char *focus_raise; Evas_Object *obj = WIDGET(it); @@ -1402,7 +1402,7 @@ _item_realize(Elm_Gen_Item *it) if (eo_it == sd->focused_item) { -_elm_gengrid_item_focus_raise(it); +_elm_gengrid_item_focus_update(it); _elm_widget_item_highlight_in_theme(WIDGET(it), EO_OBJ(it)); _elm_widget_highlight_in_theme_update(WIDGET(it)); _elm_widget_focus_highlight_start(WIDGET(it)); @@ -2023,7 +2023,7 @@ _elm_gengrid_item_focused(Elm_Object_Item *eo_it) /* If item is not realized state, widget couldn't get focus_highlight data. */ if (it->realized) { -_elm_gengrid_item_focus_raise(it); +_elm_gengrid_item_focus_update(it); _elm_widget_item_highlight_in_theme(obj, eo_it); _elm_widget_highlight_in_theme_update(obj); _elm_widget_focus_highlight_start(obj); --
[EGIT] [core/elementary] master 01/01: test_genlist: fix compilation warnings
ami pushed a commit to branch master. http://git.enlightenment.org/core/elementary.git/commit/?id=88270e93d8c565211143aeaa700d76f935c3a567 commit 88270e93d8c565211143aeaa700d76f935c3a567 Author: Amitesh Singh Date: Wed Sep 23 22:21:39 2015 +0530 test_genlist: fix compilation warnings --- src/bin/test_genlist.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/bin/test_genlist.c b/src/bin/test_genlist.c index cc3958f..0ecd43b 100644 --- a/src/bin/test_genlist.c +++ b/src/bin/test_genlist.c @@ -4867,7 +4867,9 @@ gl_filter_get(void *data, Evas_Object *obj EINA_UNUSED, void *key) } static void -_gl_filter_finished_cb(void *data, Evas_Object *obj EINA_UNUSED, void *event_info) +_gl_filter_finished_cb(void *data EINA_UNUSED, + Evas_Object *obj EINA_UNUSED, + void *event_info EINA_UNUSED) { printf("Filter finished\n"); } --
[EGIT] [core/elementary] elementary-1.15 03/03: gengrid: rename function _elm_gengrid_item_focus_raise to _elm_gengrid_item_focus_update
ami pushed a commit to branch elementary-1.15. http://git.enlightenment.org/core/elementary.git/commit/?id=b47a332cd2599f84334c3408676ec704a9361029 commit b47a332cd2599f84334c3408676ec704a9361029 Author: Amitesh Singh Date: Wed Sep 23 12:45:56 2015 +0530 gengrid: rename function _elm_gengrid_item_focus_raise to _elm_gengrid_item_focus_update In function _elm_gengrid_item_focus_raise, we are doing more than just focus_raise. Rename it to something more meaningful. --- src/lib/elm_gengrid.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib/elm_gengrid.c b/src/lib/elm_gengrid.c index 89d2b3a..70f4f3f 100644 --- a/src/lib/elm_gengrid.c +++ b/src/lib/elm_gengrid.c @@ -1286,7 +1286,7 @@ _access_widget_item_register(Elm_Gen_Item *it) } static void -_elm_gengrid_item_focus_raise(Elm_Gen_Item *it) +_elm_gengrid_item_focus_update(Elm_Gen_Item *it) { const char *focus_raise; Evas_Object *obj = WIDGET(it); @@ -1402,7 +1402,7 @@ _item_realize(Elm_Gen_Item *it) if (eo_it == sd->focused_item) { -_elm_gengrid_item_focus_raise(it); +_elm_gengrid_item_focus_update(it); _elm_widget_item_highlight_in_theme(WIDGET(it), EO_OBJ(it)); _elm_widget_highlight_in_theme_update(WIDGET(it)); _elm_widget_focus_highlight_start(WIDGET(it)); @@ -2023,7 +2023,7 @@ _elm_gengrid_item_focused(Elm_Object_Item *eo_it) /* If item is not realized state, widget couldn't get focus_highlight data. */ if (it->realized) { -_elm_gengrid_item_focus_raise(it); +_elm_gengrid_item_focus_update(it); _elm_widget_item_highlight_in_theme(obj, eo_it); _elm_widget_highlight_in_theme_update(obj); _elm_widget_focus_highlight_start(obj); --
[EGIT] [core/elementary] elementary-1.15 01/03: gengrid: fix duplicate edje signal (elm, state, focused) to item on focus
ami pushed a commit to branch elementary-1.15. http://git.enlightenment.org/core/elementary.git/commit/?id=ae5489b059c1fac44d6ad397b04f54c80e132ac7 commit ae5489b059c1fac44d6ad397b04f54c80e132ac7 Author: Amitesh Singh Date: Wed Sep 23 12:20:05 2015 +0530 gengrid: fix duplicate edje signal (elm,state,focused) to item on focus @fix --- src/lib/elm_gengrid.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/lib/elm_gengrid.c b/src/lib/elm_gengrid.c index b519c25..ef8b040 100644 --- a/src/lib/elm_gengrid.c +++ b/src/lib/elm_gengrid.c @@ -2020,7 +2020,6 @@ _elm_gengrid_item_focused(Elm_Object_Item *eo_it) sd->focused_item = eo_it; - if (it->realized) _elm_gengrid_item_focus_raise(it); eo_do(obj, eo_event_callback_call(ELM_GENGRID_EVENT_ITEM_FOCUSED, eo_it)); if (_elm_config->atspi_mode) elm_interface_atspi_accessible_state_changed_signal_emit(eo_it, ELM_ATSPI_STATE_FOCUSED, EINA_TRUE); --
[EGIT] [core/elementary] elementary-1.15 02/03: gengrid: move item focus related code to internal _elm_gengrid_item_focused()
ami pushed a commit to branch elementary-1.15. http://git.enlightenment.org/core/elementary.git/commit/?id=3cd14dd129da96b8920addc5c9cee452bf4e0e29 commit 3cd14dd129da96b8920addc5c9cee452bf4e0e29 Author: Amitesh Singh Date: Wed Sep 23 12:36:15 2015 +0530 gengrid: move item focus related code to internal _elm_gengrid_item_focused() --- src/lib/elm_gengrid.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/lib/elm_gengrid.c b/src/lib/elm_gengrid.c index ef8b040..89d2b3a 100644 --- a/src/lib/elm_gengrid.c +++ b/src/lib/elm_gengrid.c @@ -2020,6 +2020,15 @@ _elm_gengrid_item_focused(Elm_Object_Item *eo_it) sd->focused_item = eo_it; + /* If item is not realized state, widget couldn't get focus_highlight data. */ + if (it->realized) + { +_elm_gengrid_item_focus_raise(it); +_elm_widget_item_highlight_in_theme(obj, eo_it); +_elm_widget_highlight_in_theme_update(obj); +_elm_widget_focus_highlight_start(obj); + } + eo_do(obj, eo_event_callback_call(ELM_GENGRID_EVENT_ITEM_FOCUSED, eo_it)); if (_elm_config->atspi_mode) elm_interface_atspi_accessible_state_changed_signal_emit(eo_it, ELM_ATSPI_STATE_FOCUSED, EINA_TRUE); @@ -3867,15 +3876,6 @@ _elm_gengrid_item_elm_widget_item_focus_set(Eo *eo_it, Elm_Gen_Item *it, Eina_Bo if (sd->focused_item) _elm_gengrid_item_unfocused(sd->focused_item); _elm_gengrid_item_focused(eo_it); - - /* If item is not realized state, widget couldn't get focus_highlight data. */ - if (it->realized) - { - _elm_gengrid_item_focus_raise(it); - _elm_widget_item_highlight_in_theme(obj, eo_it); - _elm_widget_highlight_in_theme_update(obj); - _elm_widget_focus_highlight_start(obj); - } } } else --
[EGIT] [core/elementary] master 01/01: genlist: refractor item focus update code
ami pushed a commit to branch master. http://git.enlightenment.org/core/elementary.git/commit/?id=284109bc7ea8d3a4051d8221287d28d0a6790122 commit 284109bc7ea8d3a4051d8221287d28d0a6790122 Author: Amitesh Singh Date: Mon Sep 28 13:34:02 2015 +0530 genlist: refractor item focus update code Add duplicate code into a new local function _elm_genlist_item_focus_update --- src/lib/elm_genlist.c | 59 +++ 1 file changed, 26 insertions(+), 33 deletions(-) diff --git a/src/lib/elm_genlist.c b/src/lib/elm_genlist.c index 92e4705..a0d5cd7 100644 --- a/src/lib/elm_genlist.c +++ b/src/lib/elm_genlist.c @@ -1689,6 +1689,30 @@ _access_widget_item_register(Elm_Gen_Item *it) } static void +_elm_genlist_item_focus_update(Elm_Gen_Item *it) +{ + const char *focus_raise; + Evas_Object *obj = WIDGET(it); + ELM_GENLIST_DATA_GET(obj, sd); + + if (elm_widget_focus_highlight_enabled_get(obj)) + edje_object_signal_emit(VIEW(it), SIGNAL_FOCUSED, "elm"); + + focus_raise = edje_object_data_get(VIEW(it), "focusraise"); + if ((focus_raise) && (!strcmp(focus_raise, "on"))) + { +Elm_Gen_Item *git; +Eina_List *l; + +evas_object_raise(VIEW(it)); +EINA_LIST_FOREACH(sd->group_items, l, git) + { + if (git->realized) evas_object_raise(VIEW(git)); + } + } +} + +static void _item_realize(Elm_Gen_Item *it, int in, Eina_Bool calc) @@ -1771,22 +1795,7 @@ _item_realize(Elm_Gen_Item *it, if (EO_OBJ(it) == sd->focused_item) { - const char *focus_raise; - if (elm_widget_focus_highlight_enabled_get(WIDGET(it)) || _elm_config->win_auto_focus_enable) - edje_object_signal_emit(VIEW(it), SIGNAL_FOCUSED, "elm"); - - focus_raise = edje_object_data_get(VIEW(it), "focusraise"); - if ((focus_raise) && (!strcmp(focus_raise, "on"))) - { - Elm_Gen_Item *git; - Eina_List *l; - evas_object_raise(VIEW(it)); - EINA_LIST_FOREACH(sd->group_items, l, git) -{ - if (git->realized) evas_object_raise(VIEW(git)); -} - } - + _elm_genlist_item_focus_update(it); _elm_widget_item_highlight_in_theme(WIDGET(it), EO_OBJ(it)); _elm_widget_highlight_in_theme_update(WIDGET(it)); _elm_widget_focus_highlight_start(WIDGET(it)); @@ -2617,7 +2626,6 @@ _elm_genlist_item_focused(Elm_Object_Item *eo_it) ELM_GENLIST_ITEM_DATA_GET(eo_it, it); Evas_Object *obj = WIDGET(it); ELM_GENLIST_DATA_GET(obj, sd); - const char *focus_raise; Eina_Bool tmp; if (_is_no_select(it) || @@ -2642,22 +2650,7 @@ _elm_genlist_item_focused(Elm_Object_Item *eo_it) sd->focused_item = eo_it; if (it->realized) - { -if (elm_widget_focus_highlight_enabled_get(obj)) - edje_object_signal_emit(VIEW(it), SIGNAL_FOCUSED, "elm"); - -focus_raise = edje_object_data_get(VIEW(it), "focusraise"); -if ((focus_raise) && (!strcmp(focus_raise, "on"))) - { - Elm_Gen_Item *git; - Eina_List *l; - evas_object_raise(VIEW(it)); - EINA_LIST_FOREACH(sd->group_items, l, git) - { - if (git->realized) evas_object_raise(VIEW(git)); - } - } - } + _elm_genlist_item_focus_update(it); eo_do(obj, eo_event_callback_call(ELM_GENLIST_EVENT_ITEM_FOCUSED, eo_it)); if (_elm_config->atspi_mode) elm_interface_atspi_accessible_state_changed_signal_emit(eo_it, ELM_ATSPI_STATE_FOCUSED, EINA_TRUE); --
[EGIT] [core/elementary] master 01/01: fix typos in APIs doc
ami pushed a commit to branch master. http://git.enlightenment.org/core/elementary.git/commit/?id=57248eb13c239174792ef8782c31206c442affc5 commit 57248eb13c239174792ef8782c31206c442affc5 Author: Amitesh Singh Date: Mon Sep 28 15:06:21 2015 +0530 fix typos in APIs doc --- src/lib/elc_popup.h | 2 +- src/lib/elm_calendar.h | 2 +- src/lib/elm_config.h | 2 +- src/lib/elm_helper.h | 2 +- src/lib/elm_icon.h | 2 +- src/lib/elm_interface_atspi_accessible.h | 2 +- src/lib/elm_map_common.h | 2 +- src/lib/elm_prefs.h | 2 +- src/lib/elm_radio.h | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/lib/elc_popup.h b/src/lib/elc_popup.h index b58af5a..d672db2 100644 --- a/src/lib/elc_popup.h +++ b/src/lib/elc_popup.h @@ -78,7 +78,7 @@ * @li @c "focused" - When the popup has received focus. (since 1.8) * @li @c "unfocused" - When the popup has lost focus. (since 1.8) * @li "language,changed" - the program's language changed (since 1.8) - * @li "item,focused" - When the popup item has recieved focus. (since 1.10) + * @li "item,focused" - When the popup item has received focus. (since 1.10) * @li "item,unfocused" - When the popup item has lost focus. (since 1.10) * * Styles available for Popup diff --git a/src/lib/elm_calendar.h b/src/lib/elm_calendar.h index 4f1e00e..b1a334f 100644 --- a/src/lib/elm_calendar.h +++ b/src/lib/elm_calendar.h @@ -6,7 +6,7 @@ * @image latex calendar_inheritance_tree.eps * * This is a calendar widget. It helps applications to flexibly - * display a calender with day of the week, date, year and + * display a calendar with day of the week, date, year and * month. Applications are able to set specific dates to be reported * back, when selected, in the smart callbacks of the calendar * widget. The API of this widget lets the applications perform other diff --git a/src/lib/elm_config.h b/src/lib/elm_config.h index 8719d65..350fdd3 100644 --- a/src/lib/elm_config.h +++ b/src/lib/elm_config.h @@ -1013,7 +1013,7 @@ EAPI const char *elm_config_accel_preference_get(void); * Accepted values for depth are for instance "depth", "depth16", "depth24". * Accepted values for stencil are "stencil", "stencil1", "stencil8". * For MSAA, only predefined strings are accepted: "msaa", "msaa_low", - * "msaa_mid" and "msaa_high". The selected configuration is not garanteed + * "msaa_mid" and "msaa_high". The selected configuration is not guaranteed * and is only valid in case of GL acceleration. Only the base acceleration * string will be saved (e.g. "gl" or "hw"). * diff --git a/src/lib/elm_helper.h b/src/lib/elm_helper.h index adfbb40..ec92500 100644 --- a/src/lib/elm_helper.h +++ b/src/lib/elm_helper.h @@ -41,7 +41,7 @@ typedef enum * General designed for validate inputed entry text. * * @param pattern The regex pattern - * @param signal The part of signal name, which will be emited to style + * @param signal The part of signal name, which will be emitted to style * @return The regex validator * * @see elm_validator_regexp_del() diff --git a/src/lib/elm_icon.h b/src/lib/elm_icon.h index 67ed57b..3420fbd 100644 --- a/src/lib/elm_icon.h +++ b/src/lib/elm_icon.h @@ -134,7 +134,7 @@ * @li elm_object_signal_emit() * @li elm_object_signal_callback_add() * @li elm_object_signal_callback_del() - * for emmiting and listening to signals on the object, when the + * for emitting and listening to signals on the object, when the * internal image comes from an Edje object. This behavior was added * unintentionally, though, and is @b deprecated. Expect it to be * dropped on future releases. diff --git a/src/lib/elm_interface_atspi_accessible.h b/src/lib/elm_interface_atspi_accessible.h index acd152e..7ce9d80 100644 --- a/src/lib/elm_interface_atspi_accessible.h +++ b/src/lib/elm_interface_atspi_accessible.h @@ -140,7 +140,7 @@ typedef enum _Elm_Atspi_Role Elm_Atspi_Role; /** * @enum _Elm_Atspi_State_Type - * Describes a possible states of an object visibile to AT-SPI clients. + * Describes a possible states of an object visible to AT-SPI clients. */ enum _Elm_Atspi_State_Type { diff --git a/src/lib/elm_map_common.h b/src/lib/elm_map_common.h index 41d98c5..8e08526 100644 --- a/src/lib/elm_map_common.h +++ b/src/lib/elm_map_common.h @@ -527,7 +527,7 @@ EAPI int elm_map_overlay_class_zoom_max_get(const Elm_Map_Over * * @return The list of group overlay members. * - * The group overlays are virtualy overlays. Those are shown and hidden dynamically. + * The group overlays are virtually overlays. Those are shown and hidden dynamically. * You c
[EGIT] [core/elementary] master 01/01: fix typo in elm_map_overlay_group_members_get API doc
ami pushed a commit to branch master. http://git.enlightenment.org/core/elementary.git/commit/?id=8f3760ec1c34b3fc24d3a78962715c066dd8837c commit 8f3760ec1c34b3fc24d3a78962715c066dd8837c Author: Amitesh Singh Date: Mon Sep 28 15:21:07 2015 +0530 fix typo in elm_map_overlay_group_members_get API doc --- src/lib/elm_map_common.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/elm_map_common.h b/src/lib/elm_map_common.h index 8e08526..5de92eb 100644 --- a/src/lib/elm_map_common.h +++ b/src/lib/elm_map_common.h @@ -527,7 +527,7 @@ EAPI int elm_map_overlay_class_zoom_max_get(const Elm_Map_Over * * @return The list of group overlay members. * - * The group overlays are virtually overlays. Those are shown and hidden dynamically. + * The group overlays are virtual overlays. Those are shown and hidden dynamically. * You can add callback to the class overlay. If one of the group overlays in this class * is clicked, callback will be called and return a virtual group overlays. * --