This is an automated email from the git hooks/post-receive script.
git pushed a commit to reference refs/pull/35/head
in repository terminology.
View the commit online.
commit 975f5dca69ba289dd25096df33f4860e49d89746
Author: Cedric BAIL <[email protected]>
AuthorDate: Thu Apr 30 11:48:48 2026 -0600
macos: helpers default to empty; migrate v27 OS-default tools
config_new() now defaults all helper.* fields to empty strings on every
platform. Empty falls through to EFL's elm_open_url/_file/_email at the
call sites, so default behavior is unchanged on Linux (xdg-open) and
correct on macOS (open).
Migration v27 -> v28 detects values that match recognized OS-default
tool names ('xdg-open', 'xdg-email', 'open') and clears them, letting
EFL take over. User overrides like 'firefox --private' or
'chrome --incognito' are preserved. The migration applies on every
platform, Linux users with default 'xdg-open' baked in also get
cleared, and elm_open_url runs xdg-open anyway, so behavior is
identical.
Removes the helper-related #ifdef __APPLE__ blocks from config.c.
The remaining #ifdef __APPLE__ around login_shell is a separate concern
(shell-invocation convention: macOS apps default to login shells like
Terminal.app, Linux doesn't) and is out of scope for this EFL
portability cleanup.
---
src/bin/config.c | 83 ++++++++++++++++++++++++++++----------------------------
1 file changed, 42 insertions(+), 41 deletions(-)
diff --git a/src/bin/config.c b/src/bin/config.c
index d83ef30a..b3df3e71 100644
--- a/src/bin/config.c
+++ b/src/bin/config.c
@@ -576,23 +576,13 @@ config_new(void)
config->font.name = eina_stringshare_add("nexus.pcf");
config->font.size = 10;
config->font.bolditalic = EINA_TRUE;
-#ifdef __APPLE__
- config->helper.email = eina_stringshare_add("open");
- config->helper.url.general = eina_stringshare_add("open");
- config->helper.url.video = eina_stringshare_add("open");
- config->helper.url.image = eina_stringshare_add("open");
- config->helper.local.general = eina_stringshare_add("open");
- config->helper.local.video = eina_stringshare_add("open");
- config->helper.local.image = eina_stringshare_add("open");
-#else
- config->helper.email = eina_stringshare_add("xdg-email");
- config->helper.url.general = eina_stringshare_add("xdg-open");
- config->helper.url.video = eina_stringshare_add("xdg-open");
- config->helper.url.image = eina_stringshare_add("xdg-open");
- config->helper.local.general = eina_stringshare_add("xdg-open");
- config->helper.local.video = eina_stringshare_add("xdg-open");
- config->helper.local.image = eina_stringshare_add("xdg-open");
-#endif
+ config->helper.email = eina_stringshare_add("");
+ config->helper.url.general = eina_stringshare_add("");
+ config->helper.url.video = eina_stringshare_add("");
+ config->helper.url.image = eina_stringshare_add("");
+ config->helper.local.general = eina_stringshare_add("");
+ config->helper.local.video = eina_stringshare_add("");
+ config->helper.local.image = eina_stringshare_add("");
config->helper.inline_please = EINA_TRUE;
config->scrollback = 2000;
config->theme = eina_stringshare_add("default.edj");
@@ -833,30 +823,41 @@ config_load(void)
EINA_FALLTHROUGH;
/*pass through*/
case 27:
-#ifdef __APPLE__
- /* migrate xdg-open/xdg-email to macOS "open" command */
- if (config->helper.email &&
- !strcmp(config->helper.email, "xdg-email"))
- eina_stringshare_replace(&config->helper.email, "open");
- if (config->helper.url.general &&
- !strcmp(config->helper.url.general, "xdg-open"))
- eina_stringshare_replace(&config->helper.url.general, "open");
- if (config->helper.url.video &&
- !strcmp(config->helper.url.video, "xdg-open"))
- eina_stringshare_replace(&config->helper.url.video, "open");
- if (config->helper.url.image &&
- !strcmp(config->helper.url.image, "xdg-open"))
- eina_stringshare_replace(&config->helper.url.image, "open");
- if (config->helper.local.general &&
- !strcmp(config->helper.local.general, "xdg-open"))
- eina_stringshare_replace(&config->helper.local.general, "open");
- if (config->helper.local.video &&
- !strcmp(config->helper.local.video, "xdg-open"))
- eina_stringshare_replace(&config->helper.local.video, "open");
- if (config->helper.local.image &&
- !strcmp(config->helper.local.image, "xdg-open"))
- eina_stringshare_replace(&config->helper.local.image, "open");
-#endif
+ {
+ /* Clear helper values that match recognized OS-default
+ * tool names so EFL's portable elm_open_* takes over.
+ * User overrides (custom tools like "firefox",
+ * "thunderbird", "chrome --incognito") are preserved.
+ * Applies on all platforms — a Linux user with
+ * "xdg-open" baked in also gets cleared, and
+ * elm_open_url runs xdg-open transparently. Same
+ * end result. */
+ static const char * const _os_default_tools[] = {
+ "xdg-open", "xdg-email", "open", NULL
+ };
+
+ #define _CLEAR_IF_OS_DEFAULT(field) do { \
+ if ((field)) { \
+ int _i; \
+ for (_i = 0; _os_default_tools[_i]; _i++) { \
+ if (!strcmp((field), _os_default_tools[_i])) { \
+ eina_stringshare_replace(&(field), ""); \
+ break; \
+ } \
+ } \
+ } \
+ } while (0)
+
+ _CLEAR_IF_OS_DEFAULT(config->helper.email);
+ _CLEAR_IF_OS_DEFAULT(config->helper.url.general);
+ _CLEAR_IF_OS_DEFAULT(config->helper.url.video);
+ _CLEAR_IF_OS_DEFAULT(config->helper.url.image);
+ _CLEAR_IF_OS_DEFAULT(config->helper.local.general);
+ _CLEAR_IF_OS_DEFAULT(config->helper.local.video);
+ _CLEAR_IF_OS_DEFAULT(config->helper.local.image);
+
+ #undef _CLEAR_IF_OS_DEFAULT
+ }
EINA_FALLTHROUGH;
/*pass through*/
case 28:
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.