From dd7bad07415b4b2a46d3bae6236838d52334f6fb Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Thu, 10 Jan 2008 11:19:37 +0000 Subject: ** Fix for bug #211353 2008-01-10 Milan Crha ** Fix for bug #211353 * po/POTFILES.in: Added new file e-util/e-util-labels.c * mail/filtertypes.xml: * mail/vfoldertypes.xml: * mail/em-folder-view.c: * mail/em-folder-browser.c: * mail/em-mailer-prefs.h: * mail/em-mailer-prefs.c: * mail/mail-config.h: * mail/mail-config.c: * mail/mail-config.glade: * mail/message-list.c: Label tags are now generated based on label name when creating, except of first 5 labels. New menu option "New Label" in popup menu over message list and editing of labels has been changed in Preferences. Also renaming tab in Preferences for "Labels", not "Colors", and the tab label too. mail-config-label... functions was moved to e-util/e-util-labels.c/.h. * mail/message-list.etspec: Normalized columns has been moved by one when label column has been added. * filter/filter-option.h: * filter/filter-option.c: (filter_option_get_current), (filter_option_remove_all): New functions to be able to refill options even after initialization of the filter element. * filter/filter-label.c: Added support to notify changes on labels in runtime and use actual labels. * e-util/Makefile.am: * e-util/e-util-labels.h: * e-util/e-util-labels.c: New files to work with labels. svn path=/trunk/; revision=34788 --- filter/filter-option.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'filter/filter-option.c') diff --git a/filter/filter-option.c b/filter/filter-option.c index 2aea362bbc..f56943f22c 100644 --- a/filter/filter-option.c +++ b/filter/filter-option.c @@ -183,6 +183,29 @@ filter_option_add(FilterOption *fo, const char *value, const char *title, const return op; } +const char * +filter_option_get_current (FilterOption *option) +{ + g_return_val_if_fail (IS_FILTER_OPTION (option), NULL); + + if (!option->current) + return NULL; + + return option->current->value; +} + +void +filter_option_remove_all (FilterOption *fo) +{ + g_return_if_fail (IS_FILTER_OPTION (fo)); + + g_list_foreach (fo->options, (GFunc)free_option, NULL); + g_list_free (fo->options); + fo->options = NULL; + + fo->current = NULL; +} + static int option_eq(FilterElement *fe, FilterElement *cm) { -- cgit