return FALSE;
}
+gboolean found_in_addressbook(const gchar *address)
+{
+ gchar *addr = NULL;
+ gboolean found = FALSE;
+ gint num_addr = 0;
+
+ if (!address)
+ return FALSE;
+
+ addr = g_strdup(address);
+ extract_address(addr);
+ num_addr = complete_address(addr);
+ if (num_addr > 1) {
+ /* skip first item (this is the search string itself) */
+ int i = 1;
+ for (; i < num_addr && !found; i++) {
+ gchar *caddr = get_complete_address(i);
+ extract_address(caddr);
+ if (strcasecmp(caddr, addr) == 0)
+ found = TRUE;
+ g_free(caddr);
+ }
+ }
+ g_free(addr);
+ return found;
+}
/*
* End of Source.
*/
-
gchar *get_complete_address (gint index);
gint invalidate_address_completion (void);
gint end_address_completion (void);
+gboolean found_in_addressbook(const gchar *address);
/* ui functions */
void address_completion_start (GtkWidget *mainwindow);
static pthread_cond_t wait_cond = PTHREAD_COND_INITIALIZER;
#endif
-static gboolean found_in_addressbook(const gchar *address)
-{
- gchar *addr = NULL;
- gboolean found = FALSE;
- gint num_addr = 0;
-
- if (!address)
- return FALSE;
-
- addr = g_strdup(address);
- extract_address(addr);
- num_addr = complete_address(addr);
- if (num_addr > 1) {
- /* skip first item (this is the search string itself) */
- int i = 1;
- for (; i < num_addr && !found; i++) {
- gchar *caddr = get_complete_address(i);
- extract_address(caddr);
- if (strcasecmp(caddr, addr) == 0)
- found = TRUE;
- g_free(caddr);
- }
- }
- g_free(addr);
- return found;
-}
-
static void bogofilter_do_filter(BogoFilterData *data)
{
GPid bogo_pid;
static pthread_cond_t wait_cond = PTHREAD_COND_INITIALIZER;
#endif
-static gboolean found_in_addressbook(const gchar *address)
-{
- gchar *addr = NULL;
- gboolean found = FALSE;
- gint num_addr = 0;
-
- if (!address)
- return FALSE;
-
- addr = g_strdup(address);
- extract_address(addr);
- num_addr = complete_address(addr);
- if (num_addr > 1) {
- /* skip first item (this is the search string itself) */
- int i = 1;
- for (; i < num_addr && !found; i++) {
- gchar *caddr = get_complete_address(i);
- extract_address(caddr);
- if (strcasecmp(caddr, addr) == 0)
- found = TRUE;
- g_free(caddr);
- }
- }
- g_free(addr);
- return found;
-}
-
static void bsfilter_do_filter(BsFilterData *data)
{
int status = 0;
addressbook_folder_selection
alertpanel_error
combobox_text_new
-complete_address
end_address_completion
execute_command_line
-extract_address
folder_find_item_from_identifier
folder_get_default_trash
folder_item_get_identifier
folder_item_get_path
folder_item_remove_msg
foldersel_folder_sel
-get_complete_address
+found_in_addressbook
gtkut_get_browse_directory_btn
log_error
prefs_button_toggled
return FALSE;
}
-static gboolean found_in_addressbook(const gchar *address)
-{
- gchar *addr = NULL;
- gboolean found = FALSE;
- gint num_addr = 0;
-
- if (!address)
- return FALSE;
-
- addr = g_strdup(address);
- extract_address(addr);
- num_addr = complete_address(addr);
- if (num_addr > 1) {
- /* skip first item (this is the search string itself) */
- int i = 1;
- for (; i < num_addr && !found; i++) {
- gchar *caddr = get_complete_address(i);
- extract_address(caddr);
- if (strcasecmp(caddr, addr) == 0)
- found = TRUE;
- g_free(caddr);
- }
- }
- g_free(addr);
- return found;
-}
-
static gboolean load_images(DilloViewer *viewer)
{
MessageView *messageview = ((MimeViewer *)viewer)->mimeview
return is_spam ? MSG_IS_SPAM:MSG_IS_HAM;
}
-static gboolean sa_found_in_addressbook(const gchar *address)
-{
- gchar *addr = NULL;
- gboolean found = FALSE;
- gint num_addr = 0;
-
- if (!address)
- return FALSE;
-
- addr = g_strdup(address);
- extract_address(addr);
- num_addr = complete_address(addr);
- if (num_addr > 1) {
- /* skip first item (this is the search string itself) */
- int i = 1;
- for (; i < num_addr && !found; i++) {
- gchar *caddr = get_complete_address(i);
- extract_address(caddr);
- if (strcasecmp(caddr, addr) == 0)
- found = TRUE;
- g_free(caddr);
- }
- }
- g_free(addr);
- return found;
-}
-
static gboolean mail_filtering_hook(gpointer source, gpointer data)
{
MailFilteringData *mail_filtering_data = (MailFilteringData *) source;
start_address_completion(ab_folderpath);
if (msginfo->from &&
- sa_found_in_addressbook(msginfo->from))
+ found_in_addressbook(msginfo->from))
whitelisted = TRUE;
end_address_completion();