diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2010-01-05 11:52:24 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2010-01-07 12:18:52 +0800 |
commit | 28b84ecaf9111f2a59e1380089dad6a92ddc848d (patch) | |
tree | c925a0966e291917ce69a596c9613ac7cee33be8 /widgets/table/e-table-header-utils.c | |
parent | 5f1c9ff19d80bb50cd00114b8fb633d8eba3365f (diff) | |
download | gsoc2013-evolution-28b84ecaf9111f2a59e1380089dad6a92ddc848d.tar.gz gsoc2013-evolution-28b84ecaf9111f2a59e1380089dad6a92ddc848d.tar.zst gsoc2013-evolution-28b84ecaf9111f2a59e1380089dad6a92ddc848d.zip |
Teach ETable to prefer themed icon names over pixbufs.
Diffstat (limited to 'widgets/table/e-table-header-utils.c')
-rw-r--r-- | widgets/table/e-table-header-utils.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/widgets/table/e-table-header-utils.c b/widgets/table/e-table-header-utils.c index a5b0aac0af..c6e694da2e 100644 --- a/widgets/table/e-table-header-utils.c +++ b/widgets/table/e-table-header-utils.c @@ -84,7 +84,7 @@ e_table_header_compute_height (ETableCol *ecol, GtkWidget *widget) pango_layout_get_pixel_size (layout, NULL, &height); - if (ecol->is_pixbuf) { + if (ecol->icon_name != NULL) { g_return_val_if_fail (ecol->pixbuf != NULL, -1); height = MAX (height, gdk_pixbuf_get_height (ecol->pixbuf)); } @@ -389,7 +389,7 @@ e_table_header_draw_button (GdkDrawable *drawable, ETableCol *ecol, arrow_width = MIN (MIN_ARROW_SIZE, inner_width); arrow_height = MIN (MIN_ARROW_SIZE, inner_height); - if (!ecol->is_pixbuf) + if (ecol->icon_name == NULL) inner_width -= arrow_width + HEADER_PADDING; break; default: @@ -402,7 +402,7 @@ e_table_header_draw_button (GdkDrawable *drawable, ETableCol *ecol, layout = build_header_layout (widget, ecol->text); /* Pixbuf or label */ - if (ecol->is_pixbuf) { + if (ecol->icon_name != NULL) { gint pwidth, pheight; gint clip_width, clip_height; gint xpos; @@ -462,13 +462,13 @@ e_table_header_draw_button (GdkDrawable *drawable, ETableCol *ecol, case E_TABLE_COL_ARROW_UP: case E_TABLE_COL_ARROW_DOWN: { - if (!ecol->is_pixbuf) + if (ecol->icon_name == NULL) inner_width += arrow_width + HEADER_PADDING; gtk_paint_arrow (style, drawable, state, GTK_SHADOW_NONE, NULL, widget, "header", (arrow == E_TABLE_COL_ARROW_UP) ? GTK_ARROW_UP : GTK_ARROW_DOWN, - !ecol->is_pixbuf, + (ecol->icon_name == NULL), inner_x + inner_width - arrow_width, inner_y + (inner_height - arrow_height) / 2, arrow_width, arrow_height); |