X-Git-Url: http://git.claws-mail.org/?p=claws.git;a=blobdiff_plain;f=src%2Fplugins%2Faddress_keeper%2Faddress_keeper.c;h=a5aab85a4f1e0dfdaf7ace6313155df7ec54e123;hp=c742f94959d66da6a86676702ee6f40b038d666c;hb=HEAD;hpb=3459aff5b7bbabc9fcc84f1446dab8415716e566 diff --git a/src/plugins/address_keeper/address_keeper.c b/src/plugins/address_keeper/address_keeper.c index c742f9495..38dc6d2ae 100644 --- a/src/plugins/address_keeper/address_keeper.c +++ b/src/plugins/address_keeper/address_keeper.c @@ -1,7 +1,6 @@ /* - * Claws Mail -- a GTK+ based, lightweight, and fast e-mail client - * Copyright (C) 1999-2009 Hiroyuki Yamamoto and the Claws Mail Team - * Copyright (C) 2009-2010 Ricardo Mones + * Claws Mail -- a GTK based, lightweight, and fast e-mail client + * Copyright (C) 2009-2015 Ricardo Mones and the Claws Mail Team * * 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 @@ -14,8 +13,7 @@ * 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. + * along with this program. If not, see . */ #ifdef HAVE_CONFIG_H @@ -35,7 +33,7 @@ #include "prefs_common.h" /** Identifier for the hook. */ -static guint hook_id; +static gulong hook_id = HOOK_NONE; /** * Extracts name from an address. @@ -95,7 +93,7 @@ gchar *get_comment_from_addr(const gchar *addr) * * @return TRUE if given address matches any of the patterns, FALSE otherwise. */ -gboolean matches_blocked_address(const gchar *addr, MatcherList *blocked) +gboolean matches_blocked_address(gchar *addr, MatcherList *blocked) { if (blocked != NULL) { MsgInfo info; @@ -135,7 +133,7 @@ void keep_if_unknown(AddressBookFile * abf, ItemFolder * folder, gchar *addr, Ma a_name = get_name_from_addr(addr); a_comment = get_comment_from_addr(addr); if (!addrbook_add_contact(abf, folder, a_name, clean_addr, a_comment)) { - g_warning("contact could not be added\n"); + g_warning("contact could not be added"); } else { addressbook_refresh(); } @@ -182,11 +180,11 @@ static gboolean addrk_before_send_hook(gpointer source, gpointer data) } if (!addressbook_peek_folder_exists(keepto, &book, &folder)) { - g_warning("addressbook folder not found '%s'\n", keepto); + g_warning("addressbook folder not found '%s'", keepto); return FALSE; } if (!book) { - g_warning("addressbook_peek_folder_exists: NULL book\n"); + g_warning("addressbook_peek_folder_exists: NULL book"); return FALSE; } abf = book->rawDataSource; @@ -250,7 +248,7 @@ gint plugin_init(gchar **error) hook_id = hooks_register_hook(COMPOSE_CHECK_BEFORE_SEND_HOOKLIST, addrk_before_send_hook, NULL); - if (hook_id == -1) { + if (hook_id == HOOK_NONE) { *error = g_strdup(_("Failed to register check before send hook")); return -1; } @@ -297,11 +295,11 @@ const gchar *plugin_desc(void) /** * Get the kind of plugin. * - * @return The "GTK2" constant. + * @return The "GTK3" constant. */ const gchar *plugin_type(void) { - return "GTK2"; + return "GTK3"; } /**