Re: [evolution-patches] [Mailer] Fix for 244058
- From: Jeffrey Stedfast <fejj novell com>
- To: Johnny Jacob <johnnyjacob gmail com>
- Cc: evolution-patches gnome org
- Subject: Re: [evolution-patches] [Mailer] Fix for 244058
- Date: Tue, 03 Jan 2006 13:03:02 -0500
On Wed, 2005-12-21 at 13:01 +0530, Johnny Jacob wrote:
> ===================================================================
> RCS file: /cvs/gnome/evolution/composer/e-msg-composer.c,v
> retrieving revision 1.526
> diff -u -p -r1.526 e-msg-composer.c
> --- composer/e-msg-composer.c 17 Dec 2005 14:14:07 -0000 1.526
> +++ composer/e-msg-composer.c 21 Dec 2005 07:03:40 -0000
> @@ -2505,6 +2505,22 @@ hdrs_changed_cb (EMsgComposerHdrs *hdrs,
>
> composer = E_MSG_COMPOSER (data);
>
> + char *temp;
as was mentioned, this should probably be const char * in order to
prevent warnings about const'ness.
> +
> + composer = E_MSG_COMPOSER (data);
> +
> + /* Check cc.entry. If hidden & not empty then show */
> + if ( !e_msg_composer_get_view_cc (composer)) {
cut out the space after the ( to keep with our coding style...
> + temp = gtk_entry_get_text
> ( e_msg_composer_hdrs_get_cc_entry (hdrs));
same here (and in the bcc block)
> + e_msg_composer_set_view_cc (composer, *temp && temp);
you should check temp && *temp since the idea is to prevent
dereferencing a NULL pointer (altho I'm not sure gtk_entry_get_text()
would ever return NULL anyway, so may not be needed)
> + }
> +
> + /* Check bcc.entry if hidden & not empty then show */
> + if ( !e_msg_composer_get_view_bcc (composer)) {
> + temp = gtk_entry_get_text
> ( e_msg_composer_hdrs_get_bcc_entry (hdrs));
> + e_msg_composer_set_view_bcc (composer, *temp && temp);
> + }
> +
> /* Mark the composer as changed so it prompts about unsaved
> changes on close */
> e_msg_composer_set_changed (composer);
> }
--
Jeffrey Stedfast
Evolution Hacker - Novell, Inc.
fejj ximian com - www.novell.com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]