[evolution] Add e_table_specification_ref_columns().
- From: Matthew Barnes <mbarnes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution] Add e_table_specification_ref_columns().
- Date: Tue, 2 Jul 2013 15:25:11 +0000 (UTC)
commit e9299f623e9779bfd63a8c30b4803a2dca5ca172
Author: Matthew Barnes <mbarnes redhat com>
Date: Wed Jun 26 12:46:06 2013 -0400
Add e_table_specification_ref_columns().
.../evolution-util/evolution-util-sections.txt | 1 +
e-util/e-table-specification.c | 28 ++++++++++++++++++++
e-util/e-table-specification.h | 3 +-
3 files changed, 31 insertions(+), 1 deletions(-)
---
diff --git a/doc/reference/evolution-util/evolution-util-sections.txt
b/doc/reference/evolution-util/evolution-util-sections.txt
index d519311..989ea33 100644
--- a/doc/reference/evolution-util/evolution-util-sections.txt
+++ b/doc/reference/evolution-util/evolution-util-sections.txt
@@ -3913,6 +3913,7 @@ e_table_sorting_utils_lookup_cmp_cache
<TITLE>ETableSpecification</TITLE>
ETableSpecification
e_table_specification_new
+e_table_specification_ref_columns
e_table_specification_load_from_file
e_table_specification_load_from_string
e_table_specification_load_from_node
diff --git a/e-util/e-table-specification.c b/e-util/e-table-specification.c
index 03c160b..b14bbde 100644
--- a/e-util/e-table-specification.c
+++ b/e-util/e-table-specification.c
@@ -112,6 +112,34 @@ e_table_specification_new (void)
}
/**
+ * e_table_specification_ref_columns:
+ * @specification: an #ETableSpecification
+ *
+ * Returns a #GPtrArray containing #ETableColumnSpecification instances for
+ * all columns defined by @specification. The array contents are owned by
+ * the @specification and should not be modified. Unreference the array
+ * with g_ptr_array_unref() when finished with it.
+ *
+ * Returns: a #GPtrArray of #ETableColumnSpecification instances
+ **/
+GPtrArray *
+e_table_specification_ref_columns (ETableSpecification *specification)
+{
+ GPtrArray *array;
+ guint ii;
+
+ g_return_val_if_fail (E_IS_TABLE_SPECIFICATION (specification), NULL);
+ g_return_val_if_fail (specification->columns != NULL, NULL);
+
+ array = g_ptr_array_new ();
+
+ for (ii = 0; specification->columns[ii] != NULL; ii++)
+ g_ptr_array_add (array, specification->columns[ii]);
+
+ return array;
+}
+
+/**
* e_table_specification_load_from_file:
* @specification: an #ETableSpecification
* @filename: the name of a file containing an #ETable specification
diff --git a/e-util/e-table-specification.h b/e-util/e-table-specification.h
index 11986bb..feada9e 100644
--- a/e-util/e-table-specification.h
+++ b/e-util/e-table-specification.h
@@ -84,7 +84,8 @@ struct _ETableSpecificationClass {
GType e_table_specification_get_type (void) G_GNUC_CONST;
ETableSpecification *
e_table_specification_new (void);
-
+GPtrArray * e_table_specification_ref_columns
+ (ETableSpecification *specification);
gboolean e_table_specification_load_from_file
(ETableSpecification *specification,
const gchar *filename);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]