# HG changeset patch # User Mike Ruprecht # Date 1233309001 0 # Node ID e6d548856fcdfe2f7348063cad2db203131e349f # Parent f95aa2b14bec34ae68b43ab619051574b197c20e Use aliases for the media window title and the request window. Thanks to Marcus Lundblad for reminding me of this and practically giving me the code to copy/paste. diff -r f95aa2b14bec -r e6d548856fcd pidgin/gtkmedia.c --- a/pidgin/gtkmedia.c Fri Jan 30 08:58:07 2009 +0000 +++ b/pidgin/gtkmedia.c Fri Jan 30 09:50:01 2009 +0000 @@ -641,8 +641,6 @@ if (media->priv->screenname) g_free(media->priv->screenname); media->priv->screenname = g_value_dup_string(value); - gtk_window_set_title(GTK_WINDOW(media), - media->priv->screenname); break; case PROP_SEND_LEVEL: if (media->priv->send_level) @@ -733,12 +731,17 @@ PidginMedia *gtkmedia = PIDGIN_MEDIA( pidgin_media_new(media, screenname)); gboolean initiator; + PurpleBuddy *buddy = purple_find_buddy( + purple_connection_get_account(pc), screenname); + const gchar *alias = buddy ? + purple_buddy_get_contact_alias(buddy) : screenname; gtkmedia->priv->pc = pc; + gtk_window_set_title(GTK_WINDOW(gtkmedia), alias); g_object_get(G_OBJECT(media), "initiator", &initiator, NULL); if (initiator == FALSE) { gchar *message = g_strdup_printf("%s wishes to start a " - "media session with you\n", screenname); + "media session with you\n", alias); purple_request_accept_cancel(media, "Media invitation", message, NULL, 1, (void*)pc, screenname, NULL, media, purple_media_accept,