[Xfce4-commits] <thunar-shares-plugin:thunarx-2> New thunarx-2 branch, drop ThunarVFS
Daniel Morales
noreply at xfce.org
Sat Jan 30 03:36:02 CET 2010
Updating branch refs/heads/thunarx-2
to 3a89ca67b27d717b13fed7851fce3244f31fc94e (commit)
from 4401e0b51990f9bb79a0eb3092343115d8923de7 (commit)
commit 3a89ca67b27d717b13fed7851fce3244f31fc94e
Author: Daniel Morales <daniel at daniel.com.uy>
Date: Sat Jan 30 00:29:26 2010 -0200
New thunarx-2 branch, drop ThunarVFS
configure.in.in | 9 ++++-----
libshares/Makefile.am | 4 +---
libshares/libshares-util.c | 30 +++++++++++++++++++-----------
thunar-plugin/Makefile.am | 6 ++----
4 files changed, 26 insertions(+), 23 deletions(-)
diff --git a/configure.in.in b/configure.in.in
index 2e55da2..cfcf92e 100644
--- a/configure.in.in
+++ b/configure.in.in
@@ -21,7 +21,7 @@ m4_define([tsp_debug_default], [ifelse(tsp_version_tag(), [git], [full], [minimu
dnl -------------------------------------------------------
dnl Init autoconf
dnl -------------------------------------------------------
-AC_COPYRIGHT([Copyright (c) 2008 Daniel Morales <daniel at daniel.com.uy>.])
+AC_COPYRIGHT([Copyright (c) 2009-2010 Daniel Morales <daniel at daniel.com.uy>.])
AC_INIT([thunar-shares-plugin], [tsp_version], [thunar-dev at xfce.org])
AC_CONFIG_SRCDIR([thunar-plugin/thunar-shares-plugin.c])
AC_PREREQ(2.59)
@@ -49,15 +49,14 @@ AC_PROG_INTLTOOL([0.31])
dnl -------------------------------------------------------
dnl Check headers
dnl -------------------------------------------------------
-AC_CHECK_HEADERS([string.h sys/types.h sys/wait.h time.h sys/stat.h])
+AC_CHECK_HEADERS([string.h sys/types.h sys/wait.h time.h sys/stat.h unistd.h])
dnl -------------------------------------------------------
dnl Packages checks
dnl -------------------------------------------------------
XDT_CHECK_PACKAGE([GTK], [gtk+-2.0], [2.12.0])
-XDT_CHECK_PACKAGE([GLIB], [glib-2.0], [2.10.0])
-XDT_CHECK_PACKAGE([THUNARX], [thunarx-1], [0.8.0])
-XDT_CHECK_PACKAGE([THUNARVFS], [thunar-vfs-1], [0.8.0])
+XDT_CHECK_PACKAGE([GLIB], [glib-2.0], [2.18.0])
+XDT_CHECK_PACKAGE([THUNARX], [thunarx-2], [1.0.1])
dnl -------------------------------------------------------
dnl Languages
diff --git a/libshares/Makefile.am b/libshares/Makefile.am
index 1c26260..38e74f0 100644
--- a/libshares/Makefile.am
+++ b/libshares/Makefile.am
@@ -17,14 +17,12 @@ libshares_la_CFLAGS = \
$(PLATFORM_CFLAGS) \
$(GTK_CFLAGS) \
$(GLIB_CFLAGS) \
- $(THUNARX_CFLAGS) \
- $(THUNARVFS_CFLAGS)
+ $(THUNARX_CFLAGS)
libshares_la_LDFLAGS = \
$(GTK_LIBS) \
$(GLIB_LIBS) \
$(THUNARX_LIBS) \
- $(THUNARVFS_LIBS) \
$(PLATFORM_LDFLAGS)
# vi:set ts=8 sw=8 noet ai nocindent syntax=automake:
diff --git a/libshares/libshares-util.c b/libshares/libshares-util.c
index 7aae885..b988418 100644
--- a/libshares/libshares-util.c
+++ b/libshares/libshares-util.c
@@ -26,11 +26,16 @@
#include <sys/stat.h>
#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
+#include <gio/gio.h>
+
#include <glib/gstdio.h>
#include <gtk/gtk.h>
#include <glib/gi18n-lib.h>
-#include <thunar-vfs/thunar-vfs.h>
#include <thunarx/thunarx.h>
#include "libshares-util.h"
@@ -293,17 +298,17 @@ gboolean
libshares_is_shareable (ThunarxFileInfo *info)
{
gboolean retval;
- gchar *scheme;
+ GFile *file;
if (!thunarx_file_info_is_directory (info)){
return FALSE;
}
- scheme = thunarx_file_info_get_uri_scheme (info);
+ file = thunarx_file_info_get_location (info);
- retval = g_str_equal ("file", scheme);
+ retval = g_file_is_native (file);
- g_free (scheme);
+ g_object_unref (file);
return retval;
}
@@ -319,19 +324,22 @@ libshares_is_shareable (ThunarxFileInfo *info)
gboolean
libshares_check_owner (ThunarxFileInfo *info)
{
- ThunarVfsInfo *vfsinfo;
- gboolean retval = TRUE;
- gboolean owner_only;
+ GFileInfo *fileinfo;
+ gboolean retval = TRUE;
+ gboolean owner_only;
+ guint32 uid;
if (shares_has_owner_only (&owner_only, NULL))
{
if (owner_only)
{
- vfsinfo = thunarx_file_info_get_vfs_info (info);
+ fileinfo = thunarx_file_info_get_file_info (info);
+
+ uid = g_file_info_get_attribute_uint32 (fileinfo, G_FILE_ATTRIBUTE_UNIX_UID);
- retval = (geteuid () == vfsinfo->uid);
+ retval = (geteuid () == uid);
- thunar_vfs_info_unref (vfsinfo);
+ g_object_unref (fileinfo);
}
}
diff --git a/thunar-plugin/Makefile.am b/thunar-plugin/Makefile.am
index 84f31f3..fe2586e 100644
--- a/thunar-plugin/Makefile.am
+++ b/thunar-plugin/Makefile.am
@@ -7,7 +7,7 @@ INCLUDES = \
-DDATADIR=\"$(datadir)\" \
$(PLATFORM_CPPFLAGS)
-extensionsdir = $(libdir)/thunarx-1
+extensionsdir = $(libdir)/thunarx-2
extensions_LTLIBRARIES = thunar-shares-plugin.la
thunar_shares_plugin_la_SOURCES = \
@@ -19,8 +19,7 @@ thunar_shares_plugin_la_CFLAGS = \
$(PLATFORM_CFLAGS) \
$(GTK_CFLAGS) \
$(GLIB_CFLAGS) \
- $(THUNARX_CFLAGS) \
- $(THUNARVFS_CFLAGS)
+ $(THUNARX_CFLAGS)
thunar_shares_plugin_la_LDFLAGS = \
-avoid-version \
@@ -29,7 +28,6 @@ thunar_shares_plugin_la_LDFLAGS = \
$(GTK_LIBS) \
$(GLIB_LIBS) \
$(THUNARX_LIBS) \
- $(THUNARVFS_LIBS) \
$(PLATFORM_LDFLAGS)
thunar_shares_plugin_la_LIBADD= \
More information about the Xfce4-commits
mailing list