diff options
author | Jeffrey Stedfast <fejj@novell.com> | 2005-11-29 00:37:58 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2005-11-29 00:37:58 +0800 |
commit | f451a8f285465976c3ae5192adb8b17121c03c8c (patch) | |
tree | 770b72056d7aecc35ea3dc4384fe87382b072874 /mail | |
parent | b285661c97b01328c91536029c9dd8187a27fa5e (diff) | |
download | gsoc2013-evolution-f451a8f285465976c3ae5192adb8b17121c03c8c.tar.gz gsoc2013-evolution-f451a8f285465976c3ae5192adb8b17121c03c8c.tar.zst gsoc2013-evolution-f451a8f285465976c3ae5192adb8b17121c03c8c.zip |
literal strings do not need to be \0 terminated, they are already
2005-11-28 Jeffrey Stedfast <fejj@novell.com>
* em-folder-view.c (emfv_setting_notify): literal strings do not
need to be \0 terminated, they are already nul-terminated by
definition.
svn path=/trunk/; revision=30697
Diffstat (limited to 'mail')
-rw-r--r-- | mail/ChangeLog | 7 | ||||
-rw-r--r-- | mail/em-folder-view.c | 12 |
2 files changed, 13 insertions, 6 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog index 1c3248e773..6e5d425295 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,9 @@ +2005-11-28 Jeffrey Stedfast <fejj@novell.com> + + * em-folder-view.c (emfv_setting_notify): literal strings do not + need to be \0 terminated, they are already nul-terminated by + definition. + 2005-11-28 Sam Yang <sam.yang@sun.com> ** See bug #322414 @@ -752,6 +758,7 @@ we don't update too often and suck loads of cpu time. 2005-06-07 Andre Klapper <9016009@gmx.de> + * mail.error.xml: Fixing typo (bug 306151) 2005-06-02 Not Zed <NotZed@Ximian.com> diff --git a/mail/em-folder-view.c b/mail/em-folder-view.c index 2cba9e8f11..705cac4ae8 100644 --- a/mail/em-folder-view.c +++ b/mail/em-folder-view.c @@ -2634,24 +2634,24 @@ emfv_setting_notify(GConfClient *gconf, guint cnxn_id, GConfEntry *entry, EMFold case EMFV_SHOW_PREVIEW: { gboolean state_gconf, state_camel; char *ret; - + /* If emfv->folder hasn't been initialized, do nothing */ if (!emfv->folder) return; + state_gconf = gconf_value_get_bool (value); - ret = camel_object_meta_get (emfv->folder, "evolution:show_preview"); - if (ret){ + if ((ret = camel_object_meta_get (emfv->folder, "evolution:show_preview"))) { state_camel = (ret[0] != '0'); g_free (ret); if (state_gconf == state_camel) return; } - - if (camel_object_meta_set (emfv->folder, "evolution:show_preview", state_gconf ? "1\0" : "0\0")) + + if (camel_object_meta_set (emfv->folder, "evolution:show_preview", state_gconf ? "1" : "0")) camel_object_state_write (emfv->folder); em_folder_browser_show_preview ((EMFolderBrowser *)emfv, state_gconf); bonobo_ui_component_set_prop (emfv->uic, "/commands/ViewPreview", "state", state_gconf ? "1" : "0", NULL); - break;} + break; } } } |