aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2013-06-20 22:54:41 +0800
committerMatthew Barnes <mbarnes@redhat.com>2013-06-21 03:31:51 +0800
commit43ffc445dd3ce93f3129b517ebe6ea6f3da25f18 (patch)
treec5600afc3b887e365235503a7f462d2b8e3c13bf
parent0eaa11530b1c08bea188f4ca69a3dba1609c235e (diff)
downloadgsoc2013-evolution-43ffc445dd3ce93f3129b517ebe6ea6f3da25f18.tar.gz
gsoc2013-evolution-43ffc445dd3ce93f3129b517ebe6ea6f3da25f18.tar.zst
gsoc2013-evolution-43ffc445dd3ce93f3129b517ebe6ea6f3da25f18.zip
Remove e_tree_node_at_row().
Reducing API bloat. Do this instead: adapter = e_tree_get_table_adapter (tree); path = e_tree_table_adapter_node_at_row (adapter, row);
-rw-r--r--doc/reference/evolution-util/evolution-util-sections.txt1
-rw-r--r--e-util/e-tree.c17
-rw-r--r--e-util/e-tree.h2
-rw-r--r--mail/message-list.c7
4 files changed, 8 insertions, 19 deletions
diff --git a/doc/reference/evolution-util/evolution-util-sections.txt b/doc/reference/evolution-util/evolution-util-sections.txt
index a3132c5e67..50be301721 100644
--- a/doc/reference/evolution-util/evolution-util-sections.txt
+++ b/doc/reference/evolution-util/evolution-util-sections.txt
@@ -4207,7 +4207,6 @@ e_tree_drag_source_set
e_tree_drag_source_unset
e_tree_drag_begin
e_tree_is_dragging
-e_tree_node_at_row
e_tree_row_of_node
e_tree_root_node_is_visible
e_tree_show_node
diff --git a/e-util/e-tree.c b/e-util/e-tree.c
index e3a4e76bc8..67776e977a 100644
--- a/e-util/e-tree.c
+++ b/e-util/e-tree.c
@@ -1532,6 +1532,7 @@ et_table_rows_deleted (ETableModel *table_model,
gint count,
ETree *tree)
{
+ ETreeTableAdapter *adapter;
ETreePath * node, * prev_node;
/* If the cursor is still valid after this deletion, we're done */
@@ -1539,7 +1540,8 @@ et_table_rows_deleted (ETableModel *table_model,
|| row == 0)
return;
- prev_node = e_tree_node_at_row (tree, row - 1);
+ adapter = e_tree_get_table_adapter (tree);
+ prev_node = e_tree_table_adapter_node_at_row (adapter, row - 1);
node = e_tree_get_cursor (tree);
/* Check if the cursor is a child of the node directly before the
@@ -2190,19 +2192,6 @@ e_tree_view_to_model_row (ETree *tree,
return view_row;
}
-ETreePath
-e_tree_node_at_row (ETree *tree,
- gint row)
-{
- ETreePath path = { 0 };
-
- g_return_val_if_fail (E_IS_TREE (tree), path);
-
- path = e_tree_table_adapter_node_at_row (tree->priv->etta, row);
-
- return path;
-}
-
gint
e_tree_row_of_node (ETree *tree,
ETreePath path)
diff --git a/e-util/e-tree.h b/e-util/e-tree.h
index 362c4a8274..29cee6ef4f 100644
--- a/e-util/e-tree.h
+++ b/e-util/e-tree.h
@@ -273,8 +273,6 @@ GdkDragContext *e_tree_drag_begin (ETree *tree,
gboolean e_tree_is_dragging (ETree *tree);
/* Adapter functions */
-ETreePath e_tree_node_at_row (ETree *tree,
- gint row);
gint e_tree_row_of_node (ETree *tree,
ETreePath path);
gboolean e_tree_root_node_is_visible (ETree *tree);
diff --git a/mail/message-list.c b/mail/message-list.c
index 9cd9bf5980..cda78f9e31 100644
--- a/mail/message-list.c
+++ b/mail/message-list.c
@@ -3528,6 +3528,7 @@ is_node_selectable (MessageList *message_list,
static gchar *
find_next_selectable (MessageList *message_list)
{
+ ETreeTableAdapter *adapter;
GNode *node;
gint last;
gint vrow_orig;
@@ -3535,6 +3536,8 @@ find_next_selectable (MessageList *message_list)
ETree *et = E_TREE (message_list);
CamelMessageInfo *info;
+ adapter = e_tree_get_table_adapter (E_TREE (message_list));
+
node = g_hash_table_lookup (
message_list->uid_nodemap, message_list->cursor_uid);
if (node == NULL)
@@ -3553,7 +3556,7 @@ find_next_selectable (MessageList *message_list)
vrow = vrow_orig + 1;
while (vrow < last) {
- node = e_tree_node_at_row (et, vrow);
+ node = e_tree_table_adapter_node_at_row (adapter, vrow);
info = get_message_info (message_list, node);
if (info && is_node_selectable (message_list, info))
return g_strdup (camel_message_info_uid (info));
@@ -3565,7 +3568,7 @@ find_next_selectable (MessageList *message_list)
vrow = vrow_orig - 1;
while (vrow >= 0) {
- node = e_tree_node_at_row (et, vrow);
+ node = e_tree_table_adapter_node_at_row (adapter, vrow);
info = get_message_info (message_list, node);
if (info && is_node_selectable (message_list, info))
return g_strdup (camel_message_info_uid (info));