diff src/protocols/oscar/oscar.c @ 9620:c001be3c330e

[gaim-migrate @ 10464] Changes to those get_alias functions in blist.c from Christopher (siege) O'Brien: Renames gaim_get_buddy_alias to gaim_buddy_get_alias Renames gaim_get_buddy_alias_only to _gaim_buddy_get_alias_only Adds function gaim_buddy_get_contact_alias, which looks up a buddy's appropriate display name by order of: buddy alias; contact alias; server alias; buddy name. Note that the buddy alias is still the top-priority. Changed conversation.c to use _get_contact_alias rather than _get_alias The end result of this is that aliasing the contact will result in conversations with any of that contact's buddies using the contact alias. This allows people like myself to no longer have to alias each buddy to the same alias in order to achieve the same effect. committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Sat, 31 Jul 2004 21:29:40 +0000
parents 7541a9bee2cd
children 3ec0b63d4f2e
line wrap: on
line diff
--- a/src/protocols/oscar/oscar.c	Sat Jul 31 20:48:03 2004 +0000
+++ b/src/protocols/oscar/oscar.c	Sat Jul 31 21:29:40 2004 +0000
@@ -3341,7 +3341,7 @@
 					   buddy->name, group->name);
 			aim_ssi_sendauthrequest(od->sess, data->name, msg ? msg : _("Please authorize me so I can add you to my buddy list."));
 			if (!aim_ssi_itemlist_finditem(od->sess->ssi.local, group->name, buddy->name, AIM_SSI_TYPE_BUDDY))
-				aim_ssi_addbuddy(od->sess, buddy->name, group->name, gaim_get_buddy_alias_only(buddy), NULL, NULL, 1);
+				aim_ssi_addbuddy(od->sess, buddy->name, group->name, gaim_buddy_get_alias_only(buddy), NULL, NULL, 1);
 		}
 	}
 }
@@ -3373,8 +3373,8 @@
 	gchar *dialog_msg, *nombre;
 
 	buddy = gaim_find_buddy(gc->account, name);
-	if (buddy && (gaim_get_buddy_alias_only(buddy)))
-		nombre = g_strdup_printf("%s (%s)", name, gaim_get_buddy_alias_only(buddy));
+	if (buddy && (gaim_buddy_get_alias_only(buddy)))
+		nombre = g_strdup_printf("%s (%s)", name, gaim_buddy_get_alias_only(buddy));
 	else
 		nombre = NULL;
 
@@ -3417,7 +3417,7 @@
 		message = 0;
 		buddy = gaim_find_buddy(gc->account, data->name);
 		aim_im_sendch4(od->sess, data->name, AIM_ICQMSG_AUTHGRANTED, &message);
-		gaim_account_notify_added(gc->account, NULL, data->name, (buddy ? gaim_get_buddy_alias_only(buddy) : NULL), NULL);
+		gaim_account_notify_added(gc->account, NULL, data->name, (buddy ? gaim_buddy_get_alias_only(buddy) : NULL), NULL);
 #else
 		aim_ssi_sendauthreply(od->sess, data->name, 0x01, NULL);
 #endif
@@ -4906,7 +4906,7 @@
 		g_string_append_printf(str, "\n<hr>\n");
 	}
 
-	primary = g_strdup_printf(_("ICQ Info for %s"), gaim_get_buddy_alias(buddy));
+	primary = g_strdup_printf(_("ICQ Info for %s"), gaim_buddy_get_alias(buddy));
 	gaim_notify_formatted(gc, NULL, primary, NULL, str->str, NULL, NULL);
 	g_free(primary);
 	g_string_free(str, TRUE);
@@ -5532,7 +5532,7 @@
 		if (buddy && group) {
 			gaim_debug_info("oscar",
 					   "ssi: adding buddy %s to group %s\n", buddy->name, group->name);
-			aim_ssi_addbuddy(od->sess, buddy->name, group->name, gaim_get_buddy_alias_only(buddy), NULL, NULL, 0);
+			aim_ssi_addbuddy(od->sess, buddy->name, group->name, gaim_buddy_get_alias_only(buddy), NULL, NULL, 0);
 		}
 	}
 #endif
@@ -6053,8 +6053,8 @@
 			   "ssi: %s has given you permission to add him to your buddy list\n", sn);
 
 	buddy = gaim_find_buddy(gc->account, sn);
-	if (buddy && (gaim_get_buddy_alias_only(buddy)))
-		nombre = g_strdup_printf("%s (%s)", sn, gaim_get_buddy_alias_only(buddy));
+	if (buddy && (gaim_buddy_get_alias_only(buddy)))
+		nombre = g_strdup_printf("%s (%s)", sn, gaim_buddy_get_alias_only(buddy));
 	else
 		nombre = g_strdup(sn);
 
@@ -6092,8 +6092,8 @@
 			   "ssi: received authorization request from %s\n", sn);
 
 	buddy = gaim_find_buddy(gc->account, sn);
-	if (buddy && (gaim_get_buddy_alias_only(buddy)))
-		nombre = g_strdup_printf("%s (%s)", sn, gaim_get_buddy_alias_only(buddy));
+	if (buddy && (gaim_buddy_get_alias_only(buddy)))
+		nombre = g_strdup_printf("%s (%s)", sn, gaim_buddy_get_alias_only(buddy));
 	else
 		nombre = g_strdup(sn);
 
@@ -6132,8 +6132,8 @@
 			   "ssi: received authorization reply from %s.  Reply is 0x%04hhx\n", sn, reply);
 
 	buddy = gaim_find_buddy(gc->account, sn);
-	if (buddy && (gaim_get_buddy_alias_only(buddy)))
-		nombre = g_strdup_printf("%s (%s)", sn, gaim_get_buddy_alias_only(buddy));
+	if (buddy && (gaim_buddy_get_alias_only(buddy)))
+		nombre = g_strdup_printf("%s (%s)", sn, gaim_buddy_get_alias_only(buddy));
 	else
 		nombre = g_strdup(sn);
 
@@ -6165,7 +6165,7 @@
 	buddy = gaim_find_buddy(gc->account, sn);
 	gaim_debug_info("oscar",
 			   "ssi: %s added you to their buddy list\n", sn);
-	gaim_account_notify_added(gc->account, NULL, sn, (buddy ? gaim_get_buddy_alias_only(buddy) : NULL), NULL);
+	gaim_account_notify_added(gc->account, NULL, sn, (buddy ? gaim_buddy_get_alias_only(buddy) : NULL), NULL);
 
 	return 1;
 }
@@ -6912,8 +6912,8 @@
 				if(!GAIM_BLIST_NODE_IS_BUDDY(bnode))
 					continue;
 				if (buddy->account == gc->account && aim_ssi_waitingforauth(od->sess->ssi.local, group->name, buddy->name)) {
-					if (gaim_get_buddy_alias_only(buddy))
-						nombre = g_strdup_printf(" %s (%s)", buddy->name, gaim_get_buddy_alias_only(buddy));
+					if (gaim_buddy_get_alias_only(buddy))
+						nombre = g_strdup_printf(" %s (%s)", buddy->name, gaim_buddy_get_alias_only(buddy));
 					else
 						nombre = g_strdup_printf(" %s", buddy->name);
 					tmp = g_strdup_printf("%s%s<br>", text, nombre);