From 5e8195693beefe391f49a860b206893aedd1338c Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Sat, 15 Jun 2013 19:59:41 -0400 Subject: Remove e_tree_model_icon_at(). It always returned NULL. --- e-util/e-cell-tree.c | 39 +++------------------------------------ e-util/e-tree-model.c | 23 ----------------------- e-util/e-tree-model.h | 5 ----- 3 files changed, 3 insertions(+), 64 deletions(-) (limited to 'e-util') 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 @@ -395,29 +395,6 @@ e_tree_model_node_depth (ETreeModel *tree_model, return interface->depth (tree_model, path); } -/** - * 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); -- cgit