#define SET_SENS(name, sens) \
menu_set_sensitive(fpopup_factory, name, sens)
+ SET_SENS("/Download messages", !item->no_select);
SET_SENS("/Mark all read", item->unread_msgs >= 1);
SET_SENS("/Search folder...", item->total_msgs >= 1 &&
folderview->selected == folderview->opened);
SET_SENS("/Run processing rules", item->prefs->processing &&
item->total_msgs >= 1);
- SET_SENS("/Properties...", TRUE);
- SET_SENS("/Processing...", item->node->parent != NULL);
+ SET_SENS("/Properties...", !item->no_select);
+ SET_SENS("/Processing...", item->node->parent != NULL && !item->no_select);
if (item == folder->trash || item == special_trash
|| folder_has_parent_of_type(item, F_TRASH)) {
GSList *msglist = folder_item_get_msg_list(item);
return;
}
item = gtk_ctree_node_get_row_data(ctree, row);
- if (!item || item->no_select) {
+ if (!item) {
END_TIMING();
folderview->open_folder = FALSE;
return;
}
/* Open Folder */
+ /* TODO: wwp: avoid displaying (null) in the status bar */
buf = g_strdup_printf(_("Opening Folder %s..."), item->path ?
item->path : "(null)");
debug_print("%s\n", buf);
main_window_cursor_wait(folderview->mainwin);
res = folder_item_open(item);
- if (res == -1) {
+ if (res == -1 && item->no_select == FALSE) {
main_window_cursor_normal(folderview->mainwin);
STATUSBAR_POP(folderview->mainwin);
can_select = TRUE;
END_TIMING();
return;
- } else if (res == -2) {
+ } else if (res == -2 && item->no_select == FALSE) {
PostponedSelectData *data = g_new0(PostponedSelectData, 1);
data->ctree = ctree;
data->row = row;
if (prefs_common.warn_dnd) {
buf = g_strdup_printf(copy ? _("Do you really want to copy folder '%s' in '%s' ?"):
- _("Do you really want to make folder '%s' a sub-folder of '%s' ?"),
+ _("Do you really want to make folder '%s' a subfolder of '%s' ?"),
from_folder->name, to_folder->name);
status = alertpanel_full(copy ? _("Copy folder"):_("Move folder"), buf,
GTK_STOCK_NO, GTK_STOCK_YES, NULL, TRUE,
item = gtk_ctree_node_get_row_data(GTK_CTREE(widget), node);
src_item = folderview->summaryview->folder_item;
+ if (item->no_select) {
+ alertpanel_error(_("The destination folder can only be used to "
+ "store subfolders."));
+ return;
+ }
/* re-check (due to acceptable possibly set for folder moves */
if (!(item && item->folder && item->path && !item->no_select &&
src_item && src_item != item && FOLDER_CLASS(item->folder)->copy_msg != NULL)) {
!folder_has_parent_of_type(src_item, F_DRAFT) &&
!folder_has_parent_of_type(src_item, F_QUEUE) &&
!folder_has_parent_of_type(src_item, F_TRASH);
- if (!item || item->no_select || !src_item
- || !folder_is_normal) {
+ if (!item || !src_item || !folder_is_normal) {
gtk_drag_finish(drag_context, FALSE, FALSE, time);
return;
}