list a message comes from and create the rule for it on the fly.
(Many thanks to Joakim for suggesting the way to implement this.)
Also, use the new shiny toolbar icons from TigerT and mark some
strings for translation.
svn path=/trunk/; revision=5362
* 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-11 Christopher James Lahey <clahey@helixcode.com>
* mail-format.c, mail-tools.h, message-list.c: Fixed a warning.
svn path=/trunk/; revision=4760
* 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-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-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 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 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 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-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
* 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-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-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
* 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-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
* 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 Christopher James Lahey <clahey@helixcode.com>
* message-list.c, message-list.h: Switched from ETable to
ETableScrolled.
svn path=/trunk/; revision=4034
* 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 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
* 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-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
* 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-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
* 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 Christopher James Lahey <clahey@helixcode.com>
* message-list.c (get_message_info): Handle a row number of -1
properly.
svn path=/trunk/; revision=3947
* 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
* 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
* 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 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
* 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
* 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