Mercurial > hg
comparison mcabber/src/roster.c @ 564:95d6297a9654
Cosmetic changes
author | Mikael Berthe <mikael@lilotux.net> |
---|---|
date | Fri, 02 Dec 2005 23:18:00 +0100 |
parents | b0f1b127bfb6 |
children | afc2bd38b15c |
comparison
equal
deleted
inserted
replaced
563:b0f1b127bfb6 | 564:95d6297a9654 |
---|---|
280 } | 280 } |
281 roster_usr->type = type; | 281 roster_usr->type = type; |
282 roster_usr->list = slist; // (my_group SList element) | 282 roster_usr->list = slist; // (my_group SList element) |
283 // #4 Insert node (sorted) | 283 // #4 Insert node (sorted) |
284 my_group->list = g_slist_insert_sorted(my_group->list, roster_usr, | 284 my_group->list = g_slist_insert_sorted(my_group->list, roster_usr, |
285 (GCompareFunc)&roster_compare_name); | 285 (GCompareFunc)&roster_compare_name); |
286 return roster_find(jid, jidsearch, type); | 286 return roster_find(jid, jidsearch, type); |
287 } | 287 } |
288 | 288 |
289 // Removes user (jid) from roster, frees allocated memory | 289 // Removes user (jid) from roster, frees allocated memory |
290 void roster_del_user(const char *jid) | 290 void roster_del_user(const char *jid) |
1067 // return the first buddy with an unread message. | 1067 // return the first buddy with an unread message. |
1068 gpointer unread_msg(gpointer rosterdata) | 1068 gpointer unread_msg(gpointer rosterdata) |
1069 { | 1069 { |
1070 GSList *unread, *next_unread; | 1070 GSList *unread, *next_unread; |
1071 | 1071 |
1072 if (!unread_list) return NULL; | 1072 if (!unread_list) |
1073 return NULL; | |
1074 | |
1073 // First unread message | 1075 // First unread message |
1074 if (!rosterdata) return unread_list->data; | 1076 if (!rosterdata) |
1077 return unread_list->data; | |
1075 | 1078 |
1076 unread = g_slist_find(unread_list, rosterdata); | 1079 unread = g_slist_find(unread_list, rosterdata); |
1077 if (!unread) return unread_list->data; | 1080 if (!unread) |
1081 return unread_list->data; | |
1078 | 1082 |
1079 next_unread = g_slist_next(unread); | 1083 next_unread = g_slist_next(unread); |
1080 if (next_unread) return next_unread->data; | 1084 if (next_unread) |
1081 | 1085 return next_unread->data; |
1082 return unread_list->data; | 1086 return unread_list->data; |
1083 } | 1087 } |