aboutsummaryrefslogtreecommitdiffstats
path: root/e-util
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2013-06-16 07:59:41 +0800
committerMatthew Barnes <mbarnes@redhat.com>2013-06-16 08:10:06 +0800
commit5e8195693beefe391f49a860b206893aedd1338c (patch)
tree04c239c74cd88bb51e82fb2f59c616dd110b683c /e-util
parent69de51a15ab85e4dca9fed93a1e03644b0e6a840 (diff)
downloadgsoc2013-evolution-5e8195693beefe391f49a860b206893aedd1338c.tar
gsoc2013-evolution-5e8195693beefe391f49a860b206893aedd1338c.tar.gz
gsoc2013-evolution-5e8195693beefe391f49a860b206893aedd1338c.tar.bz2
gsoc2013-evolution-5e8195693beefe391f49a860b206893aedd1338c.tar.lz
gsoc2013-evolution-5e8195693beefe391f49a860b206893aedd1338c.tar.xz
gsoc2013-evolution-5e8195693beefe391f49a860b206893aedd1338c.tar.zst
gsoc2013-evolution-5e8195693beefe391f49a860b206893aedd1338c.zip
Remove e_tree_model_icon_at().
It always returned NULL.
Diffstat (limited to 'e-util')
-rw-r--r--e-util/e-cell-tree.c39
-rw-r--r--e-util/e-tree-model.c23
-rw-r--r--e-util/e-tree-model.h5
3 files changed, 3 insertions, 64 deletions
diff --git a/e-util/e-cell-tree.c b/e-util/e-cell-tree.c
index ba5779c720..c23be558bf 100644
--- a/e-util/e-cell-tree.c
+++ b/e-util/e-cell-tree.c
@@ -275,9 +275,6 @@ ect_draw (ECellView *ecell_view,
/* only draw the tree effects if we're the active sort */
if (/* XXX */ TRUE) {
- GdkPixbuf *node_image;
- gint node_image_width = 0, node_image_height = 0;
-
tree_view->prelit = FALSE;
node = e_cell_tree_get_node (ecell_view->e_table_model, row);
@@ -285,19 +282,12 @@ ect_draw (ECellView *ecell_view,
offset = offset_of_node (ecell_view->e_table_model, row);
subcell_offset = offset;
- node_image = e_tree_model_icon_at (tree_model, node);
-
- if (node_image) {
- node_image_width = gdk_pixbuf_get_width (node_image);
- node_image_height = gdk_pixbuf_get_height (node_image);
- }
-
/*
* Be a nice citizen: clip to the region we are supposed to draw on
*/
rect.x = x1;
rect.y = y1;
- rect.width = subcell_offset + node_image_width;
+ rect.width = subcell_offset;
rect.height = y2 - y1;
/* now draw our icon if we're expandable */
@@ -306,19 +296,9 @@ ect_draw (ECellView *ecell_view,
GdkRectangle r;
r = rect;
- r.width -= node_image_width + 2;
+ r.width -= 2;
draw_expander (tree_view, cr, expanded ? GTK_EXPANDER_EXPANDED : GTK_EXPANDER_COLLAPSED, GTK_STATE_NORMAL, &r);
}
-
- if (node_image) {
- gdk_cairo_set_source_pixbuf (
- cr, node_image,
- x1 + subcell_offset,
- y1 + (y2 - y1) / 2 - node_image_height / 2);
- cairo_paint (cr);
-
- subcell_offset += node_image_width;
- }
}
/* Now cause our subcell to draw its contents, shifted by
@@ -577,29 +557,16 @@ ect_max_width (ECellView *ecell_view,
subcell_max_width = e_cell_max_width (tree_view->subcell_view, model_col, view_col);
for (row = 0; row < number_of_rows; row++) {
- ETreeModel *tree_model = e_cell_tree_get_tree_model (ecell_view->e_table_model, row);
- ETreePath node;
- GdkPixbuf *node_image;
- gint node_image_width = 0;
-
gint offset, subcell_offset;
#if 0
gboolean expanded, expandable;
ETreeTableAdapter *tree_table_adapter = e_cell_tree_get_tree_table_adapter (ecell_view->e_table_model, row);
#endif
- node = e_cell_tree_get_node (ecell_view->e_table_model, row);
-
offset = offset_of_node (ecell_view->e_table_model, row);
subcell_offset = offset;
- node_image = e_tree_model_icon_at (tree_model, node);
-
- if (node_image) {
- node_image_width = gdk_pixbuf_get_width (node_image);
- }
-
- width = subcell_offset + node_image_width;
+ width = subcell_offset;
if (per_row)
width += e_cell_max_width_by_row (tree_view->subcell_view, model_col, view_col, row);
diff --git a/e-util/e-tree-model.c b/e-util/e-tree-model.c
index f9bf28a3a2..6c41d8003e 100644
--- a/e-util/e-tree-model.c
+++ b/e-util/e-tree-model.c
@@ -396,29 +396,6 @@ e_tree_model_node_depth (ETreeModel *tree_model,
}
/**
- * e_tree_model_icon_at
- * @tree_model: The ETreeModel.
- * @path: The ETreePath to the node we're getting the icon of.
- *
- * XXX docs here.
- *
- * return values: the GdkPixbuf associated with this node.
- */
-GdkPixbuf *
-e_tree_model_icon_at (ETreeModel *tree_model,
- ETreePath path)
-{
- ETreeModelInterface *interface;
-
- g_return_val_if_fail (E_IS_TREE_MODEL (tree_model), NULL);
-
- interface = E_TREE_MODEL_GET_INTERFACE (tree_model);
- g_return_val_if_fail (interface->icon_at != NULL, NULL);
-
- return interface->icon_at (tree_model, path);
-}
-
-/**
* e_tree_model_get_expanded_default
* @tree_model: The ETreeModel.
*
diff --git a/e-util/e-tree-model.h b/e-util/e-tree-model.h
index bdbf64ce1b..fd54b81f10 100644
--- a/e-util/e-tree-model.h
+++ b/e-util/e-tree-model.h
@@ -70,9 +70,6 @@ struct _ETreeModelInterface {
guint (*depth) (ETreeModel *tree_model,
ETreePath path);
- GdkPixbuf * (*icon_at) (ETreeModel *tree_model,
- ETreePath path);
-
gboolean (*get_expanded_default) (ETreeModel *tree_model);
gint (*column_count) (ETreeModel *tree_model);
@@ -164,8 +161,6 @@ guint e_tree_model_node_get_n_children
ETreePath path);
guint e_tree_model_node_depth (ETreeModel *tree_model,
ETreePath path);
-GdkPixbuf * e_tree_model_icon_at (ETreeModel *tree_model,
- ETreePath path);
gboolean e_tree_model_get_expanded_default
(ETreeModel *tree_model);
gint e_tree_model_column_count (ETreeModel *tree_model);