Mercurial > pidgin.yaz
comparison libpurple/conversation.c @ 27790:1aab44eab011
normalize buddy's alias name to be appeared in the window title.
author | Yoshiki Yazawa <yaz@honeyplanet.jp> |
---|---|
date | Wed, 12 Mar 2008 19:31:01 +0000 |
parents | 76ff0ad87964 |
children | 030185a59a1a |
comparison
equal
deleted
inserted
replaced
27789:9f67f9a58564 | 27790:1aab44eab011 |
---|---|
654 { | 654 { |
655 PurpleAccount *account; | 655 PurpleAccount *account; |
656 PurpleBuddy *b; | 656 PurpleBuddy *b; |
657 PurpleChat *chat; | 657 PurpleChat *chat; |
658 const char *text = NULL, *name; | 658 const char *text = NULL, *name; |
659 gchar *utf8; | |
660 gsize dummy; | |
659 | 661 |
660 g_return_if_fail(conv != NULL); | 662 g_return_if_fail(conv != NULL); |
661 | 663 |
662 account = purple_conversation_get_account(conv); | 664 account = purple_conversation_get_account(conv); |
663 name = purple_conversation_get_name(conv); | 665 name = purple_conversation_get_name(conv); |
672 | 674 |
673 | 675 |
674 if(text == NULL) | 676 if(text == NULL) |
675 text = name; | 677 text = name; |
676 | 678 |
677 purple_conversation_set_title(conv, text); | 679 utf8 = sanitize_utf(text, strlen(text), &dummy); |
680 purple_conversation_set_title(conv, utf8); | |
681 g_free(utf8); | |
678 } | 682 } |
679 | 683 |
680 void | 684 void |
681 purple_conversation_foreach(void (*func)(PurpleConversation *conv)) | 685 purple_conversation_foreach(void (*func)(PurpleConversation *conv)) |
682 { | 686 { |