# HG changeset patch # User Nathan Walp # Date 1073340569 0 # Node ID 5f86d21b623268879ced87f19eed0b6ee6c54378 # Parent c052eccc10eede0f5b8dd91e453b91cf24b4fd63 [gaim-migrate @ 8695] chat aliases in tabs/titles (like the add/remove button, these don't update when they should) committer: Tailor Script diff -r c052eccc10ee -r 5f86d21b6232 src/conversation.c --- 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); diff -r c052eccc10ee -r 5f86d21b6232 src/gtkprefs.c --- 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"),