aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-callbacks.c
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2001-12-04 03:57:19 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2001-12-04 03:57:19 +0800
commit289a09f50122dfc36c4e91d7e4314d4ef54ed35f (patch)
treeb540c4131f83e6821a7b0011a190f6c87a4fb29c /mail/mail-callbacks.c
parentb82997411cf3d5ee05fa690d766345f83a16ca94 (diff)
downloadgsoc2013-evolution-289a09f50122dfc36c4e91d7e4314d4ef54ed35f.tar.gz
gsoc2013-evolution-289a09f50122dfc36c4e91d7e4314d4ef54ed35f.tar.zst
gsoc2013-evolution-289a09f50122dfc36c4e91d7e4314d4ef54ed35f.zip
If the path exists, make sure it's a regular file (or we can't possibly
2001-11-28 Jeffrey Stedfast <fejj@ximian.com> * mail-callbacks.c (save_msg_ok): If the path exists, make sure it's a regular file (or we can't possibly save to it). Fix for #14127. 2001-11-28 Jeffrey Stedfast <fejj@ximian.com> * message-list.c (message_list_select): Cleaned up the code. * mail-callbacks.c (previous_unread_msg): Pass wraparound as TRUE. svn path=/trunk/; revision=14850
Diffstat (limited to 'mail/mail-callbacks.c')
-rw-r--r--mail/mail-callbacks.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/mail/mail-callbacks.c b/mail/mail-callbacks.c
index f1e1bcba64..4a704b077d 100644
--- a/mail/mail-callbacks.c
+++ b/mail/mail-callbacks.c
@@ -1882,11 +1882,16 @@ save_msg_ok (GtkWidget *widget, gpointer user_data)
GPtrArray *uids;
const char *path;
int fd, ret = 0;
+ struct stat st;
path = gtk_file_selection_get_filename (GTK_FILE_SELECTION (user_data));
if (path[0] == '\0')
return;
+ /* make sure we can actually save to it... */
+ if (stat (path, &st) != -1 && !S_ISREG (st.st_mode))
+ return;
+
fd = open (path, O_RDONLY);
if (fd != -1) {
GtkWidget *dialog;
@@ -2025,8 +2030,7 @@ next_unread_msg (GtkWidget *button, gpointer user_data)
return;
row = e_tree_row_of_node (fb->message_list->tree, e_tree_get_cursor (fb->message_list->tree));
- message_list_select (fb->message_list, row,
- MESSAGE_LIST_SELECT_NEXT,
+ message_list_select (fb->message_list, row, MESSAGE_LIST_SELECT_NEXT,
0, CAMEL_MESSAGE_SEEN, TRUE);
}
@@ -2040,8 +2044,7 @@ next_flagged_msg (GtkWidget *button, gpointer user_data)
return;
row = e_tree_row_of_node (fb->message_list->tree, e_tree_get_cursor (fb->message_list->tree));
- message_list_select (fb->message_list, row,
- MESSAGE_LIST_SELECT_NEXT,
+ message_list_select (fb->message_list, row, MESSAGE_LIST_SELECT_NEXT,
CAMEL_MESSAGE_FLAGGED, CAMEL_MESSAGE_FLAGGED, FALSE);
}
@@ -2055,8 +2058,7 @@ previous_msg (GtkWidget *button, gpointer user_data)
return;
row = e_tree_row_of_node (fb->message_list->tree, e_tree_get_cursor (fb->message_list->tree));
- message_list_select (fb->message_list, row,
- MESSAGE_LIST_SELECT_PREVIOUS,
+ message_list_select (fb->message_list, row, MESSAGE_LIST_SELECT_PREVIOUS,
0, 0, FALSE);
}
@@ -2070,9 +2072,8 @@ previous_unread_msg (GtkWidget *button, gpointer user_data)
return;
row = e_tree_row_of_node (fb->message_list->tree, e_tree_get_cursor (fb->message_list->tree));
- message_list_select (fb->message_list, row,
- MESSAGE_LIST_SELECT_PREVIOUS,
- 0, CAMEL_MESSAGE_SEEN, FALSE);
+ message_list_select (fb->message_list, row, MESSAGE_LIST_SELECT_PREVIOUS,
+ 0, CAMEL_MESSAGE_SEEN, TRUE);
}
void
@@ -2085,8 +2086,7 @@ previous_flagged_msg (GtkWidget *button, gpointer user_data)
return;
row = e_tree_row_of_node (fb->message_list->tree, e_tree_get_cursor (fb->message_list->tree));
- message_list_select (fb->message_list, row,
- MESSAGE_LIST_SELECT_PREVIOUS,
+ message_list_select (fb->message_list, row, MESSAGE_LIST_SELECT_PREVIOUS,
CAMEL_MESSAGE_FLAGGED, CAMEL_MESSAGE_FLAGGED, TRUE);
}