aboutsummaryrefslogtreecommitdiffstats
path: root/e-util
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2013-06-16 08:15:46 +0800
committerMatthew Barnes <mbarnes@redhat.com>2013-06-16 08:15:46 +0800
commitbd6d0c3222da89b61f04dee58ab2a2ca9fd878bc (patch)
treea52f1cf234c539776086783cc8233436911443d6 /e-util
parent6ee6427afd6d158c62563c0f1bf6ba2067460dca (diff)
downloadgsoc2013-evolution-bd6d0c3222da89b61f04dee58ab2a2ca9fd878bc.tar
gsoc2013-evolution-bd6d0c3222da89b61f04dee58ab2a2ca9fd878bc.tar.gz
gsoc2013-evolution-bd6d0c3222da89b61f04dee58ab2a2ca9fd878bc.tar.bz2
gsoc2013-evolution-bd6d0c3222da89b61f04dee58ab2a2ca9fd878bc.tar.lz
gsoc2013-evolution-bd6d0c3222da89b61f04dee58ab2a2ca9fd878bc.tar.xz
gsoc2013-evolution-bd6d0c3222da89b61f04dee58ab2a2ca9fd878bc.tar.zst
gsoc2013-evolution-bd6d0c3222da89b61f04dee58ab2a2ca9fd878bc.zip
Remove e_tree_model_has_get_node_by_id().
It always returned TRUE.
Diffstat (limited to 'e-util')
-rw-r--r--e-util/e-tree-model.c21
-rw-r--r--e-util/e-tree-model.h2
-rw-r--r--e-util/e-tree-selection-model.c4
-rw-r--r--e-util/e-tree.c9
4 files changed, 5 insertions, 31 deletions
diff --git a/e-util/e-tree-model.c b/e-util/e-tree-model.c
index 881e82eb08..a590d8c974 100644
--- a/e-util/e-tree-model.c
+++ b/e-util/e-tree-model.c
@@ -461,27 +461,6 @@ e_tree_model_get_save_id (ETreeModel *tree_model,
}
/**
- * e_tree_model_has_get_node_by_id
- * @tree_model: The ETreeModel.
- *
- * XXX docs here.
- *
- * return values: Whether this tree can quickly get a node from its save id.
- */
-gboolean
-e_tree_model_has_get_node_by_id (ETreeModel *tree_model)
-{
- ETreeModelInterface *interface;
-
- g_return_val_if_fail (E_IS_TREE_MODEL (tree_model), FALSE);
-
- interface = E_TREE_MODEL_GET_INTERFACE (tree_model);
- g_return_val_if_fail (interface->has_get_node_by_id != NULL, FALSE);
-
- return interface->has_get_node_by_id (tree_model);
-}
-
-/**
* e_tree_model_get_node_by_id
* @tree_model: The ETreeModel.
* @save_id:
diff --git a/e-util/e-tree-model.h b/e-util/e-tree-model.h
index 4771304512..847632b035 100644
--- a/e-util/e-tree-model.h
+++ b/e-util/e-tree-model.h
@@ -76,7 +76,6 @@ struct _ETreeModelInterface {
gchar * (*get_save_id) (ETreeModel *tree_model,
ETreePath path);
- gboolean (*has_get_node_by_id) (ETreeModel *tree_model);
ETreePath (*get_node_by_id) (ETreeModel *tree_model,
const gchar *save_id);
@@ -165,7 +164,6 @@ gboolean e_tree_model_get_expanded_default
gint e_tree_model_column_count (ETreeModel *tree_model);
gchar * e_tree_model_get_save_id (ETreeModel *tree_model,
ETreePath path);
-gboolean e_tree_model_has_get_node_by_id (ETreeModel *tree_model);
ETreePath e_tree_model_get_node_by_id (ETreeModel *tree_model,
const gchar *save_id);
gpointer e_tree_model_sort_value_at (ETreeModel *tree_model,
diff --git a/e-util/e-tree-selection-model.c b/e-util/e-tree-selection-model.c
index 208d6aefb5..c58bfd5903 100644
--- a/e-util/e-tree-selection-model.c
+++ b/e-util/e-tree-selection-model.c
@@ -173,11 +173,9 @@ etsm_pre_change (ETreeModel *etm,
g_free (etsm->priv->cursor_save_id);
etsm->priv->cursor_save_id = NULL;
- if (e_tree_model_has_get_node_by_id (etm) &&
- etsm->priv->cursor_path) {
+ if (etsm->priv->cursor_path != NULL)
etsm->priv->cursor_save_id = e_tree_model_get_save_id (
etm, etsm->priv->cursor_path);
- }
}
static void
diff --git a/e-util/e-tree.c b/e-util/e-tree.c
index d5ec5acc4c..17cf0deb97 100644
--- a/e-util/e-tree.c
+++ b/e-util/e-tree.c
@@ -3175,11 +3175,10 @@ hover_timeout (gpointer data)
path = e_tree_table_adapter_node_at_row (et->priv->etta, row);
if (path && e_tree_model_node_is_expandable (et->priv->model, path)) {
if (!e_tree_table_adapter_node_is_expanded (et->priv->etta, path)) {
- if (e_tree_model_has_get_node_by_id (et->priv->model))
- et->priv->expanded_list = g_list_prepend (
- et->priv->expanded_list,
- e_tree_model_get_save_id (
- et->priv->model, path));
+ et->priv->expanded_list = g_list_prepend (
+ et->priv->expanded_list,
+ e_tree_model_get_save_id (
+ et->priv->model, path));
e_tree_table_adapter_node_set_expanded (
et->priv->etta, path, TRUE);