2005-05-10 [colin] 1.9.9cvs1

* src/folderview.c
	* src/summaryview.c
		Try to fix bolding bugs again.
This commit is contained in:
Colin Leroy 2005-05-10 17:18:39 +00:00
parent 51bd82c7af
commit 25ac965717
5 changed files with 86 additions and 129 deletions

View file

@ -1,3 +1,9 @@
2005-05-10 [colin] 1.9.9cvs1
* src/folderview.c
* src/summaryview.c
Try to fix bolding bugs again.
2005-05-09 [paul]
* tools/claws.i18n.status.pl

View file

@ -475,3 +475,4 @@
( cvs diff -u -r 1.1.2.6 -r 1.1.2.7 src/imap_gtk.c; cvs diff -u -r 1.149.2.23 -r 1.149.2.24 src/inc.c; cvs diff -u -r 1.274.2.37 -r 1.274.2.38 src/mainwindow.c; cvs diff -u -r 1.2.2.5 -r 1.2.2.6 src/mh_gtk.c; cvs diff -u -r 1.43.2.16 -r 1.43.2.17 src/toolbar.c; ) > 1.9.6cvs56.patchset
( cvs diff -u -r 1.14.2.8 -r 1.14.2.9 src/grouplistdialog.c; ) > 1.9.6cvs57.patchset
( cvs diff -u -r 1.100.2.17 -r 1.100.2.18 AUTHORS; cvs diff -u -r 1.29.2.5 -r 1.29.2.6 INSTALL; cvs diff -u -r 1.24.2.7 -r 1.24.2.8 Makefile.am; cvs diff -u -r 1.37.2.2 -r 1.37.2.3 README.claws; cvs diff -u -r 0 -r 1 RELEASE_NOTES.claws; cvs diff -u -r 1.654.2.510 -r 1.654.2.511 configure.ac; cvs diff -u -r 1.6.2.5 -r 1.6.2.6 po/Makefile.in.in; cvs diff -u -r 0 -r 1 po/ca.po; cvs diff -u -r 1.58.2.8 -r 1.58.2.9 po/de.po; cvs diff -u -r 1.60.2.9 -r 1.60.2.10 po/es.po; cvs diff -u -r 0 -r 1 po/fi.po; cvs diff -u -r 1.42.2.9 -r 1.42.2.10 po/fr.po; cvs diff -u -r 1.34.2.8 -r 1.34.2.9 po/it.po; cvs diff -u -r 1.10.2.6 -r 1.10.2.7 po/pl.po; cvs diff -u -r 1.17.2.8 -r 1.17.2.9 po/ru.po; cvs diff -u -r 1.2.2.10 -r 1.2.2.11 po/sk.po; cvs diff -u -r 1.17.2.10 -r 1.17.2.11 po/sr.po; cvs diff -u -r 1.5.2.6 -r 1.5.2.7 po/zh_CN.po; cvs diff -u -r 1.115.2.32 -r 1.115.2.33 src/main.c; cvs diff -u -r 1.1.2.5 -r 1.1.2.6 src/partial_download.c; ) > 1.9.6cvs58.patchset
( cvs diff -u -r 1.207.2.32 -r 1.207.2.33 src/folderview.c; cvs diff -u -r 1.395.2.67 -r 1.395.2.68 src/summaryview.c; ) > 1.9.9cvs1.patchset

View file

@ -11,7 +11,7 @@ MINOR_VERSION=9
MICRO_VERSION=9
INTERFACE_AGE=0
BINARY_AGE=0
EXTRA_VERSION=0
EXTRA_VERSION=1
EXTRA_RELEASE=
EXTRA_GTK2_VERSION=

View file

@ -901,138 +901,75 @@ void folderview_check_new_all(void)
inc_unlock();
}
static gboolean folderview_search_new_recursive(GtkCTree *ctree,
GtkCTreeNode *node)
{
FolderItem *item;
if (node) {
item = gtk_ctree_node_get_row_data(ctree, node);
if (item) {
if (item->new_msgs > 0 ||
(item->stype == F_QUEUE && item->total_msgs > 0))
return TRUE;
}
node = GTK_CTREE_ROW(node)->children;
} else
node = GTK_CTREE_NODE(GTK_CLIST(ctree)->row_list);
while (node) {
if (folderview_search_new_recursive(ctree, node) == TRUE)
return TRUE;
node = GTK_CTREE_ROW(node)->sibling;
}
return FALSE;
}
static gboolean folderview_have_new_children(FolderView *folderview,
GtkCTreeNode *node)
FolderItem *item)
{
GtkCTree *ctree = GTK_CTREE(folderview->ctree);
GNode *node = item->folder->node;
node = g_node_find(node, G_PRE_ORDER, G_TRAVERSE_ALL, item);
node = node->children;
if (!node)
node = GTK_CTREE_NODE(GTK_CLIST(ctree)->row_list);
if (!node)
return FALSE;
node = GTK_CTREE_ROW(node)->children;
while (node) {
if (folderview_search_new_recursive(ctree, node) == TRUE)
return TRUE;
node = GTK_CTREE_ROW(node)->sibling;
if (item->unread_msgs > 0 ||
(item->stype == F_QUEUE && item->total_msgs > 0)){
return TRUE;
}
return FALSE;
}
static gboolean folderview_search_unread_recursive(GtkCTree *ctree,
GtkCTreeNode *node)
{
FolderItem *item;
if (node) {
item = gtk_ctree_node_get_row_data(ctree, node);
if (item) {
if (item->unread_msgs > 0 ||
(item->stype == F_QUEUE && item->total_msgs > 0))
while (node != NULL) {
if (node && node->data) {
FolderItem *next_item = (FolderItem*) node->data;
node = node->next;
if (folderview_have_new_children(folderview, next_item))
return TRUE;
}
node = GTK_CTREE_ROW(node)->children;
} else
node = GTK_CTREE_NODE(GTK_CLIST(ctree)->row_list);
while (node) {
if (folderview_search_unread_recursive(ctree, node) == TRUE)
return TRUE;
node = GTK_CTREE_ROW(node)->sibling;
}
return FALSE;
}
static gboolean folderview_have_unread_children(FolderView *folderview,
GtkCTreeNode *node)
FolderItem *item)
{
GtkCTree *ctree = GTK_CTREE(folderview->ctree);
GNode *node = item->folder->node;
node = g_node_find(node, G_PRE_ORDER, G_TRAVERSE_ALL, item);
node = node->children;
if (!node)
node = GTK_CTREE_NODE(GTK_CLIST(ctree)->row_list);
if (!node)
return FALSE;
node = GTK_CTREE_ROW(node)->children;
while (node) {
if (folderview_search_unread_recursive(ctree, node) == TRUE)
return TRUE;
node = GTK_CTREE_ROW(node)->sibling;
if (item->unread_msgs > 0 ||
(item->stype == F_QUEUE && item->total_msgs > 0)){
return TRUE;
}
return FALSE;
}
static gboolean folderview_search_matching_recursive(GtkCTree *ctree,
GtkCTreeNode *node)
{
FolderItem *item;
if (node) {
item = gtk_ctree_node_get_row_data(ctree, node);
if (item) {
if (item->search_match)
while (node != NULL) {
if (node && node->data) {
FolderItem *next_item = (FolderItem*) node->data;
node = node->next;
if (folderview_have_unread_children(folderview, next_item))
return TRUE;
}
node = GTK_CTREE_ROW(node)->children;
} else
node = GTK_CTREE_NODE(GTK_CLIST(ctree)->row_list);
while (node) {
if (folderview_search_matching_recursive(ctree, node) == TRUE)
return TRUE;
node = GTK_CTREE_ROW(node)->sibling;
}
return FALSE;
}
static gboolean folderview_have_matching_children(FolderView *folderview,
GtkCTreeNode *node)
FolderItem *item)
{
GtkCTree *ctree = GTK_CTREE(folderview->ctree);
GNode *node = item->folder->node;
node = g_node_find(node, G_PRE_ORDER, G_TRAVERSE_ALL, item);
node = node->children;
if (!node)
node = GTK_CTREE_NODE(GTK_CLIST(ctree)->row_list);
if (!node)
return FALSE;
if (item->search_match){
return TRUE;
}
node = GTK_CTREE_ROW(node)->children;
while (node) {
if (folderview_search_matching_recursive(ctree, node) == TRUE)
return TRUE;
node = GTK_CTREE_ROW(node)->sibling;
while (node != NULL) {
if (node && node->data) {
FolderItem *next_item = (FolderItem*) node->data;
node = node->next;
if (folderview_have_matching_children(folderview, next_item))
return TRUE;
}
}
return FALSE;
@ -1134,9 +1071,9 @@ static void folderview_update_node(FolderView *folderview, GtkCTreeNode *node)
if (!GTK_CTREE_ROW(node)->expanded) {
add_unread_mark = folderview_have_unread_children(
folderview, node);
folderview, item);
add_sub_match_mark = folderview_have_matching_children(
folderview, node);
folderview, item);
} else {
add_unread_mark = FALSE;
add_sub_match_mark = FALSE;
@ -1207,7 +1144,7 @@ static void folderview_update_node(FolderView *folderview, GtkCTreeNode *node)
use_color =
(item->new_msgs > 0) ||
(add_unread_mark &&
folderview_have_new_children(folderview, node));
folderview_have_new_children(folderview, item));
}
gtk_ctree_node_set_foreground(ctree, node, NULL);

View file

@ -964,7 +964,6 @@ gboolean summary_show(SummaryView *summaryview, FolderItem *item)
create the thread */
summary_set_ctree_from_list(summaryview, mlist);
g_slist_free(mlist);
gtk_clist_thaw(GTK_CLIST(ctree));
@ -2138,6 +2137,9 @@ static void summary_set_ctree_from_list(SummaryView *summaryview,
_("Setting summary from message data..."));
gdk_flush();
g_signal_handlers_block_by_func(G_OBJECT(ctree),
G_CALLBACK(summary_tree_expanded), summaryview);
msgid_table = g_hash_table_new(g_str_hash, g_str_equal);
summaryview->msgid_table = msgid_table;
subject_table = g_hash_table_new(g_str_hash, g_str_equal);
@ -2215,6 +2217,19 @@ static void summary_set_ctree_from_list(SummaryView *summaryview,
}
summary_sort(summaryview, summaryview->sort_key, summaryview->sort_type);
node = GTK_CTREE_NODE(GTK_CLIST(ctree)->row_list);
while (prefs_common.bold_unread && node) {
GtkCTreeNode *next = GTK_CTREE_NODE_NEXT(node);
if (GTK_CTREE_ROW(node)->children)
summary_set_row_marks(summaryview, node);
node = next;
}
g_signal_handlers_unblock_by_func(G_OBJECT(ctree),
G_CALLBACK(summary_tree_expanded), summaryview);
}
static gchar *summary_complete_address(const gchar *addr)
@ -2573,7 +2588,6 @@ static gboolean summary_have_unread_children(SummaryView *summaryview,
return TRUE;
node = GTK_CTREE_ROW(node)->sibling;
}
return FALSE;
}
@ -3711,16 +3725,6 @@ void summary_thread_build(SummaryView *summaryview)
node = next;
}
node = GTK_CTREE_NODE(GTK_CLIST(ctree)->row_list);
while (node) {
next = GTK_CTREE_NODE_NEXT(node);
if (prefs_common.bold_unread &&
GTK_CTREE_ROW(node)->children)
summary_set_row_marks(summaryview, node);
node = next;
}
gtkut_ctree_set_focus_row(ctree, summaryview->selected);
gtk_clist_thaw(GTK_CLIST(ctree));
@ -3743,20 +3747,17 @@ static void summary_thread_init(SummaryView *summaryview)
GtkCTreeNode *next;
if (!summaryview->thread_collapsed) {
g_signal_handlers_block_by_func(G_OBJECT(ctree),
G_CALLBACK(summary_tree_expanded), summaryview);
while (node) {
next = GTK_CTREE_ROW(node)->sibling;
if (GTK_CTREE_ROW(node)->children)
gtk_ctree_expand_recursive(ctree, node);
node = next;
}
} else if (prefs_common.bold_unread) {
while (node) {
next = GTK_CTREE_ROW(node)->sibling;
if (GTK_CTREE_ROW(node)->children)
summary_set_row_marks(summaryview, node);
node = next;
}
}
g_signal_handlers_unblock_by_func(G_OBJECT(ctree),
G_CALLBACK(summary_tree_expanded), summaryview);
}
}
void summary_unthread(SummaryView *summaryview)
@ -3865,15 +3866,21 @@ void summary_expand_threads(SummaryView *summaryview)
GtkCTree *ctree = GTK_CTREE(summaryview->ctree);
GtkCTreeNode *node = GTK_CTREE_NODE(GTK_CLIST(ctree)->row_list);
g_signal_handlers_block_by_func(G_OBJECT(ctree),
G_CALLBACK(summary_tree_expanded), summaryview);
gtk_clist_freeze(GTK_CLIST(ctree));
while (node) {
if (GTK_CTREE_ROW(node)->children)
if (GTK_CTREE_ROW(node)->children) {
gtk_ctree_expand(ctree, node);
summary_set_row_marks(summaryview, node);
}
node = GTK_CTREE_NODE_NEXT(node);
}
gtk_clist_thaw(GTK_CLIST(ctree));
g_signal_handlers_unblock_by_func(G_OBJECT(ctree),
G_CALLBACK(summary_tree_expanded), summaryview);
summaryview->thread_collapsed = FALSE;
@ -4547,6 +4554,12 @@ static void summary_tree_expanded(GtkCTree *ctree, GtkCTreeNode *node,
SummaryView *summaryview)
{
summary_set_row_marks(summaryview, node);
while (prefs_common.bold_unread && node) {
GtkCTreeNode *next = GTK_CTREE_NODE_NEXT(node);
if (GTK_CTREE_ROW(node)->children)
summary_set_row_marks(summaryview, node);
node = next;
}
}
static void summary_tree_collapsed(GtkCTree *ctree, GtkCTreeNode *node,