projects
/
modest
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
In ModestFolderView, use delayed refresh is we're trying to do real refresh.
[modest]
/
src
/
modest-ui-actions.c
diff --git
a/src/modest-ui-actions.c
b/src/modest-ui-actions.c
index
df873dd
..
6f6722d
100644
(file)
--- a/
src/modest-ui-actions.c
+++ b/
src/modest-ui-actions.c
@@
-863,7
+863,7
@@
modest_ui_actions_compose_msg(ModestWindow *win,
if (expected_size > MODEST_MAX_ATTACHMENT_SIZE) {
modest_platform_run_information_dialog (
GTK_WINDOW(win),
if (expected_size > MODEST_MAX_ATTACHMENT_SIZE) {
modest_platform_run_information_dialog (
GTK_WINDOW(win),
- _FM("sfil_ib_opening_not_allowed"),
+ _("mail_ib_error_attachment_size"),
TRUE);
return;
}
TRUE);
return;
}
@@
-905,9
+905,12
@@
modest_ui_actions_compose_msg(ModestWindow *win,
signature = modest_account_mgr_get_signature_from_recipient (mgr, recipient, &use_signature);
g_free (recipient);
if (body_str != NULL) {
signature = modest_account_mgr_get_signature_from_recipient (mgr, recipient, &use_signature);
g_free (recipient);
if (body_str != NULL) {
- body = use_signature ? g_strconcat(body_str, "\n--\n", signature, NULL) : g_strdup(body_str);
+ body = use_signature ? g_strconcat(body_str, "\n",
+ MODEST_TEXT_UTILS_SIGNATURE_MARKER,
+ "\n", signature, NULL) : g_strdup(body_str);
} else {
} else {
- body = use_signature ? g_strconcat("\n--\n", signature, NULL) : g_strdup("");
+ body = use_signature ? g_strconcat("\n", MODEST_TEXT_UTILS_SIGNATURE_MARKER,
+ "\n", signature, NULL) : g_strdup("");
}
msg = modest_tny_msg_new (to_str, from_str, cc_str, bcc_str, subject_str, NULL, NULL, body, NULL, NULL, NULL);
}
msg = modest_tny_msg_new (to_str, from_str, cc_str, bcc_str, subject_str, NULL, NULL, body, NULL, NULL, NULL);
@@
-1741,20
+1744,27
@@
reply_forward_cb (ModestMailOperation *mail_op,
/* Create reply mail */
switch (rf_helper->action) {
/* Create reply mail */
switch (rf_helper->action) {
+ /* Use the msg_header to ensure that we have all the
+ information. The summary can lack some data */
+ TnyHeader *msg_header;
case ACTION_REPLY:
case ACTION_REPLY:
+ msg_header = tny_msg_get_header (msg);
new_msg =
new_msg =
- modest_tny_msg_create_reply_msg (msg, header, from,
+ modest_tny_msg_create_reply_msg (msg, msg_header, from,
(use_signature) ? signature : NULL,
rf_helper->reply_forward_type,
MODEST_TNY_MSG_REPLY_MODE_SENDER);
(use_signature) ? signature : NULL,
rf_helper->reply_forward_type,
MODEST_TNY_MSG_REPLY_MODE_SENDER);
+ g_object_unref (msg_header);
break;
case ACTION_REPLY_TO_ALL:
break;
case ACTION_REPLY_TO_ALL:
+ msg_header = tny_msg_get_header (msg);
new_msg =
new_msg =
- modest_tny_msg_create_reply_msg (msg, header, from,
+ modest_tny_msg_create_reply_msg (msg, msg_header, from,
(use_signature) ? signature : NULL,
rf_helper->reply_forward_type,
MODEST_TNY_MSG_REPLY_MODE_ALL);
edit_type = MODEST_EDIT_TYPE_REPLY;
(use_signature) ? signature : NULL,
rf_helper->reply_forward_type,
MODEST_TNY_MSG_REPLY_MODE_ALL);
edit_type = MODEST_EDIT_TYPE_REPLY;
+ g_object_unref (msg_header);
break;
case ACTION_FORWARD:
new_msg =
break;
case ACTION_FORWARD:
new_msg =
@@
-2294,7
+2304,7
@@
modest_ui_actions_do_send_receive (const gchar *account_name,
if (!acc_name)
acc_name = modest_account_mgr_get_default_account (modest_runtime_get_account_mgr());
if (!acc_name) {
if (!acc_name)
acc_name = modest_account_mgr_get_default_account (modest_runtime_get_account_mgr());
if (!acc_name) {
- g_printerr ("modest: cannot get default account\n");
+ modest_platform_information_banner (NULL, NULL, _("emev_ni_internal_error"));
return;
}
} else {
return;
}
} else {
@@
-2304,6
+2314,12
@@
modest_ui_actions_do_send_receive (const gchar *account_name,
acc_store = modest_runtime_get_account_store ();
account = modest_tny_account_store_get_server_account (acc_store, acc_name, TNY_ACCOUNT_TYPE_STORE);
acc_store = modest_runtime_get_account_store ();
account = modest_tny_account_store_get_server_account (acc_store, acc_name, TNY_ACCOUNT_TYPE_STORE);
+ if (!account) {
+ g_free (acc_name);
+ modest_platform_information_banner (NULL, NULL, _("emev_ni_internal_error"));
+ return;
+ }
+
/* Do not automatically refresh accounts that are flagged as
NO_AUTO_UPDATE. This could be useful for accounts that
handle their own update times */
/* Do not automatically refresh accounts that are flagged as
NO_AUTO_UPDATE. This could be useful for accounts that
handle their own update times */
@@
-2926,7
+2942,7
@@
enough_space_for_message (ModestMsgEditWindow *edit_window,
if (expected_size > MODEST_MAX_ATTACHMENT_SIZE) {
modest_platform_run_information_dialog (
GTK_WINDOW(edit_window),
if (expected_size > MODEST_MAX_ATTACHMENT_SIZE) {
modest_platform_run_information_dialog (
GTK_WINDOW(edit_window),
- _FM("sfil_ib_opening_not_allowed"),
+ _("mail_ib_error_attachment_size"),
TRUE);
return FALSE;
}
TRUE);
return FALSE;
}
@@
-3361,7
+3377,7
@@
do_create_folder_cb (ModestMailOperation *mail_op,
error = modest_mail_operation_get_error (mail_op);
if (error) {
error = modest_mail_operation_get_error (mail_op);
if (error) {
- gboolean disk_full;
+ gboolean disk_full = FALSE;
TnyAccount *account;
/* Show an error. If there was some problem writing to
disk, show it, otherwise show the generic folder
TnyAccount *account;
/* Show an error. If there was some problem writing to
disk, show it, otherwise show the generic folder
@@
-3430,14
+3446,10
@@
do_create_folder_performer (gboolean canceled,
ModestMailOperation *mail_op;
if (canceled || err) {
ModestMailOperation *mail_op;
if (canceled || err) {
- TnyAccount *account = modest_mail_operation_get_account (mail_op);
/* In disk full conditions we could get this error here */
modest_tny_account_store_check_disk_full_error (modest_runtime_get_account_store(),
(GtkWidget *) parent_window, err,
/* In disk full conditions we could get this error here */
modest_tny_account_store_check_disk_full_error (modest_runtime_get_account_store(),
(GtkWidget *) parent_window, err,
- account,
- _("mail_in_ui_folder_create_error_memory"));
- if (account)
- g_object_unref (account);
+ NULL, _("mail_in_ui_folder_create_error_memory"));
/* This happens if we have selected the outbox folder
as the parent */
/* This happens if we have selected the outbox folder
as the parent */
@@
-5367,7
+5379,7
@@
modest_ui_actions_move_folder_error_handler (ModestMailOperation *mail_op,
{
GObject *win = NULL;
const GError *error;
{
GObject *win = NULL;
const GError *error;
- TnyAccount *account;
+ TnyAccount *account = NULL;
#ifndef MODEST_TOOLKIT_HILDON2
ModestWindow *main_window = NULL;
#ifndef MODEST_TOOLKIT_HILDON2
ModestWindow *main_window = NULL;
@@
-5392,7
+5404,11
@@
modest_ui_actions_move_folder_error_handler (ModestMailOperation *mail_op,
#endif
win = modest_mail_operation_get_source (mail_op);
error = modest_mail_operation_get_error (mail_op);
#endif
win = modest_mail_operation_get_source (mail_op);
error = modest_mail_operation_get_error (mail_op);
- account = modest_mail_operation_get_account (mail_op);
+
+ if (TNY_IS_FOLDER (user_data))
+ account = modest_tny_folder_get_account (TNY_FOLDER (user_data));
+ else if (TNY_IS_ACCOUNT (user_data))
+ account = g_object_ref (user_data);
/* If it's not a disk full error then show a generic error */
if (!modest_tny_account_store_check_disk_full_error (modest_runtime_get_account_store(),
/* If it's not a disk full error then show a generic error */
if (!modest_tny_account_store_check_disk_full_error (modest_runtime_get_account_store(),
@@
-5805,15
+5821,10
@@
on_move_folder_cb (gboolean canceled,
mail_op =
modest_mail_operation_new_with_error_handling (G_OBJECT(parent_window),
mail_op =
modest_mail_operation_new_with_error_handling (G_OBJECT(parent_window),
- modest_ui_actions_move_folder_error_handler,
- info->src_folder, NULL);
+ modest_ui_actions_move_folder_error_handler,
+ g_object_ref (info->dst_folder), g_object_unref);
modest_mail_operation_queue_add (modest_runtime_get_mail_operation_queue (),
modest_mail_operation_queue_add (modest_runtime_get_mail_operation_queue (),
- mail_op);
-
- /* Select *after* the changes */
- /* TODO: this function hangs UI after transfer */
- /* modest_folder_view_select_folder (MODEST_FOLDER_VIEW(folder_view), */
- /* TNY_FOLDER (src_folder), TRUE); */
+ mail_op);
if (MODEST_IS_MAIN_WINDOW (parent_window)) {
modest_folder_view_select_folder (MODEST_FOLDER_VIEW(info->folder_view),
if (MODEST_IS_MAIN_WINDOW (parent_window)) {
modest_folder_view_select_folder (MODEST_FOLDER_VIEW(info->folder_view),