#include "modest-marshal.h"
#include "modest-platform.h"
#include <modest-utils.h>
#include "modest-marshal.h"
#include "modest-platform.h"
#include <modest-utils.h>
- hildon_banner_show_information (NULL, NULL, dgettext("hildon-common-strings", "ecdg_ib_find_rep_enter_text"));
+ hildon_banner_show_information (NULL, NULL, _CS("ecdg_ib_find_rep_enter_text"));
- hildon_banner_show_information (NULL, NULL, dgettext("hildon-libs", "ckct_ib_find_no_matches"));
+ hildon_banner_show_information (NULL, NULL,
+ _HL("ckct_ib_find_no_matches"));
- hildon_banner_show_information (NULL, NULL, dgettext("hildon-libs", "ckct_ib_find_search_complete"));
+ hildon_banner_show_information (NULL, NULL,
+ _HL("ckct_ib_find_search_complete"));
g_return_val_if_fail (MODEST_IS_MSG_VIEW_WINDOW (window), 1.0);
priv = MODEST_MSG_VIEW_WINDOW_GET_PRIVATE (window);
g_return_val_if_fail (MODEST_IS_MSG_VIEW_WINDOW (window), 1.0);
priv = MODEST_MSG_VIEW_WINDOW_GET_PRIVATE (window);
- hildon_banner_show_information (NULL, NULL, dgettext("hildon-common-strings", "ckct_ib_max_zoom_level_reached"));
+ hildon_banner_show_information (NULL, NULL,
+ _CS("ckct_ib_max_zoom_level_reached"));
+ int_zoom = (gint) rint (zoom_level*100.0+0.1);
+ banner_text = g_strdup_printf (_HL("wdgt_ib_zoom"), int_zoom);
+ modest_platform_information_banner (GTK_WIDGET (window), NULL, banner_text);
+ g_free (banner_text);
g_return_val_if_fail (MODEST_IS_MSG_VIEW_WINDOW (window), 1.0);
priv = MODEST_MSG_VIEW_WINDOW_GET_PRIVATE (window);
g_return_val_if_fail (MODEST_IS_MSG_VIEW_WINDOW (window), 1.0);
priv = MODEST_MSG_VIEW_WINDOW_GET_PRIVATE (window);
- hildon_banner_show_information (NULL, NULL, dgettext("hildon-common-strings", "ckct_ib_min_zoom_level_reached"));
+ hildon_banner_show_information (NULL, NULL,
+ _CS("ckct_ib_min_zoom_level_reached"));
+ int_zoom = (gint) rint (zoom_level*100.0+0.1);
+ banner_text = g_strdup_printf (_HL("wdgt_ib_zoom"), int_zoom);
+ modest_platform_information_banner (GTK_WIDGET (window), NULL, banner_text);
+ g_free (banner_text);
/* g_signal_emit_by_name (G_OBJECT (priv->main_scroll), "scroll-child", */
/* scroll_type, FALSE, &return_value); */
return FALSE;
/* g_signal_emit_by_name (G_OBJECT (priv->main_scroll), "scroll-child", */
/* scroll_type, FALSE, &return_value); */
return FALSE;
mgr = modest_runtime_get_window_mgr ();
/* Msg download completed */
if (!(tny_header_get_flags (header) & TNY_HEADER_FLAG_CACHED)) {
mgr = modest_runtime_get_window_mgr ();
/* Msg download completed */
if (!(tny_header_get_flags (header) & TNY_HEADER_FLAG_CACHED)) {
/* Ask the user if he wants to download the message if
we're not online */
if (!tny_device_is_online (modest_runtime_get_device())) {
/* Ask the user if he wants to download the message if
we're not online */
if (!tny_device_is_online (modest_runtime_get_device())) {
parent_acc = modest_tny_account_get_parent_modest_account_name_for_server_account (account);
/* Close this window if I'm showing a message of the removed account */
parent_acc = modest_tny_account_get_parent_modest_account_name_for_server_account (account);
/* Close this window if I'm showing a message of the removed account */
g_return_val_if_fail (MODEST_IS_MSG_VIEW_WINDOW (win), NULL);
priv = MODEST_MSG_VIEW_WINDOW_GET_PRIVATE (win);
g_return_val_if_fail (MODEST_IS_MSG_VIEW_WINDOW (win), NULL);
priv = MODEST_MSG_VIEW_WINDOW_GET_PRIVATE (win);
if (info->result == GNOME_VFS_OK) {
hildon_banner_show_information (NULL, NULL, _CS("sfil_ib_saved"));
} else if (info->result == GNOME_VFS_ERROR_NO_SPACE) {
if (info->result == GNOME_VFS_OK) {
hildon_banner_show_information (NULL, NULL, _CS("sfil_ib_saved"));
} else if (info->result == GNOME_VFS_ERROR_NO_SPACE) {
- hildon_banner_show_information (NULL, NULL, dgettext("ke-recv",
- "cerm_device_memory_full"));
+ hildon_banner_show_information (NULL, NULL,
+ _KR("cerm_device_memory_full"));
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");
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;
+ }
- (NULL, NULL, dgettext("hildon-fm", "sfil_ib_readonly_location"));
+ (NULL, NULL, _FM("sfil_ib_readonly_location"));
- mime_parts = modest_msg_view_get_selected_attachments (MODEST_MSG_VIEW (priv->msg_view));
+ /* In Hildon 2.2 save and delete operate over all the attachments as there's no
+ * selection available */
+ mime_parts = modest_msg_view_get_attachments (MODEST_MSG_VIEW (priv->msg_view));
g_return_if_fail (MODEST_IS_MSG_VIEW_WINDOW (window));
priv = MODEST_MSG_VIEW_WINDOW_GET_PRIVATE (window);
g_return_if_fail (MODEST_IS_MSG_VIEW_WINDOW (window));
priv = MODEST_MSG_VIEW_WINDOW_GET_PRIVATE (window);
- if (get_all)
- mime_parts = modest_msg_view_get_attachments (MODEST_MSG_VIEW (priv->msg_view));
- else
- mime_parts = modest_msg_view_get_selected_attachments (MODEST_MSG_VIEW (priv->msg_view));
+ /* In hildon 2.2 we ignore the get_all flag as we always get all attachments. This is
+ * because we don't have selection
+ */
+ mime_parts = modest_msg_view_get_attachments (MODEST_MSG_VIEW (priv->msg_view));
/* Remove already purged messages from mime parts list */
iter = tny_list_create_iterator (mime_parts);
/* Remove already purged messages from mime parts list */
iter = tny_list_create_iterator (mime_parts);
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_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_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_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));
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));
- if (msg == NULL) return;
- recipients = modest_tny_msg_get_all_recipients_list (msg);
+ if (msg == NULL) {
+ TnyHeader *header;
+
+ header = modest_msg_view_window_get_header (self);
+ if (header == NULL)
+ return;
+ recipients = modest_tny_msg_header_get_all_recipients_list (header);
+ g_object_unref (header);
+ } else {
+ recipients = modest_tny_msg_get_all_recipients_list (msg);
+ g_object_unref (msg);
+ }