Fixed a Makefile.am
[modest] / src / widgets / modest-msg-view-window.c
index 7580a2f..2c6ca95 100644 (file)
@@ -283,7 +283,7 @@ static const GtkToggleActionEntry msg_view_toggle_action_entries [] = {
                                                     MODEST_TYPE_MSG_VIEW_WINDOW, \
                                                     ModestMsgViewWindowPrivate))
 /* globals */
-static GtkWindowClass *parent_class = NULL;
+static ModestWindowParentClass *parent_class = NULL;
 
 /* uncomment the following if you have defined any signals */
 static guint signals[LAST_SIGNAL] = {0};
@@ -2329,8 +2329,14 @@ view_msg_cb (ModestMailOperation *mail_op,
        }
 
        /* Mark header as read */
-       if (!(tny_header_get_flags (header) & TNY_HEADER_FLAG_SEEN))
+       if (!(tny_header_get_flags (header) & TNY_HEADER_FLAG_SEEN)) {
+               gchar *uid;
+
                tny_header_set_flag (header, TNY_HEADER_FLAG_SEEN);
+               uid = modest_tny_folder_get_header_unique_id (header);
+               modest_platform_emit_msg_read_changed_signal (uid, TRUE);
+               g_free (uid);
+       }
 
        /* Set new message */
        if (priv->msg_view != NULL && TNY_IS_MSG_VIEW (priv->msg_view)) {
@@ -2771,7 +2777,7 @@ on_decode_to_stream_async_handler (TnyMimePart *mime_part,
                                account = modest_account_mgr_get_default_account (modest_runtime_get_account_mgr ());
 
                        msg = tny_camel_msg_new ();
-                       tny_camel_msg_parse (TNY_CAMEL_MSG (msg), file_stream);
+                       tny_camel_msg_parse (msg, file_stream);
 
                        if (priv->top_msg)
                                top_msg = g_object_ref (priv->top_msg);
@@ -3120,6 +3126,7 @@ idle_save_mime_part_show_result (SaveMimePartInfo *info)
        } else {
                modest_platform_system_banner (NULL, NULL, _("mail_ib_file_operation_failed"));
        }
+       set_progress_hint (info->window, FALSE);
        save_mime_part_info_free (info, FALSE);
        gdk_threads_leave (); /* CHECKED */
 
@@ -3243,7 +3250,7 @@ save_mime_part_to_file (SaveMimePartInfo *info)
                if (written < 0) {
                        g_warning ("modest: could not save attachment %s: %d (%s)\n", pair->filename, error?error->code:-1, error?error->message:"Unknown error");
 
-                       if ((error->domain == TNY_ERROR_DOMAIN) && 
+                       if (error && (error->domain == TNY_ERROR_DOMAIN) &&
                            (error->code == TNY_IO_ERROR_WRITE) &&
                            (errno == ENOSPC)) {
                                info->result = GNOME_VFS_ERROR_NO_SPACE;
@@ -3314,6 +3321,8 @@ save_mime_parts_to_file_with_checks (GtkWindow *parent,
        if (!is_ok) {
                save_mime_part_info_free (info, TRUE);
        } else {
+               /* Start progress and launch thread */
+               set_progress_hint (info->window, TRUE);
                g_thread_create ((GThreadFunc)save_mime_part_to_file, info, FALSE, NULL);
        }