[Xfce-bugs] [Bug 15917] Thunar SendTo Email: improve archives detection

bugzilla-daemon at xfce.org bugzilla-daemon at xfce.org
Wed Sep 4 09:28:38 CEST 2019


https://bugzilla.xfce.org/show_bug.cgi?id=15917

--- Comment #3 from Sergey Ponomarev <stokito at gmail.com> ---
> are all files with "package-x-generic" archives ?
yes, I checked in
https://github.com/freedesktop/xdg-shared-mime-info/blob/master/freedesktop.org.xml.in


> would at least open a bug against glib

yes, I'll try to do this latter but here is a problem that I'm not so
experienced to send such PR into GLib itself. I'm just a regular Java dev and
for me it's much harder. Another problem is a time: 
1. we need to patch the shared-mime-info lib (it may take some time to prepare
a patch)
2. then wait until all distros will update it (API changed i.e. major update: I
guess this may take few months, maybe even year)
3. then we need to patch GLib
4. then wait until all distros will update it (I'm afraid this may take years)
5. only then update XFCE

This may takes years while my main goal is to force wider adoption of ZStandard
and Brotli.

In the same time this approach even given that looks hacky but it's simple and
well documented.
So when the zstd and brotli will be added to shared-mime-info (just adding the
two types should much more easy to add) they begin to be recognized almost
immediately.

Also please note that this patch is in fact just a simplified form of main
change
https://bugzilla.xfce.org/show_bug.cgi?id=15918

And there is a main goal to speedup archives detection and to become prepared
for zstd and brotli archives.


> just add to missing mime types.
yes, that what I did first and if you decide not to accept this detection
improvement then at least add these missing types:


Index: plugins/thunar-sendto-email/main.c
===================================================================
--- plugins/thunar-sendto-email/main.c  (date 1567420848000)
+++ plugins/thunar-sendto-email/main.c  (date 1567582010442)
@@ -76,8 +76,12 @@

 /* well known archive types */
 static const char *TSE_MIME_TYPES[] = {
+  "application/x-7z-compressed",
+  "application/x-7z-compressed-tar",
   "application/x-ar",
   "application/x-arj",
+  "application/x-brotli",
+  "application/x-brotli-compressed-tar",
   "application/x-bzip",
   "application/x-bzip-compressed-tar",
   "application/x-compress",
@@ -87,9 +91,13 @@
   "application/x-gzip",
   "application/x-lha",
   "application/x-lhz",
+  "application/x-lzma",
+  "application/x-lzma-compressed-tar",
   "application/x-rar",
   "application/x-rar-compressed",
   "application/x-tar",
+  "application/x-xz",
+  "application/x-xz-compressed-tar",
   "application/x-zip",
   "application/x-zip-compressed",
   "application/zip",
@@ -100,6 +108,8 @@
   "application/x-lzop",
   "application/x-zoo",
   "application/x-cd-image",
+  "application/zstd",
+  "application/x-zstd-compressed-tar",
 };

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the Xfce-bugs mailing list