aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
Diffstat (limited to 'mail')
-rw-r--r--mail/ChangeLog7
-rw-r--r--mail/message-list.c18
2 files changed, 18 insertions, 7 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index b9e71fb420..8ba42c5252 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,10 @@
+2000-07-06 Dan Winship <danw@helixcode.com>
+
+ * 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.
+
2000-07-06 JP Rosevear <jpr@arcavia.com>
* mail-config.glade*: Glade files for the configuration dialog.
diff --git a/mail/message-list.c b/mail/message-list.c
index aafdb35d97..edb919ad4f 100644
--- a/mail/message-list.c
+++ b/mail/message-list.c
@@ -96,9 +96,14 @@ get_message_info(MessageList *message_list, gint row)
}
} else
g_warning ("get_message_info: row %d out of range", row);
- } else {
- if (row<message_list->summary_table->len)
- info = message_list->summary_table->pdata[row];
+ } else if (row < message_list->summary_table->len) {
+ ETreeModel *model = (ETreeModel *)message_list->table_model;
+ ETreePath *node;
+
+ node = e_tree_model_node_at_row (model, row);
+ row = GPOINTER_TO_INT (e_tree_model_node_get_data (model, node));
+
+ info = message_list->summary_table->pdata[row];
}
return info;
@@ -573,8 +578,7 @@ ml_tree_icon_at (ETreeModel *etm, ETreePath *path, void *model_data)
static void *
ml_tree_value_at (ETreeModel *etm, ETreePath *path, int col, void *model_data)
{
- /* we just map the node to a row id, and reuse the other value_at */
- int row = (int)e_tree_model_node_get_data (etm, path);
+ int row = e_tree_model_row_of_node (etm, path);
return ml_value_at((ETableModel *)etm, col, row, model_data);
}
@@ -582,7 +586,7 @@ ml_tree_value_at (ETreeModel *etm, ETreePath *path, int col, void *model_data)
static void
ml_tree_set_value_at (ETreeModel *etm, ETreePath *path, int col, const void *val, void *model_data)
{
- int row = (int)e_tree_model_node_get_data (etm, path);
+ int row = e_tree_model_row_of_node (etm, path);
ml_set_value_at((ETableModel *)etm, col, row, val, model_data);
}
@@ -590,7 +594,7 @@ ml_tree_set_value_at (ETreeModel *etm, ETreePath *path, int col, const void *val
static gboolean
ml_tree_is_cell_editable (ETreeModel *etm, ETreePath *path, int col, void *model_data)
{
- int row = (int)e_tree_model_node_get_data (etm, path);
+ int row = e_tree_model_row_of_node (etm, path);
return ml_is_cell_editable((ETableModel *)etm, col, row, model_data);
}