2012-09-19 [colin] 3.8.1cvs66
authorColin Leroy <colin@colino.net>
Wed, 19 Sep 2012 15:39:05 +0000 (15:39 +0000)
committerColin Leroy <colin@colino.net>
Wed, 19 Sep 2012 15:39:05 +0000 (15:39 +0000)
* src/addressbook.c
* src/addrselect.c
Un-mix mixed enum comparison which happened
to work because multiple enums define the same
values.

ChangeLog
PATCHSETS
configure.ac
src/addressbook.c
src/addrselect.c

index 3e3f90c..b2e9770 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2012-09-19 [colin]     3.8.1cvs66
+
+       * src/addressbook.c
+       * src/addrselect.c
+               Un-mix mixed enum comparison which happened
+               to work because multiple enums define the same
+               values.
+
 2012-09-19 [colin]     3.8.1cvs65
 
        * src/addrindex.c
 2012-09-19 [colin]     3.8.1cvs65
 
        * src/addrindex.c
index ab8766f..3810847 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.13.2.23 -r 1.13.2.24 src/addritem.c;  ) > 3.8.1cvs63.patchset
 ( cvs diff -u -r 1.274.2.351 -r 1.274.2.352 src/mainwindow.c;  cvs diff -u -r 1.105.2.176 -r 1.105.2.177 src/prefs_account.c;  cvs diff -u -r 1.1.2.33 -r 1.1.2.34 src/prefs_compose_writing.c;  cvs diff -u -r 1.1.2.23 -r 1.1.2.24 src/prefs_logging.c;  cvs diff -u -r 1.1.2.36 -r 1.1.2.37 src/prefs_message.c;  cvs diff -u -r 1.1.2.48 -r 1.1.2.49 src/prefs_msg_colors.c;  cvs diff -u -r 1.1.2.47 -r 1.1.2.48 src/prefs_other.c;  cvs diff -u -r 1.1.2.31 -r 1.1.2.32 src/prefs_receive.c;  cvs diff -u -r 1.1.2.71 -r 1.1.2.72 src/prefs_summaries.c;  cvs diff -u -r 1.1.2.25 -r 1.1.2.26 src/prefs_wrapping.c;  cvs diff -u -r 1.9.2.56 -r 1.9.2.57 src/common/ssl.c;  cvs diff -u -r 1.9.2.82 -r 1.9.2.83 src/gtk/gtkaspell.c;  ) > 3.8.1cvs64.patchset
 ( cvs diff -u -r 1.28.2.50 -r 1.28.2.51 src/addrindex.c;  cvs diff -u -r 1.14.2.64 -r 1.14.2.65 src/editaddress.c;  cvs diff -u -r 1.8.2.46 -r 1.8.2.47 src/editldap.c;  cvs diff -u -r 1.5.2.32 -r 1.5.2.33 src/exporthtml.c;  cvs diff -u -r 1.18.2.36 -r 1.18.2.37 src/jpilot.c;  cvs diff -u -r 1.49.2.150 -r 1.49.2.151 src/procmime.c;  cvs diff -u -r 1.1.2.43 -r 1.1.2.44 src/plugins/bogofilter/bogofilter_gtk.c;  cvs diff -u -r 1.1.2.38 -r 1.1.2.39 src/plugins/pgpcore/prefs_gpg.c;  cvs diff -u -r 1.1.2.12 -r 1.1.2.13 src/plugins/smime/smime.c;  cvs diff -u -r 1.23.2.60 -r 1.23.2.61 src/plugins/spamassassin/spamassassin_gtk.c;  ) > 3.8.1cvs65.patchset
 ( cvs diff -u -r 1.13.2.23 -r 1.13.2.24 src/addritem.c;  ) > 3.8.1cvs63.patchset
 ( cvs diff -u -r 1.274.2.351 -r 1.274.2.352 src/mainwindow.c;  cvs diff -u -r 1.105.2.176 -r 1.105.2.177 src/prefs_account.c;  cvs diff -u -r 1.1.2.33 -r 1.1.2.34 src/prefs_compose_writing.c;  cvs diff -u -r 1.1.2.23 -r 1.1.2.24 src/prefs_logging.c;  cvs diff -u -r 1.1.2.36 -r 1.1.2.37 src/prefs_message.c;  cvs diff -u -r 1.1.2.48 -r 1.1.2.49 src/prefs_msg_colors.c;  cvs diff -u -r 1.1.2.47 -r 1.1.2.48 src/prefs_other.c;  cvs diff -u -r 1.1.2.31 -r 1.1.2.32 src/prefs_receive.c;  cvs diff -u -r 1.1.2.71 -r 1.1.2.72 src/prefs_summaries.c;  cvs diff -u -r 1.1.2.25 -r 1.1.2.26 src/prefs_wrapping.c;  cvs diff -u -r 1.9.2.56 -r 1.9.2.57 src/common/ssl.c;  cvs diff -u -r 1.9.2.82 -r 1.9.2.83 src/gtk/gtkaspell.c;  ) > 3.8.1cvs64.patchset
 ( cvs diff -u -r 1.28.2.50 -r 1.28.2.51 src/addrindex.c;  cvs diff -u -r 1.14.2.64 -r 1.14.2.65 src/editaddress.c;  cvs diff -u -r 1.8.2.46 -r 1.8.2.47 src/editldap.c;  cvs diff -u -r 1.5.2.32 -r 1.5.2.33 src/exporthtml.c;  cvs diff -u -r 1.18.2.36 -r 1.18.2.37 src/jpilot.c;  cvs diff -u -r 1.49.2.150 -r 1.49.2.151 src/procmime.c;  cvs diff -u -r 1.1.2.43 -r 1.1.2.44 src/plugins/bogofilter/bogofilter_gtk.c;  cvs diff -u -r 1.1.2.38 -r 1.1.2.39 src/plugins/pgpcore/prefs_gpg.c;  cvs diff -u -r 1.1.2.12 -r 1.1.2.13 src/plugins/smime/smime.c;  cvs diff -u -r 1.23.2.60 -r 1.23.2.61 src/plugins/spamassassin/spamassassin_gtk.c;  ) > 3.8.1cvs65.patchset
+( cvs diff -u -r 1.60.2.151 -r 1.60.2.152 src/addressbook.c;  cvs diff -u -r 1.3.2.12 -r 1.3.2.13 src/addrselect.c;  ) > 3.8.1cvs66.patchset
index cc77d46..7770aec 100644 (file)
@@ -12,7 +12,7 @@ MINOR_VERSION=8
 MICRO_VERSION=1
 INTERFACE_AGE=0
 BINARY_AGE=0
 MICRO_VERSION=1
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=65
+EXTRA_VERSION=66
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index 827829e..92b79e5 100644 (file)
@@ -1480,7 +1480,7 @@ static void addressbook_del_clicked(GtkButton *button, gpointer data)
                        item = node->data;
                        node = g_list_next( node );
                        aio = ( AddrItemObject * ) item->addressItem;
                        item = node->data;
                        node = g_list_next( node );
                        aio = ( AddrItemObject * ) item->addressItem;
-                       if( aio->type == ADDR_ITEM_PERSON || aio->type == ADDR_ITEM_EMAIL ) {
+                       if( aio->type == ITEMTYPE_PERSON || aio->type == ITEMTYPE_EMAIL ) {
                                group_delete = FALSE;
                                break;
                        }
                                group_delete = FALSE;
                                break;
                        }
@@ -1510,10 +1510,10 @@ static void addressbook_del_clicked(GtkButton *button, gpointer data)
                        aio = ( AddrItemObject * ) item->addressItem;
                        if (!aio)
                                continue;
                        aio = ( AddrItemObject * ) item->addressItem;
                        if (!aio)
                                continue;
-                       if( aio->type == ADDR_ITEM_GROUP ) {
+                       if( aio->type == ITEMTYPE_GROUP ) {
                                groups = g_list_prepend(groups, item);
                        }
                                groups = g_list_prepend(groups, item);
                        }
-                       else if( aio->type == ADDR_ITEM_PERSON ) {
+                       else if( aio->type == ITEMTYPE_PERSON ) {
                                persons = g_list_prepend(persons, item);
                        }
                }
                                persons = g_list_prepend(persons, item);
                        }
                }
@@ -1526,7 +1526,7 @@ static void addressbook_del_clicked(GtkButton *button, gpointer data)
                        aio = ( AddrItemObject * ) item->addressItem;
                        if (!aio)
                                continue;
                        aio = ( AddrItemObject * ) item->addressItem;
                        if (!aio)
                                continue;
-                       if( aio->type == ADDR_ITEM_EMAIL ) {
+                       if( aio->type == ITEMTYPE_EMAIL ) {
                                ItemEMail *sitem = ( ItemEMail * ) aio;
                                ItemPerson *person = ( ItemPerson * ) ADDRITEM_PARENT(sitem);
                                if (!g_list_find_custom(persons, person, (GCompareFunc)(find_person))) {
                                ItemEMail *sitem = ( ItemEMail * ) aio;
                                ItemPerson *person = ( ItemPerson * ) ADDRITEM_PARENT(sitem);
                                if (!g_list_find_custom(persons, person, (GCompareFunc)(find_person))) {
@@ -1543,7 +1543,7 @@ static void addressbook_del_clicked(GtkButton *button, gpointer data)
                        aio = ( AddrItemObject * ) item->addressItem;
                        if (!aio)
                                continue;
                        aio = ( AddrItemObject * ) item->addressItem;
                        if (!aio)
                                continue;
-                       if( aio->type == ADDR_ITEM_GROUP ) {
+                       if( aio->type == ITEMTYPE_GROUP ) {
                                ItemGroup *item = ( ItemGroup * ) aio;
                                GtkCMCTreeNode *nd = NULL;
                                nd = addressbook_find_group_node( addrbook.opened, item );
                                ItemGroup *item = ( ItemGroup * ) aio;
                                GtkCMCTreeNode *nd = NULL;
                                nd = addressbook_find_group_node( addrbook.opened, item );
@@ -1564,7 +1564,7 @@ static void addressbook_del_clicked(GtkButton *button, gpointer data)
                        aio = ( AddrItemObject * ) item->addressItem;
                        if (!aio)
                                continue;
                        aio = ( AddrItemObject * ) item->addressItem;
                        if (!aio)
                                continue;
-                       if( aio->type == ADDR_ITEM_PERSON ) {
+                       if( aio->type == ITEMTYPE_PERSON ) {
                                ItemPerson *item = ( ItemPerson * ) aio;
                                item->status = DELETE_ENTRY; 
                                addressbook_folder_remove_one_person( clist, item );
                                ItemPerson *item = ( ItemPerson * ) aio;
                                item->status = DELETE_ENTRY; 
                                addressbook_folder_remove_one_person( clist, item );
@@ -1596,7 +1596,7 @@ static void addressbook_del_clicked(GtkButton *button, gpointer data)
                        if (!aio)
                                continue;
 
                        if (!aio)
                                continue;
 
-                       if( aio->type == ADDR_ITEM_EMAIL ) {
+                       if( aio->type == ITEMTYPE_EMAIL ) {
                                ItemEMail *sitem = ( ItemEMail * ) aio;
                                ItemPerson *person = ( ItemPerson * ) ADDRITEM_PARENT(sitem);
                                sitem = addrbook_person_remove_email( abf, person, sitem );
                                ItemEMail *sitem = ( ItemEMail * ) aio;
                                ItemPerson *person = ( ItemPerson * ) ADDRITEM_PARENT(sitem);
                                sitem = addrbook_person_remove_email( abf, person, sitem );
@@ -1632,7 +1632,7 @@ static void addressbook_del_clicked(GtkButton *button, gpointer data)
                        item = node->data;
                        node = g_list_next( node );
                        aio = ( AddrItemObject * ) item->addressItem;
                        item = node->data;
                        node = g_list_next( node );
                        aio = ( AddrItemObject * ) item->addressItem;
-                       if( aio->type == ADDR_ITEM_EMAIL ) {
+                       if( aio->type == ITEMTYPE_EMAIL ) {
                                ItemEMail *item = ( ItemEMail * ) aio;
                                ItemPerson *person = ( ItemPerson * ) ADDRITEM_PARENT(item);
                                item = addrbook_person_remove_email( abf, person, item );
                                ItemEMail *item = ( ItemEMail * ) aio;
                                ItemPerson *person = ( ItemPerson * ) ADDRITEM_PARENT(item);
                                item = addrbook_person_remove_email( abf, person, item );
@@ -1674,7 +1674,7 @@ static gchar *addressbook_format_address( AddrItemObject * aio ) {
        gchar *name = NULL;
        gchar *address = NULL;
 
        gchar *name = NULL;
        gchar *address = NULL;
 
-       if( aio->type == ADDR_ITEM_EMAIL ) {
+       if( aio->type == ITEMTYPE_EMAIL ) {
                ItemPerson *person = NULL;
                ItemEMail *email = ( ItemEMail * ) aio;
 
                ItemPerson *person = NULL;
                ItemEMail *email = ( ItemEMail * ) aio;
 
@@ -1695,7 +1695,7 @@ static gchar *addressbook_format_address( AddrItemObject * aio ) {
                        address = email->address;
                }
        }
                        address = email->address;
                }
        }
-       else if( aio->type == ADDR_ITEM_PERSON ) {
+       else if( aio->type == ITEMTYPE_PERSON ) {
                ItemPerson *person = ( ItemPerson * ) aio;
                GList *node = person->listEMail;
 
                ItemPerson *person = ( ItemPerson * ) aio;
                GList *node = person->listEMail;
 
@@ -1746,14 +1746,14 @@ static void addressbook_to_clicked(GtkButton *button, gpointer data)
                        item = node->data;
                        node = g_list_next( node );
                        aio = item->addressItem;
                        item = node->data;
                        node = g_list_next( node );
                        aio = item->addressItem;
-                       if( aio->type == ADDR_ITEM_PERSON ||
-                           aio->type == ADDR_ITEM_EMAIL ) {
+                       if( aio->type == ITEMTYPE_PERSON ||
+                           aio->type == ITEMTYPE_EMAIL ) {
                                addr = addressbook_format_address( aio );
                                compose_entry_append(
                                        compose, addr, (ComposeEntryType) data, PREF_NONE );
                                g_free( addr );
                        }
                                addr = addressbook_format_address( aio );
                                compose_entry_append(
                                        compose, addr, (ComposeEntryType) data, PREF_NONE );
                                g_free( addr );
                        }
-                       else if( aio->type == ADDR_ITEM_GROUP ) {
+                       else if( aio->type == ITEMTYPE_GROUP ) {
                                ItemGroup *group = ( ItemGroup * ) aio;
                                GList *nodeMail = group->listEMail;
                                while( nodeMail ) {
                                ItemGroup *group = ( ItemGroup * ) aio;
                                GList *nodeMail = group->listEMail;
                                while( nodeMail ) {
@@ -2137,7 +2137,7 @@ static void addressbook_treenode_add_list(
                GtkCMCTreeNode *nn;
 
                aio = node->data;
                GtkCMCTreeNode *nn;
 
                aio = node->data;
-               if( ADDRESS_OBJECT_TYPE(aio) == ITEMTYPE_GROUP ) {
+               if( ADDRESS_OBJECT_TYPE(aio) == ADDR_ITEM_GROUP ) {
                        ItemGroup *group;
 
                        group = ( ItemGroup * ) aio;
                        ItemGroup *group;
 
                        group = ( ItemGroup * ) aio;
@@ -2146,7 +2146,7 @@ static void addressbook_treenode_add_list(
                                g_message("error adding addressbook group\n");
                        }
                }
                                g_message("error adding addressbook group\n");
                        }
                }
-               else if( ADDRESS_OBJECT_TYPE(aio) == ITEMTYPE_FOLDER ) {
+               else if( ADDRESS_OBJECT_TYPE(aio) == ADDR_ITEM_FOLDER ) {
                        ItemFolder *folder;
 
                        folder = ( ItemFolder * ) aio;
                        ItemFolder *folder;
 
                        folder = ( ItemFolder * ) aio;
@@ -3185,7 +3185,7 @@ static void addressbook_new_address_cb( GtkAction *action, gpointer data ) {
                        ItemPerson *person;
                        ItemFolder *folder = NULL;
 #ifdef USE_LDAP
                        ItemPerson *person;
                        ItemFolder *folder = NULL;
 #ifdef USE_LDAP
-                       if (abf && abf->type == ADDR_IF_LDAP) {
+                       if (abf && abf->type == ADBOOKTYPE_LDAP) {
                                GtkCMCTreeNode *parentNode;
                                ds = addressbook_find_datasource( GTK_CMCTREE_NODE( addrbook.treeSelected ) );
                                if( ds == NULL ) return;
                                GtkCMCTreeNode *parentNode;
                                ds = addressbook_find_datasource( GTK_CMCTREE_NODE( addrbook.treeSelected ) );
                                if( ds == NULL ) return;
@@ -3213,7 +3213,7 @@ static void addressbook_new_address_cb( GtkAction *action, gpointer data ) {
                                                                  addressbook_new_address_from_book_post_cb,
                                                                  TRUE );
 #ifdef USE_LDAP
                                                                  addressbook_new_address_from_book_post_cb,
                                                                  TRUE );
 #ifdef USE_LDAP
-                       if (ds && abf && abf->type == ADDR_IF_LDAP) {
+                       if (ds && abf && abf->type == ADBOOKTYPE_LDAP) {
                                LdapServer *server = ds->rawDataSource;
                                ldapsvr_set_modified(server, TRUE);
                                ldapsvr_update_book(server, NULL);
                                LdapServer *server = ds->rawDataSource;
                                ldapsvr_set_modified(server, TRUE);
                                ldapsvr_update_book(server, NULL);
@@ -3235,7 +3235,7 @@ static void addressbook_new_address_cb( GtkAction *action, gpointer data ) {
                ItemFolder *folder = ADAPTER_FOLDER(pobj)->itemFolder;
                ItemPerson *person;
 #ifdef USE_LDAP
                ItemFolder *folder = ADAPTER_FOLDER(pobj)->itemFolder;
                ItemPerson *person;
 #ifdef USE_LDAP
-               if (abf && abf->type == ADDR_IF_LDAP) {
+               if (abf && abf->type == ADBOOKTYPE_LDAP) {
                        GtkCMCTreeNode *parentNode;
                        ds = addressbook_find_datasource( GTK_CMCTREE_NODE( addrbook.treeSelected ) );
                        if( ds == NULL ) return;
                        GtkCMCTreeNode *parentNode;
                        ds = addressbook_find_datasource( GTK_CMCTREE_NODE( addrbook.treeSelected ) );
                        if( ds == NULL ) return;
@@ -3264,7 +3264,7 @@ static void addressbook_new_address_cb( GtkAction *action, gpointer data ) {
                                                          addressbook_new_address_from_folder_post_cb,
                                                          TRUE );
 #ifdef USE_LDAP
                                                          addressbook_new_address_from_folder_post_cb,
                                                          TRUE );
 #ifdef USE_LDAP
-               if (ds && abf && abf->type == ADDR_IF_LDAP) {
+               if (ds && abf && abf->type == ADBOOKTYPE_LDAP) {
                        LdapServer *server = ds->rawDataSource;
                        ldapsvr_set_modified(server, TRUE);
                        ldapsvr_update_book(server, NULL);
                        LdapServer *server = ds->rawDataSource;
                        ldapsvr_set_modified(server, TRUE);
                        ldapsvr_update_book(server, NULL);
@@ -3364,7 +3364,7 @@ static void addressbook_edit_address_post_cb( ItemPerson *person )
 #ifdef USE_LDAP
                AddressBookFile *abf = addressbook_get_book_file();
 
 #ifdef USE_LDAP
                AddressBookFile *abf = addressbook_get_book_file();
 
-               if (abf && abf->type == ADDR_IF_LDAP) {
+               if (abf && abf->type == ADBOOKTYPE_LDAP) {
                        if (strcmp2(person->nickName, ADDRITEM_NAME(person)))
                                addritem_person_set_nick_name( person, ADDRITEM_NAME(person));
                }
                        if (strcmp2(person->nickName, ADDRITEM_NAME(person)))
                                addritem_person_set_nick_name( person, ADDRITEM_NAME(person));
                }
@@ -3440,7 +3440,7 @@ static void addressbook_edit_address( gpointer data, guint action, GtkWidget *wi
                                                                                   (prefs_common.addressbook_use_editaddress_dialog||force_focus) )
                                  != NULL ) { 
 #ifdef USE_LDAP
                                                                                   (prefs_common.addressbook_use_editaddress_dialog||force_focus) )
                                  != NULL ) { 
 #ifdef USE_LDAP
-                               if (abf && abf->type == ADDR_IF_LDAP) {
+                               if (abf && abf->type == ADBOOKTYPE_LDAP) {
                                        ldapsvr_set_modified( (LdapServer *) abf, TRUE );
                                        person->status = UPDATE_ENTRY;
                                }
                                        ldapsvr_set_modified( (LdapServer *) abf, TRUE );
                                        person->status = UPDATE_ENTRY;
                                }
@@ -3459,7 +3459,7 @@ static void addressbook_edit_address( gpointer data, guint action, GtkWidget *wi
                                                                          (prefs_common.addressbook_use_editaddress_dialog||force_focus) )
                        != NULL ) {
 #ifdef USE_LDAP
                                                                          (prefs_common.addressbook_use_editaddress_dialog||force_focus) )
                        != NULL ) {
 #ifdef USE_LDAP
-                               if (abf && abf->type == ADDR_IF_LDAP) {
+                               if (abf && abf->type == ADBOOKTYPE_LDAP) {
                                        ldapsvr_set_modified( (LdapServer *) abf, TRUE );
                                        person->status = UPDATE_ENTRY;
                                }
                                        ldapsvr_set_modified( (LdapServer *) abf, TRUE );
                                        person->status = UPDATE_ENTRY;
                                }
@@ -3613,7 +3613,7 @@ static void addressbook_folder_load_one_person(
                                text[COL_NAME] = addressbook_set_col_name_guard(str);
                        }
 #ifdef USE_LDAP
                                text[COL_NAME] = addressbook_set_col_name_guard(str);
                        }
 #ifdef USE_LDAP
-                       else if( abf && abf->type == ADDR_IF_LDAP && 
+                       else if( abf && abf->type == ADBOOKTYPE_LDAP && 
                                 person && person->nickName ) {
                                if (person->nickName) {
                                        if (strcmp(person->nickName, "") != 0) {
                                 person && person->nickName ) {
                                if (person->nickName) {
                                        if (strcmp(person->nickName, "") != 0) {
@@ -5607,12 +5607,12 @@ static void addressbook_drag_data_get(GtkWidget        *widget,
        for(cur = GTK_CMCLIST(addrbook.clist)->selection; cur; cur = cur->next) {
                aio = (AddrItemObject *)gtk_cmctree_node_get_row_data(GTK_CMCTREE(addrbook.clist),
                        GTK_CMCTREE_NODE(cur->data));
        for(cur = GTK_CMCLIST(addrbook.clist)->selection; cur; cur = cur->next) {
                aio = (AddrItemObject *)gtk_cmctree_node_get_row_data(GTK_CMCTREE(addrbook.clist),
                        GTK_CMCTREE_NODE(cur->data));
-               while (aio && aio->type != ADDR_ITEM_PERSON) {
+               while (aio && aio->type != ITEMTYPE_PERSON) {
                        aio = aio->parent;
                }
        }
 
                        aio = aio->parent;
                }
        }
 
-       if (aio && aio->type == ADDR_ITEM_PERSON) {
+       if (aio && aio->type == ITEMTYPE_PERSON) {
                if( ds && ds->interface && ds->interface->readOnly)
                        gtk_selection_data_set(selection_data,
                                       gtk_selection_data_get_target(selection_data), 8,
                if( ds && ds->interface && ds->interface->readOnly)
                        gtk_selection_data_set(selection_data,
                                       gtk_selection_data_get_target(selection_data), 8,
index 243fff1..ffdb511 100644 (file)
@@ -199,7 +199,7 @@ static gchar *addrselect_format_address( AddrItemObject * aio ) {
        gchar *name = NULL;
        gchar *address = NULL;
 
        gchar *name = NULL;
        gchar *address = NULL;
 
-       if( aio->type == ADDR_ITEM_EMAIL ) {
+       if( aio->type == ITEMTYPE_EMAIL ) {
                ItemPerson *person = NULL;
                ItemEMail *email = ( ItemEMail * ) aio;
 
                ItemPerson *person = NULL;
                ItemEMail *email = ( ItemEMail * ) aio;
 
@@ -220,7 +220,7 @@ static gchar *addrselect_format_address( AddrItemObject * aio ) {
                        address = email->address;
                }
        }
                        address = email->address;
                }
        }
-       else if( aio->type == ADDR_ITEM_PERSON ) {
+       else if( aio->type == ITEMTYPE_PERSON ) {
                ItemPerson *person = ( ItemPerson * ) aio;
                GList *node = person->listEMail;
 
                ItemPerson *person = ( ItemPerson * ) aio;
                GList *node = person->listEMail;
 
@@ -276,9 +276,9 @@ void addrselect_list_add_obj( AddrSelectList *asl, AddrItemObject *aio, gchar *c
        /* Check whether object is in list */
        if( addrselect_list_find( asl->listSelect, aio ) ) return;
 
        /* Check whether object is in list */
        if( addrselect_list_find( asl->listSelect, aio ) ) return;
 
-       if( aio->type == ADDR_ITEM_PERSON ||
-           aio->type == ADDR_ITEM_EMAIL ||
-           aio->type == ADDR_ITEM_GROUP ) {
+       if( aio->type == ITEMTYPE_PERSON ||
+           aio->type == ITEMTYPE_EMAIL ||
+           aio->type == ITEMTYPE_GROUP ) {
                item = addrselect_create_item( aio );
                item->cacheID = g_strdup( cacheID );
                asl->listSelect = g_list_append( asl->listSelect, item );
                item = addrselect_create_item( aio );
                item->cacheID = g_strdup( cacheID );
                asl->listSelect = g_list_append( asl->listSelect, item );
@@ -349,7 +349,7 @@ GList *addrselect_build_list( AddrSelectList *asl ) {
                item = node->data;
                aio = ( AddrItemObject * ) item->addressItem;
                if( aio ) {
                item = node->data;
                aio = ( AddrItemObject * ) item->addressItem;
                if( aio ) {
-                       if( aio->type == ADDR_ITEM_GROUP ) {
+                       if( aio->type == ITEMTYPE_GROUP ) {
                                ItemGroup *group = ( ItemGroup * ) aio;
                                GList *node = group->listEMail;
                                while( node ) {
                                ItemGroup *group = ( ItemGroup * ) aio;
                                GList *node = group->listEMail;
                                while( node ) {