Mercurial > pidgin
changeset 10349:655c48791b3c
[gaim-migrate @ 11563]
Removed "Use remote alias when no alias is set" Defaulted to:
Conversation titles: No
Conversation messages: Yes
Buddy list: Yes
I barely use MSN, and I use ICQ even less, so if someone thinks of better
defaults let me know. These seem to be the best for me.
The trick is that on MSN, the server alias usually is less helpful than the
screenname and on ICQ, it's more helpful. An alternative is to have the prpl
specify which to use, but that's dumb.
committer: Tailor Script <tailor@pidgin.im>
author | Sean Egan <seanegan@gmail.com> |
---|---|
date | Mon, 13 Dec 2004 00:52:07 +0000 |
parents | 64bc206c7473 |
children | d962fc7778f1 |
files | ChangeLog src/blist.c src/blist.h src/conversation.c src/gtkprefs.c src/prefs.c |
diffstat | 6 files changed, 35 insertions(+), 42 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Sun Dec 12 23:57:52 2004 +0000 +++ b/ChangeLog Mon Dec 13 00:52:07 2004 +0000 @@ -34,6 +34,7 @@ Made screenname colors automatically adjust themselves to compensate for background color. * Removed "Raise Buddy List Window on Events" defaulted to "No" + * Removed "Display remote nicknames if no alias is set" version 1.0.2 (10/19/2004): Bug Fixes:
--- a/src/blist.c Sun Dec 12 23:57:52 2004 +0000 +++ b/src/blist.c Mon Dec 13 00:52:07 2004 +0000 @@ -1431,9 +1431,8 @@ if ((c != NULL) && (c->alias != NULL)) return c->alias; - /* The server alias, if preferences say so */ - if ((buddy->server_alias) && (*buddy->server_alias) && - (gaim_prefs_get_bool("/core/buddies/use_server_alias"))) + /* The server alias */ + if ((buddy->server_alias) && (*buddy->server_alias)) return buddy->server_alias; /* The buddy's user name (i.e. no alias) */ @@ -1459,6 +1458,25 @@ return buddy->name; } +const char *gaim_buddy_get_local_alias(GaimBuddy *buddy) +{ + GaimContact *c; + + g_return_val_if_fail(buddy != NULL, NULL); + + /* Search for an alias for the buddy. In order of precedence: */ + /* The buddy alias */ + if (buddy->alias != NULL) + return buddy->alias; + + /* The contact alias */ + c = gaim_buddy_get_contact(buddy); + if ((c != NULL) && (c->alias != NULL)) + return c->alias; + + /* The buddy's user name (i.e. no alias) */ + return buddy->name; +} const char *gaim_chat_get_name(GaimChat *chat) {
--- a/src/blist.h Sun Dec 12 23:57:52 2004 +0000 +++ b/src/blist.h Mon Dec 13 00:52:07 2004 +0000 @@ -553,8 +553,8 @@ * Returns the alias of a buddy. * * @param buddy The buddy whose name will be returned. - * @return The alias (if set), server alias (if set and preference - * is to display server aliases), or NULL. + * @return The alias (if set), server alias (if set), + * or NULL. */ const char *gaim_buddy_get_alias_only(GaimBuddy *buddy); @@ -570,6 +570,15 @@ */ const char *gaim_buddy_get_contact_alias(GaimBuddy *buddy); +/** + * Returns the correct alias for this user, ignoring server aliases. Used + * when a user-recognizable name is required. In order: buddy's alias; buddy's + * contact alias; buddy's user name. + * + * @param buddy The buddy whose alias will be returned. + * @return The appropriate name or alias. + */ +const char *gaim_buddy_get_local_alias(GaimBuddy *buddy); /** * Returns the correct name to display for a buddy. In order of precedence: @@ -716,7 +725,6 @@ /** @name Buddy list file management API */ /****************************************************************************************/ -/*@{*/ /** * Parses the toc-style buddy list used in older versions of Gaim and for SSI in toc.c * @@ -732,12 +740,6 @@ void gaim_blist_load(); /** - * Force an immediate write of the buddy list. Normally the buddy list is - * saved automatically a few seconds after a change is made. - */ -void gaim_blist_sync(); - -/** * Requests from the user information needed to add a buddy to the * buddy list. *
--- a/src/conversation.c Sun Dec 12 23:57:52 2004 +0000 +++ b/src/conversation.c Mon Dec 13 00:52:07 2004 +0000 @@ -1134,7 +1134,7 @@ 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_buddy_get_contact_alias(b); + text = gaim_buddy_get_local_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; @@ -2734,14 +2734,6 @@ update_titles_pref_cb(const char *name, GaimPrefType type, gpointer value, gpointer data) { - /* - * If the use_server_alias option was changed, and use_alias_for_title - * is false, then we don't have to do anything here. - */ - if (!strcmp(name, "/core/buddies/use_server_alias") && - !gaim_prefs_get_bool("/core/conversations/use_alias_for_title")) - return; - gaim_conversation_foreach(gaim_conversation_autoset_title); } @@ -2789,9 +2781,6 @@ /* Connect callbacks for changed preferences */ gaim_prefs_connect_callback(handle, "/core/conversations/use_alias_for_title", update_titles_pref_cb, NULL); - gaim_prefs_connect_callback(handle, "/core/buddies/use_server_alias", - update_titles_pref_cb, NULL); - /********************************************************************** * Register signals
--- a/src/gtkprefs.c Sun Dec 12 23:57:52 2004 +0000 +++ b/src/gtkprefs.c Mon Dec 13 00:52:07 2004 +0000 @@ -388,23 +388,6 @@ } } -/* These are the pages in the preferences notebook */ -GtkWidget *interface_page() { - GtkWidget *ret; - GtkWidget *vbox; - ret = gtk_vbox_new(FALSE, 18); - gtk_container_set_border_width (GTK_CONTAINER (ret), 12); - - vbox = gaim_gtk_make_frame(ret, _("Interface Options")); - - gaim_gtk_prefs_checkbox(_("D_isplay remote nicknames if no alias is set"), - "/core/buddies/use_server_alias", vbox); - - - gtk_widget_show_all(ret); - return ret; -} - static void smiley_sel (GtkTreeSelection *sel, GtkTreeModel *model) { GtkTreeIter iter; const char *filename; @@ -2174,7 +2157,6 @@ GtkTreeIter p, c, c2; GList *l; GaimPlugin *plug; - prefs_notebook_add_page(_("Interface"), NULL, interface_page(), &p, NULL, notebook_page++); prefs_notebook_add_page(_("Buddy List"), NULL, list_page(), &c, &p, notebook_page++); prefs_notebook_add_page(_("Conversations"), NULL, conv_page(), &c, &p, notebook_page++); prefs_notebook_add_page(_("Message Text"), NULL, messages_page(), &c2, &c, notebook_page++);
--- a/src/prefs.c Sun Dec 12 23:57:52 2004 +0000 +++ b/src/prefs.c Mon Dec 13 00:52:07 2004 +0000 @@ -1031,4 +1031,5 @@ gaim_prefs_remove("/core/conversations/chat/show_join"); gaim_prefs_remove("/core/conversations/chat/show_leave"); gaim_prefs_remove("/core/conversations/combine_chat_im"); + gaim_prefs_remove("/core/buddies/use_server_alias"); }