2005-08-08 [colin] 1.9.13cvs25
* src/folder.c * src/folder.h Cache parents' type to make folder_has_parent_of_type faster * src/folderview.c Forbid DnD of special sub-folders * src/procmsg.c * src/procmsg.h Add MAIL_POSTFILTERING_HOOK * src/summaryview.c Revert over-zealous deletion of the use_addr_book code
This commit is contained in:
parent
a2501bcf33
commit
6f73f6f5da
9 changed files with 72 additions and 6 deletions
|
@ -1,3 +1,18 @@
|
|||
2005-08-08 [colin] 1.9.13cvs25
|
||||
|
||||
* src/folder.c
|
||||
* src/folder.h
|
||||
Cache parents' type to make folder_has_parent_of_type
|
||||
faster
|
||||
* src/folderview.c
|
||||
Forbid DnD of special sub-folders
|
||||
* src/procmsg.c
|
||||
* src/procmsg.h
|
||||
Add MAIL_POSTFILTERING_HOOK
|
||||
* src/summaryview.c
|
||||
Revert over-zealous deletion of the use_addr_book
|
||||
code
|
||||
|
||||
2005-08-07 [colin] 1.9.13cvs24
|
||||
|
||||
* src/folder.c
|
||||
|
|
|
@ -710,3 +710,4 @@
|
|||
( cvs diff -u -r 1.60.2.23 -r 1.60.2.24 src/addressbook.c; ) > 1.9.13cvs22.patchset
|
||||
( cvs diff -u -r 1.382.2.148 -r 1.382.2.149 src/compose.c; cvs diff -u -r 1.213.2.45 -r 1.213.2.46 src/folder.c; cvs diff -u -r 1.87.2.14 -r 1.87.2.15 src/folder.h; cvs diff -u -r 1.26.2.18 -r 1.26.2.19 src/foldersel.c; cvs diff -u -r 1.3.2.5 -r 1.3.2.6 src/folderutils.c; cvs diff -u -r 1.207.2.53 -r 1.207.2.54 src/folderview.c; cvs diff -u -r 1.179.2.57 -r 1.179.2.58 src/imap.c; cvs diff -u -r 1.274.2.52 -r 1.274.2.53 src/mainwindow.c; cvs diff -u -r 1.94.2.60 -r 1.94.2.61 src/messageview.c; cvs diff -u -r 1.79.2.15 -r 1.79.2.16 src/mh.c; cvs diff -u -r 1.16.2.23 -r 1.16.2.24 src/msgcache.c; cvs diff -u -r 1.49.2.52 -r 1.49.2.53 src/procmime.c; cvs diff -u -r 1.395.2.105 -r 1.395.2.106 src/summaryview.c; ) > 1.9.13cvs23.patchset
|
||||
( cvs diff -u -r 1.213.2.46 -r 1.213.2.47 src/folder.c; ) > 1.9.13cvs24.patchset
|
||||
( cvs diff -u -r 1.213.2.47 -r 1.213.2.48 src/folder.c; cvs diff -u -r 1.87.2.15 -r 1.87.2.16 src/folder.h; cvs diff -u -r 1.207.2.54 -r 1.207.2.55 src/folderview.c; cvs diff -u -r 1.150.2.33 -r 1.150.2.34 src/procmsg.c; cvs diff -u -r 1.60.2.13 -r 1.60.2.14 src/procmsg.h; cvs diff -u -r 1.395.2.106 -r 1.395.2.107 src/summaryview.c; cvs diff -u -r 1.8.2.4 -r 1.8.2.5 src/plugins/Makefile.am; ) > 1.9.13cvs25.patchset
|
||||
|
|
|
@ -11,7 +11,7 @@ MINOR_VERSION=9
|
|||
MICRO_VERSION=13
|
||||
INTERFACE_AGE=0
|
||||
BINARY_AGE=0
|
||||
EXTRA_VERSION=24
|
||||
EXTRA_VERSION=25
|
||||
EXTRA_RELEASE=
|
||||
EXTRA_GTK2_VERSION=
|
||||
|
||||
|
|
|
@ -3560,8 +3560,10 @@ gboolean folder_has_parent_of_type(FolderItem *item,
|
|||
{
|
||||
FolderItem *cur = item;
|
||||
while (cur) {
|
||||
if (cur->stype == type)
|
||||
if (cur->stype == type || cur->parent_stype == type) {
|
||||
item->parent_stype == type;
|
||||
return TRUE;
|
||||
}
|
||||
cur = folder_item_parent(cur);
|
||||
}
|
||||
return FALSE;
|
||||
|
|
|
@ -623,6 +623,9 @@ struct _FolderItem
|
|||
gpointer data;
|
||||
|
||||
FolderItemPrefs * prefs;
|
||||
|
||||
/* for faster search of special parents */
|
||||
SpecialFolderItemType parent_stype;
|
||||
};
|
||||
|
||||
struct _PersistPrefs
|
||||
|
|
|
@ -2376,6 +2376,7 @@ static void folderview_drag_received_cb(GtkWidget *widget,
|
|||
} else {
|
||||
/* comes from folderview */
|
||||
char *source;
|
||||
gboolean folder_is_normal = TRUE;
|
||||
|
||||
source = data->data + 17;
|
||||
if (gtk_clist_get_selection_info
|
||||
|
@ -2388,7 +2389,15 @@ static void folderview_drag_received_cb(GtkWidget *widget,
|
|||
item = gtk_ctree_node_get_row_data(GTK_CTREE(widget), node);
|
||||
src_item = folder_find_item_from_identifier(source);
|
||||
|
||||
if (!item || item->no_select || !src_item || src_item->stype != F_NORMAL) {
|
||||
folder_is_normal =
|
||||
src_item != NULL &&
|
||||
src_item->stype == F_NORMAL &&
|
||||
!folder_has_parent_of_type(src_item, F_OUTBOX) &&
|
||||
!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) {
|
||||
gtk_drag_finish(drag_context, FALSE, FALSE, time);
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -1856,6 +1856,8 @@ gboolean procmsg_msginfo_filter(MsgInfo *msginfo)
|
|||
if((filtering_rules != NULL) &&
|
||||
filter_message_by_msginfo(filtering_rules, msginfo))
|
||||
return TRUE;
|
||||
|
||||
hooks_invoke(MAIL_POSTFILTERING_HOOKLIST, msginfo);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
|
|
@ -147,6 +147,7 @@ typedef guint32 MsgTmpFlags;
|
|||
|
||||
#define MSGINFO_UPDATE_HOOKLIST "msginfo_update"
|
||||
#define MAIL_FILTERING_HOOKLIST "mail_filtering_hooklist"
|
||||
#define MAIL_POSTFILTERING_HOOKLIST "mail_postfiltering_hooklist"
|
||||
|
||||
typedef enum {
|
||||
MSGINFO_UPDATE_FLAGS = 1 << 0,
|
||||
|
|
|
@ -2286,6 +2286,31 @@ static void summary_set_ctree_from_list(SummaryView *summaryview,
|
|||
END_TIMING();
|
||||
}
|
||||
|
||||
static gchar *summary_complete_address(const gchar *addr)
|
||||
{
|
||||
gint count;
|
||||
gchar *res, *tmp, *email_addr;
|
||||
|
||||
if (addr == NULL)
|
||||
return NULL;
|
||||
|
||||
Xstrdup_a(email_addr, addr, return NULL);
|
||||
extract_address(email_addr);
|
||||
g_return_val_if_fail(*email_addr, NULL);
|
||||
|
||||
/*
|
||||
* completion stuff must be already initialized
|
||||
*/
|
||||
res = NULL;
|
||||
if (1 < (count = complete_address(email_addr))) {
|
||||
tmp = get_complete_address(1);
|
||||
res = procheader_get_fromname(tmp);
|
||||
g_free(tmp);
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
static void summary_set_header(SummaryView *summaryview, gchar *text[],
|
||||
MsgInfo *msginfo)
|
||||
{
|
||||
|
@ -2313,9 +2338,17 @@ static void summary_set_header(SummaryView *summaryview, gchar *text[],
|
|||
else
|
||||
text[col_pos[S_COL_DATE]] = _("(No Date)");
|
||||
|
||||
text[col_pos[S_COL_FROM]] = msginfo->fromname ? msginfo->fromname :
|
||||
_("(No From)");
|
||||
text[col_pos[S_COL_TO]] = msginfo->to ? msginfo->to :
|
||||
if (!prefs_common.use_addr_book) {
|
||||
text[col_pos[S_COL_FROM]] = msginfo->fromname ?
|
||||
msginfo->fromname :
|
||||
_("(No From)");
|
||||
} else {
|
||||
gchar *tmp = summary_complete_address(msginfo->fromname);
|
||||
text[col_pos[S_COL_FROM]] = tmp ? tmp : (msginfo->fromname ?
|
||||
msginfo->fromname:
|
||||
_("(No From)"));
|
||||
}
|
||||
text[col_pos[S_COL_TO]] = msginfo->to ? msginfo->to :
|
||||
_("(No Recipient)");
|
||||
|
||||
if (msginfo->folder && msginfo->folder->folder)
|
||||
|
|
Loading…
Reference in a new issue