aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2012-05-02 04:59:58 +0000
committerhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2012-05-02 04:59:58 +0000
commit35cbfb31857c2d26b9050e4f3bc6112400cb0dfc (patch)
tree40abc55254bdf17b1b7caeca092c6928abb4de04 /src
parent1b55a7f5a4e04628b56f9da7db112a9f5373b33b (diff)
loosen up queue/draft check on mail check is running.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@3071 ee746299-78ed-0310-b773-934348b2243d
Diffstat (limited to 'src')
-rw-r--r--src/compose.c30
-rw-r--r--src/mainwindow.c7
2 files changed, 24 insertions, 13 deletions
diff --git a/src/compose.c b/src/compose.c
index fee0934b..71c9b7e0 100644
--- a/src/compose.c
+++ b/src/compose.c
@@ -7284,10 +7284,6 @@ static void compose_send_later_cb(gpointer data, guint action,
C_UNLOCK();
return;
}
- if (compose_check_activities(compose) == FALSE) {
- C_UNLOCK();
- return;
- }
queue = account_get_special_folder(compose->account, F_QUEUE);
if (!queue) {
@@ -7295,10 +7291,16 @@ static void compose_send_later_cb(gpointer data, guint action,
C_UNLOCK();
return;
}
- if (!FOLDER_IS_LOCAL(queue->folder) &&
- !main_window_toggle_online_if_offline(main_window_get())) {
- C_UNLOCK();
- return;
+
+ if (!FOLDER_IS_LOCAL(queue->folder)) {
+ if (compose_check_activities(compose) == FALSE) {
+ C_UNLOCK();
+ return;
+ }
+ if (!main_window_toggle_online_if_offline(main_window_get())) {
+ C_UNLOCK();
+ return;
+ }
}
g_snprintf(tmp, sizeof(tmp), "%s%ctmpmsg.%p",
@@ -7363,9 +7365,15 @@ static void compose_draft_cb(gpointer data, guint action, GtkWidget *widget)
C_LOCK();
- if (compose_check_activities(compose) == FALSE) {
- C_UNLOCK();
- return;
+ if (!FOLDER_IS_LOCAL(draft->folder)) {
+ if (compose_check_activities(compose) == FALSE) {
+ C_UNLOCK();
+ return;
+ }
+ if (!main_window_toggle_online_if_offline(main_window_get())) {
+ C_UNLOCK();
+ return;
+ }
}
tmp = g_strdup_printf("%s%cdraft.%p", get_tmp_dir(),
diff --git a/src/mainwindow.c b/src/mainwindow.c
index 6a1dfda7..f64677fe 100644
--- a/src/mainwindow.c
+++ b/src/mainwindow.c
@@ -1859,6 +1859,8 @@ void main_window_send_queue(MainWindow *mainwin)
{
GList *list;
+ if (inc_is_active())
+ return;
if (!main_window_toggle_online_if_offline(mainwin))
return;
@@ -2011,7 +2013,8 @@ void main_window_set_toolbar_sensitive(MainWindow *mainwin)
SET_WIDGET_COND(mainwin->getall_btn, M_HAVE_ACCOUNT|M_UNLOCKED);
SET_WIDGET_COND(mainwin->rpop3_btn,
M_HAVE_ACCOUNT|M_UNLOCKED|M_POP3_ACCOUNT);
- SET_WIDGET_COND(mainwin->send_btn, M_HAVE_ACCOUNT|M_HAVE_QUEUED_MSG);
+ SET_WIDGET_COND(mainwin->send_btn,
+ M_HAVE_ACCOUNT|M_UNLOCKED|M_HAVE_QUEUED_MSG);
SET_WIDGET_COND(mainwin->compose_btn, M_HAVE_ACCOUNT);
SET_WIDGET_COND(mainwin->reply_btn,
M_HAVE_ACCOUNT|M_SINGLE_TARGET_EXIST);
@@ -2165,7 +2168,7 @@ void main_window_set_menu_sensitive(MainWindow *mainwin)
, M_INC_ACTIVE},
{"/Message/Receive/Remote mailbox..."
, M_HAVE_ACCOUNT|M_UNLOCKED|M_POP3_ACCOUNT},
- {"/Message/Send queued messages" , M_HAVE_ACCOUNT|M_HAVE_QUEUED_MSG},
+ {"/Message/Send queued messages" , M_HAVE_ACCOUNT|M_UNLOCKED|M_HAVE_QUEUED_MSG},
{"/Message/Compose new message" , M_HAVE_ACCOUNT},
{"/Message/Reply" , M_HAVE_ACCOUNT|M_SINGLE_TARGET_EXIST},