changeset 31421:2a9327053398

Suppress the "View Locations..." protocol action on MSN if we are not actually using MSNP16 or newer
author Stu Tomlinson <stu@nosnilmot.com>
date Mon, 29 Nov 2010 01:12:51 +0000
parents 054309e46786
children 0d71d4695520
files libpurple/protocols/msn/msn.c
diffstat 1 files changed, 12 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/msn/msn.c	Sun Nov 28 08:22:09 2010 +0000
+++ b/libpurple/protocols/msn/msn.c	Mon Nov 29 01:12:51 2010 +0000
@@ -1188,18 +1188,26 @@
 static GList *
 msn_actions(PurplePlugin *plugin, gpointer context)
 {
+	PurpleConnection *gc;
+	MsnSession *session;
 	GList *m = NULL;
 	PurplePluginAction *act;
 
+	gc = (PurpleConnection *) context;
+	session = gc->proto_data;
+
 	act = purple_plugin_action_new(_("Set Friendly Name..."),
 								 msn_show_set_friendly_name);
 	m = g_list_append(m, act);
 	m = g_list_append(m, NULL);
 
-	act = purple_plugin_action_new(_("View Locations..."),
-	                               msn_show_locations);
-	m = g_list_append(m, act);
-	m = g_list_append(m, NULL);
+	if (session->protocol_ver >= 16)
+	{
+		act = purple_plugin_action_new(_("View Locations..."),
+		                               msn_show_locations);
+		m = g_list_append(m, act);
+		m = g_list_append(m, NULL);
+	}
 
 	act = purple_plugin_action_new(_("Set Home Phone Number..."),
 								 msn_show_set_home_phone);