Commit 47f47567 authored by Benedikt Meurer's avatar Benedikt Meurer

2005-06-14 Benedikt Meurer <benny@xfce.org>

	* thunar-vfs/thunar-vfs-volume-sysv.{c,h}: Add no-op implementation
	  to make it possible to compile Thunar on non-BSD systems again.
	* configure.in.in, thunar-vfs/Makefile.am,
	  thunar-vfs/thunar-vfs-volume.c, thunar-vfs/thunar-vfs-volume-bsd.c:
	  Add a rather hacky way to support different system flavours based
	  on AC_CONFIG_LINKS(). Needs to be replaced by a real solution at
	  some time.
	* TODO: Add note about the wacky AC_CONFIG_LINKS() hacks mentioned
	  above.




(Old svn revision: 16334)
parent 7f27b006
2005-06-14 Benedikt Meurer <benny@xfce.org>
* thunar-vfs/thunar-vfs-volume-sysv.{c,h}: Add no-op implementation
to make it possible to compile Thunar on non-BSD systems again.
* configure.in.in, thunar-vfs/Makefile.am,
thunar-vfs/thunar-vfs-volume.c, thunar-vfs/thunar-vfs-volume-bsd.c:
Add a rather hacky way to support different system flavours based
on AC_CONFIG_LINKS(). Needs to be replaced by a real solution at
some time.
* TODO: Add note about the wacky AC_CONFIG_LINKS() hacks mentioned
above.
2005-06-14 Benedikt Meurer <benny@xfce.org>
* thunar-vfs/thunar-vfs-uri.c(thunar_vfs_uri_new_for_path): Add some
......
Important for Thunar 1.0
========================
- Use better way to handle system flavours than simply (mis)using
AC_CONFIG_LINKS(), which is pretty messy for this purpose.
- Check getmntinfo() or getfsstat() for ThunarVfsVolumeManagerBSD, which
might be faster than several statfs() calls.
......@@ -64,5 +67,3 @@ Important for Thunar 1.0
the stat-thread. Backend technologies must be thread-safe. If
there's a lot of time or manpower in the end, additional
backends can be added, as long as they fit into the framework.
- The ThunarFavourites framework needs drag and drop support.
......@@ -22,6 +22,7 @@ AC_COPYRIGHT([Copyright (c) 2004-2005
Written for Thunar by Benedikt Meurer <benny@xfce.org>.])
AC_INIT([Thunar], [thunar_version()], [benny@xfce.org])
AC_PREREQ([2.50])
AC_CANONICAL_TARGET()
AC_REVISION([$Id$])
dnl Initialize automake
......@@ -48,6 +49,25 @@ dnl Check for required packages
XDT_CHECK_PACKAGE([EXO], [exo-0.3], [0.3.1])
XDT_CHECK_PACKAGE([GTHREAD], [gthread-2.0], [2.4.3])
dnl Check for the system flavour
AC_MSG_CHECKING([for system flavour])
case "$target_os" in
*bsd*)
FLAVOUR="bsd"
;;
*)
FLAVOUR="sysv"
;;
esac
AC_MSG_RESULT([$FLAVOUR])
dnl Create links for the volume manager implementation
AC_CONFIG_LINKS(
[
thunar-vfs/thunar-vfs-volume-impl.c:thunar-vfs/thunar-vfs-volume-$FLAVOUR.c
thunar-vfs/thunar-vfs-volume-impl.h:thunar-vfs/thunar-vfs-volume-$FLAVOUR.h
])
dnl Check for debugging support
BM_DEBUG_SUPPORT()
......
......@@ -19,7 +19,6 @@ libthunar_vfs_headers = \
thunar-vfs-util.h \
thunar-vfs-uri.h \
thunar-vfs-volume.h \
thunar-vfs-volume-bsd.h \
thunar-vfs.h
libthunar_vfs_la_SOURCES = \
......@@ -30,7 +29,8 @@ libthunar_vfs_la_SOURCES = \
thunar-vfs-util.c \
thunar-vfs-uri.c \
thunar-vfs-volume.c \
thunar-vfs-volume-bsd.c
thunar-vfs-volume-impl.c \
thunar-vfs-volume-impl.h
libthunar_vfs_la_CFLAGS = \
$(EXO_CFLAGS) \
......@@ -41,6 +41,12 @@ libthunar_vfs_la_LDFLAGS = \
$(EXO_LIBS) \
$(GTHREADS_LIBS)
EXTRA_DIST = \
thunar-vfs-volume-bsd.c \
thunar-vfs-volume-bsd.h \
thunar-vfs-volume-sysv.c \
thunar-vfs-volume-sysv.h
##
## Rules to auto-generate built sources
##
......
......@@ -432,3 +432,12 @@ thunar_vfs_volume_manager_bsd_get_volumes (ThunarVfsVolumeManager *manager)
}
GType
_thunar_vfs_volume_manager_impl_get_type (void)
{
return THUNAR_VFS_TYPE_VOLUME_MANAGER_BSD;
}
/* $Id$ */
/*-
* Copyright (c) 2005 Benedikt Meurer <benny@xfce.org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <thunar-vfs/thunar-vfs-volume-sysv.h>
static void thunar_vfs_volume_manager_sysv_class_init (ThunarVfsVolumeManagerSysVClass *klass);
static void thunar_vfs_volume_manager_sysv_manager_init (ThunarVfsVolumeManagerIface *iface);
static void thunar_vfs_volume_manager_sysv_init (ThunarVfsVolumeManagerSysV *manager_sysv);
static GList *thunar_vfs_volume_manager_sysv_get_volumes (ThunarVfsVolumeManager *manager);
struct _ThunarVfsVolumeManagerSysVClass
{
GObjectClass __parent__;
};
struct _ThunarVfsVolumeManagerSysV
{
GObject __parent__;
};
G_DEFINE_TYPE_WITH_CODE (ThunarVfsVolumeManagerSysV,
thunar_vfs_volume_manager_sysv,
G_TYPE_OBJECT,
G_IMPLEMENT_INTERFACE (THUNAR_VFS_TYPE_VOLUME_MANAGER,
thunar_vfs_volume_manager_sysv_manager_init));
static void
thunar_vfs_volume_manager_sysv_class_init (ThunarVfsVolumeManagerSysVClass *klass)
{
}
static void
thunar_vfs_volume_manager_sysv_manager_init (ThunarVfsVolumeManagerIface *iface)
{
iface->get_volumes = thunar_vfs_volume_manager_sysv_get_volumes;
}
static void
thunar_vfs_volume_manager_sysv_init (ThunarVfsVolumeManagerSysV *manager_sysv)
{
}
static GList*
thunar_vfs_volume_manager_sysv_get_volumes (ThunarVfsVolumeManager *manager)
{
g_return_val_if_fail (THUNAR_VFS_IS_VOLUME_MANAGER_SYSV (manager), NULL);
return NULL;
}
GType
_thunar_vfs_volume_manager_impl_get_type (void)
{
return THUNAR_VFS_TYPE_VOLUME_MANAGER_SYSV;
}
/* $Id$ */
/*-
* Copyright (c) 2005 Benedikt Meurer <benny@xfce.org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
#ifndef __THUNAR_VFS_VOLUME_SYSV_H__
#define __THUNAR_VFS_VOLUME_SYSV_H__
#include <thunar-vfs/thunar-vfs-volume.h>
G_BEGIN_DECLS;
typedef struct _ThunarVfsVolumeSysVClass ThunarVfsVolumeSysVClass;
typedef struct _ThunarVfsVolumeSysV ThunarVfsVolumeSysV;
#define THUNAR_VFS_TYPE_VOLUME_SYSV (thunar_vfs_volume_sysv_get_type ())
#define THUNAR_VFS_VOLUME_SYSV(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), THUNAR_VFS_TYPE_VOLUME_SYSV, ThunarVfsVolumeSYSV))
#define THUNAR_VFS_VOLUME_SYSV_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), THUNAR_VFS_TYPE_VOLUME_SYSV, ThunarVfsVolumeSYSVClass))
#define THUNAR_VFS_IS_VOLUME_SYSV(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), THUNAR_VFS_TYPE_VOLUME_SYSV))
#define THUNAR_VFS_IS_VOLUME_SYSV_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), THUNAR_VFS_TYPE_VOLUME_SYSV))
#define THUNAR_VFS_VOLUME_SYSV_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), THUNAR_VFS_TYPE_VOLUME_SYSV, ThunarVfsVolumeSYSVClass))
GType thunar_vfs_volume_sysv_get_type (void) G_GNUC_CONST;
typedef struct _ThunarVfsVolumeManagerSysVClass ThunarVfsVolumeManagerSysVClass;
typedef struct _ThunarVfsVolumeManagerSysV ThunarVfsVolumeManagerSysV;
#define THUNAR_VFS_TYPE_VOLUME_MANAGER_SYSV (thunar_vfs_volume_manager_sysv_get_type ())
#define THUNAR_VFS_VOLUME_MANAGER_SYSV(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), THUNAR_VFS_TYPE_VOLUME_MANAGER_SYSV, ThunarVfsVolumeManagerSYSV))
#define THUNAR_VFS_VOLUME_MANAGER_SYSV_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), THUNAR_VFS_TYPE_VOLUME_MANAGER_SYSV, ThunarVfsVolumeManagerSYSVClass))
#define THUNAR_VFS_IS_VOLUME_MANAGER_SYSV(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), THUNAR_VFS_TYPE_VOLUME_MANAGER_SYSV))
#define THUNAR_VFS_IS_VOLUME_MANAGER_SYSV_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), THUNAR_VFS_TYPE_VOLUME_MANAGER_SYSV))
#define THUNAR_VFS_VOLUME_MANAGER_SYSV_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), THUNAR_VFS_TYPE_VOLUME_MANAGER_SYSV, ThunarVfsVolumeManagerSYSVClass))
GType thunar_vfs_volume_manager_sysv_get_type (void) G_GNUC_CONST;
G_END_DECLS;
#endif /* !__THUNAR_VFS_VOLUME_SYSV_H__ */
......@@ -26,7 +26,6 @@
#include <thunar-vfs/thunar-vfs-enum-types.h>
#include <thunar-vfs/thunar-vfs-volume.h>
#include <thunar-vfs/thunar-vfs-volume-bsd.h>
......@@ -499,11 +498,12 @@ thunar_vfs_volume_manager_base_init (gpointer klass)
ThunarVfsVolumeManager*
thunar_vfs_volume_manager_get_default (void)
{
extern GType _thunar_vfs_volume_manager_impl_get_type (void);
static ThunarVfsVolumeManager *manager = NULL;
if (G_UNLIKELY (manager == NULL))
{
manager = g_object_new (THUNAR_VFS_TYPE_VOLUME_MANAGER_BSD, NULL);
manager = g_object_new (_thunar_vfs_volume_manager_impl_get_type (), NULL);
g_object_add_weak_pointer (G_OBJECT (manager), (gpointer) &manager);
}
else
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment