Control: forwarded -1 https://phab.enlightenment.org/T7521 Control: tags -1 patch
On Sat, Dec 22, 2018 at 11:41:20PM +0000, Simon McVittie wrote: > While researching this in codesearch.debian.net I found that e17 > (Enlightenment) still sets the user-preferred file manager by setting > it as an x-scheme-handler/file handler. e17 maintainers, please > don't do this: the interoperable freedesktop.org pseudo-MIME-type > for a general-purpose file manager like Nautilus, Thunar, Dolphin > or (presumably) enlightenment_filemanager is inode/directory, and > enlightenment_filemanager's desktop file already announces it as an > inode/directory handler. Untested patch attached. I'm travelling the next week and may not have time to test/package until January. > In principle GLib could special-case x-scheme-handler/file to be ignored, > but I don't think that's a good idea, because it would be a special case > for something that should never happen in normal desktop sessions anyway, > and it would mean that the locked-down gdm3 session would have no general > way to prevent files from being opened. I don't know the fdo specs well, but this behavior of x-scheme-handler/file seems like a pretty bad misfeature to me. Does it exist only for the gdm3 use-case? Ross
--- a/src/bin/e_open.c +++ b/src/bin/e_open.c @@ -438,7 +438,7 @@ /* {"browser", "x-scheme-handler/http"}, */ {"mail", "x-scheme-handler/mailto"}, /* {"terminal", NULL}, */ - {"filemanager", "x-scheme-handler/file"}, + {"filemanager", "inode/directory"}, {"image", "image/jpeg"}, {"video", "video/x-mpeg"}, {"music", "audio/mp3"}, --- a/src/modules/conf_applications/e_int_config_defapps.c +++ b/src/modules/conf_applications/e_int_config_defapps.c @@ -131,7 +131,7 @@ if (s) cfdata->browser_desktop = eina_stringshare_add(s); s = efreet_ini_string_get(myini, "x-scheme-handler/mailto"); if (s) cfdata->mailto_desktop = eina_stringshare_add(s); - s = efreet_ini_string_get(myini, "x-scheme-handler/file"); + s = efreet_ini_string_get(myini, "inode/directory"); if (s) cfdata->file_desktop = eina_stringshare_add(s); s = efreet_ini_string_get(myini, "x-scheme-handler/trash"); if (s) cfdata->trash_desktop = eina_stringshare_add(s); @@ -385,7 +385,7 @@ efreet_ini_string_set(cfdata->ini, "x-scheme-handler/mailto", cfdata->mailto_desktop); if ((cfdata->file_desktop) && (cfdata->file_desktop[0])) - efreet_ini_string_set(cfdata->ini, "x-scheme-handler/file", + efreet_ini_string_set(cfdata->ini, "inode/directory", cfdata->file_desktop); if ((cfdata->trash_desktop) && (cfdata->trash_desktop[0])) efreet_ini_string_set(cfdata->ini, "x-scheme-handler/trash",