Mercurial > pidgin
comparison src/conversation.c @ 10364:db5e8c8b2abb
[gaim-migrate @ 11582]
aliases in tabs/titles, default : Yes
committer: Tailor Script <tailor@pidgin.im>
author | Sean Egan <seanegan@gmail.com> |
---|---|
date | Tue, 14 Dec 2004 04:18:31 +0000 |
parents | 655c48791b3c |
children | 5ea6c9dd10a2 |
comparison
equal
deleted
inserted
replaced
10363:f608b72a7611 | 10364:db5e8c8b2abb |
---|---|
1129 g_return_if_fail(conv != NULL); | 1129 g_return_if_fail(conv != NULL); |
1130 | 1130 |
1131 account = gaim_conversation_get_account(conv); | 1131 account = gaim_conversation_get_account(conv); |
1132 name = gaim_conversation_get_name(conv); | 1132 name = gaim_conversation_get_name(conv); |
1133 | 1133 |
1134 if (gaim_prefs_get_bool("/core/conversations/use_alias_for_title")) { | 1134 if(gaim_conversation_get_type(conv) == GAIM_CONV_IM) { |
1135 if(gaim_conversation_get_type(conv) == GAIM_CONV_IM) { | 1135 if(account && ((b = gaim_find_buddy(account, name)) != NULL)) |
1136 if(account && ((b = gaim_find_buddy(account, name)) != NULL)) | 1136 text = gaim_buddy_get_local_alias(b); |
1137 text = gaim_buddy_get_local_alias(b); | 1137 } else if(gaim_conversation_get_type(conv) == GAIM_CONV_CHAT) { |
1138 } else if(gaim_conversation_get_type(conv) == GAIM_CONV_CHAT) { | 1138 if(account && ((chat = gaim_blist_find_chat(account, name)) != NULL)) |
1139 if(account && ((chat = gaim_blist_find_chat(account, name)) != NULL)) | 1139 text = chat->alias; |
1140 text = chat->alias; | 1140 } |
1141 } | 1141 |
1142 } | |
1143 | 1142 |
1144 if(text == NULL) | 1143 if(text == NULL) |
1145 text = name; | 1144 text = name; |
1146 | 1145 |
1147 gaim_conversation_set_title(conv, text); | 1146 gaim_conversation_set_title(conv, text); |
2766 * Register preferences | 2765 * Register preferences |
2767 **********************************************************************/ | 2766 **********************************************************************/ |
2768 | 2767 |
2769 /* Conversations */ | 2768 /* Conversations */ |
2770 gaim_prefs_add_none("/core/conversations"); | 2769 gaim_prefs_add_none("/core/conversations"); |
2771 gaim_prefs_add_bool("/core/conversations/use_alias_for_title", TRUE); | |
2772 | 2770 |
2773 /* Conversations -> Chat */ | 2771 /* Conversations -> Chat */ |
2774 gaim_prefs_add_none("/core/conversations/chat"); | 2772 gaim_prefs_add_none("/core/conversations/chat"); |
2775 gaim_prefs_add_bool("/core/conversations/chat/show_nick_change", TRUE); | 2773 gaim_prefs_add_bool("/core/conversations/chat/show_nick_change", TRUE); |
2776 | 2774 |
2777 /* Conversations -> IM */ | 2775 /* Conversations -> IM */ |
2778 gaim_prefs_add_none("/core/conversations/im"); | 2776 gaim_prefs_add_none("/core/conversations/im"); |
2779 gaim_prefs_add_bool("/core/conversations/im/send_typing", TRUE); | 2777 gaim_prefs_add_bool("/core/conversations/im/send_typing", TRUE); |
2780 | 2778 |
2781 /* Connect callbacks for changed preferences */ | |
2782 gaim_prefs_connect_callback(handle, "/core/conversations/use_alias_for_title", | |
2783 update_titles_pref_cb, NULL); | |
2784 | 2779 |
2785 /********************************************************************** | 2780 /********************************************************************** |
2786 * Register signals | 2781 * Register signals |
2787 **********************************************************************/ | 2782 **********************************************************************/ |
2788 gaim_signal_register(handle, "writing-im-msg", | 2783 gaim_signal_register(handle, "writing-im-msg", |