diff options
author | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2007-02-02 09:20:09 +0000 |
---|---|---|
committer | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2007-02-02 09:20:09 +0000 |
commit | 2196fd8bd137704f2642e06ab652aee29f3a0a5c (patch) | |
tree | 06c9d809f710762170f2c3ec6617938891e6f46c | |
parent | b4f66f4dbf383904028bc127ff7adc8c9e9eff66 (diff) |
disable 'Send' button when no queued messages exist.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@1527 ee746299-78ed-0310-b773-934348b2243d
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | ChangeLog.ja | 7 | ||||
-rw-r--r-- | src/compose.c | 3 | ||||
-rw-r--r-- | src/main.c | 2 | ||||
-rw-r--r-- | src/mainwindow.c | 16 |
5 files changed, 33 insertions, 2 deletions
@@ -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; } @@ -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}, |