aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/table/e-table-utils.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2010-01-05 11:52:24 +0800
committerMatthew Barnes <mbarnes@redhat.com>2010-01-07 12:18:52 +0800
commit28b84ecaf9111f2a59e1380089dad6a92ddc848d (patch)
treec925a0966e291917ce69a596c9613ac7cee33be8 /widgets/table/e-table-utils.c
parent5f1c9ff19d80bb50cd00114b8fb633d8eba3365f (diff)
downloadgsoc2013-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-utils.c')
-rw-r--r--widgets/table/e-table-utils.c30
1 files changed, 20 insertions, 10 deletions
diff --git a/widgets/table/e-table-utils.c b/widgets/table/e-table-utils.c
index 03c8e17a33..8d8b0ba09f 100644
--- a/widgets/table/e-table-utils.c
+++ b/widgets/table/e-table-utils.c
@@ -95,24 +95,34 @@ et_col_spec_to_col (ETableColumnSpecification *col_spec,
title = g_strdup (title);
if (col_spec->pixbuf && *col_spec->pixbuf) {
- GdkPixbuf *pixbuf;
+ const gchar *icon_name;
- pixbuf = e_table_extras_get_pixbuf(
+ icon_name = e_table_extras_get_icon_name (
ete, col_spec->pixbuf);
- if (pixbuf) {
- col = e_table_col_new_with_pixbuf (
- col_spec->model_col, title,
- pixbuf, col_spec->expansion,
+ if (icon_name != NULL) {
+ col = e_table_col_new (
+ col_spec->model_col,
+ title, icon_name,
+ col_spec->expansion,
col_spec->minimum_width,
- cell, compare, col_spec->resizable, col_spec->disabled, col_spec->priority);
+ cell, compare,
+ col_spec->resizable,
+ col_spec->disabled,
+ col_spec->priority);
}
}
+
if (col == NULL && col_spec->title && *col_spec->title) {
col = e_table_col_new (
- col_spec->model_col, title,
- col_spec->expansion, col_spec->minimum_width,
- cell, compare, col_spec->resizable, col_spec->disabled, col_spec->priority);
+ col_spec->model_col, title, NULL,
+ col_spec->expansion,
+ col_spec->minimum_width,
+ cell, compare,
+ col_spec->resizable,
+ col_spec->disabled,
+ col_spec->priority);
}
+
col->search = search;
if (col_spec->sortable && !strcmp(col_spec->sortable, "false"))
col->sortable = FALSE;