Re: displaying the next unread in a collapsed subtree after delete of its root



On 2001.11.01 16:50 Willem Riede wrote:
> When balsa displays the root message of a collapsed thread subtree
> which has other unread messages in it, and you hit delete, the next
> message balsa selects to preview, is not in that subtree.
> 
> I believe it should be. To make it so, I think I need something like
> 
>   		enable_empty_trash(TRASH_CHECK);
>   	}
>   	g_list_free(messages);
>       }
>             /* select another message depending on where we are in 
> the list */
>       if (GTK_CLIST(index->ctree)->rows > message_count) {
> !         if (select_next) {
> !             /* if this is the root of a collapsed (sub)tree expand 
> before anything else */
> !             gtk_ctree_expand( <TREE> , <NODE> );
>               balsa_index_select_next(index);
> ! 	} else
>               balsa_index_select_previous(index);
>       }       /* sync with backend AFTER adjacent message is selected.
>          Update the style and message counts in the mailbox list */
>       libbalsa_mailbox_sync_backend(index->mailbox_node->mailbox);
> 
> in do_delete() in balsa_index.c, but I don't know enough about gtk to
> get this right. Can anybody help me?
> 
> Thanks. WIllem Riede.

Hi Willem!

I'm working on replacements for all of the select_* functions, as there 
are more problems than this!

If you delete or move several messages, and any is the head of a 
collapsed (sub)thread, the focus should stay on the soon-to-be-viewable 
message.

If you select a message in a thread and then close the thread, the 
current code doesn't see anything selected, so `next' and `previous' 
fall back on the default (first message in the mailbox)--I think this 
too needs fixing.

If you open a mailbox with new mail below the head of a thread, the 
index doesn't open with the head (or the message) visible--I have a fix 
that will expose and select the new mail if preferred, and make the 
head visible otherwise.

The problem is that the current code casts the GtkCTree as a GtkCList 
to search it, and this ignores unviewable messages.  It's all fixable, 
but it's taking me a while to get it ready for prime time (well, at 
least ready for cvs!).

Peter



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]