On Mon, 23 Jun 2003 09:47:42 +0200 Xavier Nodet <[EMAIL PROTECTED]> wrote:

> On Sat, 21 Jun 2003 20:35:46 +1000 (E. Australia Standard Time) Mark
> Livingstone <[EMAIL PROTECTED]> wrote:
> 
> > <renaming folder leaves stale filters>
> 
> Such a code already exists but is only used when moving a folder (menu
> entry Folder->Move) in the tree, and is most probably still buggy.
> However, the needs are the same, so this code should be used when
> renaming the folders too.

I looked at renaming code and IMHO it isn't the right thing and it will
never be. I just don't like the idea that whenever I add some control
with folder name, I have to add renaming code too. The usual solution to
renaming vs. references problem is to use identifiers. Renaming is then
done by pointing the identifier to another location and all references
to the identifier can be left intact.

Now the question is how to fit identifiers into Mahogany. Using
generated numbers looks ugly in configuration file. Instead, the first
name/location that was assigned to folder should be used. Everything is
the same until renaming. When renaming, both first name and new name are
stored in configuration file. All folder references are done through
function/object that understands renaming.

More specifically, when fodler is moved, instead of physically moving
all properties, it gets MovedTo=<new location> property. To make
enumerating subfolders easy, the [<new location>] folder is actually
created, but it has only MovedFrom=<identifier> property. With careful
coding, cyclic renaming and special cases can be handled. I don't yet
understand how exactly are folder properties looked up but it seems to
me that adding MovedFrom/MovedTo handler as a layer under 
ProfileImpl::readEntry would do most of the work.

The whole thing is a bit complicated as there are many names: name in
folder tree, physical folder name, references, Imap server folder, and
now the identifier. However, I really think that identifiers are
necessary when we cannot reliably enumerate all references.



-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100006ave/direct;at.asp_061203_01/01
_______________________________________________
Mahogany-Developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/mahogany-developers

Reply via email to