diff -x Makefile -x config.h.in -x CVS -x config.h -ruN icewm-1.2-clean/src/gnomevfs.cc icewm-1.2-all/src/gnomevfs.cc --- icewm-1.2-clean/src/gnomevfs.cc 2002-07-08 12:07:15.000000000 +0200 +++ icewm-1.2-all/src/gnomevfs.cc 1970-01-01 01:00:00.000000000 +0100 @@ -1,57 +0,0 @@ -/* - * IceWM - Implementation of GNOME VFS 2.0 support - * Copyright (C) 2002 The Authors of IceWM - * - * Release under terms of the GNU Library General Public License - */ - -#include "config.h" -#include "base.h" -#include "gnomevfs.h" - -YGnomeVFS::YGnomeVFS(): -YSharedLibrary("libgnomevfs-2.so") { - ASSIGN_SYMBOL(Init, gnome_vfs_init); - ASSIGN_SYMBOL(Shutdown, gnome_vfs_init); - ASSIGN_SYMBOL(DirectoryVisit, gnome_vfs_directory_visit); - - if (!(available() && mInit())) unload(); -} - -YGnomeVFS::~YGnomeVFS() { - if (mShutdown) mShutdown(); -} - -bool YGnomeVFS::available() const { - return YSharedLibrary::loaded() && - mInit && mShutdown && mDirectoryVisit; -} - -YGnomeVFS::Result YGnomeVFS::traverse(const char *uri, Visitor *visitor, - FileInfoOptions infoOptions, - DirectoryVisitOptions visitOptions) { - return mDirectoryVisit ? mDirectoryVisit(uri, infoOptions, visitOptions, - &YGnomeVFS::visit, visitor) - : ErrorNotSupported; -} - -int YGnomeVFS::visit(const char *filename, FileInfo *info, - int recursingWillLoop, void *data, int *recurse) { - if (data) { - Visitor *visitor = (Visitor *) data; - return visitor->visit(filename, *info, recursingWillLoop, *recurse); - } else { - *recurse = !recursingWillLoop; - msg("%s", filename); - return true; - } -} - -void YGnomeVFS::unload() { - mInit = 0; - mShutdown = 0; - mDirectoryVisit = 0; - - YSharedLibrary::unload(); -} - diff -x Makefile -x config.h.in -x CVS -x config.h -ruN icewm-1.2-clean/src/gnomevfs.h icewm-1.2-all/src/gnomevfs.h --- icewm-1.2-clean/src/gnomevfs.h 2002-07-08 12:07:15.000000000 +0200 +++ icewm-1.2-all/src/gnomevfs.h 1970-01-01 01:00:00.000000000 +0100 @@ -1,206 +0,0 @@ -/* - * IceWM - Definitions for GNOME VFS 2.0 support - * Copyright (C) 2002 The Authors of IceWM - * - * Release under terms of the GNU Library General Public License - * - * This header is based on gnome-vfs2-2.0.0.0.200206210447-0.snap.ximian.1 - * built by Ximian on Don 27 Jun 2002 02:41:24 GMT. - */ - -#ifndef __YGNOMEVFS_H -#define __YGNOMEVFS_H - -#include "ylibrary.h" - -#include -#include - -class YGnomeVFS: protected YSharedLibrary { -public: - typedef unsigned long long FileSize; - typedef FileSize InodeNumber; - - enum Result { - Ok, - ErrorNotFound, - ErrorGeneric, - ErrorInternal, - ErrorBadParameters, - ErrorNotSupported, - ErrorIo, - ErrorCorruptedData, - ErrorWrongFormat, - ErrorBadFile, - ErrorTooBig, - ErrorNoSpace, - ErrorReadOnly, - ErrorInvalidUri, - ErrorNotOpen, - ErrorInvalidOpenMode, - ErrorAccessDenied, - ErrorTooManyOpenFiles, - ErrorEof, - ErrorNotADirectory, - ErrorInProgress, - ErrorInterrupted, - ErrorFileExists, - ErrorLoop, - ErrorNotPermitted, - ErrorIsDirectory, - ErrorNoMemory, - ErrorHostNotFound, - ErrorInvalidHostName, - ErrorHostHasNoAddress, - ErrorLoginFailed, - ErrorCancelled, - ErrorDirectoryBusy, - ErrorDirectoryNotEmpty, - ErrorTooManyLinks, - ErrorReadOnlyFileSystem, - ErrorNotSameFileSystem, - ErrorNameTooLong, - ErrorServiceNotAvailable, - ErrorServiceObsolete, - ErrorProtocolError, - }; - - enum FileFlags { - ffNone = 0, - ffSymlink = 1 << 0, - ffLocal = 1 << 1, - }; - - enum FileType { - ftUnknown, - ftRegular, - ftDirectory, - ftFifo, - ftSocket, - ftCharacterDevice, - ftBlockDevice, - ftSymbolicLink - }; - - enum FilePermissions { - permSuid = S_ISUID, - permSgid = S_ISGID, - permSticky = 01000, // S_ISVTX not defined on all systems - permUserRead = S_IRUSR, - permUserWrite = S_IWUSR, - permUserExec = S_IXUSR, - permUserAll = S_IRUSR | S_IWUSR | S_IXUSR, - permGroupRead = S_IRGRP, - permGroupWrite = S_IWGRP, - permGroupExec = S_IXGRP, - permGroupAll = S_IRGRP | S_IWGRP | S_IXGRP, - permOtherRead = S_IROTH, - permOtherWrite = S_IWOTH, - permOtherExec = S_IXOTH, - permOtherAll = S_IROTH | S_IWOTH | S_IXOTH - }; - - enum FileInfoOptions { - fiDefault = 0, - fiGetMIMEType = 1 << 0, - fiForceFastMIMEType = 1 << 1, - fiForceSlowMIMEType = 1 << 2, - fiFollowLinks = 1 << 3 - }; - - enum DirectoryVisitOptions { - dvDefault = 0, - dvSameFilesystem = 1 << 0, - dvLoopCheck = 1 << 1 - }; - - enum FileInfoFields { - fifNone = 0, - fifType = 1 << 0, - fifPermissions = 1 << 1, - fifFlags = 1 << 2, - fifDevice = 1 << 3, - fifInode = 1 << 4, - fifLinkCount = 1 << 5, - fifSize = 1 << 6, - fifBlockCount = 1 << 7, - fifIoBlockSize = 1 << 8, - fifAtime = 1 << 9, - fifMtime = 1 << 10, - fifCtime = 1 << 11, - fifSymlinkName = 1 << 12, - fifMimeType = 1 << 13 - }; - - struct FileInfo { - char *name; - - FileInfoFields validFields; - - FileType type; - FilePermissions permissions; - FileFlags flags; - - dev_t device; - InodeNumber inode; - - unsigned linkCount; - - unsigned uid; - unsigned gid; - - FileSize size; - - FileSize blockCount; - unsigned ioBlockSize; - - time_t atime; - time_t mtime; - time_t ctime; - - char *symlinkName; - char *mimeType; - - unsigned refcount; - }; - - class Visitor { - public: - virtual bool visit(const char *filename, const FileInfo &info, - int recursingWillLoop, int &recurse) = 0; - }; - - YGnomeVFS(); - virtual ~YGnomeVFS(); - - bool available() const; - - Result traverse(const char *uri, Visitor *visitor, - FileInfoOptions infoOptions = fiDefault, - DirectoryVisitOptions visitOptions = dvDefault); - -protected: - typedef int (* Init)(); - typedef void (* Shutdown)(); - - typedef int (* DirectoryVisitFunc) - (const char *filename, FileInfo *info, - int recursingWillLoop, void *data, int *recurse); - - typedef Result (* DirectoryVisit) - (const char *uri, FileInfoOptions infoOptions, - DirectoryVisitOptions visitOptions, - DirectoryVisitFunc callback, void *data); - - static int visit(const char *filename, FileInfo *info, - int recursingWillLoop, void *data, int *recurse); - - virtual void unload(); - -private: - Init mInit; - Shutdown mShutdown; - DirectoryVisit mDirectoryVisit; -}; - -#endif Binary files icewm-1.2-clean/src/icesound and icewm-1.2-all/src/icesound differ Binary files icewm-1.2-clean/src/icewm-menu-gnome2 and icewm-1.2-all/src/icewm-menu-gnome2 differ diff -x Makefile -x config.h.in -x CVS -x config.h -ruN icewm-1.2-clean/src/Makefile.in icewm-1.2-all/src/Makefile.in --- icewm-1.2-clean/src/Makefile.in 2003-12-22 15:53:23.000000000 +0100 +++ icewm-1.2-all/src/Makefile.in 2003-12-23 10:04:39.000000000 +0100 @@ -175,10 +175,6 @@ testdesktop.o ydesktop.o yparser.o ylocale.o misc.o testdesktop_LIBS = \ $(CORE_LIBS) $(IMAGE_LIBS) -testgnomevfs_OBJS = \ - testgnomevfs.o gnomevfs.o ylibrary.o misc.o -testgnomevfs_LFLAGS = \ - -ldl testarray_OBJS = \ testarray.o yarray.o misc.o diff -x Makefile -x config.h.in -x CVS -x config.h -ruN icewm-1.2-clean/src/testgnomevfs.cc icewm-1.2-all/src/testgnomevfs.cc --- icewm-1.2-clean/src/testgnomevfs.cc 2002-07-08 12:07:15.000000000 +0200 +++ icewm-1.2-all/src/testgnomevfs.cc 1970-01-01 01:00:00.000000000 +0100 @@ -1,53 +0,0 @@ -#include "config.h" -#include "base.h" -#include "gnomevfs.h" - -#include -#include - -char const *ApplicationName("testgnomevfs"); - -class VerboseVisitor : public YGnomeVFS::Visitor { - virtual bool visit(const char *filename, const YGnomeVFS::FileInfo &info, - int recursingWillLoop, int &recurse) { - char *mtime = ctime(&info.mtime); - mtime[strlen(mtime) - 1] = '\0'; - - msg("%s [%s][%s]", filename, info.mimeType, mtime); - - recurse = !recursingWillLoop; - return true; - } -}; - -int main(int argc, char *argv[]) { - YGnomeVFS gnomeVFS; - - if (gnomeVFS.available()) { - YGnomeVFS::Visitor *visitor = 0; - unsigned pathCount = 0; - - for (char **arg = argv + 1; arg < argv + argc; ++arg) - if (**arg == '-') { - if (!visitor && !strcmp(*arg, "-v")) - visitor = new VerboseVisitor(); - } else { - ++pathCount; - } - - if (pathCount > 0) { - for (char **arg = argv + 1; arg < argv + argc; ++arg) { - if (**arg != '-') gnomeVFS.traverse(*arg, visitor); - } - } else { - gnomeVFS.traverse("applications:", visitor); - } - - delete visitor; - - return 0; - } else { - warn("GNOME VFS 2.0 not found: %s", YSharedLibrary::getLastError()); - return 1; - } -}