[evolution] Remove e_tree_selected_row_foreach().



commit 31c6240eeba58231acd5c14e1a8b6e50d0bdcfb9
Author: Matthew Barnes <mbarnes redhat com>
Date:   Wed Jun 19 22:09:07 2013 -0400

    Remove e_tree_selected_row_foreach().
    
    Reducing API bloat.  Do this instead:
    
      selection = (ESelectionModel *) e_tree_get_selection_model (tree);
      e_selection_model_foreach (selection, callback, closure);

 .../evolution-util/evolution-util-sections.txt     |    1 -
 e-util/e-tree.c                                    |   12 ------------
 e-util/e-tree.h                                    |    3 ---
 mail/message-list.c                                |    5 +++--
 4 files changed, 3 insertions(+), 18 deletions(-)
---
diff --git a/doc/reference/evolution-util/evolution-util-sections.txt 
b/doc/reference/evolution-util/evolution-util-sections.txt
index 23f11a4..5a718f3 100644
--- a/doc/reference/evolution-util/evolution-util-sections.txt
+++ b/doc/reference/evolution-util/evolution-util-sections.txt
@@ -4192,7 +4192,6 @@ e_tree_load_state
 e_tree_show_cursor_after_reflow
 e_tree_set_cursor
 e_tree_get_cursor
-e_tree_selected_row_foreach
 e_tree_selected_path_foreach
 e_tree_path_foreach
 e_tree_get_printable
diff --git a/e-util/e-tree.c b/e-util/e-tree.c
index 5ed2e00..be43ffa 100644
--- a/e-util/e-tree.c
+++ b/e-util/e-tree.c
@@ -1910,18 +1910,6 @@ e_tree_get_cursor (ETree *tree)
 }
 
 void
-e_tree_selected_row_foreach (ETree *tree,
-                             EForeachFunc callback,
-                             gpointer closure)
-{
-       g_return_if_fail (E_IS_TREE (tree));
-
-       e_selection_model_foreach (tree->priv->selection,
-                                 callback,
-                                 closure);
-}
-
-void
 e_tree_selected_path_foreach (ETree *tree,
                               ETreeForeachFunc callback,
                               gpointer closure)
diff --git a/e-util/e-tree.h b/e-util/e-tree.h
index 6882668..50fbbb6 100644
--- a/e-util/e-tree.h
+++ b/e-util/e-tree.h
@@ -217,9 +217,6 @@ void                e_tree_set_cursor               (ETree *tree,
 
 /* NULL means we don't have the cursor. */
 ETreePath      e_tree_get_cursor               (ETree *tree);
-void           e_tree_selected_row_foreach     (ETree *tree,
-                                                EForeachFunc callback,
-                                                gpointer closure);
 void           e_tree_selected_path_foreach    (ETree *tree,
                                                 ETreeForeachFunc callback,
                                                 gpointer closure);
diff --git a/mail/message-list.c b/mail/message-list.c
index bbad9e4..d15a202 100644
--- a/mail/message-list.c
+++ b/mail/message-list.c
@@ -4817,12 +4817,13 @@ ml_getselcount_cb (gint model_row,
 guint
 message_list_selected_count (MessageList *message_list)
 {
+       ESelectionModel *selection;
        struct ml_count_data data = { message_list, 0 };
 
        g_return_val_if_fail (IS_MESSAGE_LIST (message_list), 0);
 
-       e_tree_selected_row_foreach (
-               E_TREE (message_list), ml_getselcount_cb, &data);
+       selection = e_tree_get_selection_model (E_TREE (message_list));
+       e_selection_model_foreach (selection, ml_getselcount_cb, &data);
 
        return data.count;
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]