[Commits] addressbook.c 1.60.2.151 1.60.2.152 addrselect.c 1.3.2.12 1.3.2.13

colin at claws-mail.org colin at claws-mail.org
Wed Sep 19 17:39:07 CEST 2012


Update of /home/claws-mail/claws/src
In directory srv:/tmp/cvs-serv24528/src

Modified Files:
      Tag: gtk2
	addressbook.c addrselect.c 
Log Message:
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.

Index: addrselect.c
===================================================================
RCS file: /home/claws-mail/claws/src/addrselect.c,v
retrieving revision 1.3.2.12
retrieving revision 1.3.2.13
diff -u -d -r1.3.2.12 -r1.3.2.13
--- addrselect.c	27 May 2012 17:30:49 -0000	1.3.2.12
+++ addrselect.c	19 Sep 2012 15:39:05 -0000	1.3.2.13
@@ -199,7 +199,7 @@
 	gchar *name = NULL;
 	gchar *address = NULL;
 
-	if( aio->type == ADDR_ITEM_EMAIL ) {
+	if( aio->type == ITEMTYPE_EMAIL ) {
 		ItemPerson *person = NULL;
 		ItemEMail *email = ( ItemEMail * ) aio;
 
@@ -220,7 +220,7 @@
 			address = email->address;
 		}
 	}
-	else if( aio->type == ADDR_ITEM_PERSON ) {
+	else if( aio->type == ITEMTYPE_PERSON ) {
 		ItemPerson *person = ( ItemPerson * ) aio;
 		GList *node = person->listEMail;
 
@@ -276,9 +276,9 @@
 	/* 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 );
@@ -349,7 +349,7 @@
 		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 ) {

Index: addressbook.c
===================================================================
RCS file: /home/claws-mail/claws/src/addressbook.c,v
retrieving revision 1.60.2.151
retrieving revision 1.60.2.152
diff -u -d -r1.60.2.151 -r1.60.2.152
--- addressbook.c	19 Sep 2012 12:22:24 -0000	1.60.2.151
+++ addressbook.c	19 Sep 2012 15:39:04 -0000	1.60.2.152
@@ -1480,7 +1480,7 @@
 			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;
 			}
@@ -1510,10 +1510,10 @@
 			aio = ( AddrItemObject * ) item->addressItem;
 			if (!aio)
 				continue;
-			if( aio->type == ADDR_ITEM_GROUP ) {
+			if( aio->type == ITEMTYPE_GROUP ) {
 				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);
 			}
 		}
@@ -1526,7 +1526,7 @@
 			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))) {
@@ -1543,7 +1543,7 @@
 			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 );
@@ -1564,7 +1564,7 @@
 			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 );
@@ -1596,7 +1596,7 @@
 			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 );
@@ -1632,7 +1632,7 @@
 			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 );
@@ -1674,7 +1674,7 @@
 	gchar *name = NULL;
 	gchar *address = NULL;
 
-	if( aio->type == ADDR_ITEM_EMAIL ) {
+	if( aio->type == ITEMTYPE_EMAIL ) {
 		ItemPerson *person = NULL;
 		ItemEMail *email = ( ItemEMail * ) aio;
 
@@ -1695,7 +1695,7 @@
 			address = email->address;
 		}
 	}
-	else if( aio->type == ADDR_ITEM_PERSON ) {
+	else if( aio->type == ITEMTYPE_PERSON ) {
 		ItemPerson *person = ( ItemPerson * ) aio;
 		GList *node = person->listEMail;
 
@@ -1746,14 +1746,14 @@
 			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 );
 			}
-			else if( aio->type == ADDR_ITEM_GROUP ) {
+			else if( aio->type == ITEMTYPE_GROUP ) {
 				ItemGroup *group = ( ItemGroup * ) aio;
 				GList *nodeMail = group->listEMail;
 				while( nodeMail ) {
@@ -2137,7 +2137,7 @@
 		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;
@@ -2146,7 +2146,7 @@
 				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;
@@ -3185,7 +3185,7 @@
 			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;
@@ -3213,7 +3213,7 @@
 								  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);
@@ -3235,7 +3235,7 @@
 		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;
@@ -3264,7 +3264,7 @@
 							  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);
@@ -3364,7 +3364,7 @@
 #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));
 		}
@@ -3440,7 +3440,7 @@
 										   (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;
 				}
@@ -3459,7 +3459,7 @@
 									  (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;
 				}
@@ -3613,7 +3613,7 @@
 				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) {
@@ -5607,12 +5607,12 @@
 	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;
 		}
        }
 
-	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,



More information about the Commits mailing list