Re: 2.0.2 released ...



And here is the corresponding patch for the doc

Le lun 16/09/2002 à 11:42, Christophe Fergeau a écrit :
> The attached file should contains the patch which diff adds the
> "uses_gnomevfs" key to the .application files. I'll post a patch with
> the changes I made to the ssh and ftp modules later, I noticed I have to
> clean it up a little first.
> Btw you are a good ximian employee, asking me to resend those patches
> made me switch from sylpheed to evolution since the patches were lost in
> thousands of emails and I couldn't find them with sylpheed :)
> 
> Christophe
> 
> Le lun 16/09/2002 à 11:51, Michael Meeks a écrit :
> > Hi Christophe,
> > 
> > 	Since we've released 2.0.2, it'd be really great to see your patches
> > again, so we can get them in ASAP ... do you have pointers to them
> > somewhere ?
> > 
> > 	Regards,
> > 
> > 		Michael.
> > 
> > -- 
> >  mmeeks gnu org  <><, Pseudo Engineer, itinerant idiot
> > 
> > _______________________________________________
> > gnome-vfs-list mailing list
> > gnome-vfs-list gnome org
> > http://mail.gnome.org/mailman/listinfo/gnome-vfs-list
> 
> 
> 
> 
> 
> ----
> 

> ? gnomevfs.diff
> ? gnomevfs2.diff
> ? modules/applications.vfolder-info
> ? modules/preferences.vfolder-info
> ? modules/vfolder
> Index: libgnomevfs/gnome-vfs-application-registry.c
> ===================================================================
> RCS file: /cvs/gnome/gnome-vfs/libgnomevfs/gnome-vfs-application-registry.c,v
> retrieving revision 1.21
> diff -u -r1.21 gnome-vfs-application-registry.c
> --- libgnomevfs/gnome-vfs-application-registry.c	29 May 2002 00:43:47 -0000	1.21
> +++ libgnomevfs/gnome-vfs-application-registry.c	26 Aug 2002 12:58:50 -0000
> @@ -27,7 +27,7 @@
>  
>  #include "config.h"
>  #include "gnome-vfs-application-registry.h"
> -
> +#include "gnome-vfs-configuration.h"
>  #include "gnome-vfs-mime-handlers.h"
>  #include "gnome-vfs-mime-private.h"
>  #include "gnome-vfs-mime.h"
> @@ -705,7 +705,7 @@
>  	Application *application;
>  	char *key;
>  	char *lang;
> -	
> +
>  	fp = fopen (filename, "r");
>  	if (fp == NULL)
>  		return;
> @@ -1594,7 +1594,8 @@
>  						    const char *uri_scheme)
>  {
>  	Application *application;
> -
> +	gboolean uses_gnomevfs;
> +	
>  	g_return_val_if_fail (app_id != NULL, FALSE);
>  	g_return_val_if_fail (uri_scheme != NULL, FALSE);
>  
> @@ -1604,7 +1605,10 @@
>  	if (application == NULL)
>  		return FALSE;
>  
> +	uses_gnomevfs = real_get_bool_value (application, GNOME_VFS_APPLICATION_REGISTRY_USES_GNOMEVFS, NULL);
> +
>  	if (strcmp (uri_scheme, "file") == 0 &&
> +	    uses_gnomevfs == FALSE &&
>  	    application->supported_uri_schemes == NULL &&
>  	    application->user_application->supported_uri_schemes == NULL) {
>  		return TRUE;
> @@ -1624,6 +1628,21 @@
>  				 (GCompareFunc) strcmp) != NULL)) {
>  		return TRUE;
>  	}
> +	/* check in the list of uris supported by gnome-vfs if necessary */
> +	else if (uses_gnomevfs) {
> +		GList *supported_uris;
> +		gboolean res;
> +		
> +		supported_uris = gnome_vfs_configuration_get_methods_list();
> +		res = (g_list_find_custom(supported_uris,
> +					  /*glib is const incorrect*/(gpointer) uri_scheme,
> +					  (GCompareFunc) strcmp) != NULL);
> +
> +		g_list_foreach(supported_uris, (GFunc) g_free, NULL);
> +		g_list_free(supported_uris);
> +
> +		return res;
> +	}
>  
>  	return FALSE;
>  }
> @@ -1851,6 +1870,7 @@
>  {
>  	Application *i_application;
>  	GnomeVFSMimeApplication *application;
> +	gboolean uses_gnomevfs = FALSE;
>  
>  	g_return_val_if_fail (app_id != NULL, NULL);
>  
> @@ -1888,6 +1908,29 @@
>  			(i_application,
>  			 GNOME_VFS_APPLICATION_REGISTRY_REQUIRES_TERMINAL,
>  			 NULL);
> +
> +	uses_gnomevfs = real_get_bool_value (i_application, GNOME_VFS_APPLICATION_REGISTRY_USES_GNOMEVFS, NULL);
> +
> +	if (uses_gnomevfs) {
> +		GList *methods_list = 
> +			gnome_vfs_configuration_get_methods_list();
> +		GList *l;
> +		if (application->expects_uris == GNOME_VFS_MIME_APPLICATION_ARGUMENT_TYPE_PATHS) {
> +			application->expects_uris = GNOME_VFS_MIME_APPLICATION_ARGUMENT_TYPE_URIS;
> +		}
> +		for (l = methods_list; l != NULL; l = l->next) {
> +			if (g_list_find_custom (application->supported_uri_schemes,
> +						/*glib is const incorrect*/(gpointer) l->data,
> +						(GCompareFunc) strcmp) == NULL) {
> +				application->supported_uri_schemes = 
> +					g_list_prepend(application->supported_uri_schemes, 
> +						       l->data);
> +			} else {
> +				g_free(l->data);
> +			}			
> +		}
> +		g_list_free(methods_list);
> +	}	
>  
>  	return application;
>  }
> Index: libgnomevfs/gnome-vfs-application-registry.h
> ===================================================================
> RCS file: /cvs/gnome/gnome-vfs/libgnomevfs/gnome-vfs-application-registry.h,v
> retrieving revision 1.9
> diff -u -r1.9 gnome-vfs-application-registry.h
> --- libgnomevfs/gnome-vfs-application-registry.h	3 Aug 2001 00:39:58 -0000	1.9
> +++ libgnomevfs/gnome-vfs-application-registry.h	26 Aug 2002 12:58:50 -0000
> @@ -39,6 +39,7 @@
>  /* These are the standard boolean keys to get */
>  #define GNOME_VFS_APPLICATION_REGISTRY_CAN_OPEN_MULTIPLE_FILES "can_open_multiple_files"
>  #define GNOME_VFS_APPLICATION_REGISTRY_REQUIRES_TERMINAL "requires_terminal"
> +#define GNOME_VFS_APPLICATION_REGISTRY_USES_GNOMEVFS "uses_gnomevfs"
>  	
>  /*
>   * Existance check
> Index: libgnomevfs/gnome-vfs-configuration.c
> ===================================================================
> RCS file: /cvs/gnome/gnome-vfs/libgnomevfs/gnome-vfs-configuration.c,v
> retrieving revision 1.18
> diff -u -r1.18 gnome-vfs-configuration.c
> --- libgnomevfs/gnome-vfs-configuration.c	28 Jan 2002 19:10:07 -0000	1.18
> +++ libgnomevfs/gnome-vfs-configuration.c	26 Aug 2002 12:58:50 -0000
> @@ -554,3 +554,28 @@
>  		*args = element->args;
>  	return element->path;
>  }
> +
> +static void
> +add_method_to_list(const gchar *key, gpointer value, GList **methods_list)
> +{
> +	*methods_list = g_list_append(*methods_list, g_strdup(key));
> +}
> +
> +GList *
> +gnome_vfs_configuration_get_methods_list (void)
> +{
> +	GList *methods_list = NULL;
> +
> +	G_LOCK (configuration);
> +	if (configuration != NULL) {
> +		maybe_reload ();
> +		g_hash_table_foreach(configuration->method_to_module_path, 
> +				     (GHFunc)add_method_to_list, &methods_list);
> +	} else {
> +		/* This should never happen.  */
> +		methods_list = NULL;
> +	}
> +
> +	G_UNLOCK (configuration);
> +	return methods_list;
> +}
> Index: libgnomevfs/gnome-vfs-configuration.h
> ===================================================================
> RCS file: /cvs/gnome/gnome-vfs/libgnomevfs/gnome-vfs-configuration.h,v
> retrieving revision 1.4
> diff -u -r1.4 gnome-vfs-configuration.h
> --- libgnomevfs/gnome-vfs-configuration.h	3 Aug 2001 00:39:58 -0000	1.4
> +++ libgnomevfs/gnome-vfs-configuration.h	26 Aug 2002 12:58:50 -0000
> @@ -25,6 +25,7 @@
>  #define GNOME_VFS_CONFIGURATION_H
>  
>  #include <glib/gtypes.h>
> +#include <glib/glist.h>
>  
>  G_BEGIN_DECLS
>  
> @@ -32,6 +33,8 @@
>  gboolean     gnome_vfs_configuration_init            (void);
>  void         gnome_vfs_configuration_uninit          (void);
>  const gchar *gnome_vfs_configuration_get_module_path (const gchar *method_name, const char ** args);
> +GList       *gnome_vfs_configuration_get_methods_list(void);
> +
>  
>  G_END_DECLS
>  


diff -ru gnome-vfs/doc/mime-data-specification.txt gnome-vfs-new/doc/mime-data-specification.txt
--- gnome-vfs/doc/mime-data-specification.txt	2001-05-02 00:14:18.000000000 +0200
+++ gnome-vfs-new/doc/mime-data-specification.txt	2002-08-21 23:56:13.000000000 +0200
@@ -402,10 +402,11 @@
    for some known applications that support "http" scheme URIs and
    local file paths, but not "file" scheme URIs.)
 
-5. [to be implemented] all_gnome_vfs_schemes_supported: If "true", all
-   gnome-vfs schemes should be included in the set of "supported
-   schemes". Other schemes can be added by also including a
-   supported_uri_schemes key as well.  
+5. uses_gnomevfs: If "true", all gnome-vfs schemes should be included 
+   in the set of "supported schemes". Other schemes can be added by 
+   also including a supported_uri_schemes key as well. When this key
+   is "true", if expects_uris is "false", it is automatically set to
+   "true".
 
 [may want to discuss issue of using cover scripts to make programs
 easily invokable rather than teaching clients to pass command-line


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