Commit 2ff70002 authored by John Sullivan's avatar John Sullivan
Browse files

Backed out nautilus-uri-utilities changes from earlier today.

parent 571b26b9
2000-01-04 John Sullivan <sullivan@eazel.com>
After talking with Sopwith and Darin, removed
my changes from earlier today. The current framework
handles bogus URIs better than I thought, though still
with some known problems. I can't implement the bookmarks
part until the problems are fixed. And the new functions
don't seem to be required in any case.
* libnautilus/nautilus-uri-utilities.c: removed file
* libnautilus/nautilus-uri-utilities.h: removed file
* libnautilus/Makefile.am: removed these two files
from the build, and removed GnomeVFS
* src/ntl-window.c: removed #include for nautilus-uri-utilitie.h.
Sopwith had removed the call from (nautilus_window_goto_uri_cb)
earlier (without a ChangeLog entry).
2000-01-04 Darin Adler <darin@eazel.com>
* src/Makefile.am, src/check-nautilus,
......
......@@ -4,7 +4,6 @@ INCLUDES=-I$(top_srcdir) -I$(top_builddir) \
$(GNOME_CFLAGS) \
$(GNORBA_CFLAGS) \
$(GDK_PIXBUF_CFLAGS) \
$(VFS_CFLAGS) \
$(WERROR)
nautilus_idl_sources=nautilus-stubs.c nautilus-skels.c nautilus.h nautilus-common.c
......@@ -24,7 +23,6 @@ libnautilusinclude_HEADERS= \
gtkscrollframe.h \
nautilus.h \
nautilus-file-utilities.h \
nautilus-uri-utilities.h \
ntl-content-view-client.h \
ntl-meta-view-client.h \
ntl-view-client.h
......@@ -37,7 +35,6 @@ libnautilus_la_SOURCES=$(nautilus_idl_sources) \
gtkflist.c \
gtkscrollframe.c \
nautilus-file-utilities.c \
nautilus-uri-utilities.c \
ntl-content-view-client.c \
ntl-meta-view-client.c \
ntl-view-client.c \
......@@ -45,8 +42,7 @@ libnautilus_la_SOURCES=$(nautilus_idl_sources) \
libnautilus_la_LDFLAGS=$(GNOME_LIBS) \
$(GNORBA_LIBS) \
$(GDK_PIXBUF_LIBS) \
$(VFS_LIBS)
$(GDK_PIXBUF_LIBS)
$(nautilus_idl_sources): nautilus_idl_stamp
$(fsextension_idl_sources): fsextension_idl_stamp
......
/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
/* nautilus-uri-utilities..c - implementation of uri manipulation routines.
Copyright (C) 1999, 2000 Eazel, 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.
Authors: John Sullivan <sullivan@eazel.com>
*/
#include "nautilus-uri-utilities.h"
#include <libgnomevfs/gnome-vfs.h>
/**
* nautilus_path_known_not_to_exist:
*
* Check whether a uri represents a path known in advance not to exist.
* A return value of FALSE does not guarantee that the path is valid,
* but a return value of TRUE does guarantee that the path is not valid.
* Use this to make quick rejection decisions.
* @uri: The uri to check.
*
* Return value: TRUE if inspection of uri reveals that it is invalid,
* FALSE otherwise.
**/
gboolean
nautilus_path_known_not_to_exist (const char *uri_string)
{
GnomeVFSURI *uri;
GnomeVFSFileInfo file_info;
GnomeVFSResult result;
g_return_val_if_fail(uri_string != NULL, TRUE);
/* Handle empty string here since gnome_vfs_uri_new chokes on it. */
if (uri_string[0] == 0)
return TRUE;
uri = gnome_vfs_uri_new(uri_string);
if (uri == NULL)
return TRUE;
/* Since we want only instant results, don't check remote uri's */
if (!gnome_vfs_uri_is_local(uri))
return FALSE;
result = gnome_vfs_get_file_info_uri(uri,
&file_info,
GNOME_VFS_FILE_INFO_DEFAULT,
NULL);
return result != GNOME_VFS_OK;
}
\ No newline at end of file
/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
/* nautilus-uri-utilities.h - interface for uri manipulation routines.
Copyright (C) 1999, 2000 Eazel, 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.
Authors: John Sullivan <sullivan@eazel.com>
*/
#ifndef NAUTILUS_URI_UTILITIES_H
#define NAUTILUS_URI_UTILITIES_H 1
#include <gnome.h>
gboolean nautilus_path_known_not_to_exist (const gchar *path);
#endif /* NAUTILUS_URI_UTILITIES_H */
......@@ -4,7 +4,6 @@ INCLUDES=-I$(top_srcdir) -I$(top_builddir) \
$(GNOME_CFLAGS) \
$(GNORBA_CFLAGS) \
$(GDK_PIXBUF_CFLAGS) \
$(VFS_CFLAGS) \
$(WERROR)
nautilus_idl_sources=nautilus-stubs.c nautilus-skels.c nautilus.h nautilus-common.c
......@@ -24,7 +23,6 @@ libnautilusinclude_HEADERS= \
gtkscrollframe.h \
nautilus.h \
nautilus-file-utilities.h \
nautilus-uri-utilities.h \
ntl-content-view-client.h \
ntl-meta-view-client.h \
ntl-view-client.h
......@@ -37,7 +35,6 @@ libnautilus_la_SOURCES=$(nautilus_idl_sources) \
gtkflist.c \
gtkscrollframe.c \
nautilus-file-utilities.c \
nautilus-uri-utilities.c \
ntl-content-view-client.c \
ntl-meta-view-client.c \
ntl-view-client.c \
......@@ -45,8 +42,7 @@ libnautilus_la_SOURCES=$(nautilus_idl_sources) \
libnautilus_la_LDFLAGS=$(GNOME_LIBS) \
$(GNORBA_LIBS) \
$(GDK_PIXBUF_LIBS) \
$(VFS_LIBS)
$(GDK_PIXBUF_LIBS)
$(nautilus_idl_sources): nautilus_idl_stamp
$(fsextension_idl_sources): fsextension_idl_stamp
......
/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
/* nautilus-uri-utilities..c - implementation of uri manipulation routines.
Copyright (C) 1999, 2000 Eazel, 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.
Authors: John Sullivan <sullivan@eazel.com>
*/
#include "nautilus-uri-utilities.h"
#include <libgnomevfs/gnome-vfs.h>
/**
* nautilus_path_known_not_to_exist:
*
* Check whether a uri represents a path known in advance not to exist.
* A return value of FALSE does not guarantee that the path is valid,
* but a return value of TRUE does guarantee that the path is not valid.
* Use this to make quick rejection decisions.
* @uri: The uri to check.
*
* Return value: TRUE if inspection of uri reveals that it is invalid,
* FALSE otherwise.
**/
gboolean
nautilus_path_known_not_to_exist (const char *uri_string)
{
GnomeVFSURI *uri;
GnomeVFSFileInfo file_info;
GnomeVFSResult result;
g_return_val_if_fail(uri_string != NULL, TRUE);
/* Handle empty string here since gnome_vfs_uri_new chokes on it. */
if (uri_string[0] == 0)
return TRUE;
uri = gnome_vfs_uri_new(uri_string);
if (uri == NULL)
return TRUE;
/* Since we want only instant results, don't check remote uri's */
if (!gnome_vfs_uri_is_local(uri))
return FALSE;
result = gnome_vfs_get_file_info_uri(uri,
&file_info,
GNOME_VFS_FILE_INFO_DEFAULT,
NULL);
return result != GNOME_VFS_OK;
}
\ No newline at end of file
/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
/* nautilus-uri-utilities.h - interface for uri manipulation routines.
Copyright (C) 1999, 2000 Eazel, 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.
Authors: John Sullivan <sullivan@eazel.com>
*/
#ifndef NAUTILUS_URI_UTILITIES_H
#define NAUTILUS_URI_UTILITIES_H 1
#include <gnome.h>
gboolean nautilus_path_known_not_to_exist (const gchar *path);
#endif /* NAUTILUS_URI_UTILITIES_H */
......@@ -4,7 +4,6 @@ INCLUDES=-I$(top_srcdir) -I$(top_builddir) \
$(GNOME_CFLAGS) \
$(GNORBA_CFLAGS) \
$(GDK_PIXBUF_CFLAGS) \
$(VFS_CFLAGS) \
$(WERROR)
nautilus_idl_sources=nautilus-stubs.c nautilus-skels.c nautilus.h nautilus-common.c
......@@ -24,7 +23,6 @@ libnautilusinclude_HEADERS= \
gtkscrollframe.h \
nautilus.h \
nautilus-file-utilities.h \
nautilus-uri-utilities.h \
ntl-content-view-client.h \
ntl-meta-view-client.h \
ntl-view-client.h
......@@ -37,7 +35,6 @@ libnautilus_la_SOURCES=$(nautilus_idl_sources) \
gtkflist.c \
gtkscrollframe.c \
nautilus-file-utilities.c \
nautilus-uri-utilities.c \
ntl-content-view-client.c \
ntl-meta-view-client.c \
ntl-view-client.c \
......@@ -45,8 +42,7 @@ libnautilus_la_SOURCES=$(nautilus_idl_sources) \
libnautilus_la_LDFLAGS=$(GNOME_LIBS) \
$(GNORBA_LIBS) \
$(GDK_PIXBUF_LIBS) \
$(VFS_LIBS)
$(GDK_PIXBUF_LIBS)
$(nautilus_idl_sources): nautilus_idl_stamp
$(fsextension_idl_sources): fsextension_idl_stamp
......
/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
/* nautilus-uri-utilities..c - implementation of uri manipulation routines.
Copyright (C) 1999, 2000 Eazel, 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.
Authors: John Sullivan <sullivan@eazel.com>
*/
#include "nautilus-uri-utilities.h"
#include <libgnomevfs/gnome-vfs.h>
/**
* nautilus_path_known_not_to_exist:
*
* Check whether a uri represents a path known in advance not to exist.
* A return value of FALSE does not guarantee that the path is valid,
* but a return value of TRUE does guarantee that the path is not valid.
* Use this to make quick rejection decisions.
* @uri: The uri to check.
*
* Return value: TRUE if inspection of uri reveals that it is invalid,
* FALSE otherwise.
**/
gboolean
nautilus_path_known_not_to_exist (const char *uri_string)
{
GnomeVFSURI *uri;
GnomeVFSFileInfo file_info;
GnomeVFSResult result;
g_return_val_if_fail(uri_string != NULL, TRUE);
/* Handle empty string here since gnome_vfs_uri_new chokes on it. */
if (uri_string[0] == 0)
return TRUE;
uri = gnome_vfs_uri_new(uri_string);
if (uri == NULL)
return TRUE;
/* Since we want only instant results, don't check remote uri's */
if (!gnome_vfs_uri_is_local(uri))
return FALSE;
result = gnome_vfs_get_file_info_uri(uri,
&file_info,
GNOME_VFS_FILE_INFO_DEFAULT,
NULL);
return result != GNOME_VFS_OK;
}
\ No newline at end of file
/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
/* nautilus-uri-utilities.h - interface for uri manipulation routines.
Copyright (C) 1999, 2000 Eazel, 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.
Authors: John Sullivan <sullivan@eazel.com>
*/
#ifndef NAUTILUS_URI_UTILITIES_H
#define NAUTILUS_URI_UTILITIES_H 1
#include <gnome.h>
gboolean nautilus_path_known_not_to_exist (const gchar *path);
#endif /* NAUTILUS_URI_UTILITIES_H */
......@@ -26,7 +26,6 @@
#include "config.h"
#include <gnome.h>
#include "libnautilus/nautilus-uri-utilities.h"
#include "nautilus.h"
#include "nautilus-bookmarks-menu.h"
#include "explorer-location-bar.h"
......
......@@ -26,7 +26,6 @@
#include "config.h"
#include <gnome.h>
#include "libnautilus/nautilus-uri-utilities.h"
#include "nautilus.h"
#include "nautilus-bookmarks-menu.h"
#include "explorer-location-bar.h"
......
......@@ -26,7 +26,6 @@
#include "config.h"
#include <gnome.h>
#include "libnautilus/nautilus-uri-utilities.h"
#include "nautilus.h"
#include "nautilus-bookmarks-menu.h"
#include "explorer-location-bar.h"
......
......@@ -26,7 +26,6 @@
#include "config.h"
#include <gnome.h>
#include "libnautilus/nautilus-uri-utilities.h"
#include "nautilus.h"
#include "nautilus-bookmarks-menu.h"
#include "explorer-location-bar.h"
......
......@@ -26,7 +26,6 @@
#include "config.h"
#include <gnome.h>
#include "libnautilus/nautilus-uri-utilities.h"
#include "nautilus.h"
#include "nautilus-bookmarks-menu.h"
#include "explorer-location-bar.h"
......
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