[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Ayttm-commits] CVS: ayttm/src util.c,1.51,1.52
From: |
Colin Leroy <address@hidden> |
Subject: |
[Ayttm-commits] CVS: ayttm/src util.c,1.51,1.52 |
Date: |
Fri, 07 Mar 2003 05:48:04 -0500 |
Update of /cvsroot/ayttm/ayttm/src
In directory subversions:/tmp/cvs-serv8519/src
Modified Files:
util.c
Log Message:
avoid mess when moving account to same contact
Index: util.c
===================================================================
RCS file: /cvsroot/ayttm/ayttm/src/util.c,v
retrieving revision 1.51
retrieving revision 1.52
diff -u -r1.51 -r1.52
--- util.c 4 Mar 2003 15:12:27 -0000 1.51
+++ util.c 7 Mar 2003 10:47:57 -0000 1.52
@@ -1158,33 +1158,36 @@
char * new_group = con->group->name;
char *old_group = c->group->name;
- handle_group_change(ea, old_group, new_group);
+ if (c != con) {
- c->accounts = l_list_remove(c->accounts, ea);
+ handle_group_change(ea, old_group, new_group);
- remove_account_line(ea);
- if(l_list_length(c->accounts) == 0)
- remove_contact(c);
- else {
- LList *l;
- c->online = 0;
- for(l=c->accounts; l; l=l->next)
- if(((eb_account *)l->data)->online)
- c->online++;
- if(!c->online)
- remove_contact_line(c);
- else
- add_contact_and_accounts(c);
- }
+ c->accounts = l_list_remove(c->accounts, ea);
- con->accounts = l_list_append(con->accounts, ea);
+ remove_account_line(ea);
+ if(l_list_length(c->accounts) == 0)
+ remove_contact(c);
+ else {
+ LList *l;
+ c->online = 0;
+ for(l=c->accounts; l; l=l->next)
+ if(((eb_account *)l->data)->online)
+ c->online++;
+ if(!c->online)
+ remove_contact_line(c);
+ else
+ add_contact_and_accounts(c);
+ }
- ea->account_contact = con;
- if(ea->online) {
- con->online++;
- add_contact_line(con);
- }
+ con->accounts = l_list_append(con->accounts, ea);
+ ea->account_contact = con;
+ if(ea->online) {
+ con->online++;
+ add_contact_line(con);
+ }
+ }
+
add_contact_and_accounts(con);
write_contact_list();
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Ayttm-commits] CVS: ayttm/src util.c,1.51,1.52,
Colin Leroy <address@hidden> <=
- Prev by Date:
[Ayttm-commits] CVS: ayttm ChangeLog,1.319,1.320 configure.in,1.314,1.315
- Next by Date:
[Ayttm-commits] CVS: ayttm/modules/msn2/libmsn2 msn_core.C,1.26,1.27
- Previous by thread:
[Ayttm-commits] CVS: ayttm ChangeLog,1.319,1.320 configure.in,1.314,1.315
- Next by thread:
[Ayttm-commits] CVS: ayttm/modules/msn2/libmsn2 msn_core.C,1.26,1.27
- Index(es):