aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2013-06-27 08:50:01 +0800
committerMatthew Barnes <mbarnes@redhat.com>2013-07-02 22:34:08 +0800
commita6b1bc0c1ed2acea8a1e053560826e26a7f1246c (patch)
tree95d02ec6e632eeb4ddd0ba9eb2d5d071dd8e5cea
parent37aae129f397e5973910ff227a0f18efb1b5d2fe (diff)
downloadgsoc2013-evolution-a6b1bc0c1ed2acea8a1e053560826e26a7f1246c.tar.gz
gsoc2013-evolution-a6b1bc0c1ed2acea8a1e053560826e26a7f1246c.tar.zst
gsoc2013-evolution-a6b1bc0c1ed2acea8a1e053560826e26a7f1246c.zip
ETableColumnSpecification: Make "sortable" a boolean.
-rw-r--r--e-util/e-table-column-specification.c4
-rw-r--r--e-util/e-table-column-specification.h6
-rw-r--r--e-util/e-table-utils.c5
3 files changed, 5 insertions, 10 deletions
diff --git a/e-util/e-table-column-specification.c b/e-util/e-table-column-specification.c
index 01ae1c1186..a5d68b43b1 100644
--- a/e-util/e-table-column-specification.c
+++ b/e-util/e-table-column-specification.c
@@ -53,8 +53,6 @@ free_strings (ETableColumnSpecification *etcs)
etcs->compare = NULL;
g_free (etcs->search);
etcs->search = NULL;
- g_free (etcs->sortable);
- etcs->sortable = NULL;
}
static void
@@ -119,7 +117,7 @@ e_table_column_specification_load_from_node (ETableColumnSpecification *etcs,
etcs->cell = e_xml_get_string_prop_by_name (node, (const guchar *)"cell");
etcs->compare = e_xml_get_string_prop_by_name (node, (const guchar *)"compare");
etcs->search = e_xml_get_string_prop_by_name (node, (const guchar *)"search");
- etcs->sortable = e_xml_get_string_prop_by_name (node, (const guchar *)"sortable");
+ etcs->sortable = e_xml_get_bool_prop_by_name_with_default (node, (const guchar *)"sortable", TRUE);
etcs->priority = e_xml_get_integer_prop_by_name_with_default (node, (const guchar *)"priority", 0);
if (etcs->title == NULL)
diff --git a/e-util/e-table-column-specification.h b/e-util/e-table-column-specification.h
index 0d4775f8ee..68ded2e6c4 100644
--- a/e-util/e-table-column-specification.h
+++ b/e-util/e-table-column-specification.h
@@ -64,13 +64,13 @@ struct _ETableColumnSpecification {
gdouble expansion;
gint minimum_width;
- guint resizable : 1;
- guint disabled : 1;
+ gboolean resizable;
+ gboolean disabled;
+ gboolean sortable;
gchar *cell;
gchar *compare;
gchar *search;
- gchar *sortable;
gint priority;
};
diff --git a/e-util/e-table-utils.c b/e-util/e-table-utils.c
index 1bd16a928e..207da0c04c 100644
--- a/e-util/e-table-utils.c
+++ b/e-util/e-table-utils.c
@@ -128,10 +128,7 @@ et_col_spec_to_col (ETableColumnSpecification *col_spec,
if (col) {
col->search = search;
- if (col_spec->sortable && !strcmp (col_spec->sortable, "false"))
- col->sortable = FALSE;
- else
- col->sortable = TRUE;
+ col->sortable = col_spec->sortable;
}
g_free (title);
}