Commit Graph

255 Commits

Author SHA1 Message Date
3892c5df4d Fixed some warnings.
2000-07-31  Christopher James Lahey  <clahey@helixcode.com>

	* component-factory.c, folder-browser.c: Fixed some warnings.

	* message-list.c: Made the icon column non sortable.

svn path=/trunk/; revision=4440
2000-07-31 22:32:52 +00:00
580e879674 Removed counting of selected messages.
2000-07-26  Christopher James Lahey  <clahey@helixcode.com>

	* message-list.c, message-list.h: Removed counting of selected
	messages.

svn path=/trunk/; revision=4362
2000-07-26 20:25:40 +00:00
e1ecbdf489 Update for CamelFolder API changes. (Certain functions no longer take a
* message-list.c (mark_msg_seen, ml_tree_set_value_at,
	message_list_regenerate): Update for CamelFolder API changes.
	(Certain functions no longer take a CamelException.)

	* mail-ops.c (real_fetch_mail, real_send_mail, real_delete_msg):
	ditto

	* component-factory.c (real_create_imap_storage,
	real_create_news_storage): ditto

svn path=/trunk/; revision=4305
2000-07-25 02:47:18 +00:00
db53781003 Only unref the folder if it's been set.
* message-list.c (message_list_destroy): Only unref the folder if
	it's been set.

	* folder-browser.c (folder_browser_destroy): Only sync the folder
	if it's been set.

svn path=/trunk/; revision=4162
2000-07-14 00:25:01 +00:00
f61cf36756 Disable Search capability menu/entry if folder doesn't support it.
2000-07-11  Jeffrey Stedfast  <fejj@helixcode.com>

	* folder-browser.c (folder_browser_load_folder): Disable
	Search capability menu/entry if folder doesn't support it.

	* message-list.c (message_list_regenerate): Don't perform
	a search if the folder doesn't support it.

svn path=/trunk/; revision=4097
2000-07-11 20:42:27 +00:00
e17db743f3 Update message_list_select_next to do either next or previous.
* message-list.c (message_list_select): Update
	message_list_select_next to do either next or previous.

	* folder-browser.c (etable_key): Make 'n' and 'p' do next and
	previous unread message.

	* mail-ops.c (select_first_unread): Update.
	(real_fetch_mail): clean up a bit.

svn path=/trunk/; revision=4046
2000-07-10 20:04:32 +00:00
f58676daaf Switched from ETable to ETableScrolled.
2000-07-10  Christopher James Lahey  <clahey@helixcode.com>

	* message-list.c, message-list.h: Switched from ETable to
	ETableScrolled.

svn path=/trunk/; revision=4034
2000-07-10 11:04:39 +00:00
b90d829757 Fix a bug in previous commit that could cause infinite loops
svn path=/trunk/; revision=4023
2000-07-09 22:39:34 +00:00
5a4f9250eb Don't g_warn if the user selects a fake tree parent.
* message-list.c (get_message_info): Don't g_warn if the user
	selects a fake tree parent.
	(message_list_select_next): Ignore fake rows
	(build_tree): Store the "root_subject" for fake rows
	(ml_tree_value_at): Display the correct subject for fake rows.
	(on_cursor_change_cmd): Update for the other changes and set
	cursor_uid to NULL when the cursor is on a fake row.

	* mail-ops.c (reply): Don't try to reply when no (real) message is
	selected.
	(forward_msg): Ditto.

svn path=/trunk/; revision=4021
2000-07-09 16:06:15 +00:00
173e577c05 Remove setting of dnd_code since that's handled internally to ETable.
2000-07-09  Christopher James Lahey  <clahey@helixcode.com>

	* message-list.c: Remove setting of dnd_code since that's handled
	internally to ETable.

svn path=/trunk/; revision=4014
2000-07-09 14:28:10 +00:00
1cc1f0a7a7 Add a "Threaded Message List" item to the "View" menu.
* folder-browser-factory.c (control_activate): Add a "Threaded
	Message List" item to the "View" menu.

	* message-list.c (message_list_toggle_threads): Handler for that.
	(build_flat): New function to build a "flat" message list using
	the tree model.
	(message_list_regenerate): Build tree or flat message list
	depending on the global setting.

svn path=/trunk/; revision=3999
2000-07-09 03:06:56 +00:00
1ffcdce023 Small fix to stop uid data from being set on a message-list tree node when
2000-07-08  Jeffrey Stedfast  <fejj@helixcode.com>

	* message-list.c (build_tree): Small fix to stop uid data from
	being set on a message-list tree node when it didn't correspond
	to an actual message.

svn path=/trunk/; revision=3978
2000-07-08 21:00:09 +00:00
9933ddf368 Fix Jeff's FIXME: This does get called with out-of-range data sometimes,
* message-list.c (get_message_info): Fix Jeff's FIXME: This does
	get called with out-of-range data sometimes, so we do need the
	check. Use e_table_model_row_count to get the actual right answer.

svn path=/trunk/; revision=3976
2000-07-08 18:28:01 +00:00
fffc023e64 This wasn't quite right, it will now work but still isn't perfect. See
2000-07-07  Jeffrey Stedfast  <fejj@helixcode.com>

	* message-list.c (get_message_info): This wasn't quite right, it
	will now work but still isn't perfect. See FIXME comment.

svn path=/trunk/; revision=3965
2000-07-07 22:43:31 +00:00
2d33aa8a77 Lots of changes. Store uids as node data on the tree nodes and use those
* message-list.c: Lots of changes. Store uids as node data on the
	tree nodes and use those rather than rows where possible. (The
	concept of "row" is just getting too complicated.) Get rid of the
	summary_table, because given a uid we can call
	camel_folder_get_message_info, which makes more sense than keeping
	a separate uid->row hash table ourselves.

	(get_message_info): update
	(get_message_row): removed
	(ml_col_cound, ml_row_count, ml_value_at, ml_set_value_at,
	ml_cell_is_editable, ml_duplicate_value, ml_free_value,
	ml_initialize_value, ml_value_is_empty, ml_value_to_string):
	Removed. We always use the tree model now.
	(message_list_init): Remove the non-tree code.
	(build_tree): store uids in the tree rather than row numbers,
	and build the message_list->uid_rowmap to map from uids to rows
	when needed.
	(message_list_regenerate): Renamed from _set_search, since it's
	used to redraw in non-search cases too.
	(message_changed): Use the uid_rowmap to get a model row number.

	* message-thread.c (thread_messages): Change the interface on this
	to work with the new MessageList.

	* folder-browser.c (search_set, folder_browser_clear_search):
	s/message_list_set_search/message_list_regenerate/

svn path=/trunk/; revision=3960
2000-07-07 21:15:11 +00:00
a4a1a93648 Handle a row number of -1 properly.
2000-07-07  Christopher James Lahey  <clahey@helixcode.com>

	* message-list.c (get_message_info): Handle a row number of -1
	properly.

svn path=/trunk/; revision=3947
2000-07-07 16:13:37 +00:00
2fd4f883fa Map tree model row numbers to summary row numbers. (ml_tree_value_at,
* message-list.c (get_message_info): Map tree model row numbers to
	summary row numbers.
	(ml_tree_value_at, ml_tree_set_value_at,
	ml_tree_is_cell_editable): So don't do that here.

svn path=/trunk/; revision=3938
2000-07-07 03:07:16 +00:00
443433db56 fix warnings.
* folder-browser-factory.c, folder-browser.c, mail-ops.c,
	message-list.c: fix warnings.

svn path=/trunk/; revision=3931
2000-07-07 00:47:24 +00:00
647cc8b636 New function to select the first message on or after the given row that
* message-list.c (message_list_select_next): New function to
	select the first message on or after the given row that meets
	certain flag criteria.

	* folder-browser.c (etable_key): call message_list_select_next to
	select next non-deleted message after Delete.

	* mail-ops.c (real_fetch_mail): call message_list_select_next to
	select first unread message in current folder if it changes.
	(real_delete_msg): Remove the code to move the etable cursor. It
	only makes sense really if you deleted the message with the
	keyboard, so do it from there.

svn path=/trunk/; revision=3927
2000-07-06 21:33:07 +00:00
1e8c9c87a0 Well, delete, expunge, appear broken, it sorts (initially) at least now.
* message-thread.c (sort_thread): sort messages based on date for
	the initial sort order.
	(thread_messages_free): Implement.

	(message_list_init): set the root node invisible afterall.
	(message_list_set_search): Clear the old tree before putting in a
	new one.

svn path=/trunk/; revision=3922
2000-07-06 12:32:55 +00:00
6cabd25cfa Setup the subject renderer to a tree in tree mode. (on_cursor_change_cmd):
2000-07-06  Not Zed  <NotZed@HelixCode.com>

        * message-list.c (message_list_init_header): Setup the subject
        renderer to a tree in tree mode.
        (on_cursor_change_cmd): For a tree model, map the view row to the
        data row.
        (build_tree): Builds the tree data structure of all messages.
        (message_list_set_search): For a tree model, build the tree here.
        (ml_tree_icon_at): Icon callback, returns nothing.
        (ml_tree_value_at):
        (ml_tree_set_value_at):
        (ml_tree_is_cell_editable): Maps tree node to data row, and calls
        the equivalent table callback
        (message_list_init_renderers): Setup the tree renderer if needed.

        * message-list.h: Add a tree renderer to render list, and
        tree_view indicator.

svn path=/trunk/; revision=3921
2000-07-06 08:44:01 +00:00
7ad9e59992 call mail_display_set_message with NULL if the message we tried to select
* message-list.c (select_msg): call mail_display_set_message with
	NULL if the message we tried to select doesn't exist (probably
	meaning we tried to selecte the first message and the folder is
	empty.)

	* mail-display.c (mail_display_set_message): deal with NULL as an
	input (meaning "undisplay previous message and display nothing").

svn path=/trunk/; revision=3879
2000-07-04 00:56:45 +00:00
ee429c5ada Updated to reflect camel-folder changes.
2000-07-01  Jeffrey Stedfast  <fejj@helixcode.com>

	* message-list.c (get_message_info):
	(select_msg): Updated to reflect camel-folder changes.

	* mail-ops.c (real_fetch_mail): Modified to reflect camel-folder
	changes.

svn path=/trunk/; revision=3844
2000-07-01 04:55:46 +00:00
6f95a96083 New function, a wrapper around e_table_selected_row_foreach, which calls
* message-list.c (message_list_foreach): New function, a wrapper
	around e_table_selected_row_foreach, which calls the callback
	function with UIDs rather than row numbers.

	* folder-browser-factory.c: Remove never-used "Find" button from
	the toolbar and replace it with "Refile". (We need a better icon
	for this...). Hook up "Refile" to "refile_msg".

	* mail-ops.c (refile_msg): Call the shell's user_select_folder
	routine, and then use message_list_foreach and real_refile_msg to
	do the work.
	(delete_msg): Update to use message_list_foreach.

	* folder-browser.c (mail_uri_to_folder): new function, extracted
	from folder_browser_load_folder, to turn a URI into a folder.
	(folder_browser_load_folder): Use it.

svn path=/trunk/; revision=3833
2000-06-30 20:05:47 +00:00
263cc3a01f use the ETable row_selection signal to track how many rows are selected.
* message-list.c (on_row_selection): use the ETable row_selection
	signal to track how many rows are selected. Eventually we will use
	this info to disable toolbar buttons when you have too few/too
	many messages selected, but the current toolbar widget doesn't
	allow that.

	* message-list.h, message-list.c, mail-ops.c: Change selected_row
	and selected_uid fields of MessageList to cursor_row and
	cursor_uid to be more correct according to the new ETable
	interfaces.

svn path=/trunk/; revision=3829
2000-06-30 17:46:48 +00:00
3649d5dc6d From mail:
2000-06-29  Christopher James Lahey  <clahey@helixcode.com>

	* message-list.c, mail-ops.c: Changed the name of
	e_table_select_row to e_table_set_cursor_row.

From widgets/e-table:

2000-06-29  Christopher James Lahey  <clahey@helixcode.com>

	* e-table-click-to-add.c: Made this appear a bit better.

	* e-table-defines.h: Cleaned this up a bit, added
	ETableForeachFunc.

	* e-table-group-container.c, e-table-group-leaf.c,
	e-table-group.c, e-table-group.h, e-table-item.c, e-table-item.h,
	e-table.c, e-table.h: Changed e_table_select_row to
	e_table_set_cursor_row.  Changed e_table_get_selected_view_row to
	e_table_get_cursor_row.  Added e_table_selected_row_foreach.

	* e-table-header-item.c: Fixed some warnings.

	* e-table-sorted-variable.c: Removed some unneeded debugging print
	statments.

	* e-tree-example-1.c: Changed e_table_get_selected_view_row to
	e_table_get_cursor_row.

svn path=/trunk/; revision=3799
2000-06-29 19:22:24 +00:00
d2875d9e05 Fixes brought to us by Purify
svn path=/trunk/; revision=3792
2000-06-29 15:31:01 +00:00
66c6a7abb4 make this compile.
svn path=/trunk/; revision=3780
2000-06-28 21:31:04 +00:00
4d1f7683d0 Add debugging messages
svn path=/trunk/; revision=3779
2000-06-28 20:40:31 +00:00
09f78111f5 message-list.c: added prototype for filter_date()
svn path=/trunk/; revision=3772
2000-06-28 15:02:30 +00:00
b06797413e Made dates display grouping information properly.
2000-06-27  Christopher James Lahey  <clahey@helixcode.com>

	* message-list.c: Made dates display grouping information
	properly.

svn path=/trunk/; revision=3765
2000-06-27 20:52:33 +00:00
37a9065a63 Little teeny fixes
svn path=/trunk/; revision=3764
2000-06-27 19:07:06 +00:00
9135a5d0e4 Solaris compatibility config check + implementation (ctime_r arguments)
svn path=/trunk/; revision=3754
2000-06-27 15:04:15 +00:00
db8314acf5 Work around mismatched ctime_r functions. This will be fixed.
2000-06-27  Christopher James Lahey  <clahey@helixcode.com>

	* message-list.c: Work around mismatched ctime_r functions.  This
	will be fixed.

svn path=/trunk/; revision=3753
2000-06-27 14:51:40 +00:00
e4de45da5f Calculate height including if clip_height is set to -1.
2000-06-26  Christopher James Lahey  <clahey@helixcode.com>

	* widgets/e-text/e-text.c: Calculate height including if
	clip_height is set to -1.

From addressbook/ChangeLog:

2000-06-26  Christopher James Lahey  <clahey@helixcode.com>

	* contact-editor/e-contact-editor-categories.c,
	addressbook/gui/component/e-cardlist-model.c: Added
	value_to_string handlers.

	* demo/addressbook-widget.c, demo/demo.c: Removed usage of "x" and
	"y" arguments.

	* addressbook/gui/component/addressbook.c: Activated Click To Add
	and set the click to add message.

	* addressbook/gui/component/e-addressbook-model.c: Added
	value_to_string and append_row handlers.

	* addressbook/gui/component/e-select-names.c: Added a column.

From calendar/ChangeLog:

2000-06-26  Christopher James Lahey  <clahey@helixcode.com>

	* gui/calendar-model.c: Added an #ifdefed value_to_string handler
	assignment.

From camel/ChangeLog:

2000-06-26  Christopher James Lahey  <clahey@helixcode.com>

	* providers/mbox/camel-mbox-summary.c: Added debugging
	information.

From composer/ChangeLog:

2000-06-26  Christopher James Lahey  <clahey@helixcode.com>

	* Makefile.am: Added e-msg-composer-select-file.h for make
	distcheck.

From e-util/ChangeLog:

2000-06-26  Christopher James Lahey  <clahey@helixcode.com>

	* Makefile.am: Added e-canvas-vbox.c and e-canvas-vbox.h.

	* e-canvas-vbox.c, e-canvas-vbox.h: New canvas object to act like
	a vbox using the reflow system.

From mail/ChangeLog:

2000-06-26  Christopher James Lahey  <clahey@helixcode.com>

	* message-list.c: Added a value_to_string handler.

From shell/ChangeLog:

2000-06-26  Christopher James Lahey  <clahey@helixcode.com>

	* glade/Makefile.am: Added EXTRA_DIST for make distcheck.

From widgets/e-table/ChangeLog:

2000-06-26  Christopher James Lahey  <clahey@helixcode.com>

	* Makefile.am: Added e-table-click-to-add.c,
	e-table-click-to-add.h, e-table-one.c, and e-table-one.h.

	* e-table-click-to-add.c, e-table-click-to-add.h: A new canvas
	item that represents a single row that sometimes exists.  It's for
	adding new rows to your table.

	* e-table-example-1.c, e-table-example-2.c, e-table-size-test.c,
	test-check.c, test-cols.c, test-table.c: Added value_to_string handlers.

	* e-table-group-container.c: Use value_to_string to make grouping
	not crash for non string columns.  Made some changes to work
	properly in an ECanvasVbox.

	* e-table-group-leaf.c, e-table-item.c: Made some changes to work
	properly in an ECanvasVbox.

	* e-table-model.c, e-table-model.h: Added append_row and
	value_to_string methods.

	* e-table-one.c, e-table-one.h: Given a source ETableModel, this
	provides a single row model that uses the initialize_value,
	duplicate_value, free_value, and value_is_empty methods of the
	original source to implement set_value and value_at (and proxies
	most of the other methods.)  This is used for ETableClickToAdd.

	* e-table-simple.c, e-table-simple.h: Added append_row and
	value_to_string handlers.  append_row uses a GtkArg instead of a
	parameter to e_table_simple_new.

	* e-table-subset.c: Added append_row and value_to_string handlers.

	* e-table.c, e-table.h: Use a vbox containing an ETableClickToAdd
	and an ETableItem instead of an ETableItem directly.  Only show
	the ETableClickToAdd if the top level of the xml SPEC has the
	attribute click-to-add set to some non-zero integer.
	(click-to-add="1").  Add a "click_to_add_message" argument.

	* e-tree-model.c: Add a commented out value_to_string handler.

From widgets/meeting-time-sel/ChangeLog:

2000-06-26  Christopher James Lahey  <clahey@helixcode.com>

	* Makefile.am: Added the include path to top_srcdir.

svn path=/trunk/; revision=3744
2000-06-27 00:51:06 +00:00
8e54fc772c Changed ml_value_at to return "" instead of NULL in some cases.
2000-06-22  Christopher James Lahey  <clahey@helixcode.com>

	* message-list.c: Changed ml_value_at to return "" instead of NULL
	in some cases.

svn path=/trunk/; revision=3697
2000-06-22 21:39:57 +00:00
930fe7cf7b Removed an erroneous comment.
2000-06-21  Christopher James Lahey  <clahey@helixcode.com>

	* message-list.c: Removed an erroneous comment.

svn path=/trunk/; revision=3687
2000-06-21 23:15:07 +00:00
4907469fb0 Update received date to work like sent date.
* message-list.c: Update received date to work like sent date.

svn path=/trunk/; revision=3678
2000-06-21 18:17:21 +00:00
b07386e871 Quick hack to prevent a NULL pointer dereference. Things need to be
* message-list.c (mark_msg_seen): Quick hack to prevent a NULL
	pointer dereference. Things need to be cleaned up a bit more here
	though.

svn path=/trunk/; revision=3653
2000-06-20 22:27:24 +00:00
b6225c748d Prevent double-freeing action on summary_table and uid_rowmap.
* message-list.c (message_list_set_folder): Prevent double-freeing
	action on summary_table and uid_rowmap.

svn path=/trunk/; revision=3615
2000-06-17 19:55:42 +00:00
78c8bb8577 Implement clicking on the envelope icon to set read/unread. Based on a
* message-list.c (ml_set_value_at): Implement clicking on the
	envelope icon to set read/unread. Based on a patch by clahey.
	(select_msg): keep the timeout id for the "seen" flagging in the
	message_list structure, so ml_set_value_at can clear it so it
	doesn't re-mark a message seen after you click it unseen.

svn path=/trunk/; revision=3601
2000-06-16 23:50:29 +00:00
9c21067261 new function to do a uid to row mapping. (mark_msg_seen, select_msg,
* message-list.c (get_message_row): new function to do a uid to
	row mapping.
	(mark_msg_seen, select_msg, message_changed,
	message_list_set_folder): Update for Camel flag changes.
	(on_cursor_change_cmd): Rename "row_to_select" to "selected_row",
	and keep a "selected_uid" as well.

	* mail-ops.c (composer_send_cb): Update for Camel flag changes,
	and fix some memory-handling bugs. (Free the post_send_data when
	the composer is destroyed, not when the user clicks "send", which
	could happen never, or more than once.)
	(delete_msg): Update for Camel flag changes, and fix the "holding
	down the delete key skips some messages" bug.

svn path=/trunk/; revision=3600
2000-06-16 23:11:10 +00:00
0f13b8f0bc Update for CamelFolder changes.
* mail-ops.c (fetch_mail):
	* component-factory.c (owner_unset_cb):
	* message-list.c (message_list_set_folder): Update for CamelFolder
	changes.

svn path=/trunk/; revision=3583
2000-06-15 22:22:20 +00:00
40adaa82b3 Removed the ETableModel thaw handler.
2000-06-12  Federico Mena Quintero  <federico@helixcode.com>

	* message-list.c: Removed the ETableModel thaw handler.

svn path=/trunk/; revision=3542
2000-06-13 00:40:38 +00:00
0dd54508bb install an idle function to select the row rather than doing it directly.
* message-list.c (select_row): install an idle function to
	select the row rather than doing it directly. Ugh. What a
	kludge, but at least it works now.

svn path=/trunk/; revision=3498
2000-06-09 22:44:44 +00:00
440b4825e9 Update for folder creation/existence changes.
* mail-ops.c (fetch_mail):
	* folder-browser.c (folder_browser_load_folder): Update for folder
	creation/existence changes.

	* message-list.c (message_list_set_folder): Remove the code to
	create the folder if it doesn't exist, since we don't want to do
	that.

svn path=/trunk/; revision=3455
2000-06-07 00:07:06 +00:00
dc11e4ea91 If the date in the summary is 0, output "?".
* message-list.c (filter_date): If the date in the summary is 0,
	output "?".

svn path=/trunk/; revision=3400
2000-06-02 19:49:50 +00:00
efc9f990dc Use camel_folder_free_summary instead of g_ptr_array_free. Unref the
2000-06-02  Christopher James Lahey  <clahey@helixcode.com>

	* message-list.c: Use camel_folder_free_summary instead of
	g_ptr_array_free.  Unref the folder when we're done with it.

svn path=/trunk/; revision=3389
2000-06-02 16:13:52 +00:00
1c8ef2ee53 Made sent column as wide as from column.
2000-06-02  Christopher James Lahey  <clahey@helixcode.com>

	* message-list.c: Made sent column as wide as from column.

svn path=/trunk/; revision=3373
2000-06-02 04:27:30 +00:00
df39895417 Add a date column. (COL_SENT_WIDTH_MIN): Make this wider. (ml_value_at):
* message-list.c: Add a date column.
	(COL_SENT_WIDTH_MIN): Make this wider.
	(ml_value_at): return the sent date (as a time_t) for COL_SENT.
	(Fix COL_TO too while I'm here.)
	(ml_duplicate_value, ml_free_value, ml_initialize_value,
	ml_value_is_empty): COL_SENT is numeric now.
	(message_list_init_renderers): Create a date renderer (using
	text_filter to translate the time_t into a string).
	(message_list_init_header): Use render_date for COL_SENT.

svn path=/trunk/; revision=3365
2000-06-02 02:32:10 +00:00