[GNOME VFS] Patch for bugs #72718 and #75033

Benedikt Roth <[email protected]>
Newsgroups gmane.comp.gnome.vfs
Message-ID <[email protected]>
Hi,

please review the attached patch.

Regards,

	Benedikt
gnome-vfs.patch (text/plain, 2.8 KB)
? gnome-vfs.patch
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/gnome-vfs/ChangeLog,v
retrieving revision 1.1263
diff -p -u -r1.1263 ChangeLog
--- ChangeLog	22 Apr 2002 12:29:31 -0000	1.1263
+++ ChangeLog	23 Apr 2002 14:49:25 -0000
@@ -1,3 +1,15 @@
+2002-04-23  Benedikt Roth  <[email protected]>
+
+	* modules/applications.vfolder-info.in:
+	Added <Desktop> entry for the Applications folder so that nautilus
+	will display applications:/// information in the sidebar (#72718).
+	Moved all <DontShowIfEmpty/> before </Folder> and added one to the
+	Accessibility folder.
+
+	* modules/vfolder-desktop-method.c: (get_entry_unlocked):
+	If the user made a request for 'applications:' (which would fail)
+	use 'applications:/' to be consistent witch eg. 'start-here:'
+
 2002-04-22  Jody Goldberg <[email protected]>
 
 	* configure.in : post release version bump.
Index: modules/applications.vfolder-info.in
===================================================================
RCS file: /cvs/gnome/gnome-vfs/modules/applications.vfolder-info.in,v
retrieving revision 1.15
diff -p -u -r1.15 applications.vfolder-info.in
--- modules/applications.vfolder-info.in	10 Apr 2002 13:41:08 -0000	1.15
+++ modules/applications.vfolder-info.in	23 Apr 2002 14:49:25 -0000
@@ -12,7 +12,7 @@
   <!-- Root folder -->
   <Folder>
     <Name>Applications</Name>
-
+    <Desktop>Applications.directory</Desktop>
     <Exclude>gnome-search-tool.desktop</Exclude>
 
     <Query>
@@ -47,13 +47,14 @@
       <Query>
         <Keyword>Application</Keyword>
       </Query>
-      <DontShowIfEmpty/>
-
+      
       <Exclude>vumeter.desktop</Exclude>
       <Exclude>reclevel.desktop</Exclude>
       <Exclude>gnome-search-tool.desktop</Exclude>
       <Exclude>cddb-slave.desktop</Exclude>
       <Exclude>gnomecc.desktop</Exclude>
+
+      <DontShowIfEmpty/>
     </Folder>
 
     <!-- Development Tools -->
@@ -197,6 +198,7 @@
 	    <Keyword>Accessibility</Keyword>
 	  </And>
 	</Query>
+	<DontShowIfEmpty/>
       </Folder>
       
       <Folder>
Index: modules/vfolder-desktop-method.c
===================================================================
RCS file: /cvs/gnome/gnome-vfs/modules/vfolder-desktop-method.c,v
retrieving revision 1.31
diff -p -u -r1.31 vfolder-desktop-method.c
--- modules/vfolder-desktop-method.c	17 Feb 2002 23:22:37 -0000	1.31
+++ modules/vfolder-desktop-method.c	23 Apr 2002 14:49:26 -0000
@@ -3178,7 +3178,12 @@ get_entry_unlocked (GnomeVFSURI *uri,
 		*is_directory_file = FALSE;
 	if (parent != NULL)
 		*parent = NULL;
-
+	
+	/* if the request is only for applications: */
+	if (uri->text == NULL) {
+		/* let's use applications:/ */
+		uri = gnome_vfs_uri_append_string (uri, "/");
+	}
 	path = gnome_vfs_uri_get_path (uri);
 	basename = get_basename (uri);
 	scheme = gnome_vfs_uri_get_scheme (uri);
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.