##############################
# Before next release items: #
##############################

IDEA: Take a to address on the gmail command line and open gmail with a compose window to that person. (this can be used to automate mailto fields in certain web apps - find out and make a FAQ for it).

printing is broken, bring up to date with gnome-print API and up the dependency.

There is a weird infinite loop with something... Occurs in my gmail-discuss folder. Sometimes gmail just loops through everymessage... weird. some weird loop case I haven't thought of.

segfault on aborting a matched values recreation? yes or if you abort a mail download...

Bcc is broken with queued messages.?
Attachments broken?
Large single attachments (eg: ChangeLog) gives 'smtp hates quitters' error.
Multiple attachments?
Both above with queued messages broken?


#####################
# Other TODO items: #
#####################

GUI'ize the stdout put line: Gmail FATAL ERROR
Allow different font configs for the clists and the rest of gmail.

Possible little projects for helpers to take on:
	- Make the search dialog more powerful and flexible.
	- Implement Ove's index matching stuff he posted to the list.

Use glade for the main window.

THe mark msg read and unread functions are hacky. THey should be merged into the same function - get the callback function data passing to work.

Do lots of refactoring. Untangle the spaghetti. Split the files into more logical groups.

FAQ: I added text indexing to headers by running the mysql admin client with:
ALTER TABLE details ADD FULLTEXT headers (headers); 
(warning - the size of my details.MYD was around 50 meg, this index made the size of details.MYI (the indexes) 11 meg! - of course you need a recent mysql to get this)
I should make this fulltext indexing the default setup... I don't want it on the message part just yet, as MIME attachments are in the message and you would be creating massive indexes over area you don't want searched. This is a tricky problem.

The MI warning in vfolder_display_rightpane locks up gmail/X. :( The code has been FALSE'd out.

BUG: Do we crash with empty bodies?

Now that we have multiple clist select, make rightclick unselect everything else. This seems most intuitive to me.

IDEA: Ove posted some code to the list that improved the speed of this lots. 

Do a key shortcut for search.

Foreign Language stuff:
	- Use QP instaed of 8bit. It handles foreign platforms better...?

BUG: CTRL-A doesn't work in compose window - glade issue.

Search feature:
	- Don't let it open more than one search window. DONE
	- Check for an empty string. DONE
	- Highlight the search text in the emails when displayed. Difficult.
	- Don't search through encoded mime parts. Difficult.
	- Allow more options: eg: incoming/outgoing, body vs headers vs both.
	- If using the local vfolder only and caching is on, use the MI in the query (this will be very fast then). DONE

When an unread message is read, if caching, use the MI to find what other vfolders that message is in and check them for unbolding too.

Implement a hierarchical vfolder ctree in the right pane. I started coding this in December 2000, but got stuck with implementing storing the tree data with gnome_config. I have a forked branch of gmail with this code. Here is the sub todo list for ctree:
	Make bolding/unbolding of the names work. DONE
	Make the ctree spine line start at inbox and not go off the top of the screen.
	Make it hierarchical.
	Should be using ctree_post_recursive (or related) to traverse the tree. This is needed to go hierarchical.
	Deprecate or fully implement the vfolder row rightlist data. See line 163 mysql.c. Currently we will store the currently displayed vfolder in GmailApp->node, but we should put it into the right clist data. DONE.
	Allow reordering of ctree entries via drag'n'drop. This is quite simple for this widget, apparently. DONE IN MAIN

Remember the last directory opened in the chooser, to make it easier when adding multiple files from the same directory.

Check with Jeff if utils_best_encoding can handle binaries.
FAQ: How can I modify the user interface? Give tips on how to use glade, encouraging that gmail is robust...Give the names of what the glade widgets should be.
BUG: I don't think gmime is giving us the full cc field if it goes onto a newline. This is extremely common. (check if this is fixed in 0.4)
BUG: We need to strip out whitespace (newlines) when doing SMTP and stuff... Often a cut'n'paste into the cc field carries some newlines... (Juergen reports on the list that adding a blank line to the start of a message will get through some smtp servers that otherwise refuse us - check this out)
BUG: If we get a smtp recipient rejected, continue in sending to the other recipients.. don't just abort.
BUG: What happens if we try and set a matched index value that is bad. We should detect for this and warn the user... eg: if they have a match for a vfolder whose name isn't in the matched index yet.
BUG: Reply-to-all is nearly working, but it needs to also put in the originators address into the cc field if it is not in the to field (this happens if a reply-to field gives us a different address).
BUG: If we cancel a pop3 session halfway, properly logout of the server, otherwise we have to wait for the server login to time out, which could never happen in some setups.
BUG: when we delete the last msg in a vfolder and there is nothing to put in the message widget, fill it with blank data (+ clear the mime clist).
BUG: Make the fonts update at runtime... 
BUG: We need to properly ref count the styles we use.
Try and put the current mail setup in the gnome app bar all the time...
Add prefs option to mark messages as read even if you haven't double clicked them but they were automatically displayed.
Implement customizable display of fields. Then add lots of new cool fields. Such as: size, attachment, replied etc.
Make the stdout as clean as possible.
TRASHCAN Idea: Use the status field. Allow marking the status field as 'read, unread, sent, deleted'. We can keep reusing the status field for arbitrary stuff as long as all the values are mutually exclusive. These aren't quite mutually exclusive but it's a good enough hack.

Misc Stuff:
FAQ: How do I configure a different program to run when double clicking on attachments?
FAQ: I deleted one of my standard vfolders, what were the queries?
Have a field for marking messages as Replied or Answered. Could use the status field of the email, unless people want to search on it then it should be added to the database design. I prefer the former.
Need up and down arrows to show the field we are sorting by.
Is there an easier GUI method for changing the default mailsetup. Right click on the checkmail button? Menu item?
Allow editing of queued messages.
Use gnet for non-blocking networking?
Decode MIME parts quickly just to get their size for the widget display.
Make the popup for outgoing mail update gradually... this is especially imporant when sending attachments that can get large.
Implement clever AI for existing databases. VERY NECESSARY. Maybe only do this when we libgladize the druid.
If we can't get a date from the envelope header try and get one from the normal date headers (gmime might help here)
The name should be part of our MailSetup structure. Could use this in the checkmail popup.
Find out how gedit remembers window sizes so well.
Could we use gtk_container_remove to get around all the msglistpane rubbish? (note gnome-devel list.. you need to ref something before doing so, as gtk_container_remove derefs the child).
The download threshold code is currently not implemented in the new settings. Does anyone require this anyway? It used to be good for dealing with massive emails not worth downloading, but these days most ISP's have workable mail size limits.
Better AI for helping with MI stuff. eg: if they change the name, you need to beuild MI and values. But if they just change the query, your just need to rebuild the MI values.

GMime stuff:
	If gmime stuff works well. Deprecate the splitting of the headers and body in the database. Only this would break old systems. :(
	Use gmime for all parsing when downloading. MOSTLY DONE 
	Allow multiple outgoing attachments. DONE
	Does the GMimeMessage structure obsolete our Message structure? NOT QUITE.
	Email Jeff about problem with gmime. g_mime_message_to_string doesn't put in the MIME headers, they get put in with g_mime_part_to_string. Better to check for mime parts in create_header and put them in then. Then you don't need the toplevel flag for g_mime_part_to_string - which is a cleaner design.
	Put an attachment field in the vfolder clist?

Email gnome-libs bug about docs error in file:/usr/local/share/gnome/html/gnomeui/gnomepropertybox.html - sample help callback doesn't use ampersands in the gnome_help_display second argument.
Make the vfolder_contains_unread work as fast as possible, and call it as few times as possible.
Prefs option to send queued messages when checking for newmail? 
Forwarded messages should have Fw: not RE:
Put name in quotes before the email address in the From field of outgoing messages.

Website TODO:
	When the online docs are good enough, put a copy of them on the web site.
	Definitely put a copy of the FAQ on the site.


General TODO:

Libglade'ize the entire main window.
Remove use of all dodgy global variables. They just add opportunities for bugs. eg: GmailApp->sortfield

Binary distribution issues:
Are we sure that the following things work via RPM:
	- panel menu item under Internet. NO?
	- online help files. PROBABLY
	- images for online help files. NO?
	- gnome sound setup in control centre. PROBABLY
	- relevant glade files work. YES.
Get a working debian package. 

Printing TODO items:
	Make it look professional.
	Put in page numbering.
	Implement a right margin, word wrap.
	Printing outgoing messages. (though at the moment you can do this by printing it when it is sent or queued)

User Interface Related TODO Items:
BUG: Use of styles prevents gmail responding the gtk theme changes 100% immediately. Might need to catch a signal to update our styles when the theme is changed.
Show To instead of From for the outbox.
Give the option to sort by date in email or date downloaded.

MYSQL Related TODO Items:
	Do some cleverer AI for the gnome druid mysql stuff. If we detect and existing username or database at least offer to delete and recreate it for them.
	Add a prefs options to reset the default vfolders back to their default queries.

What else can I do to reduce the memory footprint? (minimise includes?)

Reply/forward buttons need to check if there is something to reply to.
last_uid feature in pop3 to avoid old messages on server

###########
# Roadmap #
###########

For 0.6: 
	- Finish implementing the rightclick popup menus. DONE
	- Use libglade for compose, prefs and other windows. DONE
	- Gnome-print support. NEARLY DONE.
	- Queuing messages for later sending. eg: offline. Have a menu option to send all queued messages, as well as a prefs option to send queued messages when checking for newmail. If an outgoing message has an smtp rcpt error keep it in a queued state. DONE.
	- Edit/Copy/Cut/Paste. DONE.

For 0.8: 
	- GNU gettext translation support. THERE BUT UNTESTED
	- Multiple POP3. DONE
	- Use gnome property box widget for preferences. DONE
	- Fully revised online help, with extensive FAQ. NEARLY DONE
	- GMime library mime parsing. NEARLY DONE
	- Search feature. BASIC VERSION WORKING
	- 100% stability and working functionality of all (half) implemented features. NEARLY DONE

For post 0.8:
	- Use CTree for the vfolders.
	- New status fields feature. To allow for trashcan and stuff like that. Implement either within the message headers or as a SET field.
	- Automatic query builder. Initially a VERY useful tool would be an 'add person to vfolder' list check. An easy way to add email addresses to various vfolder queries would make it easy to categorise individuals into vfolders to keep the inbox empty. You could do this in the rightclick popup, or even use drag'n'drop. Should do it via drag'n'drop, and automatically open the vfolder properties to show how the query has been modified - the user can then change the query or leave it.
	- Trashcan.
	- Discussion threading. Is this hard to do?
	- libgladeize the druid.
	- Perl-DBI web interface.
	- Allow external editors, especially vi (gvim?).
	- GUI vfolder query builder.
	- Configurable key bindings ?
	- Lots of translations.
