auto-import changelog data from gnome-vfs2-2.2.2-4.src.rpm

Mon Feb 24 2003 Elliot Lee <sopwith@redhat.com>
- debuginfo rebuild
Mon Feb 24 2003 Alexander Larsson <alexl@redhat.com> 2.2.2-3
- Added patch to fix smb crash (#84982)
Mon Feb 24 2003 Alexander Larsson <alexl@redhat.com> 2.2.2-2
- Add patch to fix notify race (#84668)
Wed Feb 12 2003 Alexander Larsson <alexl@redhat.com> 2.2.2-1
- 2.2.2, fixes bad memleak (#83791)
Tue Feb 11 2003 Havoc Pennington <hp@redhat.com> 2.2.1-3
- kill menu editing again, it was very very broken
Mon Feb 10 2003 Bill Nottingham <notting@redhat.com> 2.2.1-2
- fix file list (#68226)
- prereq GConf2
Mon Feb 10 2003 Alexander Larsson <alexl@redhat.com> 2.2.1-1
- Update to 2.2.1. fixes gnome-theme-manager hang
Thu Feb 06 2003 Havoc Pennington <hp@redhat.com> 2.2.0-7
- move to menu editing modules.conf by default, we'll see if it works
Tue Jan 28 2003 Matt Wilson <msw@redhat.com> 2.2.0-6
- use LIBTOOL=/usr/bin/libtool
Mon Jan 27 2003 Havoc Pennington <hp@redhat.com>
- it would help to *install* the stupid menu edit conf file
- update the vfolder-hacks patch with some fixes
Fri Jan 24 2003 Havoc Pennington <hp@redhat.com>
- hack up editable vfolder backend to maybe work (still not the default
    config file)
Wed Jan 22 2003 Havoc Pennington <hp@redhat.com>
- include a non-default config file to use new vfolder method
- build the new vfolder method
Wed Jan 22 2003 Tim Powers <timp@redhat.com>
- rebuilt
Tue Jan 21 2003 Alexander Larsson <alexl@redhat.com>
- Update to 2.2.0
Mon Jan 13 2003 Havoc Pennington <hp@redhat.com>
- variation on the subfolders hack to try to fix it
Sat Jan 11 2003 Havoc Pennington <hp@redhat.com>
- fix bug where empty folders with empty subfolders would still be visible.
Sat Jan 11 2003 Havoc Pennington <hp@redhat.com>
- finish adapting desktop-method.c to underscore-prefixing action
Sat Jan 11 2003 Havoc Pennington <hp@redhat.com>
- adapt desktop-method.c to underscore-prefixing action
Sat Jan 11 2003 Havoc Pennington <hp@redhat.com>
- hardcode <DontShowIfEmpty>, it's stupid to ever override this.
Sat Jan 11 2003 Havoc Pennington <hp@redhat.com>
- make network:/// use libdesktop.so, and modify libdesktop.so to support
    it
Sat Jan 11 2003 Havoc Pennington <hp@redhat.com>
- Revert to George's vfolder backend from gnome-vfs-2.0.2 or so
- put back libdesktop.so
- don't build the new vfolder backend
Wed Jan 08 2003 Alexander Larsson <alexl@redhat.com> 2.1.6-2
- Removed __libdir fix that was fixed upstream
Wed Jan 08 2003 Alexander Larsson <alexl@redhat.com> 2.1.6-1
- Update to 2.1.6
Tue Jan 07 2003 Nalin Dahyabhai <nalin@redhat.com> 2.1.5-3
- rebuild
Mon Dec 16 2002 Tim Powers <timp@redhat.com> 2.1.5-2
- rebuild
Mon Dec 16 2002 Alexander Larsson <alexl@redhat.com> 2.1.5-1
- Update to 2.1.5
Thu Dec 12 2002 Nalin Dahyabhai <nalin@redhat.com>
- use OpenSSL's pkg-config information, if available
f38
cvsdist 21 years ago
parent 1905572a2c
commit ee5a77399d

@ -1 +1 @@
gnome-vfs-2.1.3.1.tar.bz2
gnome-vfs-2.2.2.tar.bz2

@ -0,0 +1,978 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: 8; c-basic-offset: 8 -*- */
/* desktop-method.c
Copyright (C) 2001 Red Hat, Inc.
The Gnome 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.
The Gnome 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 the Gnome Library; see the file COPYING.LIB. If not,
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
*/
/* URI scheme for remapping directories under magic URIs, used
* for the magic desktop file directories such as start-here.
*/
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include <glib.h>
#include <sys/types.h>
#include <dirent.h>
#include <errno.h>
#include <string.h>
#include <sys/stat.h>
#include <unistd.h>
#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
#include <libgnomevfs/gnome-vfs-mime.h>
#include <libgnomevfs/gnome-vfs-module.h>
#include <libgnomevfs/gnome-vfs-method.h>
#include <libgnomevfs/gnome-vfs-utils.h>
#include <libgnomevfs/gnome-vfs-ops.h>
#include <libgnomevfs/gnome-vfs-module-shared.h>
#include <libgnomevfs/gnome-vfs-monitor-private.h>
/* FIXME Maybe when chaining to file:, we should call the gnome-vfs wrapper
* functions, instead of the file: methods directly.
*/
#define N_ELEMENTS(arr) (sizeof (arr) / sizeof ((arr)[0]))
static GnomeVFSURI* desktop_uri_to_file_uri (GnomeVFSURI *desktop_uri);
static GnomeVFSResult open_merged_directory (GnomeVFSMethod *method,
GnomeVFSMethodHandle **method_handle,
GnomeVFSURI *uri,
GnomeVFSFileInfoOptions options,
GnomeVFSContext *context);
static char* create_file_uri_in_dir (const char *dir,
const char *filename);
static GnomeVFSMethod *parent_method = NULL;
static GnomeVFSResult
do_open (GnomeVFSMethod *method,
GnomeVFSMethodHandle **method_handle,
GnomeVFSURI *uri,
GnomeVFSOpenMode mode,
GnomeVFSContext *context)
{
GnomeVFSURI *file_uri;
GnomeVFSResult result;
file_uri = desktop_uri_to_file_uri (uri);
result = (* parent_method->open) (parent_method,
method_handle,
file_uri,
mode,
context);
gnome_vfs_uri_unref (file_uri);
return result;
}
static GnomeVFSResult
do_create (GnomeVFSMethod *method,
GnomeVFSMethodHandle **method_handle,
GnomeVFSURI *uri,
GnomeVFSOpenMode mode,
gboolean exclusive,
guint perm,
GnomeVFSContext *context)
{
GnomeVFSURI *file_uri;
GnomeVFSResult result;
file_uri = desktop_uri_to_file_uri (uri);
result = (* parent_method->create) (parent_method,
method_handle,
file_uri,
mode,
exclusive,
perm,
context);
gnome_vfs_uri_unref (file_uri);
return result;
}
static GnomeVFSResult
do_close (GnomeVFSMethod *method,
GnomeVFSMethodHandle *method_handle,
GnomeVFSContext *context)
{
GnomeVFSResult result;
result = (* parent_method->close) (parent_method,
method_handle,
context);
return result;
}
static GnomeVFSResult
do_read (GnomeVFSMethod *method,
GnomeVFSMethodHandle *method_handle,
gpointer buffer,
GnomeVFSFileSize num_bytes,
GnomeVFSFileSize *bytes_read,
GnomeVFSContext *context)
{
GnomeVFSResult result;
result = (* parent_method->read) (parent_method,
method_handle,
buffer, num_bytes,
bytes_read,
context);
return result;
}
static GnomeVFSResult
do_write (GnomeVFSMethod *method,
GnomeVFSMethodHandle *method_handle,
gconstpointer buffer,
GnomeVFSFileSize num_bytes,
GnomeVFSFileSize *bytes_written,
GnomeVFSContext *context)
{
GnomeVFSResult result;
result = (* parent_method->write) (parent_method,
method_handle,
buffer, num_bytes,
bytes_written,
context);
return result;
}
static GnomeVFSResult
do_seek (GnomeVFSMethod *method,
GnomeVFSMethodHandle *method_handle,
GnomeVFSSeekPosition whence,
GnomeVFSFileOffset offset,
GnomeVFSContext *context)
{
GnomeVFSResult result;
result = (* parent_method->seek) (parent_method,
method_handle,
whence, offset,
context);
return result;
}
static GnomeVFSResult
do_tell (GnomeVFSMethod *method,
GnomeVFSMethodHandle *method_handle,
GnomeVFSFileOffset *offset_return)
{
GnomeVFSResult result;
result = (* parent_method->tell) (parent_method,
method_handle,
offset_return);
return result;
}
static GnomeVFSResult
do_truncate_handle (GnomeVFSMethod *method,
GnomeVFSMethodHandle *method_handle,
GnomeVFSFileSize where,
GnomeVFSContext *context)
{
GnomeVFSResult result;
result = (* parent_method->truncate_handle) (parent_method,
method_handle,
where,
context);
return result;
}
static GnomeVFSResult
do_truncate (GnomeVFSMethod *method,
GnomeVFSURI *uri,
GnomeVFSFileSize where,
GnomeVFSContext *context)
{
GnomeVFSURI *file_uri;
GnomeVFSResult result;
file_uri = desktop_uri_to_file_uri (uri);
result = (* parent_method->truncate) (parent_method,
file_uri,
where,
context);
gnome_vfs_uri_unref (file_uri);
return result;
}
typedef struct _DirHandle DirHandle;
struct _DirHandle
{
GSList *next;
GSList *handles;
};
static GnomeVFSResult
do_open_directory (GnomeVFSMethod *method,
GnomeVFSMethodHandle **method_handle,
GnomeVFSURI *uri,
GnomeVFSFileInfoOptions options,
GnomeVFSContext *context)
{
return open_merged_directory (method, method_handle,
uri, options, context);
}
static GnomeVFSResult
do_close_directory (GnomeVFSMethod *method,
GnomeVFSMethodHandle *method_handle,
GnomeVFSContext *context)
{
GnomeVFSResult result;
GSList *tmp;
DirHandle *dh;
dh = (DirHandle*) method_handle;
result = GNOME_VFS_OK;
tmp = dh->handles;
while (tmp != NULL) {
GnomeVFSResult this_result;
this_result = (* parent_method->close_directory) (parent_method,
tmp->data,
context);
if (this_result != GNOME_VFS_OK)
result = this_result;
tmp = tmp->next;
}
g_slist_free (dh->handles);
g_free (dh);
return result;
}
static GnomeVFSResult
do_read_directory (GnomeVFSMethod *method,
GnomeVFSMethodHandle *method_handle,
GnomeVFSFileInfo *file_info,
GnomeVFSContext *context)
{
GnomeVFSResult result;
GnomeVFSMethodHandle *parent_handle;
DirHandle *dh;
dh = (DirHandle*) method_handle;
if (dh->next == NULL) {
return GNOME_VFS_ERROR_EOF;
}
next:
parent_handle = dh->next->data;
result = (* parent_method->read_directory) (parent_method,
parent_handle,
file_info,
context);
if (result != GNOME_VFS_OK) {
dh->next = dh->next->next;
if (dh->next)
goto next;
else
return result;
} else {
return GNOME_VFS_OK;
}
}
static void
set_directory_mime_type (GnomeVFSFileInfo *file_info)
{
g_free (file_info->mime_type);
file_info->mime_type = g_strdup ("x-directory/vfolder-desktop");
file_info->valid_fields |= GNOME_VFS_FILE_INFO_FIELDS_MIME_TYPE;
}
static GnomeVFSResult
do_get_file_info (GnomeVFSMethod *method,
GnomeVFSURI *uri,
GnomeVFSFileInfo *file_info,
GnomeVFSFileInfoOptions options,
GnomeVFSContext *context)
{
GnomeVFSURI *file_uri;
GnomeVFSResult result;
file_uri = desktop_uri_to_file_uri (uri);
result = (* parent_method->get_file_info) (parent_method,
file_uri,
file_info,
options,
context);
if (file_info->type == GNOME_VFS_FILE_TYPE_DIRECTORY)
set_directory_mime_type (file_info);
gnome_vfs_uri_unref (file_uri);
return result;
}
static GnomeVFSResult
do_get_file_info_from_handle (GnomeVFSMethod *method,
GnomeVFSMethodHandle *method_handle,
GnomeVFSFileInfo *file_info,
GnomeVFSFileInfoOptions options,
GnomeVFSContext *context)
{
GnomeVFSResult result;
result = (* parent_method->get_file_info_from_handle) (parent_method,
method_handle,
file_info,
options,
context);
if (file_info->type == GNOME_VFS_FILE_TYPE_DIRECTORY)
set_directory_mime_type (file_info);
return result;
}
static gboolean
do_is_local (GnomeVFSMethod *method,
const GnomeVFSURI *uri)
{
return TRUE;
}
static GnomeVFSResult
do_make_directory (GnomeVFSMethod *method,
GnomeVFSURI *uri,
guint perm,
GnomeVFSContext *context)
{
GnomeVFSURI *file_uri;
GnomeVFSResult result;
file_uri = desktop_uri_to_file_uri (uri);
result = (* parent_method->make_directory) (parent_method,
file_uri,
perm,
context);
gnome_vfs_uri_unref (file_uri);
return result;
}
static GnomeVFSResult
do_remove_directory (GnomeVFSMethod *method,
GnomeVFSURI *uri,
GnomeVFSContext *context)
{
GnomeVFSURI *file_uri;
GnomeVFSResult result;
file_uri = desktop_uri_to_file_uri (uri);
result = (* parent_method->remove_directory) (parent_method,
file_uri,
context);
gnome_vfs_uri_unref (file_uri);
return result;
}
static GnomeVFSResult
do_find_directory (GnomeVFSMethod *method,
GnomeVFSURI *near_uri,
GnomeVFSFindDirectoryKind kind,
GnomeVFSURI **result_uri,
gboolean create_if_needed,
gboolean find_if_needed,
guint permissions,
GnomeVFSContext *context)
{
GnomeVFSURI *file_uri;
GnomeVFSURI *file_result_uri;
GnomeVFSResult result;
file_result_uri = NULL;
file_uri = desktop_uri_to_file_uri (near_uri);
result = (* parent_method->find_directory) (parent_method,
file_uri,
kind,
&file_result_uri,
create_if_needed,
find_if_needed,
permissions,
context);
gnome_vfs_uri_unref (file_uri);
if (result_uri)
*result_uri = file_result_uri;
if (file_result_uri == NULL)
result = GNOME_VFS_ERROR_NOT_FOUND;
return result;
}
static GnomeVFSResult
do_move (GnomeVFSMethod *method,
GnomeVFSURI *old_uri,
GnomeVFSURI *new_uri,
gboolean force_replace,
GnomeVFSContext *context)
{
GnomeVFSURI *old_file_uri;
GnomeVFSURI *new_file_uri;
GnomeVFSResult result;
old_file_uri = desktop_uri_to_file_uri (old_uri);
new_file_uri = desktop_uri_to_file_uri (new_uri);
result = (* parent_method->move) (parent_method,
old_file_uri,
new_file_uri,
force_replace,
context);
gnome_vfs_uri_unref (old_file_uri);
gnome_vfs_uri_unref (new_file_uri);
return result;
}
static GnomeVFSResult
do_unlink (GnomeVFSMethod *method,
GnomeVFSURI *uri,
GnomeVFSContext *context)
{
GnomeVFSURI *file_uri;
GnomeVFSResult result;
file_uri = desktop_uri_to_file_uri (uri);
result = (* parent_method->unlink) (parent_method,
file_uri,
context);
gnome_vfs_uri_unref (file_uri);
return result;
}
static GnomeVFSResult
do_create_symbolic_link (GnomeVFSMethod *method,
GnomeVFSURI *uri,
const char *target_reference,
GnomeVFSContext *context)
{
GnomeVFSURI *file_uri;
GnomeVFSResult result;
file_uri = desktop_uri_to_file_uri (uri);
result = (* parent_method->create_symbolic_link) (parent_method,
file_uri,
target_reference,
context);
gnome_vfs_uri_unref (file_uri);
return result;
}
static GnomeVFSResult
do_check_same_fs (GnomeVFSMethod *method,
GnomeVFSURI *source_uri,
GnomeVFSURI *target_uri,
gboolean *same_fs_return,
GnomeVFSContext *context)
{
GnomeVFSURI *source_file_uri;
GnomeVFSURI *target_file_uri;
GnomeVFSResult result;
source_file_uri = desktop_uri_to_file_uri (source_uri);
target_file_uri = desktop_uri_to_file_uri (target_uri);
result = (* parent_method->check_same_fs) (parent_method,
source_file_uri,
target_file_uri,
same_fs_return,
context);
gnome_vfs_uri_unref (source_file_uri);
gnome_vfs_uri_unref (target_file_uri);
return result;
}
static GnomeVFSResult
do_set_file_info (GnomeVFSMethod *method,
GnomeVFSURI *uri,
const GnomeVFSFileInfo *info,
GnomeVFSSetFileInfoMask mask,
GnomeVFSContext *context)
{
GnomeVFSURI *file_uri;
GnomeVFSResult result;
file_uri = desktop_uri_to_file_uri (uri);
result = (* parent_method->set_file_info) (parent_method,
file_uri,
info,
mask,
context);
gnome_vfs_uri_unref (file_uri);
return result;
}
typedef struct {
GnomeVFSMonitorHandle *handle;
GnomeVFSURI *desktop_uri;
} DesktopMonitorHandle;
static void
monitor_notify_cb (GnomeVFSMonitorHandle *handle,
const gchar *monitor_uri,
const gchar *info_uri,
GnomeVFSMonitorEventType event_type,
gpointer user_data)
{
DesktopMonitorHandle *monitor_handle;
GnomeVFSURI *desktop_info_uri;
const gchar *uri_diff;
gint monitor_uri_len;
monitor_handle = (DesktopMonitorHandle *) user_data;
desktop_info_uri = NULL;
monitor_uri_len = strlen (monitor_uri);
if (info_uri != NULL &&
strncmp (info_uri, monitor_uri, monitor_uri_len) == 0) {
uri_diff = &info_uri [monitor_uri_len];
if (*uri_diff != '\0') {
desktop_info_uri =
gnome_vfs_uri_append_string (
monitor_handle->desktop_uri,
uri_diff);
} else {
desktop_info_uri = monitor_handle->desktop_uri;
gnome_vfs_uri_ref (desktop_info_uri);
}
}
gnome_vfs_monitor_callback ((GnomeVFSMethodHandle *) monitor_handle,
desktop_info_uri,
event_type);
gnome_vfs_uri_unref (desktop_info_uri);
}
static GnomeVFSResult
do_monitor_add (GnomeVFSMethod *method,
GnomeVFSMethodHandle **method_handle_return,
GnomeVFSURI *uri,
GnomeVFSMonitorType monitor_type)
{
DesktopMonitorHandle *monitor_handle;
GnomeVFSURI *file_uri;
GnomeVFSResult result;
monitor_handle = g_new0 (DesktopMonitorHandle, 1);
monitor_handle->desktop_uri = uri;
gnome_vfs_uri_ref (uri);
file_uri = desktop_uri_to_file_uri (uri);
result = gnome_vfs_monitor_do_add (parent_method,
&monitor_handle->handle,
file_uri,
monitor_type,
monitor_notify_cb,
monitor_handle);
gnome_vfs_uri_unref (file_uri);
if (result != GNOME_VFS_OK) {
gnome_vfs_uri_unref (monitor_handle->desktop_uri);
g_free (monitor_handle);
}
*method_handle_return = (GnomeVFSMethodHandle *) monitor_handle;
return result;
}
static GnomeVFSResult
do_monitor_cancel (GnomeVFSMethod *method,
GnomeVFSMethodHandle *method_handle)
{
DesktopMonitorHandle *monitor_handle;
GnomeVFSResult result;
monitor_handle = (DesktopMonitorHandle *) method_handle;
result = gnome_vfs_monitor_do_cancel (monitor_handle->handle);
gnome_vfs_uri_unref (monitor_handle->desktop_uri);
g_free (monitor_handle);
return result;
}
/* gnome-vfs bureaucracy */
static GnomeVFSMethod method = {
sizeof (GnomeVFSMethod),
do_open,
do_create,
do_close,
do_read,
do_write,
do_seek,
do_tell,
do_truncate_handle,
do_open_directory,
do_close_directory,
do_read_directory,
do_get_file_info,
do_get_file_info_from_handle,
do_is_local,
do_make_directory,
do_remove_directory,
do_move,
do_unlink,
do_check_same_fs,
do_set_file_info,
do_truncate,
do_find_directory,
do_create_symbolic_link,
do_monitor_add,
do_monitor_cancel
};
typedef enum
{
SCHEME_FAVORITES,
SCHEME_PREFERENCES,
SCHEME_START_HERE,
SCHEME_SYSTEM_SETTINGS,
SCHEME_SERVER_SETTINGS,
SCHEME_PROGRAMS
} SchemeID;
#define MAX_DIRECTORIES 3
#define DIRECTORIES_INITIALIZER { NULL, NULL, NULL }
typedef struct _SchemeDescription SchemeDescription;
struct _SchemeDescription
{
SchemeID id;
const char *scheme;
char *directories[MAX_DIRECTORIES];
};
static SchemeDescription schemes[] =
{
{ SCHEME_FAVORITES, "favorites",
DIRECTORIES_INITIALIZER },
{ SCHEME_PREFERENCES, "preferences",
DIRECTORIES_INITIALIZER },
{ SCHEME_START_HERE, "start-here",
DIRECTORIES_INITIALIZER },
{ SCHEME_SYSTEM_SETTINGS, "system-settings",
DIRECTORIES_INITIALIZER },
{ SCHEME_SERVER_SETTINGS, "server-settings",
DIRECTORIES_INITIALIZER },
{ SCHEME_PROGRAMS, "programs",
DIRECTORIES_INITIALIZER }
};
GnomeVFSMethod *
vfs_module_init (const char *method_name,
const char *args)
{
int i;
parent_method = gnome_vfs_method_get ("file");
if (parent_method == NULL) {
g_error ("Could not find 'file' method for gnome-vfs");
return NULL;
}
i = 0;
while (i < N_ELEMENTS (schemes)) {
switch (schemes[i].id) {
case SCHEME_FAVORITES:
schemes[i].directories[0] =
g_strconcat (g_get_home_dir (),
"/.gnome/apps",
NULL);
break;
case SCHEME_PREFERENCES:
/* FIXME I think the GNOME 2 control center will move
* this, but we don't know where to yet
*/
schemes[i].directories[0] =
g_strconcat (DATADIR, "/control-center/capplets", NULL);
break;
case SCHEME_START_HERE:
schemes[i].directories[0] = g_strconcat (SYSCONFDIR,
"/X11/starthere",
NULL);
break;
case SCHEME_SYSTEM_SETTINGS:
schemes[i].directories[0] =
g_strconcat (SYSCONFDIR, "/X11/sysconfig", NULL);
break;
case SCHEME_SERVER_SETTINGS:
schemes[i].directories[0] =
g_strconcat (SYSCONFDIR, "/X11/serverconfig", NULL);
break;
case SCHEME_PROGRAMS:
schemes[i].directories[0] = g_strconcat (SYSCONFDIR,
"/X11/applnk",
NULL);
schemes[i].directories[1] =
g_strconcat (DATADIR, "gnome/apps", NULL);
break;
default:
g_assert_not_reached ();
break;
}
++i;
}
return &method;
}
void
vfs_module_shutdown (GnomeVFSMethod *method)
{
int i;
i = 0;
while (i < N_ELEMENTS (schemes)) {
int j;
j = 0;
while (j < MAX_DIRECTORIES) {
g_free (schemes[i].directories[j]);
schemes[i].directories[j] = NULL;
++j;
}
++i;
}
}
static const SchemeDescription*
get_desc_for_uri (GnomeVFSURI *desktop_uri)
{
const SchemeDescription *desc;
int i;
const char *scheme;
scheme = gnome_vfs_uri_get_scheme (desktop_uri);
desc = NULL;
i = 0;
while (i < N_ELEMENTS (schemes)) {
if (strcmp (schemes[i].scheme, scheme) == 0) {
desc = &schemes[i];
break;
}
++i;
}
return desc;
}
static GnomeVFSURI*
desktop_uri_to_file_uri (GnomeVFSURI *desktop_uri)
{
const SchemeDescription *desc;
GnomeVFSURI *new_uri;
const char *path;
int i;
desc = get_desc_for_uri (desktop_uri);
if (desc == NULL) {
gnome_vfs_uri_ref (desktop_uri);
return desktop_uri;
}
/* Prepend the base for the desktop URI.
* If the SchemeDescription contains > 1 directory, we use the directory
* after the first if the given file actually exists there.
*/
new_uri = NULL;
path = gnome_vfs_uri_get_path (desktop_uri);
i = 0;
while (desc->directories[i])
++i;
do {
char *s;
--i;
s = create_file_uri_in_dir (desc->directories[i], path);
new_uri = gnome_vfs_uri_new (s);
g_free (s);
if (i == 0 ||
gnome_vfs_uri_exists (new_uri)) {
return new_uri;
} else {
gnome_vfs_uri_unref (new_uri);
new_uri = NULL;
}
} while (i > 0);
g_assert_not_reached ();
return NULL;
}
static GnomeVFSResult
open_merged_directory (GnomeVFSMethod *method,
GnomeVFSMethodHandle **method_handle,
GnomeVFSURI *desktop_uri,
GnomeVFSFileInfoOptions options,
GnomeVFSContext *context)
{
GnomeVFSResult result;
DirHandle *dh;
const SchemeDescription *desc;
int i;
gboolean found;
const char *path;
desc = get_desc_for_uri (desktop_uri);
if (desc == NULL) {
return GNOME_VFS_ERROR_NOT_FOUND;
}
dh = g_new0 (DirHandle, 1);
/* Prepend the base for the desktop URI.
* If the SchemeDescription contains > 1 directory, we use the directory
* after the first if the given file actually exists there.
*/
found = FALSE;
path = gnome_vfs_uri_get_path (desktop_uri);
i = 0;
while (desc->directories[i]) {
char *s;
GnomeVFSURI *file_uri;
GnomeVFSMethodHandle *parent_handle = NULL;
s = create_file_uri_in_dir (desc->directories[i], path);
file_uri = gnome_vfs_uri_new (s);
g_free (s);
result = (* parent_method->open_directory) (parent_method,
&parent_handle,
file_uri,
options,
context);
if (result == GNOME_VFS_OK) {
found = TRUE;
dh->handles = g_slist_prepend (dh->handles, parent_handle);
}
gnome_vfs_uri_unref (file_uri);
++i;
}
dh->next = dh->handles;
*method_handle = (GnomeVFSMethodHandle*) dh;
return found ? GNOME_VFS_OK : GNOME_VFS_ERROR_NOT_FOUND;
}
static char*
create_file_uri_in_dir (const char *dir,
const char *filename)
{
char *dir_uri;
char *retval;
dir_uri = gnome_vfs_get_uri_from_local_path (dir);
retval = g_strconcat (dir_uri, "/", filename, NULL);
g_free (dir_uri);
return retval;
}

@ -0,0 +1,14 @@
--- gnome-vfs-1.9.16/modules/vfolder-desktop-method.c.moved-menu-files Tue Jun 11 17:39:20 2002
+++ gnome-vfs-1.9.16/modules/vfolder-desktop-method.c Tue Jun 11 17:43:17 2002
@@ -1433,9 +1433,8 @@
info->scheme = g_strdup (scheme);
- info->filename = g_strconcat (SYSCONFDIR,
- "/gnome-vfs-2.0/vfolders/",
- scheme, ".vfolder-info",
+ info->filename = g_strconcat (SYSCONFDIR, "/X11/desktop-menus/",
+ scheme, ".menu",
NULL);
info->user_filename = g_strconcat (g_get_home_dir (),
"/" DOT_GNOME "/vfolders/",

@ -0,0 +1,13 @@
--- gnome-vfs-2.0.1/modules/vfolder-desktop-method.c.only-show-in Tue Jul 16 20:11:46 2002
+++ gnome-vfs-2.0.1/modules/vfolder-desktop-method.c Tue Jul 16 20:12:21 2002
@@ -2466,8 +2466,8 @@
*result = g_strdup (p);
- if (*result1 == NULL ||
- (result2 != NULL && *result2 == NULL))
+ if (*result1 != NULL &&
+ (result2 == NULL || *result2 != NULL))
break;
}

@ -0,0 +1,15 @@
--- gnome-vfs-2.0.2/modules/vfolder-desktop-method.c.newstat 2002-08-19 12:45:42.000000000 -0400
+++ gnome-vfs-2.0.2/modules/vfolder-desktop-method.c 2002-08-19 14:49:27.000000000 -0400
@@ -3353,6 +3353,12 @@
invalidate_folder_T (info->root);
info->entries_valid = TRUE;
+
+ /* Update modification time of all folders,
+ * kind of evil, but it will make adding new items work
+ * I hope. This is because rereading usually means
+ * something changed */
+ info->modification_time = time (NULL);
}
return info;
}

@ -0,0 +1,52 @@
--- gnome-vfs-2.0.2/modules/vfolder-desktop-method.c.read-only 2002-08-23 11:45:03.000000000 -0400
+++ gnome-vfs-2.0.2/modules/vfolder-desktop-method.c 2002-08-23 12:09:27.000000000 -0400
@@ -1162,7 +1162,8 @@
folder->entry.type = ENTRY_FOLDER;
folder->entry.name = g_strdup (name);
folder->entry.refcount = 1;
-
+ folder->read_only = TRUE;
+
return folder;
}
@@ -6084,28 +6085,28 @@
static GnomeVFSMethod method = {
sizeof (GnomeVFSMethod),
do_open,
- do_create,
+ NULL, /* do_create, */
do_close,
do_read,
- do_write,
+ NULL, /* do_write, */
do_seek,
do_tell,
- do_truncate_handle,
+ NULL, /* do_truncate_handle, */
do_open_directory,
do_close_directory,
do_read_directory,
do_get_file_info,
do_get_file_info_from_handle,
do_is_local,
- do_make_directory,
- do_remove_directory,
- do_move,
- do_unlink,
+ NULL, /* do_make_directory, */
+ NULL, /* do_remove_directory, */
+ NULL, /* do_move, */
+ NULL, /* do_unlink, */
do_check_same_fs,
- do_set_file_info,
- do_truncate,
- NULL /* find_directory */,
- NULL /* create_symbolic_link */,
+ NULL, /* do_set_file_info, */
+ NULL, /* do_truncate, */
+ NULL /* find_directory */,
+ NULL /* create_symbolic_link */,
do_monitor_add,
do_monitor_cancel
};

@ -0,0 +1,33 @@
--- gnome-vfs-2.1.6/modules/vfolder-desktop-method.c.hide-with-empty-subfolders 2003-01-13 16:08:37.000000000 -0500
+++ gnome-vfs-2.1.6/modules/vfolder-desktop-method.c 2003-01-13 16:09:21.000000000 -0500
@@ -937,8 +937,19 @@
/* Include subfolders */
/* we always whack them onto the beginning */
if (folder->subfolders != NULL) {
- GSList *subfolders = g_slist_copy (folder->subfolders);
- g_slist_foreach (subfolders, (GFunc)entry_ref_alloc, NULL);
+ GSList *li;
+ GSList *subfolders;
+ subfolders = NULL;
+ li = folder->subfolders;
+ for (li = folder->subfolders; li != NULL; li = li->next) {
+ Folder *f = li->data;
+ /* always dont_show_if_empty */
+ if (f->entries != NULL) {
+ entry_ref_alloc (&f->entry);
+ subfolders = g_slist_prepend (subfolders, f);
+ }
+ }
+ subfolders = g_slist_reverse (subfolders);
folder->entries = g_slist_concat (subfolders, folder->entries);
}
@@ -1079,7 +1090,7 @@
GHashTable *entry_hash;
ensure_folder (info, folder,
- FALSE /* subfolders */,
+ TRUE /* subfolders */,
NULL /* except */,
FALSE /* ignore_unallocated */);
if (folder->sorted)

@ -0,0 +1,10 @@
--- gnome-vfs-2.1.6/modules/vfolder-desktop-method.c.never-show-if-empty 2003-01-11 18:12:50.000000000 -0500
+++ gnome-vfs-2.1.6/modules/vfolder-desktop-method.c 2003-01-11 18:12:55.000000000 -0500
@@ -1163,6 +1163,7 @@
folder->entry.name = g_strdup (name);
folder->entry.refcount = 1;
folder->read_only = TRUE;
+ folder->dont_show_if_empty = TRUE;
return folder;
}

@ -0,0 +1,32 @@
--- gnome-vfs-2.1.6/modules/desktop-method.c.no-private-methods 2003-01-11 19:16:29.000000000 -0500
+++ gnome-vfs-2.1.6/modules/desktop-method.c 2003-01-11 19:37:23.000000000 -0500
@@ -627,12 +627,12 @@
gnome_vfs_uri_ref (uri);
file_uri = desktop_uri_to_file_uri (uri);
- result = gnome_vfs_monitor_do_add (parent_method,
- &monitor_handle->handle,
- file_uri,
- monitor_type,
- monitor_notify_cb,
- monitor_handle);
+ result = _gnome_vfs_monitor_do_add (parent_method,
+ &monitor_handle->handle,
+ file_uri,
+ monitor_type,
+ monitor_notify_cb,
+ monitor_handle);
gnome_vfs_uri_unref (file_uri);
if (result != GNOME_VFS_OK) {
@@ -654,8 +654,8 @@
monitor_handle = (DesktopMonitorHandle *) method_handle;
- result = gnome_vfs_monitor_do_cancel (monitor_handle->handle);
-
+ result = _gnome_vfs_monitor_do_cancel (monitor_handle->handle);
+
gnome_vfs_uri_unref (monitor_handle->desktop_uri);
g_free (monitor_handle);

@ -0,0 +1,30 @@
--- gnome-vfs-2.1.6/modules/Makefile.am.old-modules 2003-01-11 16:28:30.000000000 -0500
+++ gnome-vfs-2.1.6/modules/Makefile.am 2003-01-11 16:30:00.000000000 -0500
@@ -60,6 +60,8 @@
$(CDEMENU_LTLIBS) \
libssh.la \
libtar.la \
+ libdesktop.la \
+ libvfolder-desktop-old.la \
$(NULL)
# Not currently supported
@@ -142,6 +144,18 @@
libftp_la_LDFLAGS = $(module_flags)
libftp_la_LIBADD = ../libgnomevfs/libgnomevfs-2.la
+### `desktop' method
+
+libdesktop_la_SOURCES = desktop-method.c
+libdesktop_la_LDFLAGS = $(module_flags)
+libdesktop_la_LIBADD = ../libgnomevfs/libgnomevfs-2.la
+
+### `vfolder-desktop' method
+
+libvfolder_desktop_old_la_SOURCES = vfolder-desktop-method.c
+libvfolder_desktop_old_la_LDFLAGS = $(module_flags)
+libvfolder_desktop_old_la_LIBADD = ../libgnomevfs/libgnomevfs-2.la
+
### `nfs' method
#libnfs_la_SOURCES = \

@ -1,18 +1,20 @@
%define libbonobo_version 2.1.0
%define libbonobo_version 2.2.0
%define gconf2_version 1.2.0
%define gtkdoc_version 0.9
%define gnome_mime_data_version 2.0.0-11
%define redhat_menus_version 0.2
%define redhat_menus_version 0.30
%define po_package gnome-vfs-2.0
Summary: The GNOME virtual file-system libraries.
Name: gnome-vfs2
Version: 2.1.3.1
Release: 1
Version: 2.2.2
Release: 4
License: LGPL
Group: System Environment/Libraries
Source: gnome-vfs-%{version}.tar.bz2
Source2: vfolder-desktop-method.c
Source3: desktop-method.c
URL: http://www.gnome.org/
BuildRoot: %{_tmppath}/%{name}-%{version}-root
Requires: gnome-mime-data >= %{gnome_mime_data_version}
@ -26,11 +28,31 @@ BuildRequires: pkgconfig
BuildRequires: gnome-mime-data >= %{gnome_mime_data_version}
BuildRequires: /usr/bin/automake-1.4
BuildRequires: gtk-doc >= %{gtkdoc_version}
Prereq: GConf2 >= %{gconf2_version}
Patch1: gnome-vfs-1.9.4.91-docdir.patch
Patch2: gnome-vfs-2.1.3-moved-menu-files.patch
Patch3: gnome-vfs-2.0.4-onlyshowin.patch
Patch5: gnome-vfs-1.9.16-moved-menu-files.patch
Patch6: gnome-vfs-2.0.1-only-show-in.patch
Patch7: gnome-vfs-2.1.6-modules-conf.patch
Patch8: gnome-vfs-2.0.2-newstat.patch
Patch9: gnome-vfs-2.0.2-read-only.patch
## this is the automake-requiring patch
Patch10: gnome-vfs-2.1.6-old-modules.patch
Patch11: gnome-vfs-2.1.6-network-uri.patch
Patch12: gnome-vfs-2.1.6-never-show-if-empty.patch
Patch13: gnome-vfs-2.1.6-hide-with-empty-subfolders.patch
Patch14: gnome-vfs-2.1.6-no-private-methods.patch
Patch15: gnome-vfs-2.2.0-vfolder-hacks.patch
Patch16: gnome-vfs-2.2.2-notify-race.patch
Patch17: gnome-vfs-2.2.2-multiple-auth.patch
%description
GNOME VFS is the GNOME virtual file system. It is the foundation of
the Nautilus file manager. It provides a modular architecture and
@ -54,40 +76,80 @@ GNOME VFS modules and applications that use the GNOME VFS APIs.
%prep
%setup -q -n gnome-vfs-%{version}
cp -f %{SOURCE2} modules
cp -f %{SOURCE3} modules
# Patch1: gnome-vfs-1.9.4.91-docdir.patch modifies doc/Makefile.am
#%patch1 -p1 -b .docdir
%patch2 -p1 -b .moved-menu-files
%patch3 -p0 -b .onlyshowin
(cd modules && cp default-modules.conf default-modules.conf.with-menu-editing)
## clean out the methods that don't work with our setup
DMC=modules/default-modules.conf.with-menu-editing
perl -pi -e 's/all-applications:\s+libvfolder-desktop.so//g' $DMC
perl -pi -e 's/all-preferences:\s+libvfolder-desktop.so//g' $DMC
perl -pi -e 's/favorites:\s+libvfolder-desktop.so//g' $DMC
perl -pi -e 's/network:\s+libvfolder-desktop.so//g' $DMC
## these two should actually work
## perl -pi -e 's/applications-all-users:\s+libvfolder-desktop.so//g' $DMC
## perl -pi -e 's/preferences-all-users:\s+libvfolder-desktop.so//g' $DMC
## these are now in the vfolder-hacks patch
#%patch2 -p1 -b .moved-menu-files
#%patch3 -p0 -b .onlyshowin
%patch5 -p1 -b .moved-menu-files
%patch6 -p1 -b .only-show-in
%patch7 -p1 -b .modules-conf
%patch8 -p1 -b .newstat
%patch9 -p1 -b .read-only
%patch10 -p1 -b .old-modules
%patch11 -p1 -b .network-uri
%patch12 -p1 -b .never-show-if-empty
%patch13 -p1 -b .hide-with-empty-subfolders
%patch14 -p1 -b .no-private-methods
%patch15 -p0 -b .vfolder-hacks
%patch16 -p0 -b .notify-race
%patch17 -p0 -b .multiple-auth
%build
# patch1 is disabled, so we don't need this
#automake-1.4
# needed for patch10 (changing makefile to old vfolder backend)
automake-1.4
if pkg-config openssl ; then
CPPFLAGS=`pkg-config --cflags openssl`; export CPPFLAGS
LDFLAGS=`pkg-config --libs-only-L openssl`; export LDFLAGS
fi
%configure
make
make LIBTOOL=/usr/bin/libtool
%install
rm -fr %{buildroot}
export GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1
%makeinstall
%makeinstall LIBTOOL=/usr/bin/libtool
unset GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL
rm -f $RPM_BUILD_ROOT%{_libdir}/gnome-vfs-2.0/modules/lib*.a
rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
## work around makefile glitch in modules/extfs/Makefile.am
if test "$RPM_BUILD_ROOT%{_prefix}/lib" != "$RPM_BUILD_ROOT%{_libdir}"; then
mv $RPM_BUILD_ROOT%{_prefix}/lib/vfs $RPM_BUILD_ROOT%{_libdir}
fi
rm -f $RPM_BUILD_ROOT%{_sysconfdir}/gnome-vfs-2.0/vfolders/*.vfolder-info
rm -f $RPM_BUILD_ROOT%{_sysconfdir}/gnome-vfs-2.0/vfolders/*.vfolder-info-default
## why, dear god, why?
rm -f $RPM_BUILD_ROOT%{_datadir}/aclocal/gob2.m4
install -m 644 modules/default-modules.conf.with-menu-editing $RPM_BUILD_ROOT%{_sysconfdir}/gnome-vfs-2.0/modules/
## Remove this line and update file list to revert to
## no-menu-editing-by-default
# (cd $RPM_BUILD_ROOT%{_sysconfdir}/gnome-vfs-2.0/modules/; mv default-modules.conf default-modules.conf.without-menu-editing; mv default-modules.conf.with-menu-editing default-modules.conf)
rm -f $RPM_BUILD_ROOT%{_libdir}/bonobo/monikers/*.{a,la}
%find_lang %{po_package}
%clean
@ -111,8 +173,9 @@ done
%dir %{_sysconfdir}/gnome-vfs-2.0
%dir %{_sysconfdir}/gnome-vfs-2.0/modules
%dir %{_sysconfdir}/gnome-vfs-2.0/vfolders
#%dir %{_sysconfdir}/gnome-vfs-2.0/vfolders
%config %{_sysconfdir}/gnome-vfs-2.0/modules/*.conf
%config %{_sysconfdir}/gnome-vfs-2.0/modules/*.conf.with-menu-editing
## we aren't really using the .vfolder-info config files,
## so installing them is a little misleading.
## %config %{_sysconfdir}/gnome-vfs-2.0/vfolders/*.vfolder-info
@ -136,6 +199,95 @@ done
%{_datadir}/gtk-doc
%changelog
* Mon Feb 24 2003 Elliot Lee <sopwith@redhat.com>
- debuginfo rebuild
* Mon Feb 24 2003 Alexander Larsson <alexl@redhat.com> 2.2.2-3
- Added patch to fix smb crash (#84982)
* Mon Feb 24 2003 Alexander Larsson <alexl@redhat.com> 2.2.2-2
- Add patch to fix notify race (#84668)
* Wed Feb 12 2003 Alexander Larsson <alexl@redhat.com> 2.2.2-1
- 2.2.2, fixes bad memleak (#83791)
* Tue Feb 11 2003 Havoc Pennington <hp@redhat.com> 2.2.1-3
- kill menu editing again, it was very very broken
* Mon Feb 10 2003 Bill Nottingham <notting@redhat.com> 2.2.1-2
- fix file list (#68226)
- prereq GConf2
* Mon Feb 10 2003 Alexander Larsson <alexl@redhat.com> 2.2.1-1
- Update to 2.2.1. fixes gnome-theme-manager hang
* Thu Feb 6 2003 Havoc Pennington <hp@redhat.com> 2.2.0-7
- move to menu editing modules.conf by default, we'll see if it works
* Tue Jan 28 2003 Matt Wilson <msw@redhat.com> 2.2.0-6
- use LIBTOOL=/usr/bin/libtool
* Mon Jan 27 2003 Havoc Pennington <hp@redhat.com>
- it would help to *install* the stupid menu edit conf file
- update the vfolder-hacks patch with some fixes
* Fri Jan 24 2003 Havoc Pennington <hp@redhat.com>
- hack up editable vfolder backend to maybe work
(still not the default config file)
* Wed Jan 22 2003 Havoc Pennington <hp@redhat.com>
- include a non-default config file to use new vfolder method
- build the new vfolder method
* Wed Jan 22 2003 Tim Powers <timp@redhat.com>
- rebuilt
* Tue Jan 21 2003 Alexander Larsson <alexl@redhat.com>
- Update to 2.2.0
* Mon Jan 13 2003 Havoc Pennington <hp@redhat.com>
- variation on the subfolders hack to try to fix it
* Sat Jan 11 2003 Havoc Pennington <hp@redhat.com>
- fix bug where empty folders with empty subfolders would
still be visible.
* Sat Jan 11 2003 Havoc Pennington <hp@redhat.com>
- finish adapting desktop-method.c to underscore-prefixing action
* Sat Jan 11 2003 Havoc Pennington <hp@redhat.com>
- adapt desktop-method.c to underscore-prefixing action
* Sat Jan 11 2003 Havoc Pennington <hp@redhat.com>
- hardcode <DontShowIfEmpty>, it's stupid to ever override this.
* Sat Jan 11 2003 Havoc Pennington <hp@redhat.com>
- make network:/// use libdesktop.so, and modify libdesktop.so
to support it
* Sat Jan 11 2003 Havoc Pennington <hp@redhat.com>
- Revert to George's vfolder backend from gnome-vfs-2.0.2 or so
- put back libdesktop.so
- don't build the new vfolder backend
* Wed Jan 8 2003 Alexander Larsson <alexl@redhat.com> 2.1.6-2
- Removed __libdir fix that was fixed upstream
* Wed Jan 8 2003 Alexander Larsson <alexl@redhat.com> 2.1.6-1
- Update to 2.1.6
* Tue Jan 7 2003 Nalin Dahyabhai <nalin@redhat.com> 2.1.5-3
- rebuild
* Mon Dec 16 2002 Tim Powers <timp@redhat.com> 2.1.5-2
- rebuild
* Mon Dec 16 2002 Alexander Larsson <alexl@redhat.com> 2.1.5-1
- Update to 2.1.5
* Thu Dec 12 2002 Nalin Dahyabhai <nalin@redhat.com>
- use OpenSSL's pkg-config information, if available
* Wed Dec 4 2002 Havoc Pennington <hp@redhat.com>
- 2.1.3.1

@ -1 +1 @@
f28f83a450cb2f770f3ec604329b5fe3 gnome-vfs-2.1.3.1.tar.bz2
02845c284b27d1bed89176b72cb17890 gnome-vfs-2.2.2.tar.bz2

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save