| 1 |
1 |
/*
|
| 2 |
2 |
* Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
|
| 3 |
|
* Copyright (C) 1999-2011 Hiroyuki Yamamoto
|
|
3 |
* Copyright (C) 1999-2013 Hiroyuki Yamamoto
|
| 4 |
4 |
*
|
| 5 |
5 |
* This program is free software; you can redistribute it and/or modify
|
| 6 |
6 |
* it under the terms of the GNU General Public License as published by
|
| ... | ... | |
| 840 |
840 |
pop3_session->state != POP3_GETSIZE_LIST_RECV) {
|
| 841 |
841 |
val = pop3_ok(pop3_session, msg);
|
| 842 |
842 |
if (val != PS_SUCCESS) {
|
| 843 |
|
if (val != PS_NOTSUPPORTED) {
|
|
843 |
if (val == PS_SOCKET) {
|
| 844 |
844 |
pop3_session->state = POP3_ERROR;
|
| 845 |
845 |
gdk_threads_leave();
|
| 846 |
846 |
return -1;
|
| 847 |
847 |
}
|
|
848 |
if (val != PS_NOTSUPPORTED) {
|
|
849 |
if (pop3_session->state != POP3_LOGOUT) {
|
|
850 |
if (pop3_logout_send(pop3_session) == PS_SUCCESS) {
|
|
851 |
gdk_threads_leave();
|
|
852 |
return 0;
|
|
853 |
} else {
|
|
854 |
gdk_threads_leave();
|
|
855 |
return -1;
|
|
856 |
}
|
|
857 |
}
|
|
858 |
}
|
| 848 |
859 |
}
|
| 849 |
860 |
|
| 850 |
861 |
if (*body == '+' || *body == '-')
|
| ... | ... | |
| 952 |
963 |
rpop3_idle(TRUE);
|
| 953 |
964 |
break;
|
| 954 |
965 |
case POP3_LOGOUT:
|
| 955 |
|
pop3_session->state = POP3_DONE;
|
|
966 |
if (val == PS_SUCCESS)
|
|
967 |
pop3_session->state = POP3_DONE;
|
|
968 |
else
|
|
969 |
pop3_session->state = POP3_ERROR;
|
| 956 |
970 |
session_disconnect(session);
|
| 957 |
971 |
break;
|
| 958 |
972 |
case POP3_ERROR:
|
| ... | ... | |
| 984 |
998 |
if (val == PS_SUCCESS) {
|
| 985 |
999 |
if (rpop3_window.cancelled) {
|
| 986 |
1000 |
rpop3_status_label_set(_("Quitting..."));
|
| 987 |
|
pop3_logout_send(rpop3_window.session);
|
|
1001 |
pop3_logout_send(pop3_session);
|
| 988 |
1002 |
} else
|
| 989 |
1003 |
pop3_getsize_list_send(pop3_session);
|
| 990 |
1004 |
} else
|
| ... | ... | |
| 996 |
1010 |
pop3_session->cur_msg = 1;
|
| 997 |
1011 |
if (rpop3_window.cancelled || pop3_session->count == 0) {
|
| 998 |
1012 |
rpop3_status_label_set(_("Quitting..."));
|
| 999 |
|
pop3_logout_send(rpop3_window.session);
|
|
1013 |
pop3_logout_send(pop3_session);
|
| 1000 |
1014 |
} else {
|
| 1001 |
1015 |
pop3_session->cur_msg = pop3_session->count;
|
| 1002 |
1016 |
gtk_widget_set_sensitive(rpop3_window.stop_btn,
|
| ... | ... | |
| 1057 |
1071 |
if (rpop3_top_recv(pop3_session, fp, len) == PS_SUCCESS) {
|
| 1058 |
1072 |
if (rpop3_window.cancelled) {
|
| 1059 |
1073 |
rpop3_status_label_set(_("Quitting..."));
|
| 1060 |
|
pop3_logout_send(rpop3_window.session);
|
|
1074 |
pop3_logout_send(pop3_session);
|
| 1061 |
1075 |
} else if (!rpop3_window.stop_load &&
|
| 1062 |
1076 |
(pop3_session->cur_msg > 1)) {
|
| 1063 |
1077 |
pop3_session->cur_msg--;
|