diff options
author | Nick Schermer <nick@xfce.org> | 2009-10-23 14:17:23 +0200 |
---|---|---|
committer | Nick Schermer <nick@xfce.org> | 2009-10-23 14:17:23 +0200 |
commit | afc76d7cbf690024d4cfd819c4a2900b274290b7 (patch) | |
tree | 1e9ded4e9717d276117403f9b6dd7f14e8a84bea /exo-open | |
parent | 7963243f4f83a78b927dd93237a0c68fdd45a028 (diff) | |
download | exo-afc76d7cbf690024d4cfd819c4a2900b274290b7.tar.gz |
Make GIO-Unix an optional package.
Diffstat (limited to 'exo-open')
-rw-r--r-- | exo-open/main.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/exo-open/main.c b/exo-open/main.c index 37426b8..b556186 100644 --- a/exo-open/main.c +++ b/exo-open/main.c @@ -33,7 +33,9 @@ #include <glib/gstdio.h> #include <gio/gio.h> +#ifdef HAVE_GIO_UNIX #include <gio/gdesktopappinfo.h> +#endif #include <exo/exo.h> @@ -117,6 +119,7 @@ usage (void) static gboolean exo_open_launch_desktop_file (const gchar *arg) { +#ifdef HAVE_GIO_UNIX GFile *gfile; gchar *contents; gsize length; @@ -157,13 +160,19 @@ exo_open_launch_desktop_file (const gchar *arg) else result = FALSE; + g_object_unref (G_OBJECT (appinfo)); + #ifndef NDEBUG g_debug ("launching desktop file %s", result ? "succeeded" : "failed"); #endif - g_object_unref (G_OBJECT (appinfo)); - return result; +#else /* !HAVE_GIO_UNIX */ + g_critical (_("Launching desktop files is not supported when %s is compiled " + "without GIO-Unix features."), g_get_prgname ()); + + return FALSE; +#endif } |