Commit Graph

172 Commits

Author SHA1 Message Date
e3b786b5cf Add support for copying messages
svn path=/trunk/; revision=4845
2000-08-15 19:10:45 +00:00
9178fed291 Don't clear the tree here. If two "folder_changed"s arrive in close
* message-list.c (cleanup_regenerate_messagelist): Don't clear the
        tree here. If two "folder_changed"s arrive in close succession,
        then one possible ordering of events is
        cleanup_regenerate_messagelist, cleanup_regenerate_messagelist,
        cleanup_thread_messages, cleanup_thread_messages. Which would
        result in the message list being filled in twice without being
        cleared in between. So don't clear it until the rebuilding
        function itself is called.
        (clear_tree): New function to empty out the ETreeModel in the
        message list.
        (build_tree): Change to simpler interface. Call clear_tree.
        (build_subtree): Does most of the work of the old build_tree
        (build_flat): Remove unused arg. Call clear_tree.

        * message-thread.c (cleanup_thread_messages): Update for
        build_tree interface change.

svn path=/trunk/; revision=4787
2000-08-12 23:07:19 +00:00
c28cd1ebd7 Fixed a warning.
2000-08-11  Christopher James Lahey  <clahey@helixcode.com>

	* mail-format.c, mail-tools.h, message-list.c: Fixed a warning.

svn path=/trunk/; revision=4760
2000-08-12 01:25:32 +00:00
1fa80ef1b7 Fix the camel-folder's thaw handler. Implement event forwarding into the main thread.
svn path=/trunk/; revision=4744
2000-08-11 17:35:14 +00:00
5d79af0da6 If the caller passes "-1" for the model row, translate that to view row 0.
* message-list.c (message_list_select): If the caller passes "-1"
	for the model row, translate that to view row 0.

	* message-list.c (idle_select_row):
	* mail-callbacks.c (select_first_unread): Use new
	message_list_select kludge^H^H^H^H^H^Hfeature

svn path=/trunk/; revision=4743
2000-08-11 17:03:25 +00:00
d5f9483b16 Fixed some warnings.
2000-08-10  Christopher James Lahey  <clahey@helixcode.com>

	* folder-browser-factory.c, message-list.c, message-thread.c,
	session.c: Fixed some warnings.

svn path=/trunk/; revision=4722
2000-08-11 03:41:26 +00:00
8cb514d6dd Merge with camel-async.
svn path=/trunk/; revision=4687
2000-08-10 17:30:50 +00:00
bcbb63c59f Update for append_message api change.
2000-08-10  Not Zed  <NotZed@HelixCode.com>

        * mail-local.c (do_local_reconfigure_folder): Update for
        append_message api change.

        * message-list.c (message_list_regenerate): Change for search api
        change.
        (ml_tree_value_at): Add a colour column, based on the colour
        assigned in the summary.
        (message_list_init_renderers): Init colour column.

svn path=/trunk/; revision=4685
2000-08-10 16:37:02 +00:00
4bbaf023cb Nicify a little, add in a menu separator between VFolder and Filter stuff.
2000-08-09  Jeffrey Stedfast  <fejj@helixcode.com>

	* message-list.c (on_right_click): Nicify a little, add in a menu
	separator between VFolder and Filter stuff.

svn path=/trunk/; revision=4657
2000-08-09 19:33:18 +00:00
443b5a82a9 Helper function to add with confirm.
2000-08-09  Not Zed  <NotZed@HelixCode.com>

	* mail-autofilter.c (filter_gui_add_from_message): Helper function to add with confirm.

	* message-list.c (on_right_click): Added menu to install vfolders/filters from message.

svn path=/trunk/; revision=4646
2000-08-09 07:20:37 +00:00
e7697db4fc Fixed some warnings.
2000-08-09  Christopher James Lahey  <clahey@helixcode.com>

	* mail-display.c, mail-format.c, mail-ops.c: Fixed some warnings.

	* message-list.c: Fix the call to e_popup_menu_run to match the
	new signature.

svn path=/trunk/; revision=4634
2000-08-09 05:30:37 +00:00
0efeeb2a5d Attached a double_click signal handler (on_double_click): Our lovely new
2000-08-09  Jeffrey Stedfast  <fejj@helixcode.com>

	* message-list.c (message_list_init): Attached a double_click
	signal handler
	(on_double_click): Our lovely new double_click callback. Will
	display the current selected message in a new window

svn path=/trunk/; revision=4624
2000-08-09 04:11:34 +00:00
491b3c3c77 Value for threaded list view is now saved via gnome-config. This means that you can FINALLY shut off the threaded view once and for all :)
svn path=/trunk/; revision=4621
2000-08-09 02:06:20 +00:00
b9a9cd3a86 New convenience function with params of a normal Gtk callback function. We
2000-08-08  Jeffrey Stedfast  <fejj@helixcode.com>

	* mail-ops.c (view_msg): New convenience function with params of a
	normal Gtk callback function. We also now create a new
	FolderBrowser object so that the message-view window isn't tied to
	the display in the main window
	(view_message): Now calls view_msg (this function is a bonobo
	callback and can't be used with gtk widgets)
	(edit_msg): Same idea as view_msg()
	(edit_message): Again, same as view_message()

	* message-list.c (on_right_click): Callback for creating an
	e-popup-menu
	(message_list_init): Added a right_click event to trigger a pop-up
	menu to be displayed

svn path=/trunk/; revision=4619
2000-08-09 01:09:55 +00:00
520d69a638 Clarify that the input row is a model row, and swap it to a view row when
* message-list.c (message_list_select): Clarify that the input row
	is a model row, and swap it to a view row when finding the
	next/previous row.
	(idle_select_row): Select view row 0, not model row 0.

	* mail-ops.c (select_first_unread): Start from view row 0, not
	model row 0.

svn path=/trunk/; revision=4570
2000-08-07 17:03:06 +00:00
61fae09dc0 Fix a possible crash when using the quicksearch by freeing the UID
array correctly.

svn path=/trunk/; revision=4525
2000-08-04 04:04:11 +00:00
712b10f964 Emit "model_pre_change" where appropriate.
2000-08-02  Christopher James Lahey  <clahey@helixcode.com>

	* mail-ops.c, message-list.c: Emit "model_pre_change" where
	appropriate.

svn path=/trunk/; revision=4475
2000-08-02 17:21:30 +00:00
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