From f451a8f285465976c3ae5192adb8b17121c03c8c Mon Sep 17 00:00:00 2001 From: Jeffrey Stedfast Date: Mon, 28 Nov 2005 16:37:58 +0000 Subject: literal strings do not need to be \0 terminated, they are already 2005-11-28 Jeffrey Stedfast * 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 --- mail/ChangeLog | 7 +++++++ 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 + + * 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 ** 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 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; } } } -- cgit v1.2.3