[Xfce4-commits] [xfce/exo] 01/01: Make sure default applications are properly set in mimeapps.list
noreply at xfce.org
noreply at xfce.org
Tue Mar 3 11:54:27 CET 2020
This is an automated email from the git hooks/post-receive script.
b l u e s a b r e p u s h e d a c o m m i t t o b r a n c h m a s t e r
in repository xfce/exo.
commit 8141be8d3fef7b5fe596cc77cdb5bf8aac477a1b
Author: Maurizio Galli <maurizio.galli at gmail.com>
Date: Tue Jan 21 21:15:05 2020 +0800
Make sure default applications are properly set in mimeapps.list
Signed-off-by: Sean Davis <smd.seandavis at gmail.com>
---
exo-helper/exo-helper.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/exo-helper/exo-helper.c b/exo-helper/exo-helper.c
index ea18f99..de77b14 100644
--- a/exo-helper/exo-helper.c
+++ b/exo-helper/exo-helper.c
@@ -797,6 +797,12 @@ exo_helper_database_set_default (ExoHelperDatabase *database,
GDesktopAppInfo *info = g_desktop_app_info_new (filename);
#endif
+ xfce_rc_set_group (rc, "Default Applications");
+
+ for (i = 0; mimetypes[i] != NULL; i++)
+ if (!exo_str_is_empty (mimetypes[i]))
+ xfce_rc_write_entry (rc, mimetypes[i], filename);
+
xfce_rc_set_group (rc, "Added Associations");
for (i = 0; mimetypes[i] != NULL; i++)
@@ -923,6 +929,13 @@ exo_helper_database_clear_default (ExoHelperDatabase *database,
mimetypes = xfce_rc_read_list_entry (desktop_file, "X-XFCE-MimeType", ";");
if (mimetypes != NULL)
{
+ xfce_rc_set_group (rc, "Default Applications");
+
+ for (i = 0; mimetypes[i] != NULL; i++)
+ if (!exo_str_is_empty (mimetypes[i]))
+ xfce_rc_delete_entry (rc, mimetypes[i], FALSE);
+ g_strfreev (mimetypes);
+
xfce_rc_set_group (rc, "Added Associations");
for (i = 0; mimetypes[i] != NULL; i++)
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list