/*
- * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2012 Hiroyuki Yamamoto and the Claws Mail team
+ * Claws Mail -- a GTK+ based, lightweight, and fast e-mail client
+ * Copyright (C) 1999-2016 Hiroyuki Yamamoto and the Claws Mail team
*
* 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
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
*/
#ifdef HAVE_CONFIG_H
item->last_seen = 0;
}
}
+ /* options without meaning in drafts */
+ if (item->stype == F_DRAFT)
+ item->hide_read_msgs =
+ item->hide_del_msgs =
+ item->hide_read_threads = FALSE;
}
XMLTag *folder_item_get_xml(Folder *folder, FolderItem *item)
!folder_has_parent_of_type(mainwin->summaryview->folder_item, F_TRASH)))
UPDATE_STATE(M_NOT_TRASH);
+ if (mainwin->summaryview->folder_item
+ && mainwin->summaryview->folder_item->stype != F_DRAFT)
+ UPDATE_STATE(M_NOT_DRAFT);
+
if (prefs_common.actions_list && g_slist_length(prefs_common.actions_list))
UPDATE_STATE(M_ACTIONS_EXIST);
FILL_TABLE("Menu/View/ThreadView", M_EXEC, M_SUMMARY_ISLIST);
FILL_TABLE("Menu/View/ExpandThreads", M_MSG_EXIST, M_SUMMARY_ISLIST);
FILL_TABLE("Menu/View/CollapseThreads", M_MSG_EXIST, M_SUMMARY_ISLIST);
- FILL_TABLE("Menu/View/HideReadThreads", M_HIDE_READ_THREADS, M_SUMMARY_ISLIST);
- FILL_TABLE("Menu/View/HideReadMessages", M_HIDE_READ_MSG, M_SUMMARY_ISLIST);
- FILL_TABLE("Menu/View/HideDelMessages", M_SUMMARY_ISLIST);
+ FILL_TABLE("Menu/View/HideReadThreads", M_HIDE_READ_THREADS, M_SUMMARY_ISLIST, M_NOT_DRAFT);
+ FILL_TABLE("Menu/View/HideReadMessages", M_HIDE_READ_MSG, M_SUMMARY_ISLIST, M_NOT_DRAFT);
+ FILL_TABLE("Menu/View/HideDelMessages", M_SUMMARY_ISLIST, M_NOT_DRAFT);
FILL_TABLE("Menu/View/Goto/Prev", M_MSG_EXIST);
FILL_TABLE("Menu/View/Goto/Next", M_MSG_EXIST);
FILL_TABLE("Menu/View/Goto/PrevUnread", M_MSG_EXIST);
cm_toggle_menu_set_active_full(mainwin->ui_manager, "Menu/View/ThreadView", (state & main_window_get_mask(M_THREADED, -1)) != 0);
cm_menu_set_sensitive_full(mainwin->ui_manager, "Menu/View/ExpandThreads", (state & main_window_get_mask(M_THREADED, -1)) != 0);
cm_menu_set_sensitive_full(mainwin->ui_manager, "Menu/View/CollapseThreads", (state & main_window_get_mask(M_THREADED, -1)) != 0);
- cm_menu_set_sensitive_full(mainwin->ui_manager, "Menu/View/HideReadThreads", (state & main_window_get_mask(M_THREADED, -1)) != 0);
+ cm_menu_set_sensitive_full(mainwin->ui_manager, "Menu/View/HideReadThreads", (state & main_window_get_mask(M_THREADED, -1)) != 0 && (state & main_window_get_mask(M_NOT_DRAFT, -1)) != 0);
cm_toggle_menu_set_active_full(mainwin->ui_manager, "Menu/View/Quotes/CollapseAll", (prefs_common.hide_quotes == 1));
cm_toggle_menu_set_active_full(mainwin->ui_manager, "Menu/View/Quotes/Collapse2", (prefs_common.hide_quotes == 2));
cm_toggle_menu_set_active_full(mainwin->ui_manager, "Menu/View/Quotes/Collapse3", (prefs_common.hide_quotes == 3));
/*
- * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2013 Hiroyuki Yamamoto and the Claws Mail team
+ * Claws Mail -- a GTK+ based, lightweight, and fast e-mail client
+ * Copyright (C) 1999-2016 Hiroyuki Yamamoto and the Claws Mail team
*
* 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
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
*/
#ifndef __MAINWINDOW_H__
M_HIDE_READ_THREADS,
M_HAVE_RETRIEVABLE_ACCOUNT,
M_HAVE_ANY_RETRIEVABLE_ACCOUNT,
+ M_NOT_DRAFT,
/* reserved */
M_MAX_RESERVED