* Added some comments
authorSergio Villar Senin <svillar@igalia.com>
Thu, 14 Feb 2008 20:32:02 +0000 (20:32 +0000)
committerSergio Villar Senin <svillar@igalia.com>
Thu, 14 Feb 2008 20:32:02 +0000 (20:32 +0000)
pmo-trunk-r4178

src/dbus_api/modest-dbus-callbacks.c

index e705965..d90994a 100644 (file)
@@ -282,7 +282,9 @@ on_idle_compose_mail(gpointer user_data)
        }
 
        /* If the message has nothing then mark the buffers as not
-          modified */
+          modified. This happens in Maemo for example when opening a
+          new message from Contacts plugin, it sends "" instead of
+          NULLs */
        gdk_threads_enter (); /* CHECKED */
        if (!strncmp (idle_data->to, "", 1) &&
            !strncmp (idle_data->to, "", 1) &&
@@ -290,12 +292,13 @@ on_idle_compose_mail(gpointer user_data)
            !strncmp (idle_data->bcc, "", 1) &&
            !strncmp (idle_data->subject, "", 1) &&
            !strncmp (idle_data->body, "", 1) &&
-           attachments == NULL)
+           attachments == NULL) {
                modest_ui_actions_compose_msg(NULL, NULL, NULL, NULL, NULL, NULL, NULL, FALSE);
-       else
+       } else {
                modest_ui_actions_compose_msg(NULL, idle_data->to, idle_data->cc,
                                              idle_data->bcc, idle_data->subject,
                                              idle_data->body, attachments, TRUE);
+       }
        gdk_threads_leave (); /* CHECKED */
 cleanup:
        g_slist_foreach(attachments, (GFunc)g_free, NULL);