From 3eeed6b1fca821fa041b9aa1fdfd682e45534c66 Mon Sep 17 00:00:00 2001 From: Murray Cumming Date: Fri, 11 May 2007 17:29:00 +0000 Subject: [PATCH] 2007-05-11 Murray Cumming * src/maemo/modest-main-window.c: (on_account_update): Make the gchar* parameter const, just to be neat. * src/modest-text-utils.c: (modest_text_utils_inline): End g_strconcat() with NULL, as its documentation says. This is almost certainly the cause of my crash at startup on the device. Interestingly, valgrind doesn't tell us about these errors. pmo-trunk-r1840 --- ChangeLog2 | 9 +++++++++ src/maemo/modest-main-window.c | 6 +++--- src/modest-text-utils.c | 2 +- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/ChangeLog2 b/ChangeLog2 index a10f40a..64b7e54 100644 --- a/ChangeLog2 +++ b/ChangeLog2 @@ -1,5 +1,14 @@ 2007-05-11 Murray Cumming + * src/maemo/modest-main-window.c: (on_account_update): Make the gchar* + parameter const, just to be neat. + * src/modest-text-utils.c: (modest_text_utils_inline): + End g_strconcat() with NULL, as its documentation says. This is almost + certainly the cause of my crash at startup on the device. Interestingly, + valgrind doesn't tell us about these errors. + +2007-05-11 Murray Cumming + * scripts/build-packages: Added more precise comments about how to use this script, though I still get this error: dpkg-genchanges: error: cannot open .dsc file ../tinymail_1.0-svn1938.dsc: No such file or directory diff --git a/src/maemo/modest-main-window.c b/src/maemo/modest-main-window.c index 4fecac8..af58b22 100644 --- a/src/maemo/modest-main-window.c +++ b/src/maemo/modest-main-window.c @@ -88,7 +88,7 @@ static void on_queue_changed (ModestMailOperationQue ModestMainWindow *self); static void on_account_update (TnyAccountStore *account_store, - gchar *account_name, + const gchar *account_name, gpointer user_data); static gboolean on_inner_widgets_key_pressed (GtkWidget *widget, @@ -871,7 +871,7 @@ compare_display_names (ModestAccountData *a, static void on_account_update (TnyAccountStore *account_store, - gchar *account_name, + const gchar *account_name, gpointer user_data) { GSList *account_names, *iter, *accounts; @@ -987,7 +987,7 @@ on_account_update (TnyAccountStore *account_store, changes in a single execution because we're downcasting the guint to a guint8 in order to use a GByteArray, it should be enough */ - gchar* item_name = g_strconcat (account_data->account_name, "Menu"); + gchar* item_name = g_strconcat (account_data->account_name, "Menu", NULL); guint8 merge_id = (guint8) gtk_ui_manager_new_merge_id (parent_priv->ui_manager); priv->merge_ids = g_byte_array_append (priv->merge_ids, &merge_id, 1); gtk_ui_manager_add_ui (parent_priv->ui_manager, diff --git a/src/modest-text-utils.c b/src/modest-text-utils.c index df6e03a..24d42de 100644 --- a/src/modest-text-utils.c +++ b/src/modest-text-utils.c @@ -206,7 +206,7 @@ modest_text_utils_inline (const gchar *text, if (!strcmp (content_type, "text/html")) { formatted_signature = g_strconcat (signature, "
", NULL); } else { - formatted_signature = g_strconcat (signature, "\n"); + formatted_signature = g_strconcat (signature, "\n", NULL); } } else { formatted_signature = ""; -- 1.7.9.5