Commit Graph

65683 Commits

Author SHA1 Message Date
maxerba c9a0b0c7cd Updating all po files 2020-04-19 16:18:34 +02:00
Daniel Kolesa 1afb264288 eolian: globally enable eolian_state_check, except for beta classes
Beta classes won't have their namespaces validated at this point.
It is possible to set EOLIAN_CHECK_NAMESPACES_BETA=1 to enable
checking those as well, if you want to fix them all.
2020-04-19 01:53:50 +02:00
Daniel Kolesa 7791d9fac6 remove unused imports in eo/eot files 2020-04-19 01:44:50 +02:00
Daniel Kolesa cdf48fcf70 eolian: add composites into hard deps when checking
This prevents composites from being considered unused imports.
2020-04-19 01:43:33 +02:00
Carsten Haitzler 3283a11a88 evas_textblock/evas_text/evas_textgrid: pick textrun fonts
Summary:
Picking font on textrun, will now give priority into font picked by the user, regardless of script type.
picking font due script can cause many inconvenient results

Example of wrong results:  (User font is **NotoColorEmoji**)
{F3847118} -> add 'a' at the end (notice how text render is wrong) {F3847119} -> add tab before 'a' (text rendering now is right) {F3847120}

After Change results: (User font is **NotoColorEmoji**)
{F3847118}  -> add 'a' at the end -> {F3847122}-> add tab before 'a' -> {F3847123}

Also now the following lines will be shown exactly the same, regardless of characters order
```
"가123A321"
"A321가123"
"123가A321"
"A가123321"
```

Test Plan:
```
#include <Elementary.h>
/*
gcc -o example test.c `pkg-config --cflags --libs elementary`
*/

EAPI_MAIN int
elm_main(int argc EINA_UNUSED, char **argv EINA_UNUSED)
{
   Evas_Object *win, *en;

   elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);

   win = elm_win_util_standard_add("", "");
   elm_win_autodel_set(win, EINA_TRUE);

   en = elm_entry_add(win);
   elm_entry_scrollable_set(en, EINA_TRUE);
   evas_object_size_hint_weight_set(en, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
   evas_object_size_hint_align_set(en, EVAS_HINT_FILL, EVAS_HINT_FILL);

   elm_entry_text_style_user_push(en,"DEFAULT='font=NotoColorEmoji font_size=30 color=red'");
   elm_object_text_set(en, "&#x262a;123456a");

   evas_object_show(en);

   elm_object_content_set(win, en);
   evas_object_resize(win, 400, 200);
   evas_object_show(win);

   elm_run();

   return 0;
}
ELM_MAIN()
```

Reviewers: woohyun, bowonryu, tasn, raster, cedric

Reviewed By: tasn

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8556

Differential Revision: https://phab.enlightenment.org/D11302
2020-04-18 17:36:25 +01:00
Ali Alzyod c58f8db132 evas_textgrid: update text props to use current script font
Summary:
This update make the textgrid same as evas_text and evas_textblock to use current picked font for text_props instead of script_font

This patch will fix terminology emoji rendering when used applying D11302.

Reviewers: raster, woohyun

Reviewed By: woohyun

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11729
2020-04-18 17:36:11 +01:00
Carsten Haitzler b41aac6caa evas render - flush, dont clear unref/clean arrays on render done
we build these arrays to hold tjhings to clean up when done ... but if
one frame happens ot have a lot - the allocation stays huge as we only
clean not flush, so flush to keep memory down.

@optimize
2020-04-18 17:35:43 +01:00
maxerba 821f9bc57c Fixing POTFILES and updating italian translation 2020-04-18 17:06:23 +02:00
Carsten Haitzler d9b9647a15 Revert "evas_textblock: pick textrun fonts"
This reverts commit 9b987c67e1.

this breaks color emoji in terminology (evas textgrid).
2020-04-17 19:20:26 +01:00
Marcel Hollerbach 04567a16db exactness-inspect: unit1 can never be NULL
checkinf for it beeing NULL means that we would have to equip every
usage of unit1 with a check, but that is useless.

CID 1419859

Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D11721
2020-04-17 17:14:57 +02:00
Marcel Hollerbach 66adfc97f6 exactness-inspect: fix NULL access
ii might be NULL so we should ensure it is not NULL to call item_select

CID 1419865

Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D11720
2020-04-17 17:14:55 +02:00
Marcel Hollerbach 38d74c8a1a exactness-inspect: sanitize if clause
these if clause where a bit bottom up, and the xor operation here seemed
totally wrong, with this code we are simply displaying both entiteis of
the two structs when they are there. *or* we are replacing it with the
fallback.

CID1419875

Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D11719
2020-04-17 17:14:53 +02:00
Carsten Haitzler 838a67d311 elm - genlist test - handl g_data being null
fix CID 1396944 1396946
2020-04-17 12:48:33 +01:00
Carsten Haitzler 226c195203 ecore - examples - fix gnutls fd handler example warnings
just error returns not being checked. not an issue really, but this
silences warnings.

fix CID 1164185 715896 98094 1400818
2020-04-17 12:28:35 +01:00
Carsten Haitzler 5f93f16b61 ecore - proc env - fix values return NULL case - coverity
this fixes CID 1419857
2020-04-17 12:14:19 +01:00
Carsten Haitzler 02da386da8 ecore evas - wl - fix useless iff case for rotation
rotationis handled later on in the func

thsi fixes CID 1419870
2020-04-17 12:08:27 +01:00
Carsten Haitzler 699fadd514 evas cache - up padding just in case i was off by one
coverity was complaining but it's a false positive - it seems to not
realze the loadopts_append does nul terminate at the end.
2020-04-17 11:06:32 +01:00
Bowon Ryu 62b4e2a2da edje: fix cursor scrolling
If there is a string larger than the size of entry
and when the entry is auto scrolling, cursor is not visible.
Using _edje_entry_cursor_geometry_get guarantees the minimum size of the cursor,
and guarantee the size from edje. (min_restricted_calc)

Reviewed-by: Ali Alzyod <ali198724@gmail.com>
Differential Revision: https://phab.enlightenment.org/D11649
2020-04-17 11:53:50 +02:00
Mike Blumenkrantz e2365a0ed3 tests/elm: add image tests to verify internal object size is clamped to object size
ensure that this doesn't break again

ref 11587

Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D11599
2020-04-17 11:53:47 +02:00
Hermet Park 989570b133 canvas svg: fix memory leak.
free svg node commands & points data after usage.

@fix
2020-04-17 18:16:03 +09:00
Ali Alzyod 7ac765c71b evas_textblock: prevent segfault if there are no style
```
#include <Elementary.h>

EAPI_MAIN int
elm_main(int argc EINA_UNUSED, char **argv EINA_UNUSED)
{
   Evas_Object *win, *textblock;

   elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);

   win = elm_win_util_standard_add("", "");
   elm_win_autodel_set(win, EINA_TRUE);

   textblock = evas_object_textblock_add(win);
   evas_object_resize(textblock, 360, 360);
   evas_object_show(textblock);
   evas_object_textblock_text_markup_set(textblock, "<b>b</b>");
   evas_object_resize(win, 360, 360);
   evas_object_show(win);
   elm_run();

   return 0;
}
ELM_MAIN()
```

this application will crash.

Any font format specified in text, if there are now style will cause the crash.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D11686
2020-04-17 11:14:57 +02:00
Mike Blumenkrantz bc52776fd6 eina/value: use correct time types when comparing time types
these functions all expect struct timeval, as the name implies

../src/lib/eina/eina_value.c: In function ‘_eina_value_type_tm_compare’:
../src/lib/eina/eina_value.c:3358:19: warning: array subscript 1 is outside array bounds of ‘time_t[1]’ {aka ‘long int[1]’} [-Warray-bounds]
 3358 |    struct timeval ret = *input;
      |                   ^~~
../src/lib/eina/eina_value.c:3569:11: note: while referencing ‘ta’
 3569 |    time_t ta, tb;
      |           ^~
../src/lib/eina/eina_value.c:3358:19: warning: array subscript 1 is outside array bounds of ‘time_t[1]’ {aka ‘long int[1]’} [-Warray-bounds]
 3358 |    struct timeval ret = *input;
      |                   ^~~
../src/lib/eina/eina_value.c:3569:15: note: while referencing ‘tb’
 3569 |    time_t ta, tb;

Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D11715
2020-04-17 11:14:54 +02:00
Marcel Hollerbach b746e82b07 eina_content: free eina content in the test:
Fix the unbelievable High prioritized CID 1420314
2020-04-17 10:53:15 +02:00
Mike Blumenkrantz 9edce20081 elm/win: declare prototype for ecore_evas_dnd_mark_motion_used
../src/lib/elementary/efl_ui_win.c: In function ‘_motion_cb’:
../src/lib/elementary/efl_ui_win.c:9271:14: warning: implicit declaration of function ‘ecore_evas_dnd_mark_motion_used’ [-Wimplicit-function-declaration]
 9271 |              ecore_evas_dnd_mark_motion_used(ee, seat);
      |              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Differential Revision: https://phab.enlightenment.org/D11717
2020-04-17 10:53:15 +02:00
Stefan Schmidt 61599d67ed exactness: limit length for font_path to stay in buffer
We get fonts_dir from a getenv() without and length check. Make sure
that we stay in the given buffer size when stitching the file path
together.

CID: 1422195

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D11718
2020-04-17 10:43:04 +02:00
Stefan Schmidt 95bff0fac9 exactness: fix typo in function name
Simple spelling mistake. overlay instead of overloay.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D11714
2020-04-17 10:43:01 +02:00
Stefan Schmidt d02bbe42b9 exactness: remove no longer used code since move to preload
This has been around for prg handling before we switched to preload. No
need for it anymore. Found when looking for a Coverity issue, which also
got fixed now by luck. :-)

CID: 1421994

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D11713
2020-04-17 10:42:59 +02:00
Ali Alzyod bab13de794 evas_textblock: remove special treat for variation sequence text run
Summary:
Now there are no need for special care for variation sequence text run break.
General method will care about all types of characters\

this is also related to D11096

Reviewers: woohyun, bowonryu

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11602
2020-04-17 14:26:14 +09:00
Ali Alzyod 9b987c67e1 evas_textblock: pick textrun fonts
Summary:
Picking font on textrun, will now give priority into font picked by the user, regardless of script type.
picking font due script can cause many inconvenient results

Example of wrong results:  (User font is **NotoColorEmoji**)
{F3847118} -> add 'a' at the end (notice how text render is wrong) {F3847119} -> add tab before 'a' (text rendering now is right) {F3847120}

After Change results: (User font is **NotoColorEmoji**)
{F3847118}  -> add 'a' at the end -> {F3847122}-> add tab before 'a' -> {F3847123}

Also now the following lines will be shown exactly the same, regardless of characters order
```
"가123A321"
"A321가123"
"123가A321"
"A가123321"
```

Test Plan:
```
#include <Elementary.h>
/*
gcc -o example test.c `pkg-config --cflags --libs elementary`
*/

EAPI_MAIN int
elm_main(int argc EINA_UNUSED, char **argv EINA_UNUSED)
{
   Evas_Object *win, *en;

   elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);

   win = elm_win_util_standard_add("", "");
   elm_win_autodel_set(win, EINA_TRUE);

   en = elm_entry_add(win);
   elm_entry_scrollable_set(en, EINA_TRUE);
   evas_object_size_hint_weight_set(en, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
   evas_object_size_hint_align_set(en, EVAS_HINT_FILL, EVAS_HINT_FILL);

   elm_entry_text_style_user_push(en,"DEFAULT='font=NotoColorEmoji font_size=30 color=red'");
   elm_object_text_set(en, "&#x262a;123456a");

   evas_object_show(en);

   elm_object_content_set(win, en);
   evas_object_resize(win, 400, 200);
   evas_object_show(win);

   elm_run();

   return 0;
}
ELM_MAIN()
```

Reviewers: woohyun, bowonryu, tasn, raster, cedric

Reviewed By: tasn

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8556

Differential Revision: https://phab.enlightenment.org/D11302
2020-04-17 12:28:42 +09:00
Ali Alzyod 208c1938bc evas_test: change START_TEST to EFL_START_TEST
Summary: evas_test: change START_TEST to EFL_START_TEST

Reviewers: zmike

Reviewed By: zmike

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11716
2020-04-16 12:03:23 -04:00
Marcel Hollerbach 7cc2b11f19 ecore_evas: fix fallback code
this was using a stringshare reference that was deleted. While that is
true, the stringshare reference will always be alive, because 2 people
took a reference. Anyways, this code is now searching the other way
arround, which makes the code also easier.

fixes: CID1420331

Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D11712
2020-04-16 14:53:33 +02:00
Mike Blumenkrantz 8e1e1e5cf8 tests/elm: explicitly destroy hoversel while active
verify that there's no errors when this happens

Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D11704
2020-04-16 14:34:07 +02:00
Mike Blumenkrantz 2797827e6b tests/elm: add hoversel test to verify edge of canvas positioning
ensure that T8642 doesn't reoccur

Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D11647
2020-04-16 14:34:07 +02:00
Mike Blumenkrantz 27f5510533 elm/hoversel: force calc on internal hover object during activate
hoversel can't accurately determine its location until the hover object
has been calculated, so this needs to always happen before the hoversel
is made visible in order to correctly position the hover

fix T8642

Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D11646
2020-04-16 14:34:07 +02:00
Mike Blumenkrantz 034d42855b tests/elm: add hoversel behavior tests
this verifies all smart callbacks for a hoversel to ensure they're triggered
as expected

Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D11644
2020-04-16 14:34:07 +02:00
Mike Blumenkrantz 272c3d9a66 elm/hoversel: remove unnecessary internal callback deletion
this already happens automatically on every item destruction and passes
the item data through there to ensure the correct callback is removed

Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D11643
2020-04-16 14:34:07 +02:00
Mike Blumenkrantz df0a201021 elm/hoversel: use a wref to accurately track internal hover object
this pointer is never unset, which can cause errors when attempting to
access it after the hoversel has been deactivated

Differential Revision: https://phab.enlightenment.org/D11642
2020-04-16 14:34:07 +02:00
Mike Blumenkrantz 276c9ed26d tests/elm: add callback tests for elm_list
basic tests to verify behavior for triggering callbacks when selecting items

Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D11703
2020-04-16 14:34:07 +02:00
Carsten Haitzler 03164bfacf efreet - disable strict as this makes things less functional... 2020-04-16 13:33:37 +01:00
Carsten Haitzler 2ebc97aa96 efreet - also look in lib in /usr/local/share/pixmaps too 2020-04-16 13:19:36 +01:00
Carsten Haitzler b376c2a902 efreet - look in /usr/local/share/pixmaps too 2020-04-16 13:04:03 +01:00
Ali Alzyod da36015148 evas_textblock : fix text insertion & selection with ps in single line
Summary:
when we have text that contains <ps> (example "p1<ps>p2") in a single line mode
and the cursor position is after the ps tag
then we try to insert any character using the keyboard it will show segmentation fault.
also with the same text if we try to select the text we will notice that it is corrupted.

this should resolve https://phab.enlightenment.org/T8594

Test Plan:
  #define EFL_EO_API_SUPPORT 1
  #define EFL_BETA_API_SUPPORT 1

  #include <Eina.h>
  #include <Elementary.h>
  #include <Efl_Ui.h>

  static void
  _gui_quit_cb(void *data EINA_UNUSED, const Efl_Event *event EINA_UNUSED)
  {
     efl_exit(0);
  }

  static void
  _gui_setup()
  {
     Eo *win, *box;

     win = efl_add(EFL_UI_WIN_CLASS, efl_main_loop_get(),
                   efl_ui_win_type_set(efl_added, EFL_UI_WIN_TYPE_BASIC),
                   efl_text_set(efl_added, "Hello World"),
                   efl_ui_win_autodel_set(efl_added, EINA_TRUE));

     // when the user clicks "close" on a window there is a request to delete
     efl_event_callback_add(win, EFL_UI_WIN_EVENT_DELETE_REQUEST, _gui_quit_cb, NULL);

     box = efl_add(EFL_UI_BOX_CLASS, win,
                  efl_content_set(win, efl_added),
                  efl_gfx_hint_size_min_set(efl_added, EINA_SIZE2D(360, 240)));

     Eo *text = efl_add(EFL_UI_TEXTBOX_CLASS, box,
             efl_gfx_hint_weight_set(efl_added, 1.0, 1.0),
             efl_gfx_hint_align_set(efl_added, 1.0, 1.0),
             efl_pack(box, efl_added));

             efl_text_interactive_selection_allowed_set(text, EINA_TRUE);
             efl_text_multiline_set(text,EINA_FALSE);

             efl_text_markup_set(text, "p1<ps>p2");
  }

  EAPI_MAIN void
  efl_main(void *data EINA_UNUSED, const Efl_Event *ev EINA_UNUSED)
  {
     _gui_setup();
  }
  EFL_MAIN()

Reviewers: ali.alzyod, woohyun, zmike, bu5hm4n, segfaultxavi, stefan_schmidt

Reviewed By: ali.alzyod, woohyun

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11621
2020-04-16 20:03:31 +09:00
Carsten Haitzler d62d380690 toolbar - dont create icon objects then del if icon is null
if icon is null just never create an icon obj.. but if it's not null
it's intended so even if blank, don't delete it - so things line up.
2020-04-16 10:22:16 +01:00
Stefan Schmidt 189bb381d6 Revert "evas: text_cursor: check return value and print error"
This reverts commit c6df676a70.

Thsi is failing the evas testsuite. My bad in not checking this locally
before commiting.
2020-04-16 11:12:50 +02:00
Ali Alzyod 4ea455b1e5 evas_common_font: prevent leaking RGBA_Font
prevent leaking RGBA_Font in the for loop,

CID: 1382852

Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D11709
2020-04-16 10:38:22 +02:00
Ali Alzyod c6df676a70 evas: text_cursor: check return value and print error
Make sure we check the return of evas_textblock_cursor_geometry_bidi_get() and print an error if needed.

CID:1425191

Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D11707
2020-04-16 10:38:20 +02:00
Bo Anderson 51e4bcc32c ecore_cocoa: fix compile error using 10.15 SDK 2020-04-16 10:10:03 +02:00
Mike Blumenkrantz e88311ae95 tests/efl: use alloca for composite model test future to avoid leak
CID 1407236

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D11711
2020-04-15 19:26:39 +02:00
Carsten Haitzler 6a0c8e9d26 elm menu - fix segv on deletion/shutdown where parent was not done ok
@fix
2020-04-15 13:15:21 +01:00
Stefan Schmidt cc55b7ef98 release: Update NEWS and bump version for 1.24.0-beta2 release 2020-04-15 13:50:55 +02:00