From c0a255eb90769638d57ae4122932f75c46e4e531 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Thu, 11 Sep 2008 15:34:29 +0000 Subject: Merge revisions 36016:36303 from trunk. svn path=/branches/kill-bonobo/; revision=36307 --- plugins/mark-all-read/ChangeLog | 13 ++++++++++++ plugins/mark-all-read/mark-all-read.c | 40 ++++++++++++++++++----------------- 2 files changed, 34 insertions(+), 19 deletions(-) (limited to 'plugins/mark-all-read') diff --git a/plugins/mark-all-read/ChangeLog b/plugins/mark-all-read/ChangeLog index caf1e71e70..c3d927f105 100644 --- a/plugins/mark-all-read/ChangeLog +++ b/plugins/mark-all-read/ChangeLog @@ -1,3 +1,16 @@ +2008-09-02 Paul Bolle + + ** Fixes bug #550415 + + * mark-all-read.c (mar_got_folder): Do not leak an CamelFolderInfo. + Slightly change handling of CamelException. + +2008-08-27 Sankar P + +License Changes + + * mark-all-read.c: + 2008-08-07 Matthew Barnes ** Fixes bug #530402 diff --git a/plugins/mark-all-read/mark-all-read.c b/plugins/mark-all-read/mark-all-read.c index af6c482288..c9ea67ca61 100644 --- a/plugins/mark-all-read/mark-all-read.c +++ b/plugins/mark-all-read/mark-all-read.c @@ -1,21 +1,23 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- +/* * - * Authors: Chenthill Palanisamy (pchenthill@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. * - * 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 version 2 of the GNU General Public - * License as published by the Free Software Foundation. + * 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: + * Chenthill Palanisamy + * + * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com) * */ @@ -221,19 +223,17 @@ mar_got_folder (char *uri, CamelFolder *folder, void *data) gint response; guint32 flags = CAMEL_STORE_FOLDER_INFO_RECURSIVE | CAMEL_STORE_FOLDER_INFO_FAST; - camel_exception_init (&ex); - /* FIXME we have to disable the menu item */ if (!folder) return; + camel_exception_init (&ex); + store = folder->parent_store; info = camel_store_get_folder_info (store, folder->full_name, flags, &ex); - if (camel_exception_is_set (&ex)) { - camel_exception_clear (&ex); - return; - } + if (camel_exception_is_set (&ex)) + goto out; if (info && (info->child || info->next)) response = prompt_user (); @@ -244,6 +244,8 @@ mar_got_folder (char *uri, CamelFolder *folder, void *data) mark_all_as_read (folder); else if (response == GTK_RESPONSE_YES) mar_all_sub_folders (store, info, &ex); +out: + camel_store_free_folder_info(store, info); } static void -- cgit v1.2.3