projects
/
modest
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
* Added an attribute sent to the msg edit window that specifies that the mail has...
[modest]
/
src
/
modest-ui-actions.c
diff --git
a/src/modest-ui-actions.c
b/src/modest-ui-actions.c
index
439343f
..
fa1d7b3
100644
(file)
--- a/
src/modest-ui-actions.c
+++ b/
src/modest-ui-actions.c
@@
-486,7
+486,7
@@
modest_ui_actions_on_smtp_servers (GtkAction *action, ModestWindow *win)
void
modest_ui_actions_on_new_msg (GtkAction *action, ModestWindow *win)
{
void
modest_ui_actions_on_new_msg (GtkAction *action, ModestWindow *win)
{
- ModestWindow *msg_win;
+ ModestWindow *msg_win = NULL;
TnyMsg *msg = NULL;
TnyFolder *folder = NULL;
gchar *account_name = NULL;
TnyMsg *msg = NULL;
TnyFolder *folder = NULL;
gchar *account_name = NULL;
@@
-665,7
+665,6
@@
cleanup:
g_object_unref (parent_win);
g_object_unref (msg);
g_object_unref (folder);
g_object_unref (parent_win);
g_object_unref (msg);
g_object_unref (folder);
- g_object_unref (header);
}
/*
}
/*
@@
-785,11
+784,11
@@
reply_forward_cb (ModestMailOperation *mail_op,
{
TnyMsg *new_msg;
ReplyForwardHelper *rf_helper;
{
TnyMsg *new_msg;
ReplyForwardHelper *rf_helper;
- ModestWindow *msg_win;
+ ModestWindow *msg_win = NULL;
ModestEditType edit_type;
ModestEditType edit_type;
- gchar *from;
+ gchar *from = NULL;
TnyAccount *account = NULL;
TnyAccount *account = NULL;
- ModestWindowMgr *mgr;
+ ModestWindowMgr *mgr = NULL;
gchar *signature = NULL;
g_return_if_fail (user_data != NULL);
gchar *signature = NULL;
g_return_if_fail (user_data != NULL);
@@
-883,11
+882,11
@@
static gboolean
download_uncached_messages (TnyList *header_list, GtkWindow *win)
{
TnyIterator *iter;
download_uncached_messages (TnyList *header_list, GtkWindow *win)
{
TnyIterator *iter;
- gboolean found, retval;
+ gboolean retval;
+ gint uncached_messages = 0;
iter = tny_list_create_iterator (header_list);
iter = tny_list_create_iterator (header_list);
- found = FALSE;
- while (!tny_iterator_is_done (iter) && !found) {
+ while (!tny_iterator_is_done (iter)) {
TnyHeader *header;
TnyHeaderFlags flags;
TnyHeader *header;
TnyHeaderFlags flags;
@@
-896,7
+895,8
@@
download_uncached_messages (TnyList *header_list, GtkWindow *win)
/* TODO: is this the right flag?, it seems that some
headers that have been previously downloaded do not
come with it */
/* TODO: is this the right flag?, it seems that some
headers that have been previously downloaded do not
come with it */
- found = !(flags & TNY_HEADER_FLAG_CACHED);
+ if (! (flags & TNY_HEADER_FLAG_CACHED))
+ uncached_messages ++;
g_object_unref (header);
tny_iterator_next (iter);
}
g_object_unref (header);
tny_iterator_next (iter);
}
@@
-904,11
+904,13
@@
download_uncached_messages (TnyList *header_list, GtkWindow *win)
/* Ask for user permission to download the messages */
retval = TRUE;
/* Ask for user permission to download the messages */
retval = TRUE;
- if (found) {
+ if (uncached_messages > 0) {
GtkResponseType response;
response =
modest_platform_run_confirmation_dialog (GTK_WINDOW (win),
GtkResponseType response;
response =
modest_platform_run_confirmation_dialog (GTK_WINDOW (win),
- _("mcen_nc_get_multi_msg_txt"));
+ ngettext("mcen_nc_get_msg",
+ "mcen_nc_get_msgs",
+ uncached_messages));
if (response == GTK_RESPONSE_CANCEL)
retval = FALSE;
}
if (response == GTK_RESPONSE_CANCEL)
retval = FALSE;
}
@@
-1641,6
+1643,7
@@
modest_ui_actions_on_send (GtkWidget *widget, ModestMsgEditWindow *edit_window)
g_object_unref (G_OBJECT (mail_operation));
modest_msg_edit_window_free_msg_data (edit_window, data);
g_object_unref (G_OBJECT (mail_operation));
modest_msg_edit_window_free_msg_data (edit_window, data);
+ modest_msg_edit_window_set_sent (edit_window, TRUE);
/* Save settings and close the window: */
gtk_widget_destroy (GTK_WIDGET (edit_window));
/* Save settings and close the window: */
gtk_widget_destroy (GTK_WIDGET (edit_window));
@@
-2757,6
+2760,10
@@
msgs_move_to_confirmation (GtkWindow *win,
g_object_unref (header);
g_object_unref (iter);
g_object_unref (header);
g_object_unref (iter);
+ /* if no src_folder, message may be an attahcment */
+ if (src_folder == NULL)
+ return GTK_RESPONSE_CANCEL;
+
/* If the source is a remote folder */
if (!modest_tny_folder_is_local_folder (src_folder)) {
const gchar *message;
/* If the source is a remote folder */
if (!modest_tny_folder_is_local_folder (src_folder)) {
const gchar *message;
@@
-2940,6
+2947,7
@@
modest_ui_actions_on_msg_view_window_move_to (GtkAction *action,
/* Create header list */
header = modest_msg_view_window_get_header (MODEST_MSG_VIEW_WINDOW (win));
/* Create header list */
header = modest_msg_view_window_get_header (MODEST_MSG_VIEW_WINDOW (win));
+
headers = tny_simple_list_new ();
tny_list_prepend (headers, G_OBJECT (header));
g_object_unref (header);
headers = tny_simple_list_new ();
tny_list_prepend (headers, G_OBJECT (header));
g_object_unref (header);
@@
-3075,7
+3083,7
@@
modest_ui_actions_on_settings (GtkAction *action,
dialog = modest_platform_get_global_settings_dialog ();
gtk_window_set_transient_for (GTK_WINDOW (dialog), GTK_WINDOW (win));
dialog = modest_platform_get_global_settings_dialog ();
gtk_window_set_transient_for (GTK_WINDOW (dialog), GTK_WINDOW (win));
- gtk_widget_show (dialog);
+ gtk_widget_show_all (dialog);
gtk_dialog_run (GTK_DIALOG (dialog));
gtk_dialog_run (GTK_DIALOG (dialog));