#include <tny-msg.h>
#include <tny-mime-part.h>
#include <tny-vfs-stream.h>
+#include <tny-error.h>
#include "modest-marshal.h"
#include "modest-platform.h"
#include <modest-utils.h>
/* Sets current progress hint */
priv->progress_hint = enabled;
- if (GTK_WIDGET_VISIBLE (self)) {
- hildon_gtk_window_set_progress_indicator (GTK_WINDOW (self), enabled?1:0);
- }
+ hildon_gtk_window_set_progress_indicator (GTK_WINDOW (self), enabled?1:0);
}
stream = tny_vfs_stream_new (handle);
if (tny_mime_part_decode_to_stream (pair->part, stream, &error) < 0) {
g_warning ("modest: could not save attachment %s: %d (%s)\n", pair->filename, error?error->code:-1, error?error->message:"Unknown error");
-
- info->result = GNOME_VFS_ERROR_IO;
+
+ if ((error->domain == TNY_ERROR_DOMAIN) &&
+ (error->code = TNY_IO_ERROR_WRITE) &&
+ (errno == ENOSPC)) {
+ info->result = GNOME_VFS_ERROR_NO_SPACE;
+ } else {
+ info->result = GNOME_VFS_ERROR_IO;
+ }
}
g_object_unref (G_OBJECT (stream));
g_object_unref (pair->part);
modest_hildon2_window_add_to_menu (MODEST_HILDON2_WINDOW (self), _("mcen_me_inbox_forward"), "<Control>d",
APP_MENU_CALLBACK (modest_ui_actions_on_forward),
MODEST_DIMMING_CALLBACK (modest_ui_dimming_rules_on_reply_msg));
-
+
modest_hildon2_window_add_to_menu (MODEST_HILDON2_WINDOW (self), _("mcen_me_inbox_mark_as_read"), NULL,
APP_MENU_CALLBACK (modest_ui_actions_on_mark_as_read),
MODEST_DIMMING_CALLBACK (modest_ui_dimming_rules_on_mark_as_read_msg_in_view));
modest_hildon2_window_add_to_menu (MODEST_HILDON2_WINDOW (self), _("mcen_me_inbox_mark_as_unread"), NULL,
APP_MENU_CALLBACK (modest_ui_actions_on_mark_as_unread),
MODEST_DIMMING_CALLBACK (modest_ui_dimming_rules_on_mark_as_unread_msg_in_view));
-
+
modest_hildon2_window_add_to_menu (MODEST_HILDON2_WINDOW (self), _("mcen_me_viewer_save_attachments"), NULL,
APP_MENU_CALLBACK (modest_ui_actions_save_attachments),
MODEST_DIMMING_CALLBACK (modest_ui_dimming_rules_on_save_attachments));
modest_hildon2_window_add_to_menu (MODEST_HILDON2_WINDOW (self), _("mcen_me_inbox_remove_attachments"), NULL,
APP_MENU_CALLBACK (modest_ui_actions_remove_attachments),
MODEST_DIMMING_CALLBACK (modest_ui_dimming_rules_on_remove_attachments));
-
+
modest_hildon2_window_add_to_menu (MODEST_HILDON2_WINDOW (self), _("mcen_me_new_message"), "<Control>n",
APP_MENU_CALLBACK (modest_ui_actions_on_new_msg),
MODEST_DIMMING_CALLBACK (modest_ui_dimming_rules_on_new_msg));