diff --git a/src/engine/Account.c b/src/engine/Account.c index 92e6ccd0dfb..5598f6e2879 100644 --- a/src/engine/Account.c +++ b/src/engine/Account.c @@ -5639,7 +5639,7 @@ gnc_account_imap_get_info_bayes (Account *acc) { GList *list = NULL; - struct imap_info imapInfo; + GncImapInfo imapInfo; imapInfo.source_account = acc; imapInfo.list = list; @@ -5658,7 +5658,7 @@ gnc_account_imap_get_info (Account *acc, const char *category) GList *list = NULL; gchar *category_head = NULL; - struct imap_info imapInfo; + GncImapInfo imapInfo; imapInfo.source_account = acc; imapInfo.list = list; @@ -5770,14 +5770,12 @@ look_for_old_separator_descendants (Account *root, gchar *full_name, const gchar } static void -change_imap_entry (Account *root, gpointer user_data) +change_imap_entry (Account *root, GncImapInfo *imapInfo) { Account *map_account = NULL; const gchar *sep = gnc_get_account_separator_string (); gchar *full_name; - struct imap_info *imapInfo = (struct imap_info*)user_data; - PINFO("Category Head is '%s', Full Category is '%s'", imapInfo->category_head, imapInfo->full_category); // do we have a map_account all ready, implying a guid string @@ -5870,7 +5868,7 @@ get_account_imap_info (Account *root, Account *acc) for (node = imap_list; node; node = g_list_next (node)) { - struct imap_info *imapInfo = node->data; + GncImapInfo *imapInfo = node->data; // Lets start doing stuff change_imap_entry (root, imapInfo); diff --git a/src/engine/Account.h b/src/engine/Account.h index 4c9a2e367bc..259b50488e2 100644 --- a/src/engine/Account.h +++ b/src/engine/Account.h @@ -1406,7 +1406,7 @@ Account* gnc_account_imap_find_account_bayes (GncImportMatchMap *imap, GList* to void gnc_account_imap_add_account_bayes (GncImportMatchMap *imap, GList* tokens, Account *acc); -struct imap_info +typedef struct imap_info { Account *source_account; Account *map_account; @@ -1415,7 +1415,7 @@ struct imap_info char *full_category; char *match_string; char *count; -}; +}GncImapInfo; /** Returns a GList of structure imap_info of all Bayesian mappings for * required Account diff --git a/src/gnome/dialog-imap-editor.c b/src/gnome/dialog-imap-editor.c index 962788f9d06..80136b91369 100644 --- a/src/gnome/dialog-imap-editor.c +++ b/src/gnome/dialog-imap-editor.c @@ -400,13 +400,11 @@ show_count_column (ImapDialog *imap_dialog, gboolean show) } static void -add_to_store (GtkTreeModel *model, GtkTreeIter *iter, const gchar *text, gpointer user_data) +add_to_store (GtkTreeModel *model, GtkTreeIter *iter, const gchar *text, GncImapInfo *imapInfo) { gchar *fullname = NULL; gchar *map_fullname = NULL; - struct imap_info *imapInfo = (struct imap_info*)user_data; - fullname = gnc_account_get_full_name (imapInfo->source_account); // Do we have a valid map account @@ -455,7 +453,7 @@ get_imap_info (Account *acc, const gchar *category, GtkTreeModel *model, const g for (node = imap_list; node; node = g_list_next (node)) { - struct imap_info *imapInfo = node->data; + GncImapInfo *imapInfo = node->data; // First add a child entry and pass iter to add_to_store gtk_tree_store_append (GTK_TREE_STORE(model), &child, &toplevel); @@ -533,7 +531,7 @@ get_account_info_online (GList *accts, GtkTreeModel *model) GList *ptr; GtkTreeIter toplevel; - struct imap_info imapInfo; + GncImapInfo imapInfo; /* Go through list of accounts */ for (ptr = accts; ptr; ptr = g_list_next (ptr))