Re: [evolution-patches] Please review my patch for bug #44065



change g_strncasecmp to strncasecmp (g_strncasecmp is deprecated).

other than that, sure... looks good.

On Tue, 2003-06-24 at 10:12, Antonio Xu wrote:
> Hello All,
>                Could you review my patch for bug #44065?
>                Bug Summary:evolution mailto: commandline is better also 
> to accept attachments with file:// URLs
>                I just remove "file:" form file url for fixing this bug.
> Thanks
> Antonio Xu
> 
> 
> ______________________________________________________________________
> Index: composer/e-msg-composer.c
> ===================================================================
> RCS file: /cvs/gnome/evolution/composer/e-msg-composer.c,v
> retrieving revision 1.394
> diff -u -r1.394 e-msg-composer.c
> --- composer/e-msg-composer.c	17 Jun 2003 19:47:53 -0000	1.394
> +++ composer/e-msg-composer.c	24 Jun 2003 13:21:00 -0000
> @@ -3814,7 +3814,7 @@
>  	EMsgComposerHdrs *hdrs;
>  	GList *to = NULL, *cc = NULL, *bcc = NULL;
>  	EDestination **tov, **ccv, **bccv;
> -	char *subject = NULL, *body = NULL;
> +	char *subject = NULL, *body = NULL, *path = NULL;
>  	const char *p, *header;
>  	size_t nread, nwritten;
>  	char *content;
> @@ -3882,7 +3882,9 @@
>  					}
>  				}
>  			} else if (!strncasecmp (header, "attach", len)) {
> -				e_msg_composer_attachment_bar_attach (E_MSG_COMPOSER_ATTACHMENT_BAR (composer->attachment_bar), content);
> +				/*Change file url to absolute path*/
> +				path = (!g_strncasecmp(content, "file:", 5)) ? content + 5 : content;
> +				e_msg_composer_attachment_bar_attach (E_MSG_COMPOSER_ATTACHMENT_BAR (composer->attachment_bar), path);
>  			} else {
>  				/* add an arbitrary header? */
>  				e_msg_composer_add_header (composer, header, content);
-- 
Jeffrey Stedfast
Evolution Hacker - Ximian, Inc.
fejj ximian com  - www.ximian.com




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