aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mail/ChangeLog6
-rw-r--r--mail/message-list.c15
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);