API addition to eel



Hi,

This is a request to submit a minor API addition to EEL to add support
for the x-nautilus-search URI scheme to be used by search functionality
in Nautilus. The patch adds a define and a tiny function to the
eel-vfs-extensions API.

http://bugzilla.gnome.org/show_bug.cgi?id=310466

The search capabilities will be checked in on a branch for Nautilus
called nautilus-search later but it feels silly to have to branch eel
for this minor change.

Talked to Alex about it and he was fine with it.

Best Regards,
  Mikael Hallendal
-- 
Imendio AB, http://www.imendio.com/
? INSTALL
? depcomp
? eel-2.0-uninstalled.pc
? install-sh
? missing
? mkinstalldirs
? stamp-h1
Index: eel/eel-vfs-extensions.c
===================================================================
RCS file: /cvs/gnome/eel/eel/eel-vfs-extensions.c,v
retrieving revision 1.20
diff -u -r1.20 eel-vfs-extensions.c
--- eel/eel-vfs-extensions.c	24 Feb 2005 09:49:06 -0000	1.20
+++ eel/eel-vfs-extensions.c	23 Jun 2005 11:58:41 -0000
@@ -536,6 +536,12 @@
 }
 
 gboolean
+eel_uri_is_search (const char *uri)
+{
+	return eel_istr_has_prefix (uri, EEL_SEARCH_URI);
+}
+
+gboolean
 eel_uri_is_trash_folder (const char *uri)
 {
 	GnomeVFSURI *vfs_uri, *trash_vfs_uri;
Index: eel/eel-vfs-extensions.h
===================================================================
RCS file: /cvs/gnome/eel/eel/eel-vfs-extensions.h,v
retrieving revision 1.13
diff -u -r1.13 eel-vfs-extensions.h
--- eel/eel-vfs-extensions.h	15 May 2003 16:00:22 -0000	1.13
+++ eel/eel-vfs-extensions.h	23 Jun 2005 11:58:41 -0000
@@ -36,6 +36,7 @@
 
 #define	EEL_TRASH_URI "trash:"
 #define EEL_DESKTOP_URI "x-nautilus-desktop:"
+#define EEL_SEARCH_URI "x-nautilus-search:"
 
 typedef void     (* EelReadFileCallback) (GnomeVFSResult result,
 					  GnomeVFSFileSize file_size,
@@ -66,6 +67,7 @@
 gboolean           eel_uri_is_trash_folder               (const char           *uri);
 gboolean           eel_uri_is_in_trash                   (const char           *uri);
 gboolean           eel_uri_is_desktop                    (const char           *uri);
+gboolean           eel_uri_is_search                     (const char           *uri);
 
 
 char *             eel_format_uri_for_display            (const char           *uri);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]