aboutsummaryrefslogtreecommitdiffstats
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
parentb82997411cf3d5ee05fa690d766345f83a16ca94 (diff)
downloadgsoc2013-evolution-289a09f50122dfc36c4e91d7e4314d4ef54ed35f.tar
gsoc2013-evolution-289a09f50122dfc36c4e91d7e4314d4ef54ed35f.tar.gz
gsoc2013-evolution-289a09f50122dfc36c4e91d7e4314d4ef54ed35f.tar.bz2
gsoc2013-evolution-289a09f50122dfc36c4e91d7e4314d4ef54ed35f.tar.lz
gsoc2013-evolution-289a09f50122dfc36c4e91d7e4314d4ef54ed35f.tar.xz
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
-rw-r--r--mail/ChangeLog25
-rw-r--r--mail/mail-callbacks.c22
-rw-r--r--mail/message-list.c35
3 files changed, 58 insertions, 24 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 61dde25961..8865d13905 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,15 @@
+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.
+
2001-11-24 Jeffrey Stedfast <fejj@ximian.com>
* mail-config.c (pgpopen): Fix the boolean check to be && and not
@@ -35,6 +47,19 @@
* mail-display.c (load_content_loaded): Make sure the mail-display
object is still "alive" before accessing any of it's data.
+2001-11-20 Not Zed <NotZed@Ximian.com>
+
+ * folder-browser-ui.c: Disable search if no message
+ loaded/viewed. Also for #14348.
+
+ * folder-browser.c: Disable "Add sender to addressbook" if we dont
+ have a message loaded (it wont work). For #14348.
+
+2001-11-20 Jeffrey Stedfast <fejj@ximian.com>
+
+ * mail-display.c (load_content_loaded): Make sure the mail-display
+ object is still "alive" before accessing any of it's data.
+
2001-11-14 Zbigniew Chyla <cyba@gnome.pl>
* mail-autofilter.c (rule_match_recipients, rule_from_message,
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);
}
diff --git a/mail/message-list.c b/mail/message-list.c
index db6b48a1bf..61ff949ac5 100644
--- a/mail/message-list.c
+++ b/mail/message-list.c
@@ -386,11 +386,10 @@ message_list_select (MessageList *message_list,
{
CamelMessageInfo *info;
int vrow, last;
- ETree *et = message_list->tree;
if (!GTK_WIDGET_HAS_FOCUS (message_list))
gtk_widget_grab_focus (GTK_WIDGET (message_list));
-
+
switch (direction) {
case MESSAGE_LIST_SELECT_PREVIOUS:
last = -1;
@@ -404,28 +403,29 @@ message_list_select (MessageList *message_list,
g_warning("Invalid argument to message_list_select");
return;
}
-
+
/* If it's -1, we want the last view row, not the last model row. */
/* model_to_view_row etc simply dont work for sorted views. Sigh. */
if (base_row == -1)
- vrow = e_tree_row_count(message_list->tree) - 1;
+ vrow = e_tree_row_count (message_list->tree) - 1;
else
- vrow = e_tree_model_to_view_row (et, base_row);
-
- if (base_row <= -1)
+ vrow = e_tree_model_to_view_row (message_list->tree, base_row);
+
+ if (vrow <= -1)
return;
+
/* This means that we'll move at least one message in 'direction'. */
if (vrow != last)
vrow += direction;
-
+
/* We don't know whether to use < or > due to "direction" */
while (vrow != last) {
- ETreePath node = e_tree_node_at_row (et, vrow);
-
+ ETreePath node = e_tree_node_at_row (message_list->tree, vrow);
+
info = get_message_info (message_list, node);
-
+
if (info && (info->flags & mask) == flags) {
- e_tree_set_cursor (et, node);
+ e_tree_set_cursor (message_list->tree, node);
gtk_signal_emit (GTK_OBJECT (message_list), message_list_signals[MESSAGE_SELECTED],
camel_message_info_uid (info));
@@ -433,6 +433,15 @@ message_list_select (MessageList *message_list,
}
vrow += direction;
}
+
+ if (wraparound) {
+ if (direction == MESSAGE_LIST_SELECT_PREVIOUS)
+ base_row = -1;
+ else
+ base_row = 0;
+
+ message_list_select (message_list, base_row, direction, flags, mask, FALSE);
+ }
}
@@ -2172,7 +2181,7 @@ message_list_hide_uids (MessageList *ml, GPtrArray *uids)
{
int i;
char *uid;
-
+
/* first see if we need to do any work, if so, then do it all at once */
for (i = 0; i < uids->len; i++) {
if (g_hash_table_lookup (ml->uid_nodemap, uids->pdata[i])) {