2007-05-11 Murray Cumming <murrayc@murrayc.com>
authorMurray Cumming <murrayc@murrayc.com>
Fri, 11 May 2007 17:29:00 +0000 (17:29 +0000)
committerMurray Cumming <murrayc@murrayc.com>
Fri, 11 May 2007 17:29:00 +0000 (17:29 +0000)
* 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
src/maemo/modest-main-window.c
src/modest-text-utils.c

index a10f40a..64b7e54 100644 (file)
@@ -1,5 +1,14 @@
 2007-05-11  Murray Cumming  <murrayc@murrayc.com>
 
+       * 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  <murrayc@murrayc.com>
+
        * 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
index 4fecac8..af58b22 100644 (file)
@@ -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, 
index df6e03a..24d42de 100644 (file)
@@ -206,7 +206,7 @@ modest_text_utils_inline (const gchar *text,
                if (!strcmp (content_type, "text/html")) {
                        formatted_signature = g_strconcat (signature, "<br/>", NULL);
                } else {
-                       formatted_signature = g_strconcat (signature, "\n");
+                       formatted_signature = g_strconcat (signature, "\n", NULL);
                }
        } else {
                formatted_signature = "";