[Xfce4-commits] [xfce/exo] 01/01: Remove dependency on gio-unix-2.0 (bug #15825)

noreply at xfce.org noreply at xfce.org
Sat Aug 24 12:21:08 CEST 2019


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 7071c417b2dc4a7cbe9a8bd9214acaefe03dc72e
Author: Sean Davis <smd.seandavis at gmail.com>
Date:   Sat Aug 24 06:21:01 2019 -0400

    Remove dependency on gio-unix-2.0 (bug #15825)
---
 NEWS                    | 4 ++++
 exo-helper/exo-helper.c | 8 ++++++++
 2 files changed, 12 insertions(+)

diff --git a/NEWS b/NEWS
index 8cd9c84..4b8cfd1 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,7 @@
+0.12.9 (UNRELEASED)
+======
+- Remove dependency on gio-unix-2.0 (Xfce #15825)
+
 0.12.8
 ======
 - preferred-apps: Add button icons to Help/Close
diff --git a/exo-helper/exo-helper.c b/exo-helper/exo-helper.c
index b5da155..ea18f99 100644
--- a/exo-helper/exo-helper.c
+++ b/exo-helper/exo-helper.c
@@ -43,7 +43,9 @@
 #include <unistd.h>
 #endif
 
+#ifdef HAVE_GIO_UNIX
 #include <gio/gdesktopappinfo.h>
+#endif
 
 #include <exo-helper/exo-helper.h>
 #include <exo-helper/exo-helper-utils.h>
@@ -791,7 +793,9 @@ exo_helper_database_set_default (ExoHelperDatabase *database,
       mimetypes = xfce_rc_read_list_entry (desktop_file, "X-XFCE-MimeType", ";");
       if (mimetypes != NULL)
         {
+#ifdef HAVE_GIO_UNIX
           GDesktopAppInfo *info = g_desktop_app_info_new (filename);
+#endif
 
           xfce_rc_set_group (rc, "Added Associations");
 
@@ -802,18 +806,22 @@ exo_helper_database_set_default (ExoHelperDatabase *database,
                 xfce_rc_write_entry (rc, mimetypes[i], entry);
                 g_free (entry);
 
+#ifdef HAVE_GIO_UNIX
                 if (info != NULL)
                   {
                     g_app_info_set_as_default_for_type (G_APP_INFO (info),
                                                         mimetypes[i],
                                                         NULL);
                   }
+#endif
               }
           g_strfreev (mimetypes);
+#ifdef HAVE_GIO_UNIX
           if (info != NULL)
             {
               g_object_unref (info);
             }
+#endif
         }
 
       xfce_rc_close (desktop_file);

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list