FolderViewPopup *fpopup;
GtkItemFactory *fpopup_factory;
GtkWidget *popup;
+ FolderItem *special_trash = NULL;
+ PrefsAccount *ac;
if (!event) return FALSE;
if (fpopup->set_sensitivity != NULL)
fpopup->set_sensitivity(fpopup_factory, item);
- if (item == folder->trash &&
+ if (NULL != (ac = account_find_from_item(item)))
+ special_trash = account_get_special_folder(ac, F_TRASH);
+
+ if ((item == folder->trash || item == special_trash) &&
gtk_item_factory_get_item(fpopup_factory, "/Empty trash...") == NULL) {
gtk_item_factory_create_item(fpopup_factory, &folder_view_trash_popup_entries[0], folderview, 1);
gtk_item_factory_create_item(fpopup_factory, &folder_view_trash_popup_entries[1], folderview, 1);
- } else if (item != folder->trash) {
+ } else if (item != folder->trash && (special_trash == NULL || item != special_trash)) {
gtk_item_factory_delete_entry(fpopup_factory, &folder_view_trash_popup_entries[0]);
gtk_item_factory_delete_entry(fpopup_factory, &folder_view_trash_popup_entries[1]);
}
folderview->selected == folderview->opened);
SET_SENS("/Properties...", item->node->parent != NULL);
SET_SENS("/Processing...", item->node->parent != NULL);
- if (item == folder->trash) {
+ if (item == folder->trash || item == special_trash) {
GSList *msglist = folder_item_get_msg_list(item);
SET_SENS("/Empty trash...", msglist != NULL);
procmsg_msg_list_free(msglist);
{
if (!folderview->opened) return;
- gtkut_ctree_set_focus_row(GTK_CTREE(folderview->ctree),
- folderview->opened);
gtk_ctree_select(GTK_CTREE(folderview->ctree), folderview->opened);
}
gtk_ctree_node_set_row_data(ctree, node, item);
if (normal_style)
gtk_ctree_node_set_row_style(ctree, node, normal_style);
- folderview_sort_folders(folderview, folderview->selected, item->folder);
+ folderview_sort_folders(folderview, parent_node, item->folder);
gtk_clist_thaw(GTK_CLIST(ctree));
}
GSList *mlist = NULL;
GSList *cur = NULL;
if (!folderview->selected) return;
-
+ FolderItem *special_trash = NULL;
+ PrefsAccount *ac;
+
item = gtk_ctree_node_get_row_data(ctree, folderview->selected);
g_return_if_fail(item != NULL);
g_return_if_fail(item->folder != NULL);
- if (item != item->folder->trash) return;
+
+ if (NULL != (ac = account_find_from_item(item)))
+ special_trash = account_get_special_folder(ac, F_TRASH);
+
+ if (item != item->folder->trash && item != special_trash) return;
if (prefs_common.ask_on_clean) {
if (alertpanel(_("Empty trash"),
- _("Empty all messages in trash?"),
+ _("Delete all messages in trash?"),
GTK_STOCK_YES, GTK_STOCK_NO, NULL) != G_ALERTDEFAULT)
return;
}
folderview_sort_folders(folderview,
gtk_ctree_find_by_row_data(GTK_CTREE(folderview->ctree),
- NULL, folder_item_parent(new_folder)), new_folder->folder);
+ NULL, to_folder), new_folder->folder);
folderview_select(folderview, new_folder);
} else {
statusbar_verbosity_set(FALSE);
{
GtkCTree *ctree = GTK_CTREE(folderview->ctree);
FolderItem *item;
+ gchar *id, *title;
if (!folderview->selected) return;
g_return_if_fail(item != NULL);
g_return_if_fail(item->folder != NULL);
- prefs_filtering_open(&item->prefs->processing,
- _("Processing configuration"), NULL, NULL);
+ id = folder_item_get_identifier(item);
+ title = g_strdup_printf (_("Processing configuration for folder %s"), id);
+ g_free (id);
+
+ prefs_filtering_open(&item->prefs->processing, title, NULL, NULL);
+ g_free (title);
}
void folderview_set_target_folder_color(gint color_op)