diff options
author | Dan Winship <danw@src.gnome.org> | 2000-07-09 02:28:01 +0800 |
---|---|---|
committer | Dan Winship <danw@src.gnome.org> | 2000-07-09 02:28:01 +0800 |
commit | 9933ddf368367e576f5de7045690a3c21da40583 (patch) | |
tree | 970e12edd6ef556511f614ff827a90f4ee0d9cdd | |
parent | f1b8cb078f610e99084a62a6dbcdd63c6e4967b9 (diff) | |
download | gsoc2013-evolution-9933ddf368367e576f5de7045690a3c21da40583.tar gsoc2013-evolution-9933ddf368367e576f5de7045690a3c21da40583.tar.gz gsoc2013-evolution-9933ddf368367e576f5de7045690a3c21da40583.tar.bz2 gsoc2013-evolution-9933ddf368367e576f5de7045690a3c21da40583.tar.lz gsoc2013-evolution-9933ddf368367e576f5de7045690a3c21da40583.tar.xz gsoc2013-evolution-9933ddf368367e576f5de7045690a3c21da40583.tar.zst gsoc2013-evolution-9933ddf368367e576f5de7045690a3c21da40583.zip |
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
-rw-r--r-- | mail/ChangeLog | 6 | ||||
-rw-r--r-- | mail/message-list.c | 15 |
2 files changed, 7 insertions, 14 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog index 3b92e4b649..c2f9e4d539 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,9 @@ +2000-07-08 Dan Winship <danw@helixcode.com> + + * 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. + 2000-07-07 Jeffrey Stedfast <fejj@helixcode.com> * message-list.c (get_message_info): This wasn't quite right, it diff --git a/mail/message-list.c b/mail/message-list.c index 08d46ef93e..16171f6b3a 100644 --- a/mail/message-list.c +++ b/mail/message-list.c @@ -30,8 +30,6 @@ #include "art/tree-expanded.xpm" #include "art/tree-unexpanded.xpm" -#define d(x) x - /* * Default sizes for the ETable display * @@ -89,23 +87,12 @@ get_message_info (MessageList *message_list, int row) ETreePath *node; char *uid; - 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))); + if (row >= e_table_model_row_count (message_list->table_model)) 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); |