[Xfce4-commits] [panel-plugins/xfce4-verve-plugin] 01/02: Use autoconf to check for the presence of wordexp; disable word expansion in directory names if it is not available (e.g. OpenBSD)
noreply at xfce.org
noreply at xfce.org
Thu Feb 19 03:10:17 CET 2015
This is an automated email from the git hooks/post-receive script.
isaacschemm pushed a commit to branch master
in repository panel-plugins/xfce4-verve-plugin.
commit d82d80408a2c7c2e56a8143819ef5ea63765f246
Author: Isaac Schemm <isaacschemm at gmail.com>
Date: Wed Feb 18 20:09:32 2015 -0600
Use autoconf to check for the presence of wordexp; disable word expansion in directory names if it is not available (e.g. OpenBSD)
---
configure.ac.in | 12 ++++++++++--
panel-plugin/verve.c | 13 ++++++++++++-
2 files changed, 22 insertions(+), 3 deletions(-)
diff --git a/configure.ac.in b/configure.ac.in
index 157a0dd..b4b431d 100644
--- a/configure.ac.in
+++ b/configure.ac.in
@@ -1,13 +1,15 @@
dnl Copyright (c) 2006 - Jannis Pohlmann <jannis at xfce.org>
dnl Copyright (c) 2010 - Florian Rivoal <frivoal at xfce.org>
+dnl Copyright (c) 2015 - Isaac Schemm <isaacschemm at gmail.com>
dnl
dnl ***************************
dnl *** Initialize autoconf ***
dnl ***************************
AC_COPYRIGHT([Copyright (c) 2006-2008 Jannis Pohlmann <jannis at xfce.org>
-Copyright (c) Florian Rivoal 2010 <frivoal at xfce.org>])
-AC_INIT([xfce4-verve-plugin], [1.0.1], [jannis at xfce.org], [xfce4-verve-plugin])
+Copyright (c) Florian Rivoal 2010 <frivoal at xfce.org>
+Copyright (c) Isaac Schemm 2015 <isaacschemm at gmail.com>])
+AC_INIT([xfce4-verve-plugin], [1.0.2], [isaacschemm at gmail.com], [xfce4-verve-plugin])
AC_PREREQ([2.50])
dnl ***************************
@@ -72,6 +74,12 @@ if $PKG_CONFIG --atleast-version=0.60 dbus-glib-1 >/dev/null 2>&1; then
AC_DEFINE([HAVE_DBUS_NEW_FLAGS], [1], [Define if D-BUS version >= 0.60])
fi
+dnl *******************************************************
+dnl ** Determine if wordexp is available for expanding **
+dnl ** pathnames entered into the verve input box **
+dnl *******************************************************
+AC_CHECK_FUNCS(wordexp)
+
dnl ***********************************
dnl *** Check for debugging support ***
dnl ***********************************
diff --git a/panel-plugin/verve.c b/panel-plugin/verve.c
index 01b78db..77bedaa 100644
--- a/panel-plugin/verve.c
+++ b/panel-plugin/verve.c
@@ -20,12 +20,16 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
-
+
+#include "config.h"
+
#include <pcre.h>
#include <glib-object.h>
+#ifdef HAVE_WORDEXP
#include <wordexp.h>
+#endif
#include <libxfce4ui/libxfce4ui.h>
@@ -294,6 +298,7 @@ verve_is_email (const gchar *str)
gchar *
verve_is_directory (const gchar *str)
{
+#ifdef HAVE_WORDEXP
wordexp_t w;
int result;
@@ -312,6 +317,12 @@ verve_is_directory (const gchar *str)
return g_strdup (w.we_wordv[0]);
else
return NULL;
+#else
+ if (g_file_test (str, G_FILE_TEST_IS_DIR))
+ return g_strdup (str);
+ else
+ return NULL;
+#endif
}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list