[EGIT] [core/efl] master 01/02: theme - ibar - align overlay label according to code
raster pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=1650f9f72396a6e4d96e7424c4f3ea62aea389ad commit 1650f9f72396a6e4d96e7424c4f3ea62aea389ad Author: Carsten Haitzler Date: Mon Jan 17 21:37:15 2022 + theme - ibar - align overlay label according to code @fix --- data/elementary/themes/edc/ibar-ibox.edc | 49 +--- 1 file changed, 26 insertions(+), 23 deletions(-) diff --git a/data/elementary/themes/edc/ibar-ibox.edc b/data/elementary/themes/edc/ibar-ibox.edc index f21ced5608..5f75d0f057 100644 --- a/data/elementary/themes/edc/ibar-ibox.edc +++ b/data/elementary/themes/edc/ibar-ibox.edc @@ -403,29 +403,6 @@ group { name: "e/modules/ibox/icon_overlay"; rel.to: "background"; } } - text { name: "spacer"; scale: 1; - desc { -color: 0 0 0 0; // no cc -rel1.relative: 1 0; -rel2.relative: 0 1; -text { - source: "e.text.label"; - text_source: "e.text.label"; -} -link.base: "e,origin,center" "e"; -link.transition: SINUSOIDAL 0.1 CURRENT USE_DURATION_FACTOR 1; - } - desc { "left"; inherit: "default"; -align: 0.0 0.5; -link.base: "e,origin,left" "e"; -link.transition: SINUSOIDAL 0.1 CURRENT USE_DURATION_FACTOR 1; - } - desc { "right"; inherit: "default"; -align: 1.0 0.5; -link.base: "e,origin,right" "e"; -link.transition: SINUSOIDAL 0.1 CURRENT USE_DURATION_FACTOR 1; - } - } part { name: "bg"; type: RECT; mouse_events: 0; scale: 1; description { state: "default" 0.0; @@ -469,6 +446,32 @@ group { name: "e/modules/ibox/icon_overlay"; visible: 1; } } + text { name: "spacer"; scale: 1; + desc { +visible: 0; +rel1.offset: 4 4; +rel2.offset: -5 -5; +offscale; +text { + source: "e.text.label"; + text_source: "e.text.label"; + min: 1 1; +} +link.base: "e,origin,center" "e"; +link.transition: SINUSOIDAL 0.1 CURRENT USE_DURATION_FACTOR 1; +color: 255 0 0 255; + } + desc { "left"; inherit: "default"; +align: 0.0 0.5; +link.base: "e,origin,left" "e"; +link.transition: SINUSOIDAL 0.1 CURRENT USE_DURATION_FACTOR 1; + } + desc { "right"; inherit: "default"; +align: 1.0 0.5; +link.base: "e,origin,right" "e"; +link.transition: SINUSOIDAL 0.1 CURRENT USE_DURATION_FACTOR 1; + } + } } programs { // program { --
[EGIT] [core/efl] master 02/02: theme - pointer - remove min size and let pointer size do it
raster pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=33c0b2a82d05ae0162e7f07665adc6598ed50c09 commit 33c0b2a82d05ae0162e7f07665adc6598ed50c09 Author: Carsten Haitzler Date: Mon Jan 17 21:37:32 2022 + theme - pointer - remove min size and let pointer size do it user sets size and it is 32 * scale alreadyso this works well enough. @fix --- data/elementary/themes/edc/pointer.edc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/elementary/themes/edc/pointer.edc b/data/elementary/themes/edc/pointer.edc index 3adf45455f..8b3691d647 100644 --- a/data/elementary/themes/edc/pointer.edc +++ b/data/elementary/themes/edc/pointer.edc @@ -6,7 +6,7 @@ group { name: "e/pointer/enlightenment/default/color"; scale: 1; description { state: "default" 0.0; color: 255 255 255 255; // no cc -FIXED_SIZE(32, 32) +//FIXED_SIZE(32, 32) } description { state: "suspend" 0.0; inherit: "default" 0.0; --
[EGIT] [core/enlightenment] master 01/01: ibar - emit left/right a; ign if gadcon is left/right vertical
raster pushed a commit to branch master. http://git.enlightenment.org/core/enlightenment.git/commit/?id=58462390be5bba36f2c3f37b56e58605073e7f11 commit 58462390be5bba36f2c3f37b56e58605073e7f11 Author: Carsten Haitzler Date: Mon Jan 17 20:56:45 2022 + ibar - emit left/right a;ign if gadcon is left/right vertical @fix --- src/modules/ibar/e_mod_main.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/modules/ibar/e_mod_main.c b/src/modules/ibar/e_mod_main.c index 2efde053d..46bd424dd 100644 --- a/src/modules/ibar/e_mod_main.c +++ b/src/modules/ibar/e_mod_main.c @@ -1963,7 +1963,6 @@ _ibar_cb_icon_move(void *data, Evas *e, Evas_Object *obj, void *event_info EINA_ else if ((chx + (len / 2) > cw) || ((chx + (len / 2) > zone->x + zone->w))) sig = "e,origin,right"; } - printf("EMIT: %p %s\n", ic, sig); _ibar_icon_signal_emit(ic, sig, "e"); } --
[EGIT] [core/enlightenment] master 01/01: theme - ibar/ibox label overlay - properly align with text min size
raster pushed a commit to branch master. http://git.enlightenment.org/core/enlightenment.git/commit/?id=f615a2120da7cc8078591ef6e4deed1288c3b29d commit f615a2120da7cc8078591ef6e4deed1288c3b29d Author: Carsten Haitzler Date: Mon Jan 17 20:56:03 2022 + theme - ibar/ibox label overlay - properly align with text min size @fix --- src/bin/system/e_system_backlight.c | 2 +- src/modules/ibar/e_mod_main.c | 16 ++-- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/src/bin/system/e_system_backlight.c b/src/bin/system/e_system_backlight.c index 0d89a73f4..f4457b32b 100644 --- a/src/bin/system/e_system_backlight.c +++ b/src/bin/system/e_system_backlight.c @@ -153,7 +153,7 @@ _cb_worker_message(void *data EINA_UNUSED, Ecore_Thread *th EINA_UNUSED, void *m if (lig->max > 0) { -val = ((1000 * lig->val) + 500) / lig->max; +val = (1000 * lig->val) / lig->max; if (val < 0) val = 0; else if (val > 1000) val = 1000; } diff --git a/src/modules/ibar/e_mod_main.c b/src/modules/ibar/e_mod_main.c index 88d6dae24..2efde053d 100644 --- a/src/modules/ibar/e_mod_main.c +++ b/src/modules/ibar/e_mod_main.c @@ -1948,10 +1948,22 @@ _ibar_cb_icon_move(void *data, Evas *e, Evas_Object *obj, void *event_info EINA_ if (!zone) zone = eina_list_data_get(e_comp->zones); } - if (chx - (len / 2) < zone->x) + if ((ic->ibar->inst->orient == E_GADCON_ORIENT_LEFT) || + (ic->ibar->inst->orient == E_GADCON_ORIENT_CORNER_LT) || + (ic->ibar->inst->orient == E_GADCON_ORIENT_CORNER_LB)) sig = "e,origin,left"; - else if ((chx + (len / 2) > cw) || ((chx + (len / 2) > zone->x + zone->w))) + else if ((ic->ibar->inst->orient == E_GADCON_ORIENT_RIGHT) || +(ic->ibar->inst->orient == E_GADCON_ORIENT_CORNER_RT) || +(ic->ibar->inst->orient == E_GADCON_ORIENT_CORNER_RB)) sig = "e,origin,right"; + else + { +if (chx - (len / 2) < zone->x) + sig = "e,origin,left"; +else if ((chx + (len / 2) > cw) || ((chx + (len / 2) > zone->x + zone->w))) + sig = "e,origin,right"; + } + printf("EMIT: %p %s\n", ic, sig); _ibar_icon_signal_emit(ic, sig, "e"); } --
[EGIT] [legacy/imlib2] master 01/03: test: Check __imlib_FileKey()
kwo pushed a commit to branch master. http://git.enlightenment.org/legacy/imlib2.git/commit/?id=64c031acab05b8513cae7e8e2ed2c1a7cd939ae6 commit 64c031acab05b8513cae7e8e2ed2c1a7cd939ae6 Author: Kim Woelders Date: Mon Jan 17 12:31:44 2022 +0100 test: Check __imlib_FileKey() --- test/test_file.cpp | 66 +- 1 file changed, 65 insertions(+), 1 deletion(-) diff --git a/test/test_file.cpp b/test/test_file.cpp index dbc2dcb..084cf37 100644 --- a/test/test_file.cpp +++ b/test/test_file.cpp @@ -16,7 +16,6 @@ extern "C" { #define EXPECT_ERR(x) EXPECT_TRUE(x) #if 0 -char *__imlib_FileKey(const char *file); char *__imlib_FileRealFile(const char *file); char *__imlib_FileExtension(const char *file); @@ -185,6 +184,71 @@ TEST(FILE, file_is_real_file) EXPECT_EQ(rc, 0); } +TEST(FILE, file_key) +{ + char *key; + + key = __imlib_FileKey("file.ext:key"); + EXPECT_STREQ(key, "key"); + free(key); + + key = __imlib_FileKey("file.ext:key=abc"); + EXPECT_STREQ(key, "key=abc"); + free(key); + + key = __imlib_FileKey("file.ext:key:abc"); + EXPECT_STREQ(key, "key:abc"); + free(key); + + key = __imlib_FileKey("file.ext:key:"); + EXPECT_STREQ(key, "key:"); + free(key); + + key = __imlib_FileKey("file.ext:"); + EXPECT_FALSE(key); + free(key); + + key = __imlib_FileKey("file.ext"); + EXPECT_FALSE(key); + free(key); + + key = __imlib_FileKey("file"); + EXPECT_FALSE(key); + free(key); + + key = __imlib_FileKey("file.ext::key"); + EXPECT_FALSE(key); + free(key); + + key = __imlib_FileKey("C::file.ext:key"); + EXPECT_STREQ(key, "key"); + free(key); + + key = __imlib_FileKey("Drive::file.ext:key:zz"); + EXPECT_STREQ(key, "key:zz"); + free(key); + + key = __imlib_FileKey("C::file.ext:"); + EXPECT_FALSE(key); + free(key); + + key = __imlib_FileKey("C::file.ext"); + EXPECT_FALSE(key); + free(key); + + key = __imlib_FileKey("C::"); + EXPECT_FALSE(key); + free(key); + + key = __imlib_FileKey("C:::"); + EXPECT_FALSE(key); + free(key); + + key = __imlib_FileKey("::C:"); + EXPECT_FALSE(key); + free(key); +} + int main(int argc, char **argv) { --
[EGIT] [legacy/imlib2] master 02/03: Simplify __imlib_FileKey()
kwo pushed a commit to branch master. http://git.enlightenment.org/legacy/imlib2.git/commit/?id=9afad50f970e46db1ed30599d06ad8b458910742 commit 9afad50f970e46db1ed30599d06ad8b458910742 Author: Kim Woelders Date: Mon Jan 17 12:42:02 2022 +0100 Simplify __imlib_FileKey() And avoid malloc when not needed. --- src/lib/file.c | 43 +-- 1 file changed, 13 insertions(+), 30 deletions(-) diff --git a/src/lib/file.c b/src/lib/file.c index d5a5242..d8e4d64 100644 --- a/src/lib/file.c +++ b/src/lib/file.c @@ -29,38 +29,21 @@ __imlib_IsRealFile(const char *s) char * __imlib_FileKey(const char *file) { - char *newfile; + const char *p; - newfile = malloc(strlen(file) + 1); - if (!newfile) - return NULL; - newfile[0] = 0; - { - char *p1, *p2; - int go; + for (p = file;;) + { +p = strchr(p, ':'); +if (!p) + break; +p++; +if (*p == '\0') + break; +if (*p != ':') /* :: Drive spec? */ + return strdup(p); +p++; + } - go = 0; - p1 = (char *)file; - p2 = newfile; - while (p1[0]) -{ - if (go) - { -p2[0] = p1[0]; -p2++; - } - if ((p1[0] == ':') && (p1[1] != ':')) - go = 1; - if ((p1[0] == ':') && (p1[1] == ':')) - p1++; - p1++; -} - p2[0] = p1[0]; - } - if (newfile[0]) - return newfile; - else - free(newfile); return NULL; } --
[EGIT] [legacy/imlib2] master 03/03: Avoid redundant operations when non-existing file has no "key"
kwo pushed a commit to branch master. http://git.enlightenment.org/legacy/imlib2.git/commit/?id=cd6c00b1ce985df421e2103294e50c997143dbc9 commit cd6c00b1ce985df421e2103294e50c997143dbc9 Author: Kim Woelders Date: Mon Jan 17 11:32:41 2022 +0100 Avoid redundant operations when non-existing file has no "key" --- src/lib/image.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/lib/image.c b/src/lib/image.c index fb4e82f..1e01471 100644 --- a/src/lib/image.c +++ b/src/lib/image.c @@ -492,9 +492,12 @@ __imlib_LoadImage(const char *file, ImlibLoadArgs * ila) err = __imlib_FileStat(file, ); if (err) { - im_file = __imlib_FileRealFile(file); im_key = __imlib_FileKey(file); - err = __imlib_FileStat(im_file, ); + if (im_key) + { + im_file = __imlib_FileRealFile(file); + err = __imlib_FileStat(im_file, ); + } } } --
[EGIT] [website/www-content] master 01/01: these don't exist anymore
raster pushed a commit to branch master. http://git.enlightenment.org/website/www-content.git/commit/?id=b22c8f53e2bd94c6c1d41a214731eb8cfbcbf87f commit b22c8f53e2bd94c6c1d41a214731eb8cfbcbf87f Author: Carsten Haitzler (Rasterman) Date: Mon Jan 17 10:39:12 2022 + these don't exist anymore --- .../legacy/program_guide/sandbox_gadgets.md.txt| 651 - pages/develop/legacy/program_guide/start.txt | 1 - 2 files changed, 652 deletions(-) diff --git a/pages/develop/legacy/program_guide/sandbox_gadgets.md.txt b/pages/develop/legacy/program_guide/sandbox_gadgets.md.txt deleted file mode 100644 index 179b3fe62..0 --- a/pages/develop/legacy/program_guide/sandbox_gadgets.md.txt +++ /dev/null @@ -1,651 +0,0 @@ -~~Title: Creating Enlightenment Gadgets~~ - -# Creating Enlightenment Gadgets # -**The code blocks in this guide are not intended to be compiled separately or work individually. They are meant to be used as a visual reference of the changes that need to be made to make an EFL application a gadget. The final code block, along with the accompanying .desktop file and meson.build at the end of this page are the intended files to use if you would like to compile and install this example as a gadget.** - -*Gadgets* are standalone applications that Enlightenment can use as extensions to its desktop. They are similar to modules in that they can be placed in containers, called *gadget sites*; they differ in that they are not internal to Enlightenment and do not run in the same process. - -This process separation occurs through Enlightenment placing gadgets into a sandbox. This sandbox is a gadget visual that manages the necessary gadget requirements, in place of the application handling this. Sandboxing is beneficial to the user desktop experience as it encourages the creation of gadgets through a much easier development path while also protecting the user desktop experience from being interrupted by faulty extensions. - -This guide demonstrates how to develop these gadgets. - -## Prerequisites ## - -* Install and configure Enlightenment and the EFL with Wayland support: [Get Enlightenment](http://www.enlightenment.org/docs/distros/start). -* Create the Hello World program: [Get started with EFL](http://www.enlightenment.org/develop/efl/start) - -## Gadget Advantages and Limitations ## - -Creating gadgets directly, rather than as modules, reduces the need to call upon additional application programming interfaces (APIs). Gadgets are also more robust: as gadgets run in a separate process from Enlightenment they will not crash the desktop when encountering an error, instead gracefully recovering from their own crashes. - -There are, however, a few limitations for gadgets. It is not recommended to use forced sizes or size hints in the gadget application. The sandbox will manage sizing for the application; setting minimum or maximum sizes, resizing or moving objects will clash with how the sandbox is managing sizes. Simply setting the desired aspect for the application will tell the sandbox how it needs to prioritize the size of the application. - -Running additional applications from within the gadget application will also bring unintended results. The gadget lives in a sandbox and is bound by the size and space that the sandbox provides. If the gadget tries to open further windows or applications on its own these windows and applications will be restricted to the gadget visual. Fortunately, the sandbox provides smart callbacks than can be called to run external applications and also provides a method for opening further windows o [...] - -## Gadget Basics ## - -Enlightenment populates its list of gadgets by looking for ``.desktop`` files installed to the directory ``enlightenment/gadgets`` under Enlightenment's library directory, which can be found using ``pkg-config --variable=libdir enlightenment``. This gadget list is then made available for use through each gadget site's "Add Gadgets" popup. These popups display either a live view of the gadget or a still image. - -When Enlightenment executes the gadget application it sets the environment variable ``E_GADGET_ID``. This environmental variable is how the gadget application will determine if it is being run as a gadget, if it is being displayed in the "Add Gadget" popup or if it has been added to a gadget site and has a unique gadget ID. The environment variable ``E_GADGET_ORIENTATION`` is also set. It will be equal to one of three values. ``Horizontal`` ``Vertical`` or ``None`` and will indicate wh [...] - -To demonstrate this, a modified version of the Hello World app referenced in the Prerequisites section of this guide is used. Note the following important change: in the original version the window is created using ``elm_win_util_standard_add()``, but in order to achieve transparency on the window for use as a gadget this is changed to