2000-06-26  Charles Kerr <charles@skywalker.ou.edu>

	* pan/save.c: added 'priority' section in the 'save attachment as'
	dialog so that the user can choose to put the new save task at the
	front or the back of the task queue

	* pan/task-decode.c (task_decode_validate_and_queue_or_self_destruct):
	now takes a queue_index argument so that the caller can decide where
	in the queue to add this new task after the extra articles have been
	filtered out.

2000-06-26  Charles Kerr <charles@skywalker.ou.edu>

	* pan/sockets.c (socket_constructor): fix big bug: it appears that a
	zero sockfd is valid -- socket() returns -1 on error, and a sockfd int
	otherwise.  Pan's been having trouble reconnecting to servers after a
	ppp disconnect; a few debugging print statements revealed that we were
	getting all the way through socket_constructor, but ending up with a
	sockfd of 0.  Now we default to a -1 value in the constructor, which
	is replaced with the return value of socket().

	* pan/queue.c (queue_get_socket_for_task): use -1, rather than 0, as
	the test for an invalid sockfd.  See above.

	* pan/smtp.c (smtp_get_connection): same.

2000-06-25  Charles Kerr <charles@skywalker.ou.edu>

	* pan/task-manager.c (layout): move the 'delete' buttons over to the
	right-hand-side of the toolbar so that they'll be harder to hit by
	accident when you're reaching for the server button or the 'move task'
	button.

	* pan/task-manager.c (periodic_update_cb): only update those rows
	which are visible at the moment.  This keeps the CPU load down for
	those zillion-decode sessions.

	* pan/task-manager.c (periodic_update_cb): we now update the titlebar
	here, rather than whenever the queue state changes.  Queue state
	changes just set a dirty flag that activates the titlebar refresh in
	periodic_update_cb.

	* pan.spec.in: updated description; added Vendor (SuperPimpSoft)

2000-06-24  Charles Kerr <charles@skywalker.ou.edu>

	* pan/articlelist.c (articlelist_get_article_from_node): made static.

	* pan/date.c: very small tweaks.

	* pan/group.c (group_update_count_info): made this such that a single
	task can run for N groups.  Running an entire task for each group
	caused a lot of task/X overhead; this way is better.

	* pan/task-decode.c (task_decode_destructor): remove DECODE_QUEUED
	from all the articles in the destructor.

2000-06-23  Charles Kerr <charles@skywalker.ou.edu>

	* pan/gui.c (help menu): added a link to the pan home page.

2000-06-22  Charles Kerr <charles@skywalker.ou.edu>

	* pan/article.c (article_delete): remove unused function.

	* pan/article.c (article_delete_impl): remove delete-children-of-
	multipart special case; this is now handled more cleanly in
	articlelist.c.

	* pan/article.c (article_get_entire_thread_count): remove unused
	function.

	* pan/article.c (article_get_entire_thread): rather than wasting
	cycles counting through the thread, just allocate a good start
	size in the GPtrArray.

	* pan/articlelist.c: swapped the gui menu around to make the
	non-undoable actions a little harder to hit by accident; make
	the commonly-used ones (mark all, f'rinstance) easier to hit.

	* pan/articlelist.c (articlelist_get_selected_articles): simplify.

	* pan/articlelist.c (articlelist_delete_articles): new util function.

	* pan/articlelist.c (articlelist_selected_delete): now just build the
	article array and push the work off onto articlelist_delete_articles.

	* pan/articlelist.c (articlelist_selected_delete_thread): same.

	* pan/gui.c (clist_unselect_all): don't bother with this; just use
	gtk_clist_unselect_all instead.  removed.

	* pan/gui.c: added accelerators to delete and delete-subthread.

	* pan/message-filter.c: some simple string cleanups: use replace_gstr
	where appropriate, use GString instead of a lot of separately-allocated
	temp strings where appropriate.

	* pan/util.c (fill_paragraph): simplify.

2000-06-21  Charles Kerr <charles@skywalker.ou.edu>

	* pan/articlelist.c: fixed free-memory-read error: a freed article was
	being selected when we deleted a large batch of articles at once

2000-06-20  Charles Kerr <charles@skywalker.ou.edu>

	* pan/grouplist.c (grouplist_set_selected_groups): new utility func.
	
	* pan/grouplist.c: the group list now maintains selections when the
	state changes (from subscribed, to all, or the reverse).

	* pan/articlelist.c (unread_children_pixmap): removed unused pixmap.

	* pan/xpm/unused_children.xpm: removed unused file.

2000-06-19  Charles Kerr <charles@skywalker.ou.edu>

	* pan/message-window.c (message_reply_external): small memory
	leaks fixed.

	* pan/util.c (check_and_warn_if_version_change): new function to let
	the user know that, when they're upgrading to a version of Pan with
	a different database format, they should delete their database files.

	* pan/nntp.c (nntp_download_headers): on invalid headers, set the
	article's dirty flag to false before unreffing it.  That way it won't
	be saved to disk.

2000-06-18  Charles Kerr <charles@skywalker.ou.edu>

	* pan/prefs.c: fixed small GtkStyle leak by unreffing old styles
	before zeroing out the pointers that pointed to them.

2000-06-17  Charles Kerr <charles@skywalker.ou.edu>

	* pan/task-headers.c (task_get_header_range): small range bugfix when
	getting new headers for a group that we've never looked at before.

2000-06-16  Charles Kerr <charles@skywalker.ou.edu>

	* pan/nntp.c (nntp_download_headers): slightly better binary guessing
	heuristic thanks to Elladan.

	* pan/article-thread.c (thread_articles): speedups in finding parents
	for multipart messages.

2000-06-16  Charles Kerr <charles@skywalker.ou.edu>

	(Get New Article Qty)

	* pan/group.c (group_update_count_info_task_run): new function to
	read group information from the server, and update our Group's
	counts based on that information.
	* pan/group.c (group_update_count_into_task_describe): same.
	* pan/group.c (group_update_count_info): same.

	* pan/grouplist.c (popup menu): add 'Get New Article Count from Server'
	menu button.
	* pan/gui.c (group menu): same.

	(Article Changes)

	* pan/article.h (Article): gave article a 'dirty' flag; now Article
	saves itself back to the database in its destructor, rather than
	saving all the time whenever pieces of it change.  This makes typical
	Article manipulation faster, and hits the database less frequently.

	* pan/article.c (article_update_impl): removed unused function.
	* pan/article.c (article_add_flag_impl): same.
	* pan/article.c (article_remove_flag_impl): same.

	* pan/article.c (article_destructor): if the article's dirty flag
	is true, save the article to the database.

	* pan/article.c (article_set_followup_to): new manipulator.
	* pan/article.c (article_set_references): same.
	* pan/article.c (article_set_newsgroups): same.
	* pan/article.c (article_set_reply_to): same.

	* pan/nntp.c (nntp_article_download): use the new manipulators,
	rather than changing the fields directly.

	* pan/article.c (articles_unref): new function to more efficiently
	save groups of articles to the database.  It opens the database
	and saves all the dirty articles in the group, so that the database
	doesn't have to be opened up by each article in the destructor.

	* pan/articlelist.c (articlelist_mark_all_read): remove dead code.

	(Server Changes)

	* pan/server.c: removed 'db' field, which held a live database
	handle to that server's information.  This field was unused, but
	took up memory/file pointers anyway.

	(Folderlist)

	* pan/folderlist.c (folderlist_init): commented out this code -- we
	don't need to initialize these pieces until someone gets around to
	making folders work in Pan. 
	* pan/folderlist.c (folderlist_shutdown): same.
	* pan/grouplist.c (grouplist_add_folder): same.

	(Misc Tweaks)

	* pan/article_db.c (ahdb_field): removed unused field.

	* pan/article-thread.c (mp_strcasecmp): added 'register' qualifier
	for the most frequently-used fields
	* pan/article-thread.c (pp_article_unread_children_comp): same.
	* pan/article-thread.c (pp_article_message_id_comp): same.

2000-06-12  Matt Eagleson <e.Messiah@superpimp.org>

	* pan/message-window.c: New notebook headers/attachment
	framework
	* pan/articlelist.c (articlelist_set_current_group): check if 
	the db exists *before* we open it, so it won't try to use a
	zero length db and crash horribly

2000-06-12  Charles Kerr <charles@skywalker.ou.edu>

	* pan/message-send.c: removed unused #includes

	* pan/message-window.c (message_window_get_file_attachments): new
	stub functions for getting file attachments from the compose UI.

	* pan/pan-db.c: added #define DB_LIBRARY_COMPATIBILITY_API, which
	is required by Berkeley db 3.0 to get the db185 API to link right.
	It doesn't appear to cause any damage on older versions of the
	library, so this should be safe.

	* acconfig.h, configure.in: remove some old config checks that
	we used to use for Solaris but don't need anymore.

2000-06-11  Charles Kerr <charles@skywalker.ou.edu>

	* pan/gui.c (warn_about_tasks_running): small memory leak fixed.

2000-06-10  Charles Kerr <charles@skywalker.ou.edu>

	* pan/dialogs/dialog-headers.c: added 'download bodies, too'
	flag to the dialog and plugged in logic for it to create a
	task-header object and send it to the queue when the user hits
	'ok'.

	* pan/task-headers.c (task_headers_new_sample): new convenience
	constructor for crerating a task that samples N headers.

2000-06-09  Charles Kerr <charles@skywalker.ou.edu>

	* pan/dialogs/dialog-headers.c: new file with a dialog for
	letting the user specify how many headers to download, or to
	get all, or all new.  (Doesn't do anything yet, and isn't
	plugged into the main menu yet, but the UI is there.)

	* pan/grouplist.c: added item in the grouplist popup menu
	to use this headers dialog

2000-06-08  Charles Kerr <charles@skywalker.ou.edu>

	(GNKSA)

	* pan/gnksa.c (is_unquoted_char): new RFC 1036 parsing function.
	* pan/gnksa.c (is_quoted_char): same.
	* pan/gnksa.c (is_tag_char): same.
	* pan/gnksa.c (is_code_char): same.
	* pan/gnksa.c (is_paren_char): same.
	* pan/gnksa.c (read_space): same.
	* pan/gnksa.c (read_codes): same.
	* pan/gnksa.c (read_encoding): same.
	* pan/gnksa.c (read_charset): same.
	* pan/gnksa.c (read_encoded_word): same.
	* pan/gnksa.c (read_unquoted_word): same.
	* pan/gnksa.c (read_quoted_word): same.
	* pan/gnksa.c (read_plain_word): same.
	* pan/gnksa.c (read_plain_phrase): same.
	* pan/gnksa.c (read_paren_char): same.
	* pan/gnksa.c (read_paren_phrase): same.
	* pan/gnksa.c (gnksa_split_from): better error-checking of From: header
	* pan/gnksa.c (gnksa_check_localpart): same.

	* pan/gnksa.c (gnksa_trim_references): fix: trim at 998, not 998 -
	strlen("References: ").

	* pan/group.c (group_set_dirty): new function to ensure a group gets
	saved when it's unloaded.
	* pan/task-grouplist.c: call group_set_dirty when new groups are
	read from the server.


	* pan/message-window.c: don't add a "-- " signature delimiter if the
	signature file already has a singature delimiter.




2000-06-06  Charles Kerr <charles@skywalker.ou.edu>

	(GNKSA)

	* pan/gnksa.c (gnksa_check_message_id): new utility for checking
	whether a message-id is legal or not.

	* pan/gnksa.c (remove_broken_message_ids_from_references): new utility
	used by gnksa_trim_references().  This _should_ get us gnksa 7e.

	* pan/message-send.c (generate_message_id): this function has risen
	from the dead!  Pan now generates message ids again.

2000-06-06  Charles Kerr <charles@skywalker.ou.edu>

	(Bug Fixes)

	* pan/nntp.c (nntp_articlelist_download): fixed array-bounds-read
	bug when the part/parts ("[n/N]") parser was walking past the beginning
	of the subject line.  Goodness knows how long we've had this bug.
	Found with purify.

	* pan/article.c (article_constructor): initialize 'state' field to
	avoid uninitialized-memory-read errors.  Found with purify.

	* pan/message-send.c (get_email_rcpts): fix a bug I introduced in last
	night's commit.

2000-06-05  Charles Kerr <charles@skywalker.ou.edu>

	(Small Features)

	* pan/message-send.c (build_nntp_message): added "Organization" to
	the headers of the message being sent.

	* pan/message-send (send_smtp_message): Now use "User-Agent" to tell
	that the mailer is Pan.

	(Bug Fixes)

	* pan/message-send.c (message_send): memory leak plugged: the newsgroup
	and email recipients lists were not being freed.

	* pan/smtp.c (smtp_send_message): memory leak plugged: the 'full_to'
	pointer was being overwritten inside a loop via g_strconcat().

	(Code Cleanup)

	* pan/message-window.c (message_window_get_from): new accessor.
	* pan/message-window.c (message_window_get_reply_to): same.
	* pan/message-window.c (message_window_get_newsgroups): same.
	* pan/message-window.c (message_window_get_users): same.
	* pan/message-window.c (message_window_get_subject): same.
	* pan/message-window.c (message_window_get_body): same.
	* pan/message-window.c (message_window_get_reply_to): same.
	* pan/message-window.c (message_window_get_followup_to): same.
	* pan/message-window.c (message_window_get_organization): same.
	Now clients needing to access the message-window to get post/mail
	information can use safe & sanitized accessors.

2000-06-04  Charles Kerr <charles@skywalker.ou.edu>

	* pan/message-window.c (make_reply_window): new private function to
	handle determining what goes into the reply window when it first
	appears, and then for invoking message_window_new().  (This works,
	but the logic flow between text, message-window, and task-body needs
	cleaning up.)  This gives us gnksa 10e: letting the user specify
	a portion of the message for a partial reply.

	* pan/message-window.c (message_reply_window): use make_reply_window.

	* pan/message-window.c (message_followup_window): same.

2000-06-04  Charles Kerr <charles@skywalker.ou.edu>

	* pan/articlelist.c (popup_menu): moved 'delete binary attachment'
	to the bottom of the menu with the other delete functions, so that
	it'll be less likely to hit by accident.  Thanks to Dave Higgins for
	this idea.

	* pan/message-filter.c (message_filter_get_action): made the filters
	case-insensitive, rather than case-sensitive.  When the message filter
	gets rewritten, this should be a configurable option.  Thanks to
	Eric Potter for pointing this out.

2000-06-04  Charles Kerr <charles@skywalker.ou.edu>

	* pan/message-send.c: (check_signature): new utility function.
	* pan/message-send.c: (check_wide_body): same.
	* pan/message-send.c: (check_empty): same.
	* pan/message-send.c: (check_mostly_quoted): same.
	* pan/message-send.c: (check_all_quoted): same.
	* pan/message-send.c: (check_body): pushes all of its work out onto
	these new utility function.  This should get us gnksa 16b, 16c, 16d.

2000-06-03  Charles Kerr <charles@skywalker.ou.edu>

	* pan/message-send.c (generate_references): remove unused function
	left over from yesterday; the gnksa module now does this.

	* pan/gnksa.c: more fixes & regression tests to mail address checking.

2000-06-02  Charles Kerr <charles@skywalker.ou.edu>

	* pan/gksa.c (gnksa_trim_references): this code seems to be working
	again.  Added regression tests for it, too.

2000-06-02  Charles Kerr <charles@skywalker.ou.edu>

	* gnksalib: removed this library.  It apparently doesn't work
	on Solaris or other machines that don't default to gnu regex.

	* pan/gnksa.[ch]: new 900-line module for checking gnksa-centric
	things.  Currently has some pretty thorough mail address code.

	* pan/pan.c (main): added --regression-tests command line option
	to run some tests and make sure that things are working properly.
	Currently invokes the gnksa test routine.

	* pan/message-send.c: removed references to gksalib.  This means
	that references trimming & fixing is currently broken.

2000-06-01  Charles Kerr <charles@skywalker.ou.edu>

	* pan/message-send.c (build_nntp_message): use "User-Agent" rather
	than "X-Newsreader".  Thanks to Adam Bailey for suggesting this.

	* pan/message-send.c (check_groups): if >12 groups in crossposting,
	just refuse (rather than warn) to post.  Thanks to Adam Bailey for
	suggesting this.

	* pan/message-send.c (generate_references): use gnksalib's
	MakeValidReferences instead of doing it ourselves.  Adam Bailey's
	gnksa evaluation of Pan today showed that our method truncated
	too short.

	* pan/message-send.c (check_mail_addresses): use gnksalib's mail
	address checker rather than the one from mutt.  (the mutt file,
	rfc822.[ch], has been removed from Pan).  Adam Bailey's gnksa
	evaluation of Pan today showed that the old checker wasn't able
	to correctly handle missing domains, among  other things.
	"Charles Kerr <charles@>".  (Possibly this is because mutt also
	deals with address books and aliases and defers some parsing til
	later..?)

	* pan/message-send.c (send_cb): use the StealthWhiteSpaceFixer
	provided by gnksalib.

	* pan/message-send.c (check_body): add checks in the
	'lines of quoted vs. lines of original' & 'is message body empty'
	routines to make sure we're not wrongly counting signature files.
	In other words, signature files don't count towards the new content
	stats.

2000-05-31  Charles Kerr <charles@skywalker.ou.edu>

	* pan/group.c (group_set_subscribed): new function.
	* pan/group.c (group_is_subscribed): same.

	* pan/server.c (server_save_dirty): function to quickly save dirty
	groups from a server.  This is faster than saving one-by-one
	in the group dtor because it keeps the db file open and recycles
	GStrings.  This is called from the server's destructor.

	* pan/server.c (server_import_newsrc_dialog): finished 'import newsrc'
	functionality.  Works for my .newsrc files, but probably there are some
	bugs left to be shaken out.

	* pan/server.c (server_export_newsrc_dialog): finished 'export newsrc'
	functionality.  Created an exact duplicate of the tin .newsrc file
	that I fed into Pan before running export.  It worked the first time,
	woo-hoo! :)

2000-05-29  Charles Kerr <charles@skywalker.ou.edu>

	* pan/newsrc.c (parse_read_str): fix small newsrc reading bug.

	* pan/article.c (article_mark_read_impl): small bug fix.
	* pan/article.c (article_mark_unread_impl): same.

2000-05-29  Charles Kerr <charles@skywalker.ou.edu>

	* pan/article.c (articles_mark_read): compress updates so that
	the grouplist is only updated once for all articles being set.
	* pan/article.c (article_set_unread_impl): same.
	* pan/article.c (article_set_read_impl): same.

	* pan/group.c (group_catchup): new function.
	* pan/grouplist.c (popup menu): added hook for 'catchup'
	* pan/grouplist.c (popup menu): added hook for 'catchup'
	* pan/grouplist.c (grouplist_selected_catchup): new function.

	* pan/grouplist.c (grouplist_button_press): Fix insensitivity
	buttons in the grouplist popup menu.

	* pan/newsrc.c (range_new): use a gmemchunk for allocating ranges.
	* pan/newsrc.c (range_free): sync.
	* pan/newsrc.c (newsrc_mark_all): make sure it works even if the
	article headers haven't been loaded yet.

	* pan/task-func-ptr.[ch]: new task class that can be used for
	performing simple tasks that don't really need an entire class
	just for themselves.  task_catchup() uses task-func-ptr.

2000-05-29  Charles Kerr <charles@skywalker.ou.edu>

	* more work, testing, debugging on newsrc.

	* pan/article.h (Article): add a Group pointer to each article.
	This is necessary for marking articles as read/unread, and for
	finding out if they're read, since we no longer have a STATE_READ
	field and instead ask the group's newsrc.  (Someday maybe this will
	be number/group pairs for an 'article-centric' Pan?)

	* pan/articlelist.c (articlelist_all_mark_read): big speedups based
	on using the new newsrc code.

	* pan/articlelist.c (tree_select_row_cb_thread): use a mutex.  This
	mutex thing in tree_select_row_cb and tree_select_row_cb_thread is
	because ctree fires off an event for *each* row selected/deselected,
	even when you're doing a recursive select/deselect.  That results in
	a thread being spawned for *each* select, which can get messy when
	selecting or deselecting the whole tree.  So the workaround is this
	mutex, which effectively batches up selections and deselections.  

2000-05-28  Charles Kerr <charles@skywalker.ou.edu>

	(Newsrc)

	* pan/newsrc.c: Finished up implementation for newsrc support.

	* pan/grouplist.c (grouplist_load_group): When a group is loaded,
	initialize its newsrc field.

	* pan/grouplist.c (serialize_group): When a group is saved, save its
	newsrc field.

	* pan/article.c (article_mark_read): reimplemented using newsrc tools.
	* pan/article.c (articles_mark_read): same.
	* pan/article.c (article_mark_unread): same.
	* pan/article.c (articles_mark_unread): same.

2000-05-24  Valek Filippov  <frob@df.ru>

	* Unified quotes (``'','',`' -> "") in about 40 places.

2000-05-20  Charles Kerr <charles@skywalker.ou.edu>

	(Bugfixes -- these should be merged into 0.8.1)

	* pan/util.c (get_next_token_ulong): fix bug where the return char*
       	was walked past the end of the input string.
	* pan/util.c (get_next_token_int): same.

	* pan/articlelist.c (articlelist_select_all): workaround for gtkctree
	bug that fires a signal for each article selected, rather than one
	for the entire bunch.

	(Big Changes to Group class)
	 
	* Group is now a PanObject.

	* It now has a Server* field, which lets us take the Server* argument
	out of most of Pan's APIs.  For example, ahdb_ref only takes a Group*.
	(1) The API changes get us one step closer to group-centric
	(2) Should help folders out in that they won't have to specify a server
	(3) Eliminates the confusion of which server to use for a group
	operation, like task_new (articlelist_or_grouplist_get_server(), grp).
	
	* All of the group fields are stored in a group database a la ahdb;
	this is just an extension of code already in grouplist.c (note: this
	doesn't break old file formats; see group_serialize()).
	group_{get|set}_attrib are dead; you now manipulate the struct instead.
	
	* There's also a dirty flag so that when a group is destroyed (when
	Pan exits), it knows if it needs to save itself to the db.
	
	These last two will have some performance wins in that we don't have to
	poke the db every time we want an attribute.  They also make Group
	ready for a newsrc field that gets written to disk once per session,
	instead of each time an article is read.  I bet you thought I'd
	forgotten about newsrc support, didn't you. :)

	* pan/article.c (article_mark_read): removed Server* argument.
	* pan/article.c (articles_mark_read): same.
	* pan/article.c (article_mark_unread): same.
	* pan/article.c (articles_mark_unread): same.
	* pan/article.c (article_delete): same.
	* pan/article.c (articles_delete): same.
	* pan/article.c (article_add_flag): same.
	* pan/article.c (article_remove_flag): same.
	* pan/article.c (article_remove_flag): same.
	* pan/article.c (article_update): same.
	* pan/article.c (article_move_to_folder): same.

	* pan/article-db.c (AHDB): removed Server* field
	* pan/article-db.c (ahdb_get_all_dbfunc): use group fields, not attrib
	* pan/article-db.c (article_ref): removed Server* argument
	* pan/article-db.c (ahdb_exists): same.
	* pan/article-db.c (ahdb_delete_db_file): same.
	* pan/article-db.c (ahdb_unref): same.

	* pan/article-find.c, pan/articlelist.c, pan/article-toolbar.c
	  pan/decode.c, pan/group.c, pan/grouplist.c, pan/gui.c,
	  pan/gui-paned.c, pan/message-window.c, pan/nntp.c, pan/pan.c,
	  pan/save.c, pan/server.c, pan/task-bodies.c, pan/task-body.c,
	  pan/task-decode.c, pan/task-headers.c, pan/text.c: remove references
	  to Server* where just a Group* will do.

	* pan/folder.c (create_folder): sync with new group_new().
	* pan/folderlist.c (folderlist_load_folder): same.

	* pan/group.c (group_constructor): new protected function.
	* pan/group.c (group_destructor): same.
	* pan/group.c (group_new): update for PanObject.
	* pan/group.c (group_free): removed unused function.
	* pan/group.c (group_set_sort_style): new public mutator.
	* pan/group.c (group_set_article_range): same.
	* pan/group.c (group_set_article_qty): same.
	* pan/group.c (group_inc_article_read_qty): same.
	* pan/group.c (group_set_article_read_qty): same.

	* pan/grouplist.c (groups_free): removed unused function.
	* pan/grouplist.c (grouplist_load_group): updated to read all the new
	db fields -- article range, read qty, article qty, etc.
	* pan/grouplist.c (group_serialize): new function for converting a
	group to a string that can be stored in the db.
	* pan/grouplist.c (grouplist_save_group): used group_serialize.
	* pan/grouplist.c (grouplist_save_list): same.

	* pan/server.c (server_destructor): unref all the Group objects in
	the server's groups field

