projects
/
modest
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fremantle save and remove attachments act on all attachments
[modest]
/
src
/
hildon2
/
modest-msg-view-window.c
diff --git
a/src/hildon2/modest-msg-view-window.c
b/src/hildon2/modest-msg-view-window.c
index
2c4a5f5
..
ea5ba0d
100644
(file)
--- a/
src/hildon2/modest-msg-view-window.c
+++ b/
src/hildon2/modest-msg-view-window.c
@@
-1443,7
+1443,7
@@
modest_msg_view_window_find_toolbar_search (GtkWidget *widget,
if ((current_search == NULL) || (strcmp (current_search, "") == 0)) {
g_free (current_search);
if ((current_search == NULL) || (strcmp (current_search, "") == 0)) {
g_free (current_search);
- 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"));
return;
}
return;
}
@@
-1454,7
+1454,8
@@
modest_msg_view_window_find_toolbar_search (GtkWidget *widget,
result = modest_isearch_view_search (MODEST_ISEARCH_VIEW (priv->msg_view),
priv->last_search);
if (!result) {
result = modest_isearch_view_search (MODEST_ISEARCH_VIEW (priv->msg_view),
priv->last_search);
if (!result) {
- 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"));
g_free (priv->last_search);
priv->last_search = NULL;
} else {
g_free (priv->last_search);
priv->last_search = NULL;
} else {
@@
-1463,7
+1464,8
@@
modest_msg_view_window_find_toolbar_search (GtkWidget *widget,
}
} else {
if (!modest_isearch_view_search_next (MODEST_ISEARCH_VIEW (priv->msg_view))) {
}
} else {
if (!modest_isearch_view_search_next (MODEST_ISEARCH_VIEW (priv->msg_view))) {
- 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_free (priv->last_search);
priv->last_search = NULL;
} else {
g_free (priv->last_search);
priv->last_search = NULL;
} else {
@@
-1507,6
+1509,8
@@
modest_msg_view_window_zoom_plus (ModestWindow *window)
{
gdouble zoom_level;
ModestMsgViewWindowPrivate *priv;
{
gdouble zoom_level;
ModestMsgViewWindowPrivate *priv;
+ gint int_zoom;
+ gchar *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);
@@
-1514,7
+1518,8
@@
modest_msg_view_window_zoom_plus (ModestWindow *window)
zoom_level = modest_zoomable_get_zoom (MODEST_ZOOMABLE (priv->msg_view));
if (zoom_level >= 2.0) {
zoom_level = modest_zoomable_get_zoom (MODEST_ZOOMABLE (priv->msg_view));
if (zoom_level >= 2.0) {
- 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"));
return FALSE;
} else if (zoom_level >= 1.5) {
zoom_level = 2.0;
return FALSE;
} else if (zoom_level >= 1.5) {
zoom_level = 2.0;
@@
-1531,7
+1536,10
@@
modest_msg_view_window_zoom_plus (ModestWindow *window)
}
/* set zoom level */
}
/* set zoom level */
- hildon_banner_show_information (NULL, NULL, _HL("wdgt_ib_zoom"));
+ 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);
modest_zoomable_set_zoom (MODEST_ZOOMABLE (priv->msg_view), zoom_level);
return TRUE;
modest_zoomable_set_zoom (MODEST_ZOOMABLE (priv->msg_view), zoom_level);
return TRUE;
@@
-1542,6
+1550,8
@@
modest_msg_view_window_zoom_minus (ModestWindow *window)
{
gdouble zoom_level;
ModestMsgViewWindowPrivate *priv;
{
gdouble zoom_level;
ModestMsgViewWindowPrivate *priv;
+ gint int_zoom;
+ gchar *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);
@@
-1549,7
+1559,8
@@
modest_msg_view_window_zoom_minus (ModestWindow *window)
zoom_level = modest_zoomable_get_zoom (MODEST_ZOOMABLE (priv->msg_view));
if (zoom_level <= 0.5) {
zoom_level = modest_zoomable_get_zoom (MODEST_ZOOMABLE (priv->msg_view));
if (zoom_level <= 0.5) {
- 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"));
return FALSE;
} else if (zoom_level <= 0.8) {
zoom_level = 0.5;
return FALSE;
} else if (zoom_level <= 0.8) {
zoom_level = 0.5;
@@
-1566,7
+1577,10
@@
modest_msg_view_window_zoom_minus (ModestWindow *window)
}
/* set zoom level */
}
/* set zoom level */
- hildon_banner_show_information (NULL, NULL, _HL("wdgt_ib_zoom"));
+ 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);
modest_zoomable_set_zoom (MODEST_ZOOMABLE (priv->msg_view), zoom_level);
return TRUE;
modest_zoomable_set_zoom (MODEST_ZOOMABLE (priv->msg_view), zoom_level);
return TRUE;
@@
-1604,7
+1618,7
@@
modest_msg_view_window_key_event (GtkWidget *window,
if (event->type == GDK_KEY_PRESS) {
GtkScrollType scroll_type;
if (event->type == GDK_KEY_PRESS) {
GtkScrollType scroll_type;
-
+
switch (event->keyval) {
case GDK_Up:
case GDK_KP_Up:
switch (event->keyval) {
case GDK_Up:
case GDK_KP_Up:
@@
-1626,7
+1640,7
@@
modest_msg_view_window_key_event (GtkWidget *window,
scroll_type = GTK_SCROLL_END; break;
default: scroll_type = GTK_SCROLL_NONE;
}
scroll_type = GTK_SCROLL_END; break;
default: scroll_type = GTK_SCROLL_NONE;
}
-
+
/* 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;
@@
-2266,7
+2280,7
@@
on_account_removed (TnyAccountStore *account_store,
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 */
- if (strcmp (parent_acc, our_acc) == 0)
+ if (our_acc && parent_acc && strcmp (parent_acc, our_acc) == 0)
modest_ui_actions_on_close_window (NULL, MODEST_WINDOW (user_data));
}
}
modest_ui_actions_on_close_window (NULL, MODEST_WINDOW (user_data));
}
}
@@
-2380,7
+2394,8
@@
modest_msg_view_window_get_attachments (ModestMsgViewWindow *win)
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);
- selected_attachments = modest_msg_view_get_selected_attachments (MODEST_MSG_VIEW (priv->msg_view));
+ /* In Hildon 2.2 as there's no selection we assume we have all attachments selected */
+ selected_attachments = modest_msg_view_get_attachments (MODEST_MSG_VIEW (priv->msg_view));
return selected_attachments;
}
return selected_attachments;
}
@@
-2605,8
+2620,8
@@
idle_save_mime_part_show_result (SaveMimePartInfo *info)
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"));
} else {
hildon_banner_show_information (NULL, NULL, _("mail_ib_file_operation_failed"));
}
} else {
hildon_banner_show_information (NULL, NULL, _("mail_ib_file_operation_failed"));
}
@@
-2699,7
+2714,7
@@
save_attachments_response (GtkDialog *dialog,
if (!modest_utils_folder_writable (chooser_uri)) {
hildon_banner_show_information
if (!modest_utils_folder_writable (chooser_uri)) {
hildon_banner_show_information
- (NULL, NULL, dgettext("hildon-fm", "sfil_ib_readonly_location"));
+ (NULL, NULL, _FM("sfil_ib_readonly_location"));
} else {
TnyIterator *iter;
} else {
TnyIterator *iter;
@@
-2711,7
+2726,7
@@
save_attachments_response (GtkDialog *dialog,
!tny_mime_part_is_purged (mime_part) &&
(tny_mime_part_get_filename (mime_part) != NULL)) {
SaveMimePartPair *pair;
!tny_mime_part_is_purged (mime_part) &&
(tny_mime_part_get_filename (mime_part) != NULL)) {
SaveMimePartPair *pair;
-
+
pair = g_slice_new0 (SaveMimePartPair);
if (tny_list_get_length (mime_parts) > 1) {
pair = g_slice_new0 (SaveMimePartPair);
if (tny_list_get_length (mime_parts) > 1) {
@@
-2757,7
+2772,9
@@
modest_msg_view_window_save_attachments (ModestMsgViewWindow *window, TnyList *m
priv = MODEST_MSG_VIEW_WINDOW_GET_PRIVATE (window);
if (mime_parts == NULL) {
priv = MODEST_MSG_VIEW_WINDOW_GET_PRIVATE (window);
if (mime_parts == NULL) {
- 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));
if (mime_parts == NULL || tny_list_get_length (mime_parts) == 0)
return;
} else {
if (mime_parts == NULL || tny_list_get_length (mime_parts) == 0)
return;
} else {
@@
-2853,10
+2870,10
@@
modest_msg_view_window_remove_attachments (ModestMsgViewWindow *window, gboolean
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);