aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog7
-rw-r--r--ChangeLog.ja7
-rw-r--r--src/compose.c3
-rw-r--r--src/main.c2
-rw-r--r--src/mainwindow.c16
5 files changed, 33 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 9da4ed31..38fa0409 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
2007-02-02
+ * src/compose.c
+ src/main.c
+ src/mainwindow.c: disable 'Send' button when no queued messages
+ exist.
+
+2007-02-02
+
* src/prefs_toolbar.c
src/prefs_summary_column.c
src/prefs_display_items.c: disalbed reordering by DnD because of
diff --git a/ChangeLog.ja b/ChangeLog.ja
index c54f1a9b..2cbd8a56 100644
--- a/ChangeLog.ja
+++ b/ChangeLog.ja
@@ -1,5 +1,12 @@
2007-02-02
+ * src/compose.c
+ src/main.c
+ src/mainwindow.c: 送信待ちメッセージが存在しない場合は「送信」ボタン
+ を無効にするようにした。
+
+2007-02-02
+
* src/prefs_toolbar.c
src/prefs_summary_column.c
src/prefs_display_items.c: GtkCList のバグのために DnD による順番
diff --git a/src/compose.c b/src/compose.c
index ff48c1c3..7d43ea10 100644
--- a/src/compose.c
+++ b/src/compose.c
@@ -3551,6 +3551,9 @@ static gint compose_queue(Compose *compose, const gchar *file)
folder_item_scan(queue);
folderview_update_item(queue, TRUE);
+ main_window_set_menu_sensitive(main_window_get());
+ main_window_set_toolbar_sensitive(main_window_get());
+
return 0;
}
diff --git a/src/main.c b/src/main.c
index 6739ee2a..13a97010 100644
--- a/src/main.c
+++ b/src/main.c
@@ -1289,4 +1289,6 @@ static void send_queue(void)
}
folderview_update_all_updated(TRUE);
+ main_window_set_menu_sensitive(main_window_get());
+ main_window_set_toolbar_sensitive(main_window_get());
}
diff --git a/src/mainwindow.c b/src/mainwindow.c
index a4591a12..44872ac5 100644
--- a/src/mainwindow.c
+++ b/src/mainwindow.c
@@ -1770,6 +1770,8 @@ void main_window_send_queue(MainWindow *mainwin)
}
folderview_update_all_updated(TRUE);
+ main_window_set_menu_sensitive(mainwin);
+ main_window_set_toolbar_sensitive(mainwin);
}
typedef enum
@@ -1786,6 +1788,7 @@ typedef enum
M_ALLOW_DELETE = 1 << 9,
M_INC_ACTIVE = 1 << 10,
M_ENABLE_JUNK = 1 << 11,
+ M_HAVE_QUEUED_MSG = 1 << 12,
M_FOLDER_NEWOK = 1 << 17,
M_FOLDER_RENOK = 1 << 18,
@@ -1802,6 +1805,7 @@ static SensitiveCond main_window_get_current_state(MainWindow *mainwin)
{
SensitiveCond state = 0;
SummarySelection selection;
+ GList *list;
FolderItem *item = mainwin->summaryview->folder_item;
selection = summary_get_selection_type(mainwin->summaryview);
@@ -1838,6 +1842,14 @@ static SensitiveCond main_window_get_current_state(MainWindow *mainwin)
if (prefs_common.enable_junk)
state |= M_ENABLE_JUNK;
+ for (list = folder_get_list(); list != NULL; list = list->next) {
+ Folder *folder = list->data;
+ if (folder->queue && folder->queue->total > 0) {
+ state |= M_HAVE_QUEUED_MSG;
+ break;
+ }
+ }
+
item = folderview_get_selected_item(mainwin->folderview);
if (item) {
state |= M_FOLDER_NEWOK;
@@ -1887,7 +1899,7 @@ 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->send_btn, M_HAVE_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,
M_HAVE_ACCOUNT|M_SINGLE_TARGET_EXIST);
@@ -2026,7 +2038,7 @@ void main_window_set_menu_sensitive(MainWindow *mainwin)
, M_HAVE_ACCOUNT|M_UNLOCKED},
{"/Message/Receive/Cancel receiving"
, M_INC_ACTIVE},
- {"/Message/Send queued messages" , M_HAVE_ACCOUNT},
+ {"/Message/Send queued messages" , M_HAVE_ACCOUNT|M_HAVE_QUEUED_MSG},
{"/Message/Compose new message" , M_HAVE_ACCOUNT},
{"/Message/Reply" , M_HAVE_ACCOUNT|M_SINGLE_TARGET_EXIST},