+2005-09-07 [colin] 1.9.14cvs2
+
+ * src/folderview.c
+ * src/procmsg.c
+ * src/summaryview.c
+ * src/toolbar.c
+ Fix special subfolders:
+ - Inherit parent's icon
+ - sent contents of queues subfolders
+ - empty subfolders of trashes
+ * src/mainwindow.c
+ Remove outdated manual and faq entries
+ * src/common/utils.c
+ Add quotes around %s coming from mailcap
+
2005-09-07 [colin] 1.9.14cvs1
* src/compose.c
( cvs diff -u -r 1.382.2.160 -r 1.382.2.161 src/compose.c; ) > 1.9.13cvs82.patchset
( cvs diff -u -r 1.58.2.11 -r 1.58.2.12 po/de.po; cvs diff -u -r 1.60.2.12 -r 1.60.2.13 po/es.po; cvs diff -u -r 1.1.2.4 -r 1.1.2.5 po/fi.po; cvs diff -u -r 1.42.2.12 -r 1.42.2.13 po/fr.po; cvs diff -u -r 1.1.2.1 -r 1.1.2.2 po/nb.po; cvs diff -u -r 1.50.2.9 -r 1.50.2.10 po/pt_BR.po; cvs diff -u -r 1.17.2.12 -r 1.17.2.13 po/sr.po; ) > 1.9.13cvs83.patchset
( cvs diff -u -r 1.382.2.161 -r 1.382.2.162 src/compose.c; cvs diff -u -r 1.83.2.38 -r 1.83.2.39 src/mimeview.c; cvs diff -u -r 1.36.2.42 -r 1.36.2.43 src/common/utils.c; cvs diff -u -r 1.20.2.23 -r 1.20.2.24 src/common/utils.h; ) > 1.9.14cvs1.patchset
+( cvs diff -u -r 1.207.2.62 -r 1.207.2.63 src/folderview.c; cvs diff -u -r 1.274.2.58 -r 1.274.2.59 src/mainwindow.c; cvs diff -u -r 1.150.2.42 -r 1.150.2.43 src/procmsg.c; cvs diff -u -r 1.395.2.121 -r 1.395.2.122 src/summaryview.c; cvs diff -u -r 1.43.2.23 -r 1.43.2.24 src/toolbar.c; cvs diff -u -r 1.36.2.43 -r 1.36.2.44 src/common/utils.c; ) > 1.9.14cvs2.patchset
MICRO_VERSION=14
INTERFACE_AGE=0
BINARY_AGE=0
-EXTRA_VERSION=1
+EXTRA_VERSION=2
EXTRA_RELEASE=
EXTRA_GTK2_VERSION=
result = g_strdup(trimmed);
g_strfreev(parts);
fclose(fp);
+ if (strstr(result, "%s") && !strstr(result, "'%s'")) {
+ gchar *start = g_strdup(result);
+ gchar *end = g_strdup(strstr(result, "%s")+2);
+ gchar *tmp;
+ *strstr(start, "%s") = '\0';
+ tmp = g_strconcat(start,"'%s'",end, NULL);
+ g_free(start);
+ g_free(end);
+ g_free(result);
+ result = tmp;
+ }
return result;
}
g_strfreev(parts);
}
if (!bold_style) {
- PangoFontDescription *font_desc;
bold_style = gtk_style_copy(gtk_widget_get_style(ctree));
pango_font_description_set_weight
(bold_style->font_desc, PANGO_WEIGHT_BOLD);
gboolean add_sub_match_mark;
gboolean use_bold, use_color;
gint *col_pos = folderview->col_pos;
-
+ SpecialFolderItemType stype;
+
item = gtk_ctree_node_get_row_data(ctree, node);
g_return_if_fail(item != NULL);
mark = (item->marked_msgs != 0);
- switch (item->stype) {
+ stype = item->stype;
+ if (stype == F_NORMAL) {
+ if (folder_has_parent_of_type(item, F_TRASH))
+ stype = F_TRASH;
+ else if (folder_has_parent_of_type(item, F_DRAFT))
+ stype = F_DRAFT;
+ else if (folder_has_parent_of_type(item, F_OUTBOX))
+ stype = F_OUTBOX;
+ else if (folder_has_parent_of_type(item, F_QUEUE))
+ stype = F_QUEUE;
+ }
+ switch (stype) {
case F_INBOX:
if (item->hide_read_msgs) {
xpm = mark?m_inboxhrmxpm:inboxhrmxpm;
if (NULL != (ac = account_find_from_item(item)))
special_trash = account_get_special_folder(ac, F_TRASH);
- if ((item == folder->trash || item == special_trash) &&
+ if ((item == folder->trash || item == special_trash
+ || folder_has_parent_of_type(item, F_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 && (special_trash == NULL || item != special_trash)) {
+ } else if (item != folder->trash && (special_trash == NULL || item != special_trash)
+ && !folder_has_parent_of_type(item, F_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 || item == special_trash) {
+ if (item == folder->trash || item == special_trash
+ || folder_has_parent_of_type(item, F_TRASH)) {
GSList *msglist = folder_item_get_msg_list(item);
SET_SENS("/Empty trash...", msglist != NULL);
procmsg_msg_list_free(msglist);
gchar *text[N_FOLDER_COLS] = {NULL, "0", "0", "0"};
GtkCTreeNode *node, *parent_node;
gint *col_pos = folderview->col_pos;
+ FolderItemUpdateData hookdata;
parent_node = gtk_ctree_find_by_row_data(ctree, NULL, folder_item_parent(item));
if (parent_node == NULL)
gtk_ctree_node_set_row_style(ctree, node, normal_style);
folderview_sort_folders(folderview, parent_node, item->folder);
+ hookdata.item = item;
+ hookdata.update_flags = F_ITEM_UPDATE_NAME;
+ hookdata.msg = NULL;
+ hooks_invoke(FOLDER_ITEM_UPDATE_HOOKLIST, &hookdata);
+
gtk_clist_thaw(GTK_CLIST(ctree));
}
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 (item != item->folder->trash && item != special_trash
+ && !folder_has_parent_of_type(item, F_TRASH)) return;
if (prefs_common.ask_on_clean) {
if (alertpanel(_("Empty trash"),
{N_("/_Help"), NULL, NULL, 0, "<Branch>"},
{N_("/_Help/_Manual (Local)"), NULL, manual_open_cb, MANUAL_MANUAL_LOCAL, NULL},
- {N_("/_Help/Ma_nual (Sylpheed Doc Homepage)"),
- NULL, manual_open_cb, MANUAL_MANUAL_SYLDOC, NULL},
{N_("/_Help/_FAQ (Local)"), NULL, manual_open_cb, MANUAL_FAQ_LOCAL, NULL},
- {N_("/_Help/FA_Q (Sylpheed Doc Homepage)"),
- NULL, manual_open_cb, MANUAL_FAQ_SYLDOC, NULL},
- {N_("/_Help/_Claws FAQ (Claws Documentation)"),
+ {N_("/_Help/_User-contributed FAQ (Online)"),
NULL, manual_open_cb, MANUAL_FAQ_CLAWS, NULL},
{N_("/_Help/---"), NULL, NULL, 0, "<Separator>"},
{N_("/_Help/_About"), NULL, about_show, 0, NULL}
void main_window_empty_trash(MainWindow *mainwin, gboolean confirm)
{
- GList *list;
- guint has_trash;
- Folder *folder;
-
- for (has_trash = 0, list = folder_get_list(); list != NULL; list = list->next) {
- folder = FOLDER(list->data);
- if (folder && folder->trash && folder->trash->total_msgs > 0)
- has_trash++;
- if (folder->account && folder->account->set_trash_folder &&
- folder_find_item_from_identifier(folder->account->trash_folder))
- has_trash++;
- }
-
- if (!has_trash) return;
-
if (confirm) {
if (alertpanel(_("Empty trash"),
_("Delete all messages in trash folders?"),
void procmsg_empty_trash(FolderItem *trash)
{
+ GNode *node, *next;
+
+ if (!trash ||
+ (trash->stype != F_TRASH &&
+ !folder_has_parent_of_type(trash, F_TRASH)))
+ return;
+
if (trash && trash->total_msgs > 0) {
GSList *mlist = folder_item_get_msg_list(trash);
GSList *cur;
g_slist_free(mlist);
folder_item_remove_all_msg(trash);
}
+
+ if (!trash->node || !trash->node->children)
+ return;
+
+ node = trash->node->children;
+ while (node != NULL) {
+ next = node->next;
+ procmsg_empty_trash(FOLDER_ITEM(node->data));
+ node = next;
+ }
}
void procmsg_empty_all_trash(void)
cur = orig;
while (cur) {
gchar *file = NULL;
- PrefsAccount *ac = procmsg_get_account_from_file(file);
+ PrefsAccount *ac = NULL;
msg = (MsgInfo *)cur->data;
file = folder_item_fetch_msg(queue, msg->msgnum);
+ ac = procmsg_get_account_from_file(file);
g_free(file);
if (last_account == NULL || (ac != NULL && ac == last_account)) {
gint sent = 0, err = 0;
GSList *list, *elem;
GSList *sorted_list = NULL;
+ GNode *node, *next;
if (!queue)
queue = folder_get_default_queue();
}
g_slist_free(sorted_list);
+ folder_item_scan(queue);
+
+ if (queue->node && queue->node->children) {
+ node = queue->node->children;
+ while (node != NULL) {
+ int res = 0;
+ next = node->next;
+ res = procmsg_send_queue(FOLDER_ITEM(node->data), save_msgs);
+ if (res < 0)
+ err = -res;
+ else
+ sent += res;
+ node = next;
+ }
+ }
return (err != 0 ? -err : sent);
}
list = folder_item_get_msg_list(queue);
res = (list == NULL);
procmsg_msg_list_free(list);
+
+ if (res == TRUE) {
+ GNode *node, *next;
+ if (queue->node && queue->node->children) {
+ node = queue->node->children;
+ while (node != NULL) {
+ next = node->next;
+ if (!procmsg_queue_is_empty(FOLDER_ITEM(node->data)))
+ return FALSE;
+ node = next;
+ }
+ }
+ }
return res;
}
void summary_select_next_unread(SummaryView *summaryview)
{
GtkCTreeNode *node = summaryview->selected;
- GtkCTree *ctree = GTK_CTREE(summaryview->ctree);
gboolean skip_cur = FALSE;
if (summaryview->displayed
void summary_select_next_new(SummaryView *summaryview)
{
GtkCTreeNode *node = summaryview->selected;
- GtkCTree *ctree = GTK_CTREE(summaryview->ctree);
gboolean skip_cur = FALSE;
if (summaryview->displayed
if (to_folder == NULL)
to_folder = summaryview->folder_item->folder->trash;
- if (to_folder == NULL || to_folder == summaryview->folder_item)
+ if (to_folder == NULL || to_folder == summaryview->folder_item
+ || folder_has_parent_of_type(summaryview->folder_item, F_TRASH))
summary_delete(summaryview);
else
summary_move_selected_to(summaryview, to_folder);
prefs_common.savemsg) < 0)
alertpanel_error(_("Some errors occurred while "
"sending queued messages."));
- folder_item_scan(folder->queue);
}
}
}