diff options
author | Milan Crha <mcrha@redhat.com> | 2008-12-06 03:20:28 +0800 |
---|---|---|
committer | Milan Crha <mcrha@src.gnome.org> | 2008-12-06 03:20:28 +0800 |
commit | 7b221ebc07a7867c3528b113e82f25a01816a015 (patch) | |
tree | 975f1efd25565d3fd930c935fabeb10ec5b866da /e-util/e-util.c | |
parent | 888965285486dbe274238c1b6062ed89986676a8 (diff) | |
download | gsoc2013-evolution-7b221ebc07a7867c3528b113e82f25a01816a015.tar.gz gsoc2013-evolution-7b221ebc07a7867c3528b113e82f25a01816a015.tar.zst gsoc2013-evolution-7b221ebc07a7867c3528b113e82f25a01816a015.zip |
** Fix for bug #332629
2008-12-05 Milan Crha <mcrha@redhat.com>
** Fix for bug #332629
* filter/filter-option.h: (struct _filter_option),
(struct _FilterOption), (filter_option_add):
* filter/filter-option.c: (filter_option_init), (filter_option_finalise),
(filter_option_add), (xml_create), (get_widget), (clone):
Be able to define optionlist with dynamically created list of options.
* filter/filter-label.c: (fill_options): Adapt.
* addressbook/gui/widgets/addresstypes.xml:
* calendar/gui/caltypes.xml:
* calendar/gui/memotypes.xml:
* calendar/gui/tasktypes.xml:
Use dynamically created list of categories in the option's widget.
svn path=/trunk/; revision=36836
Diffstat (limited to 'e-util/e-util.c')
-rw-r--r-- | e-util/e-util.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/e-util/e-util.c b/e-util/e-util.c index f05c9d907a..215a494df9 100644 --- a/e-util/e-util.c +++ b/e-util/e-util.c @@ -46,6 +46,8 @@ #endif #include <libedataserver/e-data-server-util.h> +#include <libedataserver/e-categories.h> +#include "filter/filter-option.h" #include "e-util.h" #include "e-util-private.h" @@ -1224,3 +1226,23 @@ e_util_read_file (const char *filename, gboolean filename_is_uri, char **buffer, return res; } +GSList * +e_util_get_category_filter_options (void) +{ + GSList *res = NULL; + GList *clist, *l; + + clist = e_categories_get_list (); + for (l = clist; l; l = l->next) { + const char *cname = l->data; + struct _filter_option *fo = g_new0 (struct _filter_option, 1); + + fo->title = g_strdup (cname); + fo->value = g_strdup (cname); + res = g_slist_prepend (res, fo); + } + + g_list_free (clist); + + return g_slist_reverse (res); +} |