From c5f7464467beeb50c932b5ee1392951103b28ac8 Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Mon, 28 Jul 2008 07:25:28 +0000 Subject: ** Fix for bug #530388 2008-07-28 Milan Crha ** Fix for bug #530388 * filter-label.c: (filter_label_init), (filter_label_finalise), (fill_options), (filter_label_count), (filter_label_label), (filter_label_index): Make 'cache_lock' a rec mutex. * filter-label.c: (regen_label_options): Guard also regeneration of each tracked item with the rec lock, thus noone will touch 'tracked_filters' GSList until we are fully done with it. svn path=/trunk/; revision=35849 --- filter/ChangeLog | 11 +++++++++++ filter/filter-label.c | 33 +++++++++++++++++---------------- 2 files changed, 28 insertions(+), 16 deletions(-) (limited to 'filter') diff --git a/filter/ChangeLog b/filter/ChangeLog index 1e713d561e..5eacc51aee 100644 --- a/filter/ChangeLog +++ b/filter/ChangeLog @@ -1,3 +1,14 @@ +2008-07-28 Milan Crha + + ** Fix for bug #530388 + + * filter-label.c: (filter_label_init), (filter_label_finalise), + (fill_options), (filter_label_count), (filter_label_label), + (filter_label_index): Make 'cache_lock' a rec mutex. + * filter-label.c: (regen_label_options): Guard also regeneration + of each tracked item with the rec lock, thus noone will touch + 'tracked_filters' GSList until we are fully done with it. + 2008-07-03 Milan Crha ** Fix for bug #243201 diff --git a/filter/filter-label.c b/filter/filter-label.c index 90906e8ba1..7291e36b4c 100644 --- a/filter/filter-label.c +++ b/filter/filter-label.c @@ -74,7 +74,7 @@ filter_label_get_type (void) return type; } -static GStaticMutex cache_lock = G_STATIC_MUTEX_INIT; +static GStaticRecMutex cache_lock = G_STATIC_REC_MUTEX_INIT; static guint cache_notifier_id = 0; static GSList *tracked_filters = NULL; static GSList *labels_cache = NULL; @@ -103,7 +103,7 @@ filter_label_init (FilterLabel *fl) { ((FilterOption *) fl)->type = "label"; - g_static_mutex_lock (&cache_lock); + g_static_rec_mutex_lock (&cache_lock); if (!tracked_filters) { fill_cache (); @@ -115,7 +115,7 @@ filter_label_init (FilterLabel *fl) tracked_filters = g_slist_prepend (tracked_filters, fl); - g_static_mutex_unlock (&cache_lock); + g_static_rec_mutex_unlock (&cache_lock); } static void @@ -123,7 +123,7 @@ filter_label_finalise (GObject *obj) { G_OBJECT_CLASS (parent_class)->finalize (obj); - g_static_mutex_lock (&cache_lock); + g_static_rec_mutex_lock (&cache_lock); tracked_filters = g_slist_remove (tracked_filters, obj); @@ -138,7 +138,7 @@ filter_label_finalise (GObject *obj) gconf_client = NULL; } - g_static_mutex_unlock (&cache_lock); + g_static_rec_mutex_unlock (&cache_lock); } /** @@ -176,7 +176,7 @@ fill_options (FilterOption *fo) { GSList *l; - g_static_mutex_lock (&cache_lock); + g_static_rec_mutex_lock (&cache_lock); for (l = labels_cache; l; l = l->next) { EUtilLabel *label = l->data; @@ -197,7 +197,7 @@ fill_options (FilterOption *fo) g_free (title); } - g_static_mutex_unlock (&cache_lock); + g_static_rec_mutex_unlock (&cache_lock); } static void @@ -222,12 +222,13 @@ regen_label_options (FilterOption *fo) static void gconf_labels_changed (GConfClient *client, guint cnxn_id, GConfEntry *entry, gpointer user_data) { - g_static_mutex_lock (&cache_lock); + g_static_rec_mutex_lock (&cache_lock); + clear_cache (); fill_cache (); - g_static_mutex_unlock (&cache_lock); - g_slist_foreach (tracked_filters, (GFunc)regen_label_options, NULL); + + g_static_rec_mutex_unlock (&cache_lock); } /* ************************************************************************* */ @@ -237,11 +238,11 @@ filter_label_count (void) { int res; - g_static_mutex_lock (&cache_lock); + g_static_rec_mutex_lock (&cache_lock); res = g_slist_length (labels_cache); - g_static_mutex_unlock (&cache_lock); + g_static_rec_mutex_unlock (&cache_lock); return res; } @@ -253,7 +254,7 @@ filter_label_label (int i) GSList *l; EUtilLabel *label; - g_static_mutex_lock (&cache_lock); + g_static_rec_mutex_lock (&cache_lock); l = g_slist_nth (labels_cache, i); @@ -269,7 +270,7 @@ filter_label_label (int i) res = label->tag; } - g_static_mutex_unlock (&cache_lock); + g_static_rec_mutex_unlock (&cache_lock); return res; } @@ -280,7 +281,7 @@ filter_label_index (const char *label) int i; GSList *l; - g_static_mutex_lock (&cache_lock); + g_static_rec_mutex_lock (&cache_lock); for (i = 0, l = labels_cache; l; i++, l = l->next) { EUtilLabel *lbl = l->data; @@ -293,7 +294,7 @@ filter_label_index (const char *label) break; } - g_static_mutex_unlock (&cache_lock); + g_static_rec_mutex_unlock (&cache_lock); if (l) return i; -- cgit From d420d5c626405e18f0fc56c8d36ce8597cbf8ca8 Mon Sep 17 00:00:00 2001 From: Takao Fujiwara Date: Wed, 30 Jul 2008 14:17:12 +0000 Subject: Reviewed by Srinivasa Ragavan 2008-07-30 Takao Fujiwara Reviewed by Srinivasa Ragavan ** Fix for bug #545303 * filter-rule.c: (xml_decode): Add gettext in the xml string. svn path=/trunk/; revision=35868 --- filter/ChangeLog | 8 ++++++++ filter/filter-rule.c | 7 ++++--- 2 files changed, 12 insertions(+), 3 deletions(-) (limited to 'filter') diff --git a/filter/ChangeLog b/filter/ChangeLog index 5eacc51aee..145ae2c029 100644 --- a/filter/ChangeLog +++ b/filter/ChangeLog @@ -1,3 +1,11 @@ +2008-07-30 Takao Fujiwara + + Reviewed by Srinivasa Ragavan + + ** Fix for bug #545303 + + * filter-rule.c: (xml_decode): Add gettext in the xml string. + 2008-07-28 Milan Crha ** Fix for bug #530388 diff --git a/filter/filter-rule.c b/filter/filter-rule.c index e6e59baeac..c7e79269e6 100644 --- a/filter/filter-rule.c +++ b/filter/filter-rule.c @@ -444,12 +444,13 @@ xml_decode (FilterRule *fr, xmlNodePtr node, RuleContext *f) load_set (work, fr, f); } else if (!strcmp ((char *)work->name, "title") || !strcmp ((char *)work->name, "_title")) { if (!fr->name) { - char *str, *decstr; + char *str, *decstr = NULL; str = (char *)xmlNodeGetContent (work); - decstr = g_strdup (str); - if (str) + if (str) { + decstr = g_strdup (_(str)); xmlFree (str); + } fr->name = decstr; } } -- cgit From 1bad915150e2d5e97cbbf1a77f7a85e338c07f28 Mon Sep 17 00:00:00 2001 From: Sankarasivasubramanian Pasupathilingam Date: Wed, 27 Aug 2008 10:33:22 +0000 Subject: License Changes svn path=/trunk/; revision=36116 --- filter/ChangeLog | 9 +++++++++ filter/filter-file.h | 30 +++++++++++++++--------------- filter/filter-label.c | 32 ++++++++++++++++---------------- filter/filter-label.h | 30 +++++++++++++++--------------- filter/rule-context.h | 27 ++++++++++++++------------- 5 files changed, 69 insertions(+), 59 deletions(-) (limited to 'filter') diff --git a/filter/ChangeLog b/filter/ChangeLog index 145ae2c029..2755f5abe8 100644 --- a/filter/ChangeLog +++ b/filter/ChangeLog @@ -1,3 +1,12 @@ +2008-08-27 Sankar P + +License Changes + + * filter-file.h: + * filter-label.c: + * filter-label.h: + * rule-context.h: + 2008-07-30 Takao Fujiwara Reviewed by Srinivasa Ragavan diff --git a/filter/filter-file.h b/filter/filter-file.h index 35a4474ddd..81e6b8c1cd 100644 --- a/filter/filter-file.h +++ b/filter/filter-file.h @@ -1,26 +1,26 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ /* - * Authors: Jeffrey Stedfast * - * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com) + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) version 3. * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * You should have received a copy of the GNU Lesser General Public + * License along with the program; if not, see * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * Authors: + * Jeffrey Stedfast + * + * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com) * */ - #ifndef __FILTER_FILE_H__ #define __FILTER_FILE_H__ diff --git a/filter/filter-label.c b/filter/filter-label.c index 7291e36b4c..1d76300339 100644 --- a/filter/filter-label.c +++ b/filter/filter-label.c @@ -1,27 +1,27 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ /* - * Authors: Jeffrey Stedfast - * Michael Zucchi * - * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com) + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) version 3. * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * You should have received a copy of the GNU Lesser General Public + * License along with the program; if not, see * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * Authors: + * Jeffrey Stedfast + * Michael Zucchi + * + * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com) * */ - #ifdef HAVE_CONFIG_H #include #endif diff --git a/filter/filter-label.h b/filter/filter-label.h index 9b1d73735b..5df24b8b0d 100644 --- a/filter/filter-label.h +++ b/filter/filter-label.h @@ -1,26 +1,26 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ /* - * Authors: Jeffrey Stedfast * - * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com) + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) version 3. * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * You should have received a copy of the GNU Lesser General Public + * License along with the program; if not, see * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * Authors: + * Jeffrey Stedfast + * + * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com) * */ - #ifndef __FILTER_LABEL__ #define __FILTER_LABEL__ diff --git a/filter/rule-context.h b/filter/rule-context.h index 104cf66c8a..f7a10df65f 100644 --- a/filter/rule-context.h +++ b/filter/rule-context.h @@ -1,26 +1,27 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ /* - * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com) - * - * Authors: Not Zed - * Jeffrey Stedfast * * This program is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) version 3. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with the program; if not, see + * + * + * Authors: + * Not Zed + * Jeffrey Stedfast + * + * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com) * - * You should have received a copy of the GNU General Public - * License along with this program; if not, write to the - * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. */ - #ifndef _RULE_CONTEXT_H #define _RULE_CONTEXT_H -- cgit From 14fa5c8a8cf736e3207b9d9e414586d9ff3a623f Mon Sep 17 00:00:00 2001 From: Sankarasivasubramanian Pasupathilingam Date: Tue, 2 Sep 2008 16:25:53 +0000 Subject: Change License from GPL to LGPL. 2nd batch. More changes to come. svn path=/trunk/; revision=36247 --- filter/ChangeLog | 19 +++++++++++++++++++ filter/filter-code.c | 28 ++++++++++++++-------------- filter/filter-code.h | 28 ++++++++++++++-------------- filter/filter-colour.c | 28 ++++++++++++++-------------- filter/filter-colour.h | 27 ++++++++++++++------------- filter/filter-datespec.h | 28 ++++++++++++++-------------- filter/filter-element.h | 27 ++++++++++++++------------- filter/filter-file.c | 28 ++++++++++++++-------------- filter/filter-input.c | 28 ++++++++++++++-------------- filter/filter-input.h | 28 ++++++++++++++-------------- filter/filter-option.h | 28 ++++++++++++++-------------- filter/filter-part.h | 27 ++++++++++++++------------- filter/filter-rule.h | 27 ++++++++++++++------------- filter/rule-context.c | 27 ++++++++++++++------------- filter/rule-editor.h | 28 ++++++++++++++-------------- 15 files changed, 215 insertions(+), 191 deletions(-) (limited to 'filter') diff --git a/filter/ChangeLog b/filter/ChangeLog index 2755f5abe8..740a192178 100644 --- a/filter/ChangeLog +++ b/filter/ChangeLog @@ -1,3 +1,22 @@ +2008-09-02 Sankar P + +License Changes + + * filter-code.c: + * filter-code.h: + * filter-colour.c: + * filter-colour.h: + * filter-datespec.h: + * filter-element.h: + * filter-file.c: + * filter-input.c: + * filter-input.h: + * filter-option.h: + * filter-part.h: + * filter-rule.h: + * rule-context.c: + * rule-editor.h: + 2008-08-27 Sankar P License Changes diff --git a/filter/filter-code.c b/filter/filter-code.c index 403ba5bc16..2ca98313b6 100644 --- a/filter/filter-code.c +++ b/filter/filter-code.c @@ -1,26 +1,26 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ /* - * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com) - * - * Authors: Not Zed - * Jeffrey Stedfast - * * This program is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) version 3. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with the program; if not, see + * + * + * Authors: + * Not Zed + * Jeffrey Stedfast + * + * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com) * - * You should have received a copy of the GNU General Public - * License along with this program; if not, write to the - * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. */ - #ifdef HAVE_CONFIG_H #include #endif diff --git a/filter/filter-code.h b/filter/filter-code.h index e3d7f35c78..3ea5559a2c 100644 --- a/filter/filter-code.h +++ b/filter/filter-code.h @@ -1,26 +1,26 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ /* - * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com) - * - * Authors: Not Zed - * Jeffrey Stedfast - * * This program is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) version 3. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with the program; if not, see + * + * + * Authors: + * Not Zed + * Jeffrey Stedfast + * + * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com) * - * You should have received a copy of the GNU General Public - * License along with this program; if not, write to the - * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. */ - #ifndef _FILTER_CODE_H #define _FILTER_CODE_H diff --git a/filter/filter-colour.c b/filter/filter-colour.c index dbe38e0b41..0d0388de94 100644 --- a/filter/filter-colour.c +++ b/filter/filter-colour.c @@ -1,26 +1,26 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ /* - * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com) - * - * Authors: Not Zed - * Jeffrey Stedfast - * * This program is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) version 3. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with the program; if not, see + * + * + * Authors: + * Not Zed + * Jeffrey Stedfast + * + * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com) * - * You should have received a copy of the GNU General Public - * License along with this program; if not, write to the - * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. */ - #ifdef HAVE_CONFIG_H #include #endif diff --git a/filter/filter-colour.h b/filter/filter-colour.h index afb7ae1c39..1de46ab70b 100644 --- a/filter/filter-colour.h +++ b/filter/filter-colour.h @@ -1,23 +1,24 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ /* - * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com) - * - * Authors: Not Zed - * Jeffrey Stedfast - * * This program is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) version 3. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with the program; if not, see + * + * + * Authors: + * Not Zed + * Jeffrey Stedfast + * + * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com) * - * You should have received a copy of the GNU General Public - * License along with this program; if not, write to the - * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. */ diff --git a/filter/filter-datespec.h b/filter/filter-datespec.h index 03734284e7..29c4f872b1 100644 --- a/filter/filter-datespec.h +++ b/filter/filter-datespec.h @@ -1,26 +1,26 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ /* - * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com) - * - * Authors: Not Zed - * Jeffrey Stedfast - * * This program is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) version 3. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with the program; if not, see + * + * + * Authors: + * Not Zed + * Jeffrey Stedfast + * + * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com) * - * You should have received a copy of the GNU General Public - * License along with this program; if not, write to the - * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. */ - #ifndef _FILTER_DATESPEC_H #define _FILTER_DATESPEC_H diff --git a/filter/filter-element.h b/filter/filter-element.h index 5c7fdfe01f..6124b364a2 100644 --- a/filter/filter-element.h +++ b/filter/filter-element.h @@ -1,23 +1,24 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ /* - * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com) - * - * Authors: Not Zed - * Jeffrey Stedfast - * * This program is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) version 3. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with the program; if not, see + * + * + * Authors: + * Not Zed + * Jeffrey Stedfast + * + * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com) * - * You should have received a copy of the GNU General Public - * License along with this program; if not, write to the - * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. */ #ifndef _FILTER_ELEMENT_H diff --git a/filter/filter-file.c b/filter/filter-file.c index c9b95d0f6d..4126c4b937 100644 --- a/filter/filter-file.c +++ b/filter/filter-file.c @@ -1,22 +1,22 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ /* - * Authors: Jeffrey Stedfast + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) version 3. * - * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com) + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. + * You should have received a copy of the GNU Lesser General Public + * License along with the program; if not, see * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * Authors: + * Jeffrey Stedfast + * + * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com) * */ diff --git a/filter/filter-input.c b/filter/filter-input.c index bb87f4f7b5..be88a06835 100644 --- a/filter/filter-input.c +++ b/filter/filter-input.c @@ -1,26 +1,26 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ /* - * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com) - * - * Authors: Not Zed - * Jeffrey Stedfast - * * This program is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) version 3. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with the program; if not, see + * + * + * Authors: + * Not Zed + * Jeffrey Stedfast + * + * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com) * - * You should have received a copy of the GNU General Public - * License along with this program; if not, write to the - * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. */ - #ifdef HAVE_CONFIG_H #include #endif diff --git a/filter/filter-input.h b/filter/filter-input.h index 831808ee32..b6c6019052 100644 --- a/filter/filter-input.h +++ b/filter/filter-input.h @@ -1,26 +1,26 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ /* - * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com) - * - * Authors: Not Zed - * Jeffrey Stedfast - * * This program is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) version 3. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with the program; if not, see + * + * + * Authors: + * Not Zed + * Jeffrey Stedfast + * + * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com) * - * You should have received a copy of the GNU General Public - * License along with this program; if not, write to the - * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. */ - #ifndef _FILTER_INPUT_H #define _FILTER_INPUT_H diff --git a/filter/filter-option.h b/filter/filter-option.h index 9d4b874110..8cc6c052d4 100644 --- a/filter/filter-option.h +++ b/filter/filter-option.h @@ -1,26 +1,26 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ /* - * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com) - * - * Authors: Not Zed - * Jeffrey Stedfast - * * This program is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) version 3. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with the program; if not, see + * + * + * Authors: + * Not Zed + * Jeffrey Stedfast + * + * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com) * - * You should have received a copy of the GNU General Public - * License along with this program; if not, write to the - * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. */ - #ifndef _FILTER_OPTION_H #define _FILTER_OPTION_H diff --git a/filter/filter-part.h b/filter/filter-part.h index bb6d59868e..6c83b1d734 100644 --- a/filter/filter-part.h +++ b/filter/filter-part.h @@ -1,23 +1,24 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ /* - * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com) - * - * Authors: Not Zed - * Jeffrey Stedfast - * * This program is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) version 3. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with the program; if not, see + * + * + * Authors: + * Not Zed + * Jeffrey Stedfast + * + * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com) * - * You should have received a copy of the GNU General Public - * License along with this program; if not, write to the - * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. */ #ifndef _FILTER_PART_H diff --git a/filter/filter-rule.h b/filter/filter-rule.h index c43b09916c..184c1270e5 100644 --- a/filter/filter-rule.h +++ b/filter/filter-rule.h @@ -1,23 +1,24 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ /* - * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com) - * - * Authors: Not Zed - * Jeffrey Stedfast - * * This program is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) version 3. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with the program; if not, see + * + * + * Authors: + * Not Zed + * Jeffrey Stedfast + * + * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com) * - * You should have received a copy of the GNU General Public - * License along with this program; if not, write to the - * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. */ #ifndef _FILTER_RULE_H diff --git a/filter/rule-context.c b/filter/rule-context.c index b41791a032..2a370fd2af 100644 --- a/filter/rule-context.c +++ b/filter/rule-context.c @@ -1,23 +1,24 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ /* - * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com) - * - * Authors: Not Zed - * Jeffrey Stedfast - * * This program is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) version 3. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with the program; if not, see + * + * + * Authors: + * Not Zed + * Jeffrey Stedfast + * + * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com) * - * You should have received a copy of the GNU General Public - * License along with this program; if not, write to the - * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. */ #include diff --git a/filter/rule-editor.h b/filter/rule-editor.h index 9bf9e034b3..4e675f839f 100644 --- a/filter/rule-editor.h +++ b/filter/rule-editor.h @@ -1,26 +1,26 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ /* - * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com) - * - * Authors: Not Zed - * Jeffrey Stedfast - * * This program is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) version 3. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with the program; if not, see + * + * + * Authors: + * Not Zed + * Jeffrey Stedfast + * + * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com) * - * You should have received a copy of the GNU General Public - * License along with this program; if not, write to the - * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. */ - #ifndef _RULE_EDITOR_H #define _RULE_EDITOR_H -- cgit From 79d878670a311644f188f671cbc4e60193100558 Mon Sep 17 00:00:00 2001 From: Sankarasivasubramanian Pasupathilingam Date: Tue, 16 Sep 2008 10:52:29 +0000 Subject: License changes from GPL to LGPL svn path=/trunk/; revision=36344 --- filter/ChangeLog | 7 +++++++ filter/filter-option.c | 28 ++++++++++++++-------------- filter/filter-part.c | 28 ++++++++++++++-------------- 3 files changed, 35 insertions(+), 28 deletions(-) (limited to 'filter') diff --git a/filter/ChangeLog b/filter/ChangeLog index 740a192178..3510ad0412 100644 --- a/filter/ChangeLog +++ b/filter/ChangeLog @@ -1,3 +1,10 @@ +2008-09-16 Sankar P + +License Changes + + * filter-option.c: + * filter-part.c: + 2008-09-02 Sankar P License Changes diff --git a/filter/filter-option.c b/filter/filter-option.c index 5c4283b889..1685fe06ce 100644 --- a/filter/filter-option.c +++ b/filter/filter-option.c @@ -1,26 +1,26 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ /* - * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com) - * - * Authors: Not Zed - * Jeffrey Stedfast - * * This program is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) version 3. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with the program; if not, see + * + * + * Authors: + * Not Zed + * Jeffrey Stedfast + * + * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com) * - * You should have received a copy of the GNU General Public - * License along with this program; if not, write to the - * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. */ - #ifdef HAVE_CONFIG_H #include #endif diff --git a/filter/filter-part.c b/filter/filter-part.c index 7ed7c306e6..08434eadac 100644 --- a/filter/filter-part.c +++ b/filter/filter-part.c @@ -1,26 +1,26 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ /* - * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com) - * - * Authors: Not Zed - * Jeffrey Stedfast - * * This program is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) version 3. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with the program; if not, see + * + * + * Authors: + * Not Zed + * Jeffrey Stedfast + * + * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com) * - * You should have received a copy of the GNU General Public - * License along with this program; if not, write to the - * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. */ - #ifdef HAVE_CONFIG_H #include #endif -- cgit From 044925165fcc12e33d7c67df79021679aefb5dc4 Mon Sep 17 00:00:00 2001 From: Sankarasivasubramanian Pasupathilingam Date: Wed, 24 Sep 2008 09:12:38 +0000 Subject: License changes from GPL to LGPL svn path=/trunk/; revision=36440 --- filter/ChangeLog | 6 ++++++ filter/filter-datespec.c | 27 ++++++++++++++------------- 2 files changed, 20 insertions(+), 13 deletions(-) (limited to 'filter') diff --git a/filter/ChangeLog b/filter/ChangeLog index 3510ad0412..4a0faacd31 100644 --- a/filter/ChangeLog +++ b/filter/ChangeLog @@ -1,3 +1,9 @@ +2008-09-24 Sankar P + +License Changes + + * filter-datespec.c: + 2008-09-16 Sankar P License Changes diff --git a/filter/filter-datespec.c b/filter/filter-datespec.c index fbcc78a0aa..82b0e08197 100644 --- a/filter/filter-datespec.c +++ b/filter/filter-datespec.c @@ -1,23 +1,24 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ /* - * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com) - * - * Authors: Not Zed - * Jeffrey Stedfast - * * This program is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) version 3. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with the program; if not, see + * + * + * Authors: + * Not Zed + * Jeffrey Stedfast + * + * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com) * - * You should have received a copy of the GNU General Public - * License along with this program; if not, write to the - * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. */ #ifdef HAVE_CONFIG_H -- cgit From dc4967ab610a6d97258c8e937b0f623bce89856b Mon Sep 17 00:00:00 2001 From: Sankarasivasubramanian Pasupathilingam Date: Thu, 25 Sep 2008 10:03:08 +0000 Subject: License change from GPL to LGPL svn path=/trunk/; revision=36448 --- filter/ChangeLog | 8 ++++++++ filter/filter-element.c | 28 ++++++++++++++-------------- filter/filter-int.c | 29 ++++++++++++++--------------- filter/filter-int.h | 29 ++++++++++++++--------------- 4 files changed, 50 insertions(+), 44 deletions(-) (limited to 'filter') diff --git a/filter/ChangeLog b/filter/ChangeLog index 4a0faacd31..a36684aa4a 100644 --- a/filter/ChangeLog +++ b/filter/ChangeLog @@ -1,3 +1,11 @@ +2008-09-25 Sankar P + +License Changes + + * filter-element.c: + * filter-int.c: + * filter-int.h: + 2008-09-24 Sankar P License Changes diff --git a/filter/filter-element.c b/filter/filter-element.c index d63dd1e491..4369c65050 100644 --- a/filter/filter-element.c +++ b/filter/filter-element.c @@ -1,26 +1,26 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ /* - * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com) - * - * Authors: Not Zed - * Jeffrey Stedfast - * * This program is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) version 3. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with the program; if not, see + * + * + * Authors: + * Not Zed + * Jeffrey Stedfast + * + * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com) * - * You should have received a copy of the GNU General Public - * License along with this program; if not, write to the - * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. */ - #ifdef HAVE_CONFIG_H #include #endif diff --git a/filter/filter-int.c b/filter/filter-int.c index 22d1f0b819..5336884eae 100644 --- a/filter/filter-int.c +++ b/filter/filter-int.c @@ -1,26 +1,25 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ /* - * Authors: Jeffrey Stedfast + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) version 3. * - * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com) + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. + * You should have received a copy of the GNU Lesser General Public + * License along with the program; if not, see * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * Authors: + * Jeffrey Stedfast + * + * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com) * */ - #ifdef HAVE_CONFIG_H #include #endif diff --git a/filter/filter-int.h b/filter/filter-int.h index 7a25ae6c9b..06add3fd05 100644 --- a/filter/filter-int.h +++ b/filter/filter-int.h @@ -1,26 +1,25 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ /* - * Authors: Jeffrey Stedfast + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) version 3. * - * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com) + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. + * You should have received a copy of the GNU Lesser General Public + * License along with the program; if not, see * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * Authors: + * Jeffrey Stedfast + * + * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com) * */ - #ifndef _FILTER_INT_H #define _FILTER_INT_H -- cgit From bfc8b8784d22d4eb4e7286cc6ef35dd5be5419a4 Mon Sep 17 00:00:00 2001 From: Sankarasivasubramanian Pasupathilingam Date: Mon, 29 Sep 2008 08:36:04 +0000 Subject: License changes from GPL to LGPL svn path=/trunk/; revision=36465 --- filter/ChangeLog | 6 ++++++ filter/rule-editor.c | 28 ++++++++++++++-------------- 2 files changed, 20 insertions(+), 14 deletions(-) (limited to 'filter') diff --git a/filter/ChangeLog b/filter/ChangeLog index a36684aa4a..991d9f5fb8 100644 --- a/filter/ChangeLog +++ b/filter/ChangeLog @@ -1,3 +1,9 @@ +2008-09-29 Sankar P + +License Changes + + * rule-editor.c: + 2008-09-25 Sankar P License Changes diff --git a/filter/rule-editor.c b/filter/rule-editor.c index 82bfd4aa68..53c576540c 100644 --- a/filter/rule-editor.c +++ b/filter/rule-editor.c @@ -1,26 +1,26 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ /* - * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com) - * - * Authors: Not Zed - * Jeffrey Stedfast - * * This program is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) version 3. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with the program; if not, see + * + * + * Authors: + * Not Zed + * Jeffrey Stedfast + * + * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com) * - * You should have received a copy of the GNU General Public - * License along with this program; if not, write to the - * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. */ - #ifdef HAVE_CONFIG_H #include #endif -- cgit From 3b318d5cbf08f6a42088df23db27fcfa55502591 Mon Sep 17 00:00:00 2001 From: Sankarasivasubramanian Pasupathilingam Date: Wed, 1 Oct 2008 09:24:41 +0000 Subject: Change License from GPL to LGPL. svn path=/trunk/; revision=36520 --- filter/ChangeLog | 6 ++++++ filter/filter-rule.c | 27 ++++++++++++++------------- 2 files changed, 20 insertions(+), 13 deletions(-) (limited to 'filter') diff --git a/filter/ChangeLog b/filter/ChangeLog index 991d9f5fb8..12ee719755 100644 --- a/filter/ChangeLog +++ b/filter/ChangeLog @@ -1,3 +1,9 @@ +2008-10-01 Sankar P + +License Changes + + * filter-rule.c: + 2008-09-29 Sankar P License Changes diff --git a/filter/filter-rule.c b/filter/filter-rule.c index c7e79269e6..c0123e21c3 100644 --- a/filter/filter-rule.c +++ b/filter/filter-rule.c @@ -1,23 +1,24 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ /* - * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com) - * - * Authors: Not Zed - * Jeffrey Stedfast - * * This program is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) version 3. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with the program; if not, see + * + * + * Authors: + * Not Zed + * Jeffrey Stedfast + * + * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com) * - * You should have received a copy of the GNU General Public - * License along with this program; if not, write to the - * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. */ #ifdef HAVE_CONFIG_H -- cgit From e1ed13a4b36ba23bb2b7a8f762d8b23eda4dcce0 Mon Sep 17 00:00:00 2001 From: Lucian Langa Date: Mon, 6 Oct 2008 09:59:41 +0000 Subject: ** Fix for bug #554566 2008-10-06 Lucian Langa ** Fix for bug #554566 * rule-editor.c: (rule_editor_class_init), (rule_edit), (rule_top), (rule_up), (rule_down), (rule_bottom), (cursor_changed) (update_selected_rule): new function to update current selected rule svn path=/trunk/; revision=36569 --- filter/ChangeLog | 10 ++++++++++ filter/rule-editor.c | 26 ++++++++++++++++++++++++-- 2 files changed, 34 insertions(+), 2 deletions(-) (limited to 'filter') diff --git a/filter/ChangeLog b/filter/ChangeLog index 12ee719755..b66dbb7ff6 100644 --- a/filter/ChangeLog +++ b/filter/ChangeLog @@ -1,3 +1,13 @@ +2008-10-06 Lucian Langa + + ** Fix for bug #554566 + + * rule-editor.c: (rule_editor_class_init), (rule_edit), + (rule_top), (rule_up), (rule_down), (rule_bottom), + (cursor_changed) + (update_selected_rule): new function to update + current selected rule + 2008-10-01 Sankar P License Changes diff --git a/filter/rule-editor.c b/filter/rule-editor.c index 53c576540c..16e79f0ee3 100644 --- a/filter/rule-editor.c +++ b/filter/rule-editor.c @@ -43,6 +43,7 @@ static void set_source (RuleEditor *re, const char *source); static void set_sensitive (RuleEditor *re); static FilterRule *create_rule (RuleEditor *re); +static gboolean update_selected_rule (RuleEditor *re); static void cursor_changed (GtkTreeView *treeview, RuleEditor *re); static void rule_editor_class_init (RuleEditorClass *klass); @@ -442,6 +443,8 @@ rule_edit (GtkWidget *widget, RuleEditor *re) { GtkWidget *rules; + update_selected_rule(re); + if (re->current == NULL || re->edit != NULL) return; @@ -483,6 +486,8 @@ rule_delete (GtkWidget *widget, RuleEditor *re) GtkTreeIter iter; int pos, len; + update_selected_rule(re); + d(printf ("delete rule\n")); pos = rule_context_get_rank_rule (re->context, re->current, re->source); if (pos != -1) { @@ -576,6 +581,8 @@ rule_top (GtkWidget *widget, RuleEditor *re) { int pos; + update_selected_rule(re); + d(printf ("top rule\n")); pos = rule_context_get_rank_rule (re->context, re->current, re->source); if (pos > 0) @@ -587,6 +594,8 @@ rule_up (GtkWidget *widget, RuleEditor *re) { int pos; + update_selected_rule(re); + d(printf ("up rule\n")); pos = rule_context_get_rank_rule (re->context, re->current, re->source); if (pos > 0) @@ -598,6 +607,8 @@ rule_down (GtkWidget *widget, RuleEditor *re) { int pos; + update_selected_rule(re); + d(printf ("down rule\n")); pos = rule_context_get_rank_rule (re->context, re->current, re->source); if (pos >= 0) @@ -611,6 +622,8 @@ rule_bottom (GtkWidget *widget, RuleEditor *re) int index = -1, count = 0; FilterRule *rule = NULL; + update_selected_rule(re); + d(printf ("bottom rule\n")); pos = rule_context_get_rank_rule (re->context, re->current, re->source); /* There's probably a better/faster way to get the count of the list here */ @@ -669,8 +682,8 @@ dialog_rule_changed (FilterRule *fr, GtkWidget *dialog) gtk_dialog_set_response_sensitive (GTK_DIALOG (dialog), GTK_RESPONSE_OK, fr && fr->parts); } -static void -cursor_changed (GtkTreeView *treeview, RuleEditor *re) +static gboolean +update_selected_rule (RuleEditor *re) { GtkTreeSelection *selection; GtkTreeModel *model; @@ -679,7 +692,16 @@ cursor_changed (GtkTreeView *treeview, RuleEditor *re) selection = gtk_tree_view_get_selection (re->list); if (gtk_tree_selection_get_selected (selection, &model, &iter)) { gtk_tree_model_get (GTK_TREE_MODEL (re->model), &iter, 1, &re->current, -1); + return TRUE; + } + + return FALSE; +} +static void +cursor_changed (GtkTreeView *treeview, RuleEditor *re) +{ + if (update_selected_rule(re)) { g_return_if_fail (re->current); rule_editor_set_sensitive (re); -- cgit From bbbcb08af033697dfee8b82f61f96bc0ffd77093 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Fri, 17 Oct 2008 08:51:33 +0000 Subject: ** Fix for bug #503898 2008-10-17 Matthew Barnes ** Fix for bug #503898 * filter-rule.c: (get_widget): s/criteria/condition/ svn path=/trunk/; revision=36637 --- filter/ChangeLog | 6 ++++++ filter/filter-rule.c | 6 +++--- 2 files changed, 9 insertions(+), 3 deletions(-) (limited to 'filter') diff --git a/filter/ChangeLog b/filter/ChangeLog index b66dbb7ff6..3534320543 100644 --- a/filter/ChangeLog +++ b/filter/ChangeLog @@ -1,3 +1,9 @@ +2008-10-17 Matthew Barnes + + ** Fix for bug #503898 + + * filter-rule.c: (get_widget): s/criteria/condition/ + 2008-10-06 Lucian Langa ** Fix for bug #554566 diff --git a/filter/filter-rule.c b/filter/filter-rule.c index c0123e21c3..794c94498d 100644 --- a/filter/filter-rule.c +++ b/filter/filter-rule.c @@ -878,7 +878,7 @@ get_widget (FilterRule *fr, struct _RuleContext *f) gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0); gtk_widget_show (hbox); - text = g_strdup_printf("%s", _("Find items that meet the following criteria")); + text = g_strdup_printf("%s", _("Find items that meet the following conditions")); label = gtk_label_new (text); gtk_label_set_use_markup (GTK_LABEL (label), TRUE); gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5); @@ -912,13 +912,13 @@ get_widget (FilterRule *fr, struct _RuleContext *f) hbox = gtk_hbox_new (FALSE, 3); - add = gtk_button_new_with_mnemonic (_("A_dd Filter Criteria")); + add = gtk_button_new_with_mnemonic (_("A_dd Condition")); gtk_button_set_image (GTK_BUTTON (add), gtk_image_new_from_stock (GTK_STOCK_ADD, GTK_ICON_SIZE_BUTTON)); g_signal_connect (add, "clicked", G_CALLBACK (more_parts), data); gtk_box_pack_start (GTK_BOX (hbox), add, FALSE, FALSE, 0); if (f->flags & RULE_CONTEXT_GROUPING) { - const char *thread_types[] = { N_("If all criteria are met"), N_("If any criteria are met") }; + const char *thread_types[] = { N_("If all conditions are met"), N_("If any conditions are met") }; label = gtk_label_new_with_mnemonic (_("_Find items:")); menu = gtk_menu_new (); -- cgit From 7b221ebc07a7867c3528b113e82f25a01816a015 Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Fri, 5 Dec 2008 19:20:28 +0000 Subject: ** Fix for bug #332629 2008-12-05 Milan Crha ** 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 --- filter/ChangeLog | 12 ++++++ filter/filter-label.c | 2 +- filter/filter-option.c | 102 +++++++++++++++++++++++++++++++++++++++++++++++-- filter/filter-option.h | 5 ++- 4 files changed, 115 insertions(+), 6 deletions(-) (limited to 'filter') diff --git a/filter/ChangeLog b/filter/ChangeLog index 3534320543..740edb5ecd 100644 --- a/filter/ChangeLog +++ b/filter/ChangeLog @@ -1,3 +1,15 @@ +2008-12-05 Milan Crha + + ** Fix for bug #332629 + + * filter-option.h: (struct _filter_option), + (struct _FilterOption), (filter_option_add): + * 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-label.c: (fill_options): Adapt. + 2008-10-17 Matthew Barnes ** Fix for bug #503898 diff --git a/filter/filter-label.c b/filter/filter-label.c index 1d76300339..006d4822e8 100644 --- a/filter/filter-label.c +++ b/filter/filter-label.c @@ -192,7 +192,7 @@ fill_options (FilterOption *fo) if (tag && strncmp (tag, "$Label", 6) == 0) tag += 6; - filter_option_add (fo, tag, title, NULL); + filter_option_add (fo, tag, title, NULL, FALSE); g_free (title); } diff --git a/filter/filter-option.c b/filter/filter-option.c index 1685fe06ce..e0827d4475 100644 --- a/filter/filter-option.c +++ b/filter/filter-option.c @@ -29,6 +29,7 @@ #include #include +#include #include "filter-option.h" #include "filter-part.h" @@ -102,6 +103,7 @@ static void filter_option_init (FilterOption *fo) { fo->type = "option"; + fo->dynamic_func = NULL; } static void @@ -120,6 +122,7 @@ filter_option_finalise (GObject *obj) g_list_foreach (fo->options, (GFunc)free_option, NULL); g_list_free (fo->options); + g_free (fo->dynamic_func); G_OBJECT_CLASS (parent_class)->finalize (obj); } @@ -164,7 +167,7 @@ filter_option_set_current (FilterOption *option, const char *name) /* used by implementers to add additional options */ struct _filter_option * -filter_option_add(FilterOption *fo, const char *value, const char *title, const char *code) +filter_option_add(FilterOption *fo, const char *value, const char *title, const char *code, gboolean is_dynamic) { struct _filter_option *op; @@ -175,6 +178,7 @@ filter_option_add(FilterOption *fo, const char *value, const char *title, const op->title = g_strdup(title); op->value = g_strdup(value); op->code = g_strdup(code); + op->is_dynamic = is_dynamic; fo->options = g_list_append(fo->options, op); if (fo->current == NULL) @@ -253,10 +257,34 @@ xml_create (FilterElement *fe, xmlNodePtr node) work = work->next; } - filter_option_add (fo, value, title, code); + filter_option_add (fo, value, title, code, FALSE); xmlFree (value); g_free (title); g_free (code); + } else if (g_str_equal ((char *)n->name, "dynamic")) { + if (fo->dynamic_func) { + g_warning ("Only one 'dynamic' node is acceptable in the optionlist '%s'", fe->name); + } else { + /* Expecting only one in the option list, + The 'cb' should be of this prototype: + GSList *cb (void); + returning GSList of struct _filter_option, all newly allocated, because it'll + be freed with g_free and g_slist_free. 'is_dynamic' member is ignored here. + */ + xmlChar *fn; + + fn = xmlGetProp (n, (const unsigned char *)"func"); + if (fn && *fn) { + fo->dynamic_func = g_strdup ((const char *)fn); + + /* to remember where to place them */ + filter_option_add (fo, "fake_dynamic", "fake_dynamic", NULL, TRUE); + } else { + g_warning ("Missing 'func' attribute within '%s' node in optionlist '%s'", n->name, fe->name); + } + + xmlFree (fn); + } } else if (n->type == XML_ELEMENT_NODE) { g_warning ("Unknown xml node within optionlist: %s\n", n->name); } @@ -315,11 +343,75 @@ get_widget (FilterElement *fe) GtkWidget *omenu; GtkWidget *item; GtkWidget *first = NULL; - GList *l = fo->options; + GList *l; struct _filter_option *op; int index = 0, current = 0; + if (fo->dynamic_func) { + /* it is dynamically filled, thus remove all dynamics and put there the fresh ones */ + GList *old_ops; + struct _filter_option *old_cur; + void *module; + GSList *(*get_func)(void); + + old_ops = fo->options; + old_cur = fo->current; + l = old_ops; + + /* start with an empty list */ + fo->current = NULL; + fo->options = NULL; + + for (l = fo->options; l; l = l->next) { + op = l->data; + + if (op->is_dynamic) { + break; + } else { + filter_option_add (fo, op->value, op->title, op->code, FALSE); + } + } + + module = dlopen (NULL, RTLD_LAZY); + + get_func = dlsym (module, fo->dynamic_func); + if (get_func) { + GSList *items, *i; + + items = get_func (); + for (i = items; i; i = i->next) { + op = i->data; + + if (op) { + filter_option_add (fo, op->value, op->title, op->code, TRUE); + free_option (op, NULL); + } + } + + g_slist_free (items); + } else + g_warning ("optionlist dynamic fill function '%s' not found", fo->dynamic_func); + + dlclose (module); + + /* maybe some static left after those dynamic, add them too */ + for (; l; l = l->next) { + op = l->data; + + if (!op->is_dynamic) + filter_option_add (fo, op->value, op->title, op->code, FALSE); + } + + if (old_cur) + filter_option_set_current (fo, old_cur->value); + + /* free old list */ + g_list_foreach (old_ops, (GFunc)free_option, NULL); + g_list_free (old_ops); + } + menu = gtk_menu_new (); + l = fo->options; while (l) { op = l->data; item = gtk_menu_item_new_with_label (_(op->title)); @@ -382,12 +474,14 @@ clone (FilterElement *fe) l = fo->options; while (l) { op = l->data; - newop = filter_option_add (new, op->value, op->title, op->code); + newop = filter_option_add (new, op->value, op->title, op->code, op->is_dynamic); if (fo->current == op) new->current = newop; l = l->next; } + new->dynamic_func = g_strdup (fo->dynamic_func); + d(printf ("cloning option code %p, current = %p\n", new, new->current)); return (FilterElement *) new; diff --git a/filter/filter-option.h b/filter/filter-option.h index 8cc6c052d4..6cf56645b8 100644 --- a/filter/filter-option.h +++ b/filter/filter-option.h @@ -40,6 +40,8 @@ struct _filter_option { char *title; /* button title */ char *value; /* value, if it has one */ char *code; /* used to string code segments together */ + + gboolean is_dynamic; /* whether is the option dynamic, FALSE if static */ }; struct _FilterOption { @@ -49,6 +51,7 @@ struct _FilterOption { GList *options; struct _filter_option *current; + char *dynamic_func; /* name of the dynamic fill func, called in get_widget */ }; struct _FilterOptionClass { @@ -66,7 +69,7 @@ FilterOption *filter_option_new (void); void filter_option_set_current (FilterOption *option, const char *name); const char *filter_option_get_current (FilterOption *option); -struct _filter_option *filter_option_add (FilterOption *fo, const char *name, const char *title, const char *code); +struct _filter_option *filter_option_add (FilterOption *fo, const char *name, const char *title, const char *code, gboolean is_dynamic); void filter_option_remove_all (FilterOption *fo); #endif /* ! _FILTER_OPTION_H */ -- cgit From 14ed95aaafdf590495c951a46234894acfd14157 Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Tue, 9 Dec 2008 12:53:32 +0000 Subject: ** Fix for bug #563669 2008-12-09 Milan Crha ** Fix for bug #563669 * addressbook/gui/component/ldap-config.glade: * addressbook/printing/e-contact-print.glade: * mail/mail-config.glade: * filter/filter.glade: * widgets/misc/e-send-options.glade: * calendar/gui/dialogs/recurrence-page.glade: * calendar/gui/dialogs/alarm-dialog.glade: * calendar/gui/dialogs/event-page.glade: * calendar/gui/dialogs/task-details-page.glade: * calendar/gui/dialogs/cal-prefs-dialog.glade: * calendar/gui/alarm-notify/alarm-notify.glade: * calendar/gui/goto-dialog.glade: Use zero GtkSpinButton's PageSize, as Gtk+ requires. svn path=/trunk/; revision=36855 --- filter/ChangeLog | 7 +++++++ filter/filter.glade | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) (limited to 'filter') diff --git a/filter/ChangeLog b/filter/ChangeLog index 740edb5ecd..8c8ec1336b 100644 --- a/filter/ChangeLog +++ b/filter/ChangeLog @@ -1,3 +1,10 @@ +2008-12-09 Milan Crha + + ** Part of fix for bug #563669 + + * filter.glade: + Use zero GtkSpinButton's PageSize, as Gtk+ requires. + 2008-12-05 Milan Crha ** Fix for bug #332629 diff --git a/filter/filter.glade b/filter/filter.glade index 8dd6197f0c..3b43c26249 100644 --- a/filter/filter.glade +++ b/filter/filter.glade @@ -615,7 +615,7 @@ a time relative to when filtering occurs. GTK_UPDATE_ALWAYS False False - 1 0 1000 1 10 10 + 1 0 1000 1 10 0 0 -- cgit From 65145381a69be1ac144c6e6dc7c2ab3fdb05d3b7 Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Wed, 10 Dec 2008 11:05:01 +0000 Subject: ** Fix for bug #563870 2008-12-10 Milan Crha ** Fix for bug #563870 * e-util/e-util-labels.h: (e_util_labels_get_filter_options): * e-util/e-util-labels.c: (e_util_labels_get_filter_options): New helper function to be used in FilterOption. * filter/Makefile.am: * filter/filter-label.h: * filter/filter-label.c: Drop, not used anywhere. * filter/filter-element.c: * filter/rule-context.c: Remove dropped include and code. * filter/filter-option.c: (get_dynamic_options), (xml_create), (get_widget): Evaluate dynamic options even on create, to have them available for saved searches even before the widget itself is shown. * mail/vfoldertypes.xml: * mail/filtertypes.xml: * mail/searchtypes.xml: Use dynamic filter option. * mail/message-list.c: Drop unused header include. svn path=/trunk/; revision=36863 --- filter/ChangeLog | 14 +++ filter/Makefile.am | 2 - filter/filter-element.c | 1 - filter/filter-label.c | 311 ------------------------------------------------ filter/filter-label.h | 70 ----------- filter/filter-option.c | 71 +++++++---- filter/rule-context.c | 3 - 7 files changed, 63 insertions(+), 409 deletions(-) delete mode 100644 filter/filter-label.c delete mode 100644 filter/filter-label.h (limited to 'filter') diff --git a/filter/ChangeLog b/filter/ChangeLog index 8c8ec1336b..367645ea18 100644 --- a/filter/ChangeLog +++ b/filter/ChangeLog @@ -1,3 +1,17 @@ +2008-12-10 Milan Crha + + ** Part of fix for bug #563870 + + * Makefile.am: + * filter-label.h: + * filter-label.c: Drop, not used anywhere. + * filter-element.c: + * rule-context.c: Remove dropped include and code. + + * filter-option.c: (get_dynamic_options), (xml_create), (get_widget): + Evaluate dynamic options even on create, to have them available for + saved searches even before the widget itself is shown. + 2008-12-09 Milan Crha ** Part of fix for bug #563669 diff --git a/filter/Makefile.am b/filter/Makefile.am index 72cebb002a..7d4e72daeb 100644 --- a/filter/Makefile.am +++ b/filter/Makefile.am @@ -27,8 +27,6 @@ libfilter_la_SOURCES = \ filter-input.h \ filter-int.c \ filter-int.h \ - filter-label.c \ - filter-label.h \ filter-marshal.c \ filter-marshal.h \ filter-option.c \ diff --git a/filter/filter-element.c b/filter/filter-element.c index 4369c65050..c14365cc8a 100644 --- a/filter/filter-element.c +++ b/filter/filter-element.c @@ -279,7 +279,6 @@ clone (FilterElement *fe) #include "filter-datespec.h" #include "filter-int.h" #include "filter-file.h" -#include "filter-label.h" static void copy_value(FilterElement *de, FilterElement *se) diff --git a/filter/filter-label.c b/filter/filter-label.c deleted file mode 100644 index 006d4822e8..0000000000 --- a/filter/filter-label.c +++ /dev/null @@ -1,311 +0,0 @@ -/* - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) version 3. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with the program; if not, see - * - * - * Authors: - * Jeffrey Stedfast - * Michael Zucchi - * - * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com) - * - */ - -#ifdef HAVE_CONFIG_H -#include -#endif - -#include - -#include -#include -#include -#include -#include -#include - -#include "filter-label.h" -#include -#include "e-util/e-util.h" -#include "e-util/e-util-labels.h" - -#define d(x) - -static void xml_create (FilterElement *fe, xmlNodePtr node); - -static void filter_label_class_init (FilterLabelClass *klass); -static void filter_label_init (FilterLabel *label); -static void filter_label_finalise (GObject *obj); - -static FilterElementClass *parent_class; - -GType -filter_label_get_type (void) -{ - static GType type = 0; - - if (!type) { - static const GTypeInfo info = { - sizeof (FilterLabelClass), - NULL, /* base_class_init */ - NULL, /* base_class_finalize */ - (GClassInitFunc) filter_label_class_init, - NULL, /* class_finalize */ - NULL, /* class_data */ - sizeof (FilterLabel), - 0, /* n_preallocs */ - (GInstanceInitFunc) filter_label_init, - }; - - type = g_type_register_static (FILTER_TYPE_OPTION, "FilterLabel", &info, 0); - } - - return type; -} - -static GStaticRecMutex cache_lock = G_STATIC_REC_MUTEX_INIT; -static guint cache_notifier_id = 0; -static GSList *tracked_filters = NULL; -static GSList *labels_cache = NULL; -static GConfClient *gconf_client = NULL; - -static void fill_cache (void); -static void clear_cache (void); -static void gconf_labels_changed (GConfClient *client, guint cnxn_id, GConfEntry *entry, gpointer user_data); - -static void -filter_label_class_init (FilterLabelClass *klass) -{ - GObjectClass *object_class = G_OBJECT_CLASS (klass); - FilterElementClass *fe_class = FILTER_ELEMENT_CLASS (klass); - - parent_class = g_type_class_ref (FILTER_TYPE_OPTION); - - object_class->finalize = filter_label_finalise; - - /* override methods */ - fe_class->xml_create = xml_create; -} - -static void -filter_label_init (FilterLabel *fl) -{ - ((FilterOption *) fl)->type = "label"; - - g_static_rec_mutex_lock (&cache_lock); - - if (!tracked_filters) { - fill_cache (); - - gconf_client = gconf_client_get_default (); - gconf_client_add_dir (gconf_client, E_UTIL_LABELS_GCONF_KEY, GCONF_CLIENT_PRELOAD_ONELEVEL, NULL); - cache_notifier_id = gconf_client_notify_add (gconf_client, E_UTIL_LABELS_GCONF_KEY, gconf_labels_changed, NULL, NULL, NULL); - } - - tracked_filters = g_slist_prepend (tracked_filters, fl); - - g_static_rec_mutex_unlock (&cache_lock); -} - -static void -filter_label_finalise (GObject *obj) -{ - G_OBJECT_CLASS (parent_class)->finalize (obj); - - g_static_rec_mutex_lock (&cache_lock); - - tracked_filters = g_slist_remove (tracked_filters, obj); - - if (!tracked_filters) { - clear_cache (); - - if (cache_notifier_id) - gconf_client_notify_remove (gconf_client, cache_notifier_id); - - cache_notifier_id = 0; - g_object_unref (gconf_client); - gconf_client = NULL; - } - - g_static_rec_mutex_unlock (&cache_lock); -} - -/** - * filter_label_new: - * - * Create a new FilterLabel object. - * - * Return value: A new #FilterLabel object. - **/ -FilterLabel * -filter_label_new (void) -{ - return (FilterLabel *) g_object_new (FILTER_TYPE_LABEL, NULL, NULL); -} - -/* ************************************************************************* */ - -/* should already hold the lock when calling this function */ -static void -fill_cache (void) -{ - labels_cache = e_util_labels_parse (NULL); -} - -/* should already hold the lock when calling this function */ -static void -clear_cache (void) -{ - e_util_labels_free (labels_cache); - labels_cache = NULL; -} - -static void -fill_options (FilterOption *fo) -{ - GSList *l; - - g_static_rec_mutex_lock (&cache_lock); - - for (l = labels_cache; l; l = l->next) { - EUtilLabel *label = l->data; - const char *tag; - char *title; - - if (!label) - continue; - - title = e_str_without_underscores (label->name); - tag = label->tag; - - if (tag && strncmp (tag, "$Label", 6) == 0) - tag += 6; - - filter_option_add (fo, tag, title, NULL, FALSE); - - g_free (title); - } - - g_static_rec_mutex_unlock (&cache_lock); -} - -static void -regen_label_options (FilterOption *fo) -{ - char *current; - - if (!fo) - return; - - current = g_strdup (filter_option_get_current (fo)); - - filter_option_remove_all (fo); - fill_options (fo); - - if (current) - filter_option_set_current (fo, current); - - g_free (current); -} - -static void -gconf_labels_changed (GConfClient *client, guint cnxn_id, GConfEntry *entry, gpointer user_data) -{ - g_static_rec_mutex_lock (&cache_lock); - - clear_cache (); - fill_cache (); - g_slist_foreach (tracked_filters, (GFunc)regen_label_options, NULL); - - g_static_rec_mutex_unlock (&cache_lock); -} - -/* ************************************************************************* */ - -int -filter_label_count (void) -{ - int res; - - g_static_rec_mutex_lock (&cache_lock); - - res = g_slist_length (labels_cache); - - g_static_rec_mutex_unlock (&cache_lock); - - return res; -} - -const char * -filter_label_label (int i) -{ - const char *res = NULL; - GSList *l; - EUtilLabel *label; - - g_static_rec_mutex_lock (&cache_lock); - - l = g_slist_nth (labels_cache, i); - - if (l) - label = l->data; - else - label = NULL; - - if (label && label->tag) { - if (strncmp (label->tag, "$Label", 6) == 0) - res = label->tag + 6; - else - res = label->tag; - } - - g_static_rec_mutex_unlock (&cache_lock); - - return res; -} - -int -filter_label_index (const char *label) -{ - int i; - GSList *l; - - g_static_rec_mutex_lock (&cache_lock); - - for (i = 0, l = labels_cache; l; i++, l = l->next) { - EUtilLabel *lbl = l->data; - const char *tag = lbl->tag; - - if (tag && strncmp (tag, "$Label", 6) == 0) - tag += 6; - - if (tag && strcmp (tag, label) == 0) - break; - } - - g_static_rec_mutex_unlock (&cache_lock); - - if (l) - return i; - - return -1; -} - -static void -xml_create (FilterElement *fe, xmlNodePtr node) -{ - FILTER_ELEMENT_CLASS (parent_class)->xml_create (fe, node); - - fill_options ((FilterOption *) fe); -} diff --git a/filter/filter-label.h b/filter/filter-label.h deleted file mode 100644 index 5df24b8b0d..0000000000 --- a/filter/filter-label.h +++ /dev/null @@ -1,70 +0,0 @@ -/* - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) version 3. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with the program; if not, see - * - * - * Authors: - * Jeffrey Stedfast - * - * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com) - * - */ - -#ifndef __FILTER_LABEL__ -#define __FILTER_LABEL__ - -#ifdef __cplusplus -extern "C" { -#pragma } -#endif /* __cplusplus */ - -#include "filter-option.h" - -#define FILTER_TYPE_LABEL (filter_label_get_type ()) -#define FILTER_LABEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FILTER_TYPE_LABEL, FilterLabel)) -#define FILTER_LABEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FILTER_TYPE_LABEL, FilterLabelClass)) -#define IS_FILTER_LABEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FILTER_TYPE_LABEL)) -#define IS_FILTER_LABEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FILTER_TYPE_LABEL)) -#define FILTER_LABEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FILTER_TYPE_LABEL, FilterLabelClass)) - -typedef struct _FilterLabel FilterLabel; -typedef struct _FilterLabelClass FilterLabelClass; - -struct _FilterLabel { - FilterOption parent_object; - -}; - -struct _FilterLabelClass { - FilterOptionClass parent_class; - - /* virtual methods */ - - /* signals */ -}; - -GType filter_label_get_type (void); - -FilterLabel *filter_label_new (void); - -/* Sigh, this is a mess, but its cleaner than the original mess */ -int filter_label_count(void); -const char *filter_label_label(int i); -int filter_label_index(const char *label); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif /* __FILTER_LABEL__ */ diff --git a/filter/filter-option.c b/filter/filter-option.c index e0827d4475..2d79b609c9 100644 --- a/filter/filter-option.c +++ b/filter/filter-option.c @@ -45,6 +45,7 @@ static FilterElement *clone (FilterElement *fe); static GtkWidget *get_widget (FilterElement *fe); static void build_code (FilterElement *fe, GString *out, struct _FilterPart *ff); static void format_sexp (FilterElement *, GString *); +static GSList *get_dynamic_options (FilterOption *fo); static void filter_option_class_init (FilterOptionClass *klass); static void filter_option_init (FilterOption *fo); @@ -275,10 +276,23 @@ xml_create (FilterElement *fe, xmlNodePtr node) fn = xmlGetProp (n, (const unsigned char *)"func"); if (fn && *fn) { + GSList *items, *i; + struct _filter_option *op; + fo->dynamic_func = g_strdup ((const char *)fn); - /* to remember where to place them */ - filter_option_add (fo, "fake_dynamic", "fake_dynamic", NULL, TRUE); + /* get options now, to have them available when reading saved rules */ + items = get_dynamic_options (fo); + for (i = items; i; i = i->next) { + op = i->data; + + if (op) { + filter_option_add (fo, op->value, op->title, op->code, TRUE); + free_option (op, NULL); + } + } + + g_slist_free (items); } else { g_warning ("Missing 'func' attribute within '%s' node in optionlist '%s'", n->name, fe->name); } @@ -335,6 +349,30 @@ option_changed (GtkWidget *widget, FilterElement *fe) fo->current = g_object_get_data ((GObject *) widget, "option"); } +static GSList * +get_dynamic_options (FilterOption *fo) +{ + void *module; + GSList *(*get_func)(void); + GSList *res = NULL; + + if (!fo || !fo->dynamic_func) + return res; + + module = dlopen (NULL, RTLD_LAZY); + + get_func = dlsym (module, fo->dynamic_func); + if (get_func) { + res = get_func (); + } else { + g_warning ("optionlist dynamic fill function '%s' not found", fo->dynamic_func); + } + + dlclose (module); + + return res; +} + static GtkWidget * get_widget (FilterElement *fe) { @@ -349,10 +387,9 @@ get_widget (FilterElement *fe) if (fo->dynamic_func) { /* it is dynamically filled, thus remove all dynamics and put there the fresh ones */ + GSList *items, *i; GList *old_ops; struct _filter_option *old_cur; - void *module; - GSList *(*get_func)(void); old_ops = fo->options; old_cur = fo->current; @@ -372,27 +409,17 @@ get_widget (FilterElement *fe) } } - module = dlopen (NULL, RTLD_LAZY); - - get_func = dlsym (module, fo->dynamic_func); - if (get_func) { - GSList *items, *i; + items = get_dynamic_options (fo); + for (i = items; i; i = i->next) { + op = i->data; - items = get_func (); - for (i = items; i; i = i->next) { - op = i->data; - - if (op) { - filter_option_add (fo, op->value, op->title, op->code, TRUE); - free_option (op, NULL); - } + if (op) { + filter_option_add (fo, op->value, op->title, op->code, TRUE); + free_option (op, NULL); } + } - g_slist_free (items); - } else - g_warning ("optionlist dynamic fill function '%s' not found", fo->dynamic_func); - - dlclose (module); + g_slist_free (items); /* maybe some static left after those dynamic, add them too */ for (; l; l = l->next) { diff --git a/filter/rule-context.c b/filter/rule-context.c index 2a370fd2af..304d230568 100644 --- a/filter/rule-context.c +++ b/filter/rule-context.c @@ -48,7 +48,6 @@ #include "filter-file.h" #include "filter-input.h" #include "filter-int.h" -#include "filter-label.h" #include "filter-marshal.h" #include "filter-option.h" #include "filter-rule.h" @@ -922,8 +921,6 @@ new_element(RuleContext *rc, const char *type) return (FilterElement *) filter_int_new (); } else if (!strcmp (type, "regex")) { return (FilterElement *) filter_input_new_type_name (type); - } else if (!strcmp (type, "label")) { - return (FilterElement *) filter_label_new (); }else if (!strcmp(type, "completedpercent")) { return (FilterElement *) filter_int_new_type("completedpercent", 0,100); -- cgit From 7365be40fe5adb231140711487e798438ff8777a Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Mon, 15 Dec 2008 11:46:53 +0000 Subject: ** Part of fix for bug #563669 2008-12-15 Milan Crha ** Part of fix for bug #563669 * mail/em-account-editor.c: (emae_option_checkspin): * filter/filter-int.c: (get_widget): * calendar/gui/dialogs/recurrence-page.c: (make_ending_count_special): * calendar/conduits/todo/todo-conduit.c: (e_todo_gui_new): Use zero GtkSpinButton's PageSize, as Gtk+ requires. svn path=/trunk/; revision=36892 --- filter/ChangeLog | 7 +++++++ filter/filter-int.c | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) (limited to 'filter') diff --git a/filter/ChangeLog b/filter/ChangeLog index 367645ea18..2bfb8a6aa1 100644 --- a/filter/ChangeLog +++ b/filter/ChangeLog @@ -1,3 +1,10 @@ +2008-12-15 Milan Crha + + ** Part of fix for bug #563669 + + * filter-int.c: (get_widget): + Use zero GtkSpinButton's PageSize, as Gtk+ requires. + 2008-12-10 Milan Crha ** Part of fix for bug #563870 diff --git a/filter/filter-int.c b/filter/filter-int.c index 5336884eae..969a477331 100644 --- a/filter/filter-int.c +++ b/filter/filter-int.c @@ -241,7 +241,7 @@ get_widget (FilterElement *fe) GtkObject *adjustment; FilterInt *fs = (FilterInt *)fe; - adjustment = gtk_adjustment_new (0.0, (gfloat)fs->min, (gfloat)fs->max, 1.0, 1.0, 1.0); + adjustment = gtk_adjustment_new (0.0, (gfloat)fs->min, (gfloat)fs->max, 1.0, 1.0, 0); spin = gtk_spin_button_new (GTK_ADJUSTMENT (adjustment), fs->max>fs->min+1000?5.0:1.0, 0); gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (spin), TRUE); -- cgit From 37362c7b255ab1b932db1c9e41da146dd43abfa7 Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Thu, 8 Jan 2009 11:09:02 +0000 Subject: ** Fix for bug #339879 2009-01-08 Milan Crha ** Fix for bug #339879 * filter/filter-code.h: (filter_code_new): * filter/filter-code.c: (filter_code_new), (build_code): * filter/rule-context.c: (new_element): Have two types of code expression, one "code", which adds also a "match-all" into the expression, and a "rawcode" without it. * addressbook/gui/widgets/addresstypes.xml: Use "rawcode" instead of "code" to have not added a "match-all" into the expression. svn path=/trunk/; revision=37014 --- filter/ChangeLog | 10 ++++++++++ filter/filter-code.c | 20 ++++++++++++++++---- filter/filter-code.h | 2 +- filter/rule-context.c | 4 +++- 4 files changed, 30 insertions(+), 6 deletions(-) (limited to 'filter') diff --git a/filter/ChangeLog b/filter/ChangeLog index 2bfb8a6aa1..d6093ddfb1 100644 --- a/filter/ChangeLog +++ b/filter/ChangeLog @@ -1,3 +1,13 @@ +2009-01-08 Milan Crha + + ** Fix for bug #339879 + + * filter-code.h: (filter_code_new): + * filter-code.c: (filter_code_new), (build_code): + * rule-context.c: (new_element): + Have two types of code expression, one "code", which adds also + a "match-all" into the expression, and a "rawcode" without it. + 2008-12-15 Milan Crha ** Part of fix for bug #563669 diff --git a/filter/filter-code.c b/filter/filter-code.c index 2ca98313b6..1de9c3aba6 100644 --- a/filter/filter-code.c +++ b/filter/filter-code.c @@ -98,9 +98,16 @@ filter_code_finalise (GObject *obj) * Return value: A new #FilterCode object. **/ FilterCode * -filter_code_new (void) +filter_code_new (gboolean raw_code) { - return (FilterCode *) g_object_new (FILTER_TYPE_CODE, NULL, NULL); + FilterCode *fc = (FilterCode *) g_object_new (FILTER_TYPE_CODE, NULL, NULL); + + if (fc && raw_code) { + xmlFree (((FilterInput *) fc)->type); + ((FilterInput *) fc)->type = (char *)xmlStrdup ((const unsigned char *)"rawcode"); + } + + return fc; } /* here, the string IS the code */ @@ -109,14 +116,19 @@ build_code (FilterElement *fe, GString *out, struct _FilterPart *ff) { GList *l; FilterInput *fi = (FilterInput *)fe; + gboolean is_rawcode = fi && fi->type && g_str_equal (fi->type, "rawcode"); + + if (!is_rawcode) + g_string_append(out, "(match-all "); - g_string_append(out, "(match-all "); l = fi->values; while (l) { g_string_append(out, (char *)l->data); l = g_list_next(l); } - g_string_append(out, ")"); + + if (!is_rawcode) + g_string_append (out, ")"); } /* and we have no value */ diff --git a/filter/filter-code.h b/filter/filter-code.h index 3ea5559a2c..7199bcef68 100644 --- a/filter/filter-code.h +++ b/filter/filter-code.h @@ -49,7 +49,7 @@ struct _FilterCodeClass { }; GType filter_code_get_type (void); -FilterCode *filter_code_new (void); +FilterCode *filter_code_new (gboolean raw_code); /* methods */ diff --git a/filter/rule-context.c b/filter/rule-context.c index 304d230568..cc81513784 100644 --- a/filter/rule-context.c +++ b/filter/rule-context.c @@ -906,7 +906,9 @@ new_element(RuleContext *rc, const char *type) /* FIXME: temporary ... need real address type */ return (FilterElement *) filter_input_new_type_name (type); } else if (!strcmp (type, "code")) { - return (FilterElement *) filter_code_new (); + return (FilterElement *) filter_code_new (FALSE); + } else if (!strcmp (type, "rawcode")) { + return (FilterElement *) filter_code_new (TRUE); } else if (!strcmp (type, "colour")) { return (FilterElement *) filter_colour_new (); } else if (!strcmp (type, "optionlist")) { -- cgit From 65e57aa9bde8f1e62eb39da1a85a02e68ef8bcbc Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Thu, 8 Jan 2009 15:55:09 +0000 Subject: ** Fix for bug #567031 2009-01-08 Milan Crha ** Fix for bug #567031 * rule-editor.c: (rule_editor_new): Hide also label of the combo. svn path=/trunk/; revision=37017 --- filter/ChangeLog | 6 ++++++ filter/rule-editor.c | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) (limited to 'filter') diff --git a/filter/ChangeLog b/filter/ChangeLog index d6093ddfb1..119cae2592 100644 --- a/filter/ChangeLog +++ b/filter/ChangeLog @@ -1,3 +1,9 @@ +2009-01-08 Milan Crha + + ** Fix for bug #567031 + + * rule-editor.c: (rule_editor_new): Hide also label of the combo. + 2009-01-08 Milan Crha ** Fix for bug #339879 diff --git a/filter/rule-editor.c b/filter/rule-editor.c index 16e79f0ee3..dc4c65a24c 100644 --- a/filter/rule-editor.c +++ b/filter/rule-editor.c @@ -175,7 +175,8 @@ rule_editor_new (RuleContext *rc, const char *source, const char *label) gui = glade_xml_new (filter_glade, "rule_editor", NULL); g_free (filter_glade); rule_editor_construct (re, rc, gui, source, label); - gtk_widget_hide(glade_xml_get_widget (gui, "filter_source")); + gtk_widget_hide(glade_xml_get_widget (gui, "label17")); + gtk_widget_hide(glade_xml_get_widget (gui, "filter_source")); g_object_unref (gui); return re; -- cgit From dab08c513e7bf5f7c0f52c42ff245f940601b866 Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Sat, 10 Jan 2009 22:21:47 +0000 Subject: ** Bug #567244 2009-01-11 Tor Lillqvist ** Bug #567244 * filter-option.c (get_dynamic_options): For portability, use API instead of API. svn path=/trunk/; revision=37029 --- filter/ChangeLog | 7 +++++++ filter/filter-option.c | 11 +++++------ 2 files changed, 12 insertions(+), 6 deletions(-) (limited to 'filter') diff --git a/filter/ChangeLog b/filter/ChangeLog index 119cae2592..9402e27b98 100644 --- a/filter/ChangeLog +++ b/filter/ChangeLog @@ -1,3 +1,10 @@ +2009-01-11 Tor Lillqvist + + ** Bug #567244 + + * filter-option.c (get_dynamic_options): For portability, use + API instead of API. + 2009-01-08 Milan Crha ** Fix for bug #567031 diff --git a/filter/filter-option.c b/filter/filter-option.c index 2d79b609c9..0ec6dfeffb 100644 --- a/filter/filter-option.c +++ b/filter/filter-option.c @@ -29,7 +29,7 @@ #include #include -#include +#include #include "filter-option.h" #include "filter-part.h" @@ -352,23 +352,22 @@ option_changed (GtkWidget *widget, FilterElement *fe) static GSList * get_dynamic_options (FilterOption *fo) { - void *module; + GModule *module; GSList *(*get_func)(void); GSList *res = NULL; if (!fo || !fo->dynamic_func) return res; - module = dlopen (NULL, RTLD_LAZY); + module = g_module_open (NULL, G_MODULE_BIND_LAZY); - get_func = dlsym (module, fo->dynamic_func); - if (get_func) { + if (g_module_symbol (module, fo->dynamic_func, &get_func)) { res = get_func (); } else { g_warning ("optionlist dynamic fill function '%s' not found", fo->dynamic_func); } - dlclose (module); + g_module_close (module); return res; } -- cgit From e29a17618e113bc681ad122302c646fb9fd6dec8 Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Sun, 11 Jan 2009 20:09:36 +0000 Subject: Add cast to avoid warning. 2009-01-11 Tor Lillqvist * filter-option.c (get_dynamic_options): Add cast to avoid warning. svn path=/trunk/; revision=37040 --- filter/ChangeLog | 5 +++++ filter/filter-option.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'filter') diff --git a/filter/ChangeLog b/filter/ChangeLog index 9402e27b98..a30463deb5 100644 --- a/filter/ChangeLog +++ b/filter/ChangeLog @@ -1,3 +1,8 @@ +2009-01-11 Tor Lillqvist + + * filter-option.c (get_dynamic_options): Add cast to avoid + warning. + 2009-01-11 Tor Lillqvist ** Bug #567244 diff --git a/filter/filter-option.c b/filter/filter-option.c index 0ec6dfeffb..7af511b543 100644 --- a/filter/filter-option.c +++ b/filter/filter-option.c @@ -361,7 +361,7 @@ get_dynamic_options (FilterOption *fo) module = g_module_open (NULL, G_MODULE_BIND_LAZY); - if (g_module_symbol (module, fo->dynamic_func, &get_func)) { + if (g_module_symbol (module, fo->dynamic_func, (gpointer) &get_func)) { res = get_func (); } else { g_warning ("optionlist dynamic fill function '%s' not found", fo->dynamic_func); -- cgit From e42f27652709397453431b75c32601a4f4effd48 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Thu, 23 Apr 2009 10:02:07 -0400 Subject: Bug 577929 – Consolidate marshallers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Consolidate all marshalling specifications to e-util/e-marshal.list. This reduces code duplication and makes it slightly easier to locate unused marshallers. --- filter/Makefile.am | 10 ++-------- filter/filter-marshal.list | 0 filter/filter-rule.c | 1 - filter/rule-context.c | 1 - 4 files changed, 2 insertions(+), 10 deletions(-) delete mode 100644 filter/filter-marshal.list (limited to 'filter') diff --git a/filter/Makefile.am b/filter/Makefile.am index 7d4e72daeb..7dc0353ded 100644 --- a/filter/Makefile.am +++ b/filter/Makefile.am @@ -27,8 +27,6 @@ libfilter_la_SOURCES = \ filter-input.h \ filter-int.c \ filter-int.h \ - filter-marshal.c \ - filter-marshal.h \ filter-option.c \ filter-option.h \ filter-part.c \ @@ -50,16 +48,12 @@ libfilter_la_LIBADD = \ EXTRA_DIST = \ $(glade_DATA) \ filter.error.xml \ - ChangeLog.pre-1-4 \ - filter-marshal.list + ChangeLog.pre-1-4 # basic rules. error_DATA = filter.error errordir = $(privdatadir)/errors @EVO_PLUGIN_RULE@ -MARSHAL_GENERATED = filter-marshal.c filter-marshal.h -@EVO_MARSHAL_RULE@ - -BUILT_SOURCES = $(MARSHAL_GENERATED) $(error_DATA) +BUILT_SOURCES = $(error_DATA) CLEANFILES = $(BUILT_SOURCES) diff --git a/filter/filter-marshal.list b/filter/filter-marshal.list deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/filter/filter-rule.c b/filter/filter-rule.c index 794c94498d..9febe8d0ee 100644 --- a/filter/filter-rule.c +++ b/filter/filter-rule.c @@ -33,7 +33,6 @@ #include "e-util/e-error.h" #include "filter-rule.h" #include "rule-context.h" -#include "filter-marshal.h" #define d(x) diff --git a/filter/rule-context.c b/filter/rule-context.c index cc81513784..0a7438b12c 100644 --- a/filter/rule-context.c +++ b/filter/rule-context.c @@ -48,7 +48,6 @@ #include "filter-file.h" #include "filter-input.h" #include "filter-int.h" -#include "filter-marshal.h" #include "filter-option.h" #include "filter-rule.h" #include "rule-context.h" -- cgit From 8a072ffc7c0ddcde472877a51ace0bb14f86fb0a Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Fri, 24 Apr 2009 11:45:21 +0200 Subject: GN-bug #572348 - Removed deprecated Gtk+ symbols Some still left, because those gone in kill-bonobo branch. --- filter/ChangeLog | 10 +++ filter/filter-datespec.c | 49 +++++--------- filter/filter-option.c | 34 +++------- filter/filter-rule.c | 80 ++++++++++------------ filter/filter.glade | 171 ++++++++--------------------------------------- 5 files changed, 101 insertions(+), 243 deletions(-) (limited to 'filter') diff --git a/filter/ChangeLog b/filter/ChangeLog index a30463deb5..656210ddce 100644 --- a/filter/ChangeLog +++ b/filter/ChangeLog @@ -1,3 +1,13 @@ +2009-04-24 Milan Crha + + ** Fix for bug #572348 + + * filter.glade: + * filter-datespec.c: + * filter-rule.c: + * filter-option.c: + Remove deprecated Gtk+ symbols. + 2009-01-11 Tor Lillqvist * filter-option.c (get_dynamic_options): Add cast to avoid diff --git a/filter/filter-datespec.c b/filter/filter-datespec.c index 82b0e08197..599681c4d4 100644 --- a/filter/filter-datespec.c +++ b/filter/filter-datespec.c @@ -95,7 +95,7 @@ static const timespan timespans[] = { struct _FilterDatespecPrivate { GtkWidget *label_button; - GtkWidget *notebook_type, *option_type, *calendar_specify, *spin_relative, *option_relative, *option_past_future; + GtkWidget *notebook_type, *combobox_type, *calendar_specify, *spin_relative, *combobox_relative, *combobox_past_future; FilterDatespec_type type; int span; }; @@ -385,49 +385,39 @@ set_values (FilterDatespec *fds) case FDST_X_AGO: p->span = get_best_span(fds->value); gtk_spin_button_set_value((GtkSpinButton*)p->spin_relative, fds->value/timespans[p->span].seconds); - gtk_option_menu_set_history((GtkOptionMenu*)p->option_relative, p->span); - gtk_option_menu_set_history((GtkOptionMenu*)p->option_past_future, 0); + gtk_combo_box_set_active (GTK_COMBO_BOX (p->combobox_relative), p->span); + gtk_combo_box_set_active (GTK_COMBO_BOX (p->combobox_past_future), 0); break; case FDST_X_FUTURE: p->span = get_best_span(fds->value); gtk_spin_button_set_value((GtkSpinButton*)p->spin_relative, fds->value/timespans[p->span].seconds); - gtk_option_menu_set_history((GtkOptionMenu*)p->option_relative, p->span); - gtk_option_menu_set_history((GtkOptionMenu*)p->option_past_future, 1); + gtk_combo_box_set_active (GTK_COMBO_BOX (p->combobox_relative), p->span); + gtk_combo_box_set_active (GTK_COMBO_BOX (p->combobox_past_future), 1); break; } gtk_notebook_set_current_page ((GtkNotebook*) p->notebook_type, note_type); - gtk_option_menu_set_history ((GtkOptionMenu*) p->option_type, note_type); + gtk_combo_box_set_active (GTK_COMBO_BOX (p->combobox_type), note_type); } static void -set_option_type (GtkMenu *menu, FilterDatespec *fds) +set_combobox_type (GtkComboBox *combobox, FilterDatespec *fds) { - GtkWidget *w; - - /* ugh, no other way to 'get_history' */ - w = gtk_menu_get_active (menu); - fds->priv->type = g_list_index (GTK_MENU_SHELL (menu)->children, w); + fds->priv->type = gtk_combo_box_get_active (combobox); gtk_notebook_set_current_page ((GtkNotebook*) fds->priv->notebook_type, fds->priv->type); } static void -set_option_relative (GtkMenu *menu, FilterDatespec *fds) +set_combobox_relative (GtkComboBox *combobox, FilterDatespec *fds) { - GtkWidget *w; - - w = gtk_menu_get_active (menu); - fds->priv->span = g_list_index (GTK_MENU_SHELL (menu)->children, w); + fds->priv->span = gtk_combo_box_get_active (combobox); } static void -set_option_past_future (GtkMenu *menu, FilterDatespec *fds) +set_combobox_past_future (GtkComboBox *combobox, FilterDatespec *fds) { - GtkWidget *w; - - w = gtk_menu_get_active (menu); - if(g_list_index (GTK_MENU_SHELL (menu)->children, w) == 0) + if (gtk_combo_box_get_active (combobox) == 0) fds->type = fds->priv->type = FDST_X_AGO; else fds->type = fds->priv->type = FDST_X_FUTURE; @@ -457,20 +447,17 @@ button_clicked (GtkButton *button, FilterDatespec *fds) gtk_dialog_set_has_separator (dialog, FALSE); p->notebook_type = glade_xml_get_widget (gui, "notebook_type"); - p->option_type = glade_xml_get_widget (gui, "option_type"); + p->combobox_type = glade_xml_get_widget (gui, "combobox_type"); p->calendar_specify = glade_xml_get_widget (gui, "calendar_specify"); p->spin_relative = glade_xml_get_widget (gui, "spin_relative"); - p->option_relative = glade_xml_get_widget (gui, "option_relative"); - p->option_past_future = glade_xml_get_widget (gui, "option_past_future"); + p->combobox_relative = glade_xml_get_widget (gui, "combobox_relative"); + p->combobox_past_future = glade_xml_get_widget (gui, "combobox_past_future"); set_values (fds); - g_signal_connect (GTK_OPTION_MENU (p->option_type)->menu, "deactivate", - G_CALLBACK (set_option_type), fds); - g_signal_connect (GTK_OPTION_MENU (p->option_relative)->menu, "deactivate", - G_CALLBACK (set_option_relative), fds); - g_signal_connect (GTK_OPTION_MENU (p->option_past_future)->menu, "deactivate", - G_CALLBACK (set_option_past_future), fds); + g_signal_connect (p->combobox_type, "changed", G_CALLBACK (set_combobox_type), fds); + g_signal_connect (p->combobox_relative, "changed", G_CALLBACK (set_combobox_relative), fds); + g_signal_connect (p->combobox_past_future, "changed", G_CALLBACK (set_combobox_past_future), fds); gtk_box_pack_start ((GtkBox *) dialog->vbox, toplevel, TRUE, TRUE, 3); diff --git a/filter/filter-option.c b/filter/filter-option.c index 7af511b543..3b93084d67 100644 --- a/filter/filter-option.c +++ b/filter/filter-option.c @@ -342,11 +342,11 @@ xml_decode (FilterElement *fe, xmlNodePtr node) } static void -option_changed (GtkWidget *widget, FilterElement *fe) +combobox_changed (GtkWidget *widget, FilterElement *fe) { FilterOption *fo = (FilterOption *)fe; - fo->current = g_object_get_data ((GObject *) widget, "option"); + fo->current = (struct _filter_option *) g_list_nth (fo->options, gtk_combo_box_get_active (GTK_COMBO_BOX (widget))); } static GSList * @@ -376,10 +376,7 @@ static GtkWidget * get_widget (FilterElement *fe) { FilterOption *fo = (FilterOption *)fe; - GtkWidget *menu; - GtkWidget *omenu; - GtkWidget *item; - GtkWidget *first = NULL; + GtkWidget *combobox; GList *l; struct _filter_option *op; int index = 0, current = 0; @@ -436,35 +433,20 @@ get_widget (FilterElement *fe) g_list_free (old_ops); } - menu = gtk_menu_new (); + combobox = gtk_combo_box_new_text (); l = fo->options; while (l) { op = l->data; - item = gtk_menu_item_new_with_label (_(op->title)); - g_object_set_data ((GObject *) item, "option", op); - g_signal_connect (item, "activate", G_CALLBACK (option_changed), fe); - gtk_menu_shell_append(GTK_MENU_SHELL(menu), item); - gtk_widget_show (item); - if (op == fo->current) { - current = index; - first = item; - } else if (!first) { - first = item; - } + gtk_combo_box_append_text (GTK_COMBO_BOX (combobox), _(op->title)); l = g_list_next (l); index++; } - omenu = gtk_option_menu_new (); - gtk_option_menu_set_menu (GTK_OPTION_MENU (omenu), menu); - - if (first) - g_signal_emit_by_name (first, "activate", fe); - - gtk_option_menu_set_history (GTK_OPTION_MENU (omenu), current); + g_signal_connect (combobox, "changed", G_CALLBACK (combobox_changed), fe); + gtk_combo_box_set_active (GTK_COMBO_BOX (combobox), current); - return omenu; + return combobox; } static void diff --git a/filter/filter-rule.c b/filter/filter-rule.c index 9febe8d0ee..7972de13d0 100644 --- a/filter/filter-rule.c +++ b/filter/filter-rule.c @@ -605,13 +605,13 @@ build_code (FilterRule *fr, GString *out) static void fr_grouping_changed(GtkWidget *w, FilterRule *fr) { - fr->grouping = gtk_option_menu_get_history((GtkOptionMenu *)w); + fr->grouping = gtk_combo_box_get_active (GTK_COMBO_BOX (w)); } static void fr_threading_changed(GtkWidget *w, FilterRule *fr) { - fr->threading = gtk_option_menu_get_history((GtkOptionMenu *)w); + fr->threading = gtk_combo_box_get_active (GTK_COMBO_BOX (w)); } struct _part_data { @@ -622,11 +622,20 @@ struct _part_data { }; static void -option_activate (GtkMenuItem *item, struct _part_data *data) +part_combobox_changed (GtkComboBox *combobox, struct _part_data *data) { - FilterPart *part = g_object_get_data ((GObject *) item, "part"); + FilterPart *part = NULL; FilterPart *newpart; + int index, i; + + index = gtk_combo_box_get_active (combobox); + for (i = 0, part = rule_context_next_part (data->f, part); part && i < index; i++, part = rule_context_next_part (data->f, part)) { + /* traverse until reached index */ + } + g_return_if_fail (part != NULL); + g_return_if_fail (i == index); + /* dont update if we haven't changed */ if (!strcmp (part->title, data->part->title)) return; @@ -644,17 +653,13 @@ option_activate (GtkMenuItem *item, struct _part_data *data) data->partwidget = filter_part_get_widget (newpart); if (data->partwidget) gtk_box_pack_start (GTK_BOX (data->container), data->partwidget, TRUE, TRUE, 0); - - g_object_set_data ((GObject *) data->container, "part", newpart); } static GtkWidget * get_rule_part_widget (RuleContext *f, FilterPart *newpart, FilterRule *fr) { FilterPart *part = NULL; - GtkWidget *menu; - GtkWidget *item; - GtkWidget *omenu; + GtkWidget *combobox; GtkWidget *hbox; GtkWidget *p; int index = 0, current = 0; @@ -674,26 +679,23 @@ get_rule_part_widget (RuleContext *f, FilterPart *newpart, FilterRule *fr) data->partwidget = p; data->container = hbox; - menu = gtk_menu_new (); + combobox = gtk_combo_box_new_text (); + /* sigh, this is a little ugly */ while ((part = rule_context_next_part (f, part))) { - item = gtk_menu_item_new_with_label (_(part->title)); - g_object_set_data ((GObject *) item, "part", part); - g_signal_connect (item, "activate", G_CALLBACK (option_activate), data); - gtk_menu_shell_append(GTK_MENU_SHELL(menu), item); - gtk_widget_show (item); + gtk_combo_box_append_text (GTK_COMBO_BOX (combobox), _(part->title)); + if (!strcmp (newpart->title, part->title)) current = index; index++; } - omenu = gtk_option_menu_new (); - gtk_option_menu_set_menu (GTK_OPTION_MENU (omenu), menu); - gtk_option_menu_set_history (GTK_OPTION_MENU (omenu), current); - gtk_widget_show (omenu); + gtk_combo_box_set_active (GTK_COMBO_BOX (combobox), current); + g_signal_connect (combobox, "changed", G_CALLBACK (part_combobox_changed), data); + gtk_widget_show (combobox); - gtk_box_pack_start (GTK_BOX (hbox), omenu, FALSE, FALSE, 0); + gtk_box_pack_start (GTK_BOX (hbox), combobox, FALSE, FALSE, 0); if (p) gtk_box_pack_start (GTK_BOX (hbox), p, TRUE, TRUE, 0); @@ -836,7 +838,7 @@ get_widget (FilterRule *fr, struct _RuleContext *f) { GtkWidget *hbox, *vbox, *parts, *inframe; GtkWidget *add, *label, *name, *w; - GtkWidget *omenu, *menu, *item; + GtkWidget *combobox; GtkWidget *scrolledwindow; GtkObject *hadj, *vadj; GList *l; @@ -920,48 +922,40 @@ get_widget (FilterRule *fr, struct _RuleContext *f) const char *thread_types[] = { N_("If all conditions are met"), N_("If any conditions are met") }; label = gtk_label_new_with_mnemonic (_("_Find items:")); - menu = gtk_menu_new (); + combobox = gtk_combo_box_new_text (); for (i=0;i<2;i++) { - item = gtk_menu_item_new_with_label(_(thread_types[i])); - gtk_menu_shell_append (GTK_MENU_SHELL (menu), item); - gtk_widget_show (item); + gtk_combo_box_append_text (GTK_COMBO_BOX (combobox), _(thread_types[i])); } - omenu = gtk_option_menu_new (); - gtk_label_set_mnemonic_widget ((GtkLabel *)label, omenu); - gtk_option_menu_set_menu (GTK_OPTION_MENU (omenu), menu); - gtk_option_menu_set_history (GTK_OPTION_MENU (omenu), fr->grouping); - gtk_widget_show (omenu); + gtk_label_set_mnemonic_widget ((GtkLabel *)label, combobox); + gtk_combo_box_set_active (GTK_COMBO_BOX (combobox), fr->grouping); + gtk_widget_show (combobox); - gtk_box_pack_end (GTK_BOX (hbox), omenu, FALSE, FALSE, 0); + gtk_box_pack_end (GTK_BOX (hbox), combobox, FALSE, FALSE, 0); gtk_box_pack_end (GTK_BOX (hbox), label, FALSE, FALSE, 0); - g_signal_connect(omenu, "changed", G_CALLBACK(fr_grouping_changed), fr); + g_signal_connect (combobox, "changed", G_CALLBACK (fr_grouping_changed), fr); } if (f->flags & RULE_CONTEXT_THREADING) { const char *thread_types[] = { N_("None"), N_("All related"), N_("Replies"), N_("Replies and parents"), N_("No reply or parent") }; label = gtk_label_new_with_mnemonic (_("I_nclude threads")); - menu = gtk_menu_new (); + combobox = gtk_combo_box_new_text (); for (i=0;i<5;i++) { - item = gtk_menu_item_new_with_label(_(thread_types[i])); - gtk_menu_shell_append (GTK_MENU_SHELL (menu), item); - gtk_widget_show (item); + gtk_combo_box_append_text (GTK_COMBO_BOX (combobox), _(thread_types[i])); } - omenu = gtk_option_menu_new (); - gtk_label_set_mnemonic_widget ((GtkLabel *)label, omenu); - gtk_option_menu_set_menu (GTK_OPTION_MENU (omenu), menu); - gtk_option_menu_set_history (GTK_OPTION_MENU (omenu), fr->threading); - gtk_widget_show (omenu); + gtk_label_set_mnemonic_widget ((GtkLabel *)label, combobox); + gtk_combo_box_set_active (GTK_COMBO_BOX (combobox), fr->threading); + gtk_widget_show (combobox); - gtk_box_pack_end (GTK_BOX (hbox), omenu, FALSE, FALSE, 0); + gtk_box_pack_end (GTK_BOX (hbox), combobox, FALSE, FALSE, 0); gtk_box_pack_end (GTK_BOX (hbox), label, FALSE, FALSE, 0); - g_signal_connect(omenu, "changed", G_CALLBACK(fr_threading_changed), fr); + g_signal_connect (combobox, "changed", G_CALLBACK (fr_threading_changed), fr); } gtk_box_pack_start (GTK_BOX (inframe), hbox, FALSE, FALSE, 3); diff --git a/filter/filter.glade b/filter/filter.glade index 3b43c26249..3773a234c1 100644 --- a/filter/filter.glade +++ b/filter/filter.glade @@ -6,7 +6,7 @@ True - window1 + window1 GTK_WINDOW_TOPLEVEL GTK_WIN_POS_NONE False @@ -53,23 +53,11 @@ - - True - 0 - - - - True - - - - True - Incoming - True - - - - + + True + Incoming + False + True 0 @@ -298,7 +286,7 @@ 6 True - window1 + window1 GTK_WINDOW_TOPLEVEL GTK_WIN_POS_NONE False @@ -351,40 +339,13 @@ - + True - True - 0 - - - - True - - - - True - the current time - True - - - - - - True - the time you specify - True - - - - - - True - a time relative to the current time - True - - - - + the current time +the time you specify +a time relative to the current time + False + True 0 @@ -625,72 +586,17 @@ a time relative to when filtering occurs. - + True - True - 0 - - - - True - - - - True - seconds - True - - - - - - True - minutes - True - - - - - - True - hours - True - - - - - - True - days - True - - - - - - True - weeks - True - - - - - - True - months - True - - - - - - True - years - True - - - - + seconds +minutes +hours +days +weeks +months +years + False + True 0 @@ -700,33 +606,12 @@ a time relative to when filtering occurs. - + True - True - 0 - - - - True - - - - True - ago - True - - - - - - True - in the future - True - - - - - + ago +in the future + False + True 0 -- cgit