aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2009-03-23 02:44:41 +0000
committerhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2009-03-23 02:44:41 +0000
commitcf2bd3b80dfffc5965efbe4c4ecf368052c6b61d (patch)
tree2b5145753f98906d862d1ee9b7dfe77a605ad5a2
parentd679294c4c806b2e01ce8059a4424ce628f1e81f (diff)
enable 'Remote mailbox' only if current account is POP3.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@2126 ee746299-78ed-0310-b773-934348b2243d
-rw-r--r--ChangeLog5
-rw-r--r--ChangeLog.ja5
-rw-r--r--src/mainwindow.c19
3 files changed, 24 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index b5564dad..bfdbde09 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2008-03-23
+
+ * src/mainwindow.c: enable 'Remote mailbox' only if current account
+ is POP3.
+
2008-03-19
* src/folderview.c: show 'Send queued messages' instead of 'Mark all
diff --git a/ChangeLog.ja b/ChangeLog.ja
index de1ee3cf..96b235f8 100644
--- a/ChangeLog.ja
+++ b/ChangeLog.ja
@@ -1,3 +1,8 @@
+2008-03-23
+
+ * src/mainwindow.c: 現在のアカウントが POP3 の場合だけ「リモート
+ メールボックス」を有効にするようにした。
+
2008-03-19
* src/folderview.c: 送信待ちフォルダのコンテキストメニューでは
diff --git a/src/mainwindow.c b/src/mainwindow.c
index dfe126f2..e0a43dd8 100644
--- a/src/mainwindow.c
+++ b/src/mainwindow.c
@@ -1,6 +1,6 @@
/*
* Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2008 Hiroyuki Yamamoto
+ * Copyright (C) 1999-2009 Hiroyuki Yamamoto
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -1841,6 +1841,7 @@ typedef enum
M_INC_ACTIVE = 1 << 10,
M_ENABLE_JUNK = 1 << 11,
M_HAVE_QUEUED_MSG = 1 << 12,
+ M_POP3_ACCOUNT = 1 << 13,
M_FOLDER_NEWOK = 1 << 17,
M_FOLDER_RENOK = 1 << 18,
@@ -1883,8 +1884,11 @@ static SensitiveCond main_window_get_current_state(MainWindow *mainwin)
if (selection == SUMMARY_SELECTED_SINGLE &&
FOLDER_ITEM_IS_SENT_FOLDER(item))
state |= M_ALLOW_REEDIT;
- if (cur_account)
+ if (cur_account) {
state |= M_HAVE_ACCOUNT;
+ if (cur_account->protocol == A_POP3)
+ state |= M_POP3_ACCOUNT;
+ }
if (inc_is_active())
state |= M_INC_ACTIVE;
@@ -1949,7 +1953,8 @@ void main_window_set_toolbar_sensitive(MainWindow *mainwin)
SET_WIDGET_COND(mainwin->get_btn, M_HAVE_ACCOUNT|M_UNLOCKED);
SET_WIDGET_COND(mainwin->getall_btn, M_HAVE_ACCOUNT|M_UNLOCKED);
- SET_WIDGET_COND(mainwin->rpop3_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->compose_btn, M_HAVE_ACCOUNT);
SET_WIDGET_COND(mainwin->reply_btn,
@@ -2103,7 +2108,7 @@ void main_window_set_menu_sensitive(MainWindow *mainwin)
{"/Message/Receive/Stop receiving"
, M_INC_ACTIVE},
{"/Message/Receive/Remote mailbox..."
- , M_HAVE_ACCOUNT|M_UNLOCKED},
+ , M_HAVE_ACCOUNT|M_UNLOCKED|M_POP3_ACCOUNT},
{"/Message/Send queued messages" , M_HAVE_ACCOUNT|M_HAVE_QUEUED_MSG},
{"/Message/Compose new message" , M_HAVE_ACCOUNT},
@@ -3874,8 +3879,12 @@ static void new_account_cb(MainWindow *mainwin, guint action,
static void account_selector_menu_cb(GtkMenuItem *menuitem, gpointer data)
{
+ MainWindow *mainwin = main_window_get();
+
cur_account = (PrefsAccount *)data;
- main_window_show_cur_account(main_window_get());
+ main_window_show_cur_account(mainwin);
+ main_window_set_menu_sensitive(mainwin);
+ main_window_set_toolbar_sensitive(mainwin);
}
static void account_receive_menu_cb(GtkMenuItem *menuitem, gpointer data)