Mercurial > pidgin
comparison src/aim.c @ 2397:520257562955
[gaim-migrate @ 2410]
changing aim_users to GSList. this works better for me since in gaim-core i had them as a GSList. besides, it saves memory.
committer: Tailor Script <tailor@pidgin.im>
author | Eric Warmenhoven <eric@warmenhoven.org> |
---|---|
date | Sun, 30 Sep 2001 19:58:48 +0000 |
parents | cacaf7ace3a5 |
children | 61b816a7b467 |
comparison
equal
deleted
inserted
replaced
2396:78fab38249a2 | 2397:520257562955 |
---|---|
179 } | 179 } |
180 | 180 |
181 | 181 |
182 static GList *combo_user_names() | 182 static GList *combo_user_names() |
183 { | 183 { |
184 GList *usr = aim_users; | 184 GSList *usr = aim_users; |
185 GList *tmp = NULL; | 185 GList *tmp = NULL; |
186 struct aim_user *u; | 186 struct aim_user *u; |
187 | 187 |
188 if (!usr) | 188 if (!usr) |
189 return g_list_append(NULL, "<New User>"); | 189 return g_list_append(NULL, "<New User>"); |
421 | 421 |
422 if (!u) { /* new user */ | 422 if (!u) { /* new user */ |
423 u = g_new0(struct aim_user, 1); | 423 u = g_new0(struct aim_user, 1); |
424 g_snprintf(u->username, sizeof(u->username), "%s", name); | 424 g_snprintf(u->username, sizeof(u->username), "%s", name); |
425 u->protocol = DEFAULT_PROTO; | 425 u->protocol = DEFAULT_PROTO; |
426 aim_users = g_list_prepend(aim_users, u); | 426 aim_users = g_slist_prepend(aim_users, u); |
427 } else { /* user already exists */ | 427 } else { /* user already exists */ |
428 aim_users = g_list_remove(aim_users, u); | 428 aim_users = g_slist_remove(aim_users, u); |
429 aim_users = g_list_prepend(aim_users, u); | 429 aim_users = g_slist_prepend(aim_users, u); |
430 } | 430 } |
431 save_prefs(); | 431 save_prefs(); |
432 } | 432 } |
433 | 433 |
434 int main(int argc, char *argv[]) | 434 int main(int argc, char *argv[]) |