changeset 30726:8e765543dc8b

Don't hardcode "Pidgin" as the name of this endpoint. Instead, grab the name supplied by the UI. If no name was supplied then fall back to the PACKAGE #define.
author Mark Doliner <mark@kingant.net>
date Thu, 22 Apr 2010 21:04:29 +0000
parents de59c181e6aa
children e167de25e795
files libpurple/protocols/msn/msn.c
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/msn/msn.c	Thu Apr 22 20:51:24 2010 +0000
+++ b/libpurple/protocols/msn/msn.c	Thu Apr 22 21:04:29 2010 +0000
@@ -1202,7 +1202,10 @@
 	purple_connection_set_display_name(gc, username);
 
 	if (purple_account_get_string(account, "endpoint-name", NULL) == NULL) {
-		purple_account_set_string(account, "endpoint-name", "Pidgin");
+		GHashTable *ui_info = purple_core_get_ui_info();
+		const gchar *ui_name = ui_info ? g_hash_table_lookup(ui_info, "name") : NULL;
+		purple_account_set_string(account, "endpoint-name",
+				ui_name && *ui_name ? ui_name : PACKAGE_NAME);
 	}
 
 	if (!msn_session_connect(session, host, port, http_method))