Mercurial > pidgin.yaz
changeset 8015:5f86d21b6232
[gaim-migrate @ 8695]
chat aliases in tabs/titles (like the add/remove button, these don't update when they should)
committer: Tailor Script <tailor@pidgin.im>
author | Nathan Walp <nwalp@pidgin.im> |
---|---|
date | Mon, 05 Jan 2004 22:09:29 +0000 |
parents | c052eccc10ee |
children | 7bae464195c4 |
files | src/conversation.c src/gtkprefs.c |
diffstat | 2 files changed, 15 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/src/conversation.c Mon Jan 05 20:51:37 2004 +0000 +++ b/src/conversation.c Mon Jan 05 22:09:29 2004 +0000 @@ -1085,19 +1085,25 @@ { GaimAccount *account; GaimBuddy *b; - const char *text, *name; + GaimChat *chat; + const char *text = NULL, *name; g_return_if_fail(conv != NULL); account = gaim_conversation_get_account(conv); name = gaim_conversation_get_name(conv); - if (gaim_prefs_get_bool("/core/conversations/use_alias_for_title") && - account != NULL && ((b = gaim_find_buddy(account, name)) != NULL)) { - - text = gaim_get_buddy_alias(b); + if (gaim_prefs_get_bool("/core/conversations/use_alias_for_title")) { + if(gaim_conversation_get_type(conv) == GAIM_CONV_IM) { + if(account && ((b = gaim_find_buddy(account, name)) != NULL)) + text = gaim_get_buddy_alias(b); + } else if(gaim_conversation_get_type(conv) == GAIM_CONV_CHAT) { + if(account && ((chat = gaim_blist_find_chat(account, name)) != NULL)) + text = chat->alias; + } } - else + + if(!text) text = name; gaim_conversation_set_title(conv, text);
--- a/src/gtkprefs.c Mon Jan 05 20:51:37 2004 +0000 +++ b/src/gtkprefs.c Mon Jan 05 22:09:29 2004 +0000 @@ -889,6 +889,9 @@ gaim_gtk_prefs_checkbox(_("Show Formatting Toolbar"), "/gaim/gtk/conversations/show_formatting_toolbar", vbox); + gaim_gtk_prefs_checkbox(_("Show a_liases in tabs/titles"), + "/core/conversations/use_alias_for_title", vbox); + vbox = gaim_gtk_make_frame (ret, _("Tab Options")); label = gaim_gtk_prefs_dropdown(vbox, _("_Tab Placement:"), GAIM_PREF_INT, @@ -984,8 +987,6 @@ vbox = gaim_gtk_make_frame (ret, _("Display")); gaim_gtk_prefs_checkbox(_("Show _logins in window"), "/core/conversations/im/show_login", vbox); - gaim_gtk_prefs_checkbox(_("Show a_liases in tabs/titles"), - "/core/conversations/use_alias_for_title", vbox); vbox = gaim_gtk_make_frame (ret, _("Typing Notification")); gaim_gtk_prefs_checkbox(_("Notify buddies that you are _typing to them"),