Mercurial > pidgin
comparison src/blist.c @ 7727:72c0d2c66f45
[gaim-migrate @ 8372]
(10:49:40) faceprint: no no no no no
(10:49:51) LSchiere2: what did i get wrong faceprint?
(10:50:05) faceprint: server aliases
(10:50:11) LSchiere2: what about them?
(10:50:18) Paco-Paco: they don't belong in blist.xml
(10:50:24) faceprint: bingo
(10:50:25) LSchiere2: i asked sean
(10:50:36) SeanEgan: He did
(10:50:38) Paco-Paco: yeah that bugged me but I wasn't going to get involved
(10:51:04) SeanEgan: but I'd listen to faceprint.
(10:51:08) LSchiere2: it makes sense, both winicq and winaim use them even after the person goes offline
(10:51:20) faceprint: and so does the oscar prpl
(10:51:28) faceprint: but the core didn't
(10:51:33) faceprint: and everyone was happy
(10:51:37) datallah: whats wrong w/ saving them as long as they are refreshed when appropriate?
(10:51:58) faceprint: datallah: doing it in the core assumes certain things about how they're handled in all prpls
(10:51:58) LSchiere2: so the correct fix would be to change the protocols instead of the blist?
(10:52:22) faceprint: right. the prpls know what's going on, so they should store it as a setting like oscar does
committer: Tailor Script <tailor@pidgin.im>
author | Luke Schierer <lschiere@pidgin.im> |
---|---|
date | Wed, 03 Dec 2003 15:53:54 +0000 |
parents | dcfdbcd223cd |
children | d2710b3dcc5c |
comparison
equal
deleted
inserted
replaced
7726:dcfdbcd223cd | 7727:72c0d2c66f45 |
---|---|
394 | 394 |
395 conv = gaim_find_conversation_with_account(buddy->name, buddy->account); | 395 conv = gaim_find_conversation_with_account(buddy->name, buddy->account); |
396 | 396 |
397 if (conv) | 397 if (conv) |
398 gaim_conversation_autoset_title(conv); | 398 gaim_conversation_autoset_title(conv); |
399 | |
400 gaim_blist_save(); | |
401 } | 399 } |
402 | 400 |
403 void gaim_blist_rename_group(GaimGroup *group, const char *name) | 401 void gaim_blist_rename_group(GaimGroup *group, const char *name) |
404 { | 402 { |
405 GaimBlistUiOps *ops = gaimbuddylist->ui_ops; | 403 GaimBlistUiOps *ops = gaimbuddylist->ui_ops; |
1935 | 1933 |
1936 static void parse_buddy(GaimGroup *group, GaimContact *contact, xmlnode *bnode) | 1934 static void parse_buddy(GaimGroup *group, GaimContact *contact, xmlnode *bnode) |
1937 { | 1935 { |
1938 GaimAccount *account; | 1936 GaimAccount *account; |
1939 GaimBuddy *buddy; | 1937 GaimBuddy *buddy; |
1940 char *name = NULL, *alias = NULL, *server_alias = NULL; | 1938 char *name = NULL, *alias = NULL; |
1941 const char *acct_name, *proto, *protocol; | 1939 const char *acct_name, *proto, *protocol; |
1942 xmlnode *x; | 1940 xmlnode *x; |
1943 | 1941 |
1944 acct_name = xmlnode_get_attrib(bnode, "account"); | 1942 acct_name = xmlnode_get_attrib(bnode, "account"); |
1945 protocol = xmlnode_get_attrib(bnode, "protocol"); | 1943 protocol = xmlnode_get_attrib(bnode, "protocol"); |
1959 if(!name) | 1957 if(!name) |
1960 return; | 1958 return; |
1961 | 1959 |
1962 if((x = xmlnode_get_child(bnode, "alias"))) | 1960 if((x = xmlnode_get_child(bnode, "alias"))) |
1963 alias = xmlnode_get_data(x); | 1961 alias = xmlnode_get_data(x); |
1964 | |
1965 if((x = xmlnode_get_child(bnode, "server_alias"))) | |
1966 server_alias = xmlnode_get_data(x); | |
1967 | 1962 |
1968 buddy = gaim_buddy_new(account, name, alias); | 1963 buddy = gaim_buddy_new(account, name, alias); |
1969 gaim_blist_add_buddy(buddy, contact, group, | 1964 gaim_blist_add_buddy(buddy, contact, group, |
1970 gaim_blist_get_last_child((GaimBlistNode*)contact)); | 1965 gaim_blist_get_last_child((GaimBlistNode*)contact)); |
1971 | 1966 |
1976 } | 1971 } |
1977 | 1972 |
1978 g_free(name); | 1973 g_free(name); |
1979 if(alias) | 1974 if(alias) |
1980 g_free(alias); | 1975 g_free(alias); |
1981 | |
1982 if(server_alias) | |
1983 g_free(server_alias); | |
1984 } | 1976 } |
1985 | 1977 |
1986 static void parse_contact(GaimGroup *group, xmlnode *cnode) | 1978 static void parse_contact(GaimGroup *group, xmlnode *cnode) |
1987 { | 1979 { |
1988 GaimContact *contact = gaim_contact_new(); | 1980 GaimContact *contact = gaim_contact_new(); |
2308 } | 2300 } |
2309 | 2301 |
2310 static void print_buddy(FILE *file, GaimBuddy *buddy) { | 2302 static void print_buddy(FILE *file, GaimBuddy *buddy) { |
2311 char *bud_name = g_markup_escape_text(buddy->name, -1); | 2303 char *bud_name = g_markup_escape_text(buddy->name, -1); |
2312 char *bud_alias = NULL; | 2304 char *bud_alias = NULL; |
2313 char *bud_server_alias = NULL; | |
2314 char *acct_name = g_markup_escape_text(buddy->account->username, -1); | 2305 char *acct_name = g_markup_escape_text(buddy->account->username, -1); |
2315 int proto_num = gaim_account_get_protocol(buddy->account); | 2306 int proto_num = gaim_account_get_protocol(buddy->account); |
2316 if(buddy->alias) | 2307 if(buddy->alias) |
2317 bud_alias= g_markup_escape_text(buddy->alias, -1); | 2308 bud_alias= g_markup_escape_text(buddy->alias, -1); |
2318 if(buddy->server_alias) | |
2319 bud_server_alias= g_markup_escape_text(buddy->server_alias, -1); | |
2320 fprintf(file, "\t\t\t\t<buddy account=\"%s\" proto=\"%s\"", acct_name, | 2309 fprintf(file, "\t\t\t\t<buddy account=\"%s\" proto=\"%s\"", acct_name, |
2321 gaim_account_get_protocol_id(buddy->account)); | 2310 gaim_account_get_protocol_id(buddy->account)); |
2322 if(proto_num != -1) | 2311 if(proto_num != -1) |
2323 fprintf(file, " protocol=\"%d\"", proto_num); | 2312 fprintf(file, " protocol=\"%d\"", proto_num); |
2324 fprintf(file, ">\n"); | 2313 fprintf(file, ">\n"); |
2325 | 2314 |
2326 fprintf(file, "\t\t\t\t\t<name>%s</name>\n", bud_name); | 2315 fprintf(file, "\t\t\t\t\t<name>%s</name>\n", bud_name); |
2327 if(bud_alias) { | 2316 if(bud_alias) { |
2328 fprintf(file, "\t\t\t\t\t<alias>%s</alias>\n", bud_alias); | 2317 fprintf(file, "\t\t\t\t\t<alias>%s</alias>\n", bud_alias); |
2329 } | 2318 } |
2330 if(bud_server_alias) { | |
2331 fprintf(file, "\t\t\t\t\t<server_alias>%s</server_alias>\n", bud_server_alias); | |
2332 } | |
2333 g_hash_table_foreach(buddy->node.settings, blist_print_buddy_settings, file); | 2319 g_hash_table_foreach(buddy->node.settings, blist_print_buddy_settings, file); |
2334 fprintf(file, "\t\t\t\t</buddy>\n"); | 2320 fprintf(file, "\t\t\t\t</buddy>\n"); |
2335 g_free(bud_name); | 2321 g_free(bud_name); |
2336 g_free(bud_alias); | 2322 g_free(bud_alias); |
2337 g_free(acct_name); | 2323 g_free(acct_name); |
2338 g_free(bud_server_alias); | |
2339 } | 2324 } |
2340 | 2325 |
2341 static void gaim_blist_write(FILE *file, GaimAccount *exp_acct) { | 2326 static void gaim_blist_write(FILE *file, GaimAccount *exp_acct) { |
2342 GList *accounts; | 2327 GList *accounts; |
2343 GSList *buds; | 2328 GSList *buds; |