Mercurial > pidgin
comparison src/blist.c @ 12319:7630a95f3b8b
[gaim-migrate @ 14623]
Improve Handling of Aliasing with respect to Contacts
Basically, if you choose "Alias", your changes will be saved to whichever text field you saw. This makes sense, given we're doing inline editing. Also, because we're doing inline editing, I think it's weird to have Alias offered in a buddy submenu (as choosing it causes the text to change pre-edit and post-edit, making you feel like your changes weren't saved). I've removed it. If you need to alias a buddy that's not currently online, you can always expand the contact.
committer: Tailor Script <tailor@pidgin.im>
author | Richard Laager <rlaager@wiktel.com> |
---|---|
date | Sun, 04 Dec 2005 17:54:43 +0000 |
parents | 1504d878be54 |
children | bd42f4d5854c |
comparison
equal
deleted
inserted
replaced
12318:e346a085bb4f | 12319:7630a95f3b8b |
---|---|
830 | 830 |
831 if (ops && ops->update) | 831 if (ops && ops->update) |
832 ops->update(gaimbuddylist, (GaimBlistNode *)buddy); | 832 ops->update(gaimbuddylist, (GaimBlistNode *)buddy); |
833 } | 833 } |
834 | 834 |
835 void gaim_blist_alias_contact(GaimContact *contact, const char *alias) | |
836 { | |
837 GaimBlistUiOps *ops = gaimbuddylist->ui_ops; | |
838 GaimConversation *conv; | |
839 char *old_alias = contact->alias; | |
840 GaimBlistNode *bnode; | |
841 | |
842 g_return_if_fail(contact != NULL); | |
843 | |
844 if ((alias != NULL) && (*alias != '\0')) | |
845 contact->alias = g_strdup(alias); | |
846 else | |
847 contact->alias = NULL; | |
848 | |
849 gaim_blist_schedule_save(); | |
850 | |
851 if (ops && ops->update) | |
852 ops->update(gaimbuddylist, (GaimBlistNode *)contact); | |
853 | |
854 for(bnode = ((GaimBlistNode *)contact)->child; bnode != NULL; bnode = bnode->next) | |
855 { | |
856 GaimBuddy *buddy = (GaimBuddy *)bnode; | |
857 | |
858 conv = gaim_find_conversation_with_account(GAIM_CONV_TYPE_IM, buddy->name, | |
859 buddy->account); | |
860 if (conv) | |
861 gaim_conversation_autoset_title(conv); | |
862 } | |
863 | |
864 gaim_signal_emit(gaim_blist_get_handle(), "blist-node-aliased", | |
865 contact, old_alias); | |
866 g_free(old_alias); | |
867 } | |
868 | |
835 void gaim_blist_alias_chat(GaimChat *chat, const char *alias) | 869 void gaim_blist_alias_chat(GaimChat *chat, const char *alias) |
836 { | 870 { |
837 GaimBlistUiOps *ops = gaimbuddylist->ui_ops; | 871 GaimBlistUiOps *ops = gaimbuddylist->ui_ops; |
838 char *old_alias = chat->alias; | 872 char *old_alias = chat->alias; |
839 | 873 |