diff options
-rw-r--r-- | mail/ChangeLog | 5 | ||||
-rw-r--r-- | mail/message-list.c | 15 |
2 files changed, 19 insertions, 1 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog index 1462275027..3b92e4b649 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,8 @@ +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. + 2000-07-07 Dan Winship <danw@helixcode.com> * message-thread.c (remove_node): Add another argument "clast" diff --git a/mail/message-list.c b/mail/message-list.c index e4d5bee062..08d46ef93e 100644 --- a/mail/message-list.c +++ b/mail/message-list.c @@ -30,6 +30,8 @@ #include "art/tree-expanded.xpm" #include "art/tree-unexpanded.xpm" +#define d(x) x + /* * Default sizes for the ETable display * @@ -87,12 +89,23 @@ get_message_info (MessageList *message_list, int row) ETreePath *node; char *uid; - if (row >= g_hash_table_size (message_list->uid_rowmap)) + d(printf ("\t*** row = %d ***\n", row)); +#if 0 + /* FIXME: The reason this is commented out is because this is not a good + safety check. Let me explain: Since we can have more rows than actual messages, + the condition row >= [size] could fail beyond a certain point in the message + list. We need a way to account for the "No item in this view" rows */ + if (row >= g_hash_table_size (message_list->uid_rowmap)) { + d(printf ("\t*** max row = %d ***\n", g_hash_table_size (message_list->uid_rowmap))); return NULL; + } +#endif node = e_tree_model_node_at_row (model, row); + d(printf ("\t*** node = %p ***\n", node)); g_return_val_if_fail (node != NULL, NULL); uid = e_tree_model_node_get_data (model, node); + d(printf ("\t*** uid = %s ***\n", uid)); g_return_val_if_fail (uid != NULL, NULL); return camel_folder_get_message_info (message_list->folder, uid); |