Re: Balsa programming questions



On Sat, 05 Feb 2000 20:01:04 Matthew Guenther wrote:
> Hi,
> 
> I'm doing some work on Balsa, and I've got a few questions for whoever
> can answer them.
> 
> First, what exactly is the expanded variable in the MailboxNode
> structure used for?  The reason I ask is that the tree expand/collapse
> callbacks appear to be broken, and the only apparent reason for having
> it is to set this flag.  The callbacks are broken (I think) because
> they are taking a GtkCTree, GtkCTreenode, and data pointer as
> arguments, when in actuality it should be a GList instead of a
> treenode.  
> 

$ grep 'expanded' src/*.c
src/balsa-mblist.c:                              mbnode->expanded);
src/balsa-mblist.c:                          mbnode->expanded);
src/balsa-mblist.c:  mbnode->expanded = TRUE;
src/balsa-mblist.c:  mbnode->expanded = FALSE;
src/local-mailbox.c:      tmppath = g_strdup_printf ("%s/.expanded", path);
src/local-mailbox.c:    mbnode->expanded = TRUE;
src/local-mailbox.c:    mbnode->expanded = FALSE;
src/main.c:           if (mbnode->expanded)
!!!src/main.c:               tmpfile = g_strdup_printf ("%s/.expanded", mbnode->name);
!!!src/main.c:               tmpfile = g_strdup_printf ("%s/.expanded", mbnode->name);

I believe we use this to keep the expanded state of mailbox nodes between
sessions... so that if you have a mail subdirectory, it will stay open or
closed between sessions. I'm guessing this, anyway. In this case I do not
believe that the GList vs GtkCTreenode discrepancy matters, although it
should be fixed.

> On a related note, if anyone knows what the GList that gets passed to
> that function is, I can't find any documentation.
> 
> Secondly, I'm wondering about the function "mailbox_have_new_messages"
> in mailbox.c, specifically whether it works on mailboxes other than
> mbox format.  As far as I can tell it doesn't, but I'm not terribly
> well versed in the back-end of balsa.  It'd be useful to have a
> function such as this that can check for the existence of new messages
> without having to look through the whole mailbox.
> 

Balsa's backend is completely not smart about different mailbox formats.
It only works with mbox.

If we wanted to check for new messages the modification time of the file
would be the thing to watch.


==============================
Peter Williams peter@newton.cx



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