User talk:Wjjohnst
nsIMailDBView
I've been trying to get TB to display messages with the subject on one line and the sender on another. Without this ability, a 3-pane vertical view is pretty much useless. I've thought of three ways to do it:
- Rewrite the treeview to fill in different data on every other row. This isn't that hard to implement, but it worries me a lot. I also had to write a treeSelection that would select rows in groups of two. I'm not sure who's polling for the selected message though. If they ask, and I tell them that row two is selected, its likely that they'll assume that also means that message two is selected, and possibly display, delete or move the wrong message.
- Write a new tree box object that allows two columns to be put on top of one another, but vertically shifted. I've looked into this. Best I can tell, its the "correct" way to do this, but it looks hard and requires me to build my own Mozilla. I don't even want to try.
- Hide the threadpane and use a richlistbox instead. This gives the prettiest results, but you have to keep the real threadpane and richlistbox in sync so that when, for instance, the delete button is pressed, the right messages are deleted. Also, richlistboxes have horrible performance when compared to a tree. However, its the only option that actually works. Its just a complete hack and a lot of juggling.
Right now most of my confusion comes from the nsIMsgView interface which couples the database backend and the threadpane frontend. Upon first look, I just assumed that the threadpane was filled by an in memory RDF datasource. Instead the DBView houses both access to the real DB and provides a TreeView for showing the DB. I don't want to have to rewrite all those DB access functions just to rewrite the frontend though. I just want to overwrite the tree or treeview and not have to fight anything else.
So in conclusion, I have no idea what the best way to do this is. I just wanted to rant about how I can't get this stupid thing to work without doing some weird hacks, and to see if anyone else knew an easy (or at least the correct) way to do this.