On Fri, 13 Dec 2002 10:37:03 +0100 Xavier Nodet <[EMAIL PROTECTED]> wrote:

XN> > How to do it withotu duplicating the code is a good
XN> > question however.
XN> 
XN> I don't really think that there is so much duplicated code...
XN> VerifySignature and VerifyDetachedSignature share ExecCommand. Finding
XN> if the message is signed, and which parts to feed GPG with, is obviously
XN> not the same for PGP/MIME and ASCII Armor.

 Right.

XN> The only thing that should be common but is not at this time is what we
XN> do after the checking: displaying the result. I will try to devise a way
XN> to share this code.

 Yes, this is exactly what I was referring to above.

XN> Some virtual MessageViewer::displaySignedPart(), to which would be
XN> given all the necessary stuff to know what to do exactly?

 I wonder if this shouldn't go into PGPEngine itself? The rationale is that
I'd like to keep the code modular (in literal sense of the word: all PGP
code should live in the modules) and would like to avoid putting PGP logic
directly into MessageView (BTW, I assume you meant MessageView and not
MessageViewer above as MessageViewer is just an interface so we can't put
anything there and duplicating code in all viewer doesn't make sense, does
it?).

XN> >  It would be nice but I don't really know how to do it... Of course, we can
XN> > have the pure virtual StartBox()/EndBox() in the viewer class -- this
XN> > doesn't cost much. But how to implement them?
XN> 
XN> Something like this, perhaps...
...

 If you can make this work I don't have objections, of course. But I think
I can propose something simpler: what if we had a margin, i.e. a vertical
column on the left of the window in which we'd simply display a vertical
line for the entire extent of the signed text? This seems simpler than
drawing boxes in the viewer itself (although it's still not trivial as we
should be able to find the extent of the text...) and we could also in the
future use this margin for indicating the quote level (I believe Eudora
does it like this) and maybe something more...

XN> > XN> This seems to me particularly important for MIME messages: attachements
XN> > XN> can be signed or not: this should be prominent.
XN> 
XN> >  We could include the list of signed message parts in the "details" window
XN> > of the PGP signature.
XN> 
XN> This will not do for ASCII armor, where it will not be easy to state
XN> exactly where the signed text starts and end. BTW, ASCII armor signature
XN> detection code could (should?) be recursive...

 If it should, this is not difficult to do.

XN> >  It might be not or it might be, but M startup time is already quite long
XN> 
XN> Actually, I do not start M so often! ;)  It is rather always on...

 Me neither -- I'm even running an old version simply because I hadn't
restarted it yet after the latest changes :-)

XN> > Someone has to delete this pointer [to the PGPEngine instance]... Of
XN> > course we can simply insert one line in MApp::Shutdown() and forget
XN> > about it but it would be nice to have a more generic way of dealing
XN> > with this.
XN> 
XN> A list of pointers to global instances of such classes? With a way to
XN> get (and automatically create) them, and a way to delete them, all that
XN> done by giving a String to refer to the class, and everything is deleted
XN> during shutdown?

 Yes, I'm thinking about something like this but the details are a bit
unclear. Maybe we could, in fact, simply have a "server" with which any
object could register to be deleted just before shutdown...

 Regards,
VZ



-------------------------------------------------------
This sf.net email is sponsored by:
With Great Power, Comes Great Responsibility 
Learn to use your power at OSDN's High Performance Computing Channel
http://hpc.devchannel.org/
_______________________________________________
Mahogany-Developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/mahogany-developers

Reply via email to