cpw.qulogic.msnp16: 88964f99: Don't hardcode "Pidgin" as the name of t...

markdoliner at pidgin.im markdoliner at pidgin.im
Thu Apr 22 17:10:26 EDT 2010


-----------------------------------------------------------------
Revision: 88964f99b95fe1135b1333c82fdd404b40d71fa9
Ancestor: 7d1398bb3e419750c3e8b634439ca36b44772c17
Author: markdoliner at pidgin.im
Date: 2010-04-22T21:04:29
Branch: im.pidgin.cpw.qulogic.msnp16
URL: http://d.pidgin.im/viewmtn/revision/info/88964f99b95fe1135b1333c82fdd404b40d71fa9

Modified files:
        libpurple/protocols/msn/msn.c

ChangeLog: 

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.

-------------- next part --------------
============================================================
--- libpurple/protocols/msn/msn.c	a410686be0c33a4e09c2ef1d5887ed2c9cf26bcd
+++ libpurple/protocols/msn/msn.c	386bbc3ab193e203de23157163c296eacdd11702
@@ -1202,7 +1202,10 @@ msn_login(PurpleAccount *account)
 	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))


More information about the Commits mailing list