[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Ayttm-commits] CVS: ayttm/src util.c,1.21,1.22
From: |
Colin Leroy <address@hidden> |
Subject: |
[Ayttm-commits] CVS: ayttm/src util.c,1.21,1.22 |
Date: |
Tue, 21 Jan 2003 07:12:19 -0500 |
Update of /cvsroot/ayttm/ayttm/src
In directory subversions:/tmp/cvs-serv8170/src
Modified Files:
util.c
Log Message:
- src/util.c
Delete contact if it has no more accounts
Index: util.c
===================================================================
RCS file: /cvsroot/ayttm/ayttm/src/util.c,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- util.c 20 Jan 2003 20:33:18 -0000 1.21
+++ util.c 21 Jan 2003 12:11:52 -0000 1.22
@@ -1145,25 +1145,36 @@
buddy_logoff(a);
remove_account_line(a);
c->accounts = g_list_remove(c->accounts, a);
+
RUN_SERVICE(a)->del_user(a);
g_free(a);
+
+ if (!g_list_length(c->accounts)) {
+ remove_contact(c);
+ return 0; /* so if coming from remove_contact
+ don't try again to remove_contact_line()
+ and so on */
+ }
+
return 1;
}
void remove_contact( struct contact * c )
{
grouplist * g = c->group;
+
if(c->chatwindow)
gtk_widget_destroy(c->chatwindow->window);
- while(c->accounts)
+
+ while(c->accounts && g_list_length(c->accounts))
{
if (!remove_account(c->accounts->data))
return;
}
- remove_contact_line(c);
+ remove_contact_line(c);
g->members = g_list_remove(g->members, c);
g_free(c);
-
}
+
void remove_group( grouplist * g )
{
GList *node = NULL;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Ayttm-commits] CVS: ayttm/src util.c,1.21,1.22,
Colin Leroy <address@hidden> <=
- Prev by Date:
[Ayttm-commits] CVS: ayttm ChangeLog,1.175,1.176 configure.in,1.171,1.172
- Next by Date:
[Ayttm-commits] CVS: ayttm ChangeLog,1.176,1.177 configure.in,1.172,1.173
- Previous by thread:
[Ayttm-commits] CVS: ayttm ChangeLog,1.175,1.176 configure.in,1.171,1.172
- Next by thread:
[Ayttm-commits] CVS: ayttm ChangeLog,1.176,1.177 configure.in,1.172,1.173
- Index(es):