]> git.sur5r.net Git - glabels/commitdiff
2007-10-14 Jim Evins <evins@snaught.com>
authorJim Evins <evins@snaught.com>
Mon, 15 Oct 2007 03:12:42 +0000 (03:12 +0000)
committerJim Evins <evins@snaught.com>
Mon, 15 Oct 2007 03:12:42 +0000 (03:12 +0000)
* docs/libglabels/libglabels-decl-list.txt:
* docs/libglabels/libglabels-sections.txt:
* docs/libglabels/libglabels-undocumented.txt:
* docs/libglabels/tmpl/category.sgml:
* libglabels/category.c:
* libglabels/category.h:
Added lgl_category_get_id_list() and lgl_category_free_id_list() to have
parity with paper functions.

git-svn-id: https://glabels.svn.sourceforge.net/svnroot/glabels/trunk@680 f5e0f49d-192f-0410-a22d-a8d8700d0965

glabels2/ChangeLog
glabels2/docs/libglabels/libglabels-decl-list.txt
glabels2/docs/libglabels/libglabels-sections.txt
glabels2/docs/libglabels/libglabels-undocumented.txt
glabels2/docs/libglabels/tmpl/category.sgml
glabels2/libglabels/category.c
glabels2/libglabels/category.h

index 536b7ab6c904e95227b084a042fae6f4b5d3c509..463a49126e6b8144270083e11ed64babe94d310e 100644 (file)
@@ -1,3 +1,14 @@
+2007-10-14  Jim Evins  <evins@snaught.com>
+
+       * docs/libglabels/libglabels-decl-list.txt:
+       * docs/libglabels/libglabels-sections.txt:
+       * docs/libglabels/libglabels-undocumented.txt:
+       * docs/libglabels/tmpl/category.sgml:
+       * libglabels/category.c:
+       * libglabels/category.h:
+               Added lgl_category_get_id_list() and lgl_category_free_id_list() to have
+       parity with paper functions.
+
 2007-10-12  Jim Evins  <evins@snaught.com>
 
        * docs/libglabels/libglabels-decl-list.txt:
index fbd070037dc8ec011dd983c718c8fdbb030800e5..1cbc870116387ca6beda40a94ccb1d97e54a6332 100644 (file)
@@ -116,6 +116,8 @@ lglCategory
 lgl_category_new
 lgl_category_dup
 lgl_category_free
+lgl_category_get_id_list
+lgl_category_free_id_list
 lgl_category_get_name_list
 lgl_category_free_name_list
 lgl_category_from_name
index f3c04c4d1708fb88d16fb9e9ce2646f058827e2d..d29ec3d62dde48985b6a5bbd399d8bec81a50a23 100644 (file)
@@ -44,6 +44,8 @@ lgl_category_free
 lgl_category_from_name
 lgl_category_from_id
 <SUBSECTION List Functions>
+lgl_category_get_id_list
+lgl_category_free_id_list
 lgl_category_get_name_list
 lgl_category_free_name_list
 <SUBSECTION Conversion Functions>
index 2e20b3a5c42049bd0bfe3f5516686cf31690cc49..2b02c59e68ca7a081bace59fac4ac0589f534cdb 100644 (file)
@@ -1,5 +1,5 @@
 99% symbol docs coverage.
-128 symbols documented.
+130 symbols documented.
 0 symbols incomplete.
 1 not documented.
 
index 0797f85481310e525026d46173ceea71e47c101b..1a603f37ff2191dd06771d911fa44d116173c3e6 100644 (file)
@@ -71,6 +71,22 @@ This structure defines a category.
 @Returns: 
 
 
+<!-- ##### FUNCTION lgl_category_get_id_list ##### -->
+<para>
+
+</para>
+
+@Returns: 
+
+
+<!-- ##### FUNCTION lgl_category_free_id_list ##### -->
+<para>
+
+</para>
+
+@ids: 
+
+
 <!-- ##### FUNCTION lgl_category_get_name_list ##### -->
 <para>
 
index 03576e886d5117deea0872b0d54950a0a1b80744..11cc40bbed284acfef026f03b9e584384b37ae3d 100644 (file)
@@ -153,6 +153,55 @@ void lgl_category_free (lglCategory *category)
 }
 
 
+/**
+ * lgl_category_get_id_list:
+ *
+ * Get a list of all category ids known to libglabels.
+ *
+ * Returns: a list of category ids.
+ *
+ */
+GList *
+lgl_category_get_id_list (void)
+{
+       GList           *ids = NULL;
+       GList           *p;
+       lglCategory     *category;
+
+       if (!categories) {
+               lgl_category_init ();
+       }
+
+       for ( p=categories; p != NULL; p=p->next ) {
+               category = (lglCategory *)p->data;
+               ids = g_list_append (ids, g_strdup (category->id));
+       }
+
+       return ids;
+}
+
+/**
+ * lgl_category_free_id_list:
+ * @ids: List of id strings to be freed.
+ *
+ * Free up all storage associated with an id list obtained with
+ * lgl_category_get_id_list().
+ *
+ */
+void
+lgl_category_free_id_list (GList *ids)
+{
+       GList *p;
+
+       for (p = ids; p != NULL; p = p->next) {
+               g_free (p->data);
+               p->data = NULL;
+       }
+
+       g_list_free (ids);
+}
+
+
 /**
  * lgl_category_get_name_list:
  *
index 84817da082e253a6eb8391db89a26d0acd74882e..cab4585de17f2aee088cbfcdd3812bf4cc66fee0 100644 (file)
@@ -54,6 +54,13 @@ lglCategory      *lgl_category_dup                 (const lglCategory *orig);
 void              lgl_category_free                (lglCategory       *category);
 
 
+/*
+ * ID lists
+ */
+GList               *lgl_category_get_id_list      (void);
+void                 lgl_category_free_id_list     (GList           *ids);
+
+
 /*
  * Known category name lists
  */