changeset 23948:0943e9c59a18

merge of '43173262756f7a4040386ac05c0492431fa3c308' and '710f38b975eaf7565ddfa8389153489ce33c6d31'
author Mark Doliner <mark@kingant.net>
date Thu, 21 Aug 2008 21:08:13 +0000
parents 209da0d52824 (current diff) 60de5d1ee482 (diff)
children ced4e7f27ff6
files pidgin/pixmaps/emotes/default/24/scalable/act-up.svg pidgin/pixmaps/emotes/default/24/scalable/alien.svg pidgin/pixmaps/emotes/default/24/scalable/angel.svg pidgin/pixmaps/emotes/default/24/scalable/angry.svg pidgin/pixmaps/emotes/default/24/scalable/arrogant.svg pidgin/pixmaps/emotes/default/24/scalable/at-wits-end.svg pidgin/pixmaps/emotes/default/24/scalable/bashful.svg pidgin/pixmaps/emotes/default/24/scalable/beat-up.svg pidgin/pixmaps/emotes/default/24/scalable/beauty.svg pidgin/pixmaps/emotes/default/24/scalable/blowkiss.svg pidgin/pixmaps/emotes/default/24/scalable/bulgy-eyes.svg pidgin/pixmaps/emotes/default/24/scalable/bye.svg pidgin/pixmaps/emotes/default/24/scalable/call-me.svg pidgin/pixmaps/emotes/default/24/scalable/clap.svg pidgin/pixmaps/emotes/default/24/scalable/confused.svg pidgin/pixmaps/emotes/default/24/scalable/cowboy.svg pidgin/pixmaps/emotes/default/24/scalable/crying.svg pidgin/pixmaps/emotes/default/24/scalable/curl-lip.svg pidgin/pixmaps/emotes/default/24/scalable/curse.svg pidgin/pixmaps/emotes/default/24/scalable/cute.svg pidgin/pixmaps/emotes/default/24/scalable/cyclops.svg pidgin/pixmaps/emotes/default/24/scalable/dance.svg pidgin/pixmaps/emotes/default/24/scalable/desire.svg pidgin/pixmaps/emotes/default/24/scalable/devil.svg pidgin/pixmaps/emotes/default/24/scalable/disappointed.svg pidgin/pixmaps/emotes/default/24/scalable/disdain.svg pidgin/pixmaps/emotes/default/24/scalable/doctor.svg pidgin/pixmaps/emotes/default/24/scalable/doh.svg pidgin/pixmaps/emotes/default/24/scalable/dont-know.svg pidgin/pixmaps/emotes/default/24/scalable/drool.svg pidgin/pixmaps/emotes/default/24/scalable/eat.svg pidgin/pixmaps/emotes/default/24/scalable/embarrassed.svg pidgin/pixmaps/emotes/default/24/scalable/excruciating.svg pidgin/pixmaps/emotes/default/24/scalable/eyeroll.svg pidgin/pixmaps/emotes/default/24/scalable/female-fighter.svg pidgin/pixmaps/emotes/default/24/scalable/fingers-crossed.svg pidgin/pixmaps/emotes/default/24/scalable/foot-in-mouth.svg pidgin/pixmaps/emotes/default/24/scalable/freaked-out.svg pidgin/pixmaps/emotes/default/24/scalable/giggle.svg pidgin/pixmaps/emotes/default/24/scalable/glasses-cool.svg pidgin/pixmaps/emotes/default/24/scalable/glasses-nerdy.svg pidgin/pixmaps/emotes/default/24/scalable/go-away.svg pidgin/pixmaps/emotes/default/24/scalable/handshake.svg pidgin/pixmaps/emotes/default/24/scalable/highfive.svg pidgin/pixmaps/emotes/default/24/scalable/hug-left.svg pidgin/pixmaps/emotes/default/24/scalable/hug-right.svg pidgin/pixmaps/emotes/default/24/scalable/hypnotized.svg pidgin/pixmaps/emotes/default/24/scalable/in-love.svg pidgin/pixmaps/emotes/default/24/scalable/jump.svg pidgin/pixmaps/emotes/default/24/scalable/kiss.svg pidgin/pixmaps/emotes/default/24/scalable/kissed.svg pidgin/pixmaps/emotes/default/24/scalable/kissing.svg pidgin/pixmaps/emotes/default/24/scalable/lashes.svg pidgin/pixmaps/emotes/default/24/scalable/laugh.svg pidgin/pixmaps/emotes/default/24/scalable/lying.svg pidgin/pixmaps/emotes/default/24/scalable/madtongue.svg pidgin/pixmaps/emotes/default/24/scalable/male-fighter2.svg pidgin/pixmaps/emotes/default/24/scalable/mean.svg pidgin/pixmaps/emotes/default/24/scalable/meeting.svg pidgin/pixmaps/emotes/default/24/scalable/messed.svg pidgin/pixmaps/emotes/default/24/scalable/mohawk.svg pidgin/pixmaps/emotes/default/24/scalable/moneymouth.svg pidgin/pixmaps/emotes/default/24/scalable/music.svg pidgin/pixmaps/emotes/default/24/scalable/nailbiting.svg pidgin/pixmaps/emotes/default/24/scalable/neutral.svg pidgin/pixmaps/emotes/default/24/scalable/on-the-phone.svg pidgin/pixmaps/emotes/default/24/scalable/party.svg pidgin/pixmaps/emotes/default/24/scalable/pirate.svg pidgin/pixmaps/emotes/default/24/scalable/pissed-off.svg pidgin/pixmaps/emotes/default/24/scalable/pray.svg pidgin/pixmaps/emotes/default/24/scalable/question.svg pidgin/pixmaps/emotes/default/24/scalable/quiet.svg pidgin/pixmaps/emotes/default/24/scalable/rotfl.svg pidgin/pixmaps/emotes/default/24/scalable/sad.svg pidgin/pixmaps/emotes/default/24/scalable/sarcastic.svg pidgin/pixmaps/emotes/default/24/scalable/secret.svg pidgin/pixmaps/emotes/default/24/scalable/shame.svg pidgin/pixmaps/emotes/default/24/scalable/shock.svg pidgin/pixmaps/emotes/default/24/scalable/shut-mouth.svg pidgin/pixmaps/emotes/default/24/scalable/sick.svg pidgin/pixmaps/emotes/default/24/scalable/sidefrown.svg pidgin/pixmaps/emotes/default/24/scalable/silly.svg pidgin/pixmaps/emotes/default/24/scalable/sinister.svg pidgin/pixmaps/emotes/default/24/scalable/skywalker.svg pidgin/pixmaps/emotes/default/24/scalable/sleepy.svg pidgin/pixmaps/emotes/default/24/scalable/smile-big.svg pidgin/pixmaps/emotes/default/24/scalable/smile.svg pidgin/pixmaps/emotes/default/24/scalable/smirk.svg pidgin/pixmaps/emotes/default/24/scalable/soldier.svg pidgin/pixmaps/emotes/default/24/scalable/starving.svg pidgin/pixmaps/emotes/default/24/scalable/stop.svg pidgin/pixmaps/emotes/default/24/scalable/struggle.svg pidgin/pixmaps/emotes/default/24/scalable/sweat.svg pidgin/pixmaps/emotes/default/24/scalable/talktohand.svg pidgin/pixmaps/emotes/default/24/scalable/terror.svg pidgin/pixmaps/emotes/default/24/scalable/thinking.svg pidgin/pixmaps/emotes/default/24/scalable/time-out.svg pidgin/pixmaps/emotes/default/24/scalable/tongue.svg pidgin/pixmaps/emotes/default/24/scalable/tremble.svg pidgin/pixmaps/emotes/default/24/scalable/vampire.svg pidgin/pixmaps/emotes/default/24/scalable/victory.svg pidgin/pixmaps/emotes/default/24/scalable/waiting.svg pidgin/pixmaps/emotes/default/24/scalable/waving.svg pidgin/pixmaps/emotes/default/24/scalable/weep.svg pidgin/pixmaps/emotes/default/24/scalable/wilt.svg pidgin/pixmaps/emotes/default/24/scalable/wink.svg pidgin/pixmaps/emotes/default/24/scalable/worship.svg pidgin/pixmaps/emotes/default/24/scalable/yawn.svg
diffstat 5 files changed, 63 insertions(+), 22 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Thu Aug 21 20:52:51 2008 +0000
+++ b/ChangeLog	Thu Aug 21 21:08:13 2008 +0000
@@ -1,5 +1,10 @@
 Pidgin and Finch: The Pimpin' Penguin IM Clients That're Good for the Soul
 
+version 2.5.1 (??/??/????):
+	libpurple:
+	* In the Join/Part plugin, add the ability to apply the rules to
+	  buddies.  By default, joins and parts for buddies are still shown.
+
 version 2.5.0 (08/18/2008):
 	libpurple:
 	* Ability to create custom smileys (currently only the MSN protocol
--- a/configure.ac	Thu Aug 21 20:52:51 2008 +0000
+++ b/configure.ac	Thu Aug 21 21:08:13 2008 +0000
@@ -46,8 +46,8 @@
 m4_define([purple_lt_current], [5])
 m4_define([purple_major_version], [2])
 m4_define([purple_minor_version], [5])
-m4_define([purple_micro_version], [0])
-m4_define([purple_version_suffix], [])
+m4_define([purple_micro_version], [1])
+m4_define([purple_version_suffix], [devel])
 m4_define([purple_version],
           [purple_major_version.purple_minor_version.purple_micro_version])
 m4_define([purple_display_version], purple_version[]m4_ifdef([purple_version_suffix],[purple_version_suffix]))
@@ -55,8 +55,8 @@
 m4_define([gnt_lt_current], [5])
 m4_define([gnt_major_version], [2])
 m4_define([gnt_minor_version], [5])
-m4_define([gnt_micro_version], [0])
-m4_define([gnt_version_suffix], [])
+m4_define([gnt_micro_version], [1])
+m4_define([gnt_version_suffix], [devel])
 m4_define([gnt_version],
           [gnt_major_version.gnt_minor_version.gnt_micro_version])
 m4_define([gnt_display_version], gnt_version[]m4_ifdef([gnt_version_suffix],[gnt_version_suffix]))
--- a/libpurple/plugins/joinpart.c	Thu Aug 21 20:52:51 2008 +0000
+++ b/libpurple/plugins/joinpart.c	Thu Aug 21 21:08:13 2008 +0000
@@ -41,6 +41,10 @@
 #define THRESHOLD_PREF "/plugins/core/joinpart/threshold"
 #define THRESHOLD_DEFAULT 20
 
+/* Hide buddies */
+#define HIDE_BUDDIES_PREF "/plugins/core/joinpart/hide_buddies"
+#define HIDE_BUDDIES_DEFAULT FALSE
+
 struct joinpart_key
 {
 	PurpleConversation *conv;
@@ -89,8 +93,8 @@
 	if (g_list_length(purple_conv_chat_get_users(chat)) < threshold)
 		return FALSE;
 
-	/* We always care about our buddies! */
-	if (purple_find_buddy(purple_conversation_get_account(conv), name))
+	if (!purple_prefs_get_bool(HIDE_BUDDIES_PREF) &&
+	    purple_find_buddy(purple_conversation_get_account(conv), name))
 		return FALSE;
 
 	/* Only show the notice if the user has spoken recently. */
@@ -233,12 +237,15 @@
 	purple_plugin_pref_set_bounds(ppref, 0, 1000);
 	purple_plugin_pref_frame_add(frame, ppref);
 
-
 	ppref = purple_plugin_pref_new_with_name_and_label(DELAY_PREF,
 	                                                 _("User Inactivity Timeout (in minutes)"));
 	purple_plugin_pref_set_bounds(ppref, 0, 8 * 60); /* 8 Hours */
 	purple_plugin_pref_frame_add(frame, ppref);
 
+	ppref = purple_plugin_pref_new_with_name_and_label(HIDE_BUDDIES_PREF,
+	                                                 _("Apply hiding rules to buddies"));
+	purple_plugin_pref_frame_add(frame, ppref);
+
 	return frame;
 }
 
@@ -300,6 +307,7 @@
 
 	purple_prefs_add_int(DELAY_PREF, DELAY_DEFAULT);
 	purple_prefs_add_int(THRESHOLD_PREF, THRESHOLD_DEFAULT);
+	purple_prefs_add_bool(HIDE_BUDDIES_PREF, HIDE_BUDDIES_DEFAULT);
 }
 
 PURPLE_INIT_PLUGIN(joinpart, init_plugin, info)
--- a/libpurple/protocols/msn/notification.c	Thu Aug 21 20:52:51 2008 +0000
+++ b/libpurple/protocols/msn/notification.c	Thu Aug 21 21:08:13 2008 +0000
@@ -613,13 +613,16 @@
 	xmlnode_set_attrib(adl_node, "l", "1");
 
 	/*get the userlist*/
-	for (l = session->userlist->users; l != NULL; l = l->next){
+	for (l = session->userlist->users; l != NULL; l = l->next) {
 		user = l->data;
 
 		/* skip RL & PL during initial dump */
 		if (!(user->list_op & MSN_LIST_OP_MASK))
 			continue;
 
+		if (!strcmp(user->passport, "messenger@microsoft.com"))
+			continue;
+
 		msn_add_contact_xml(session, adl_node, user->passport,
 			user->list_op & MSN_LIST_OP_MASK, user->networkid);
 
@@ -947,10 +950,11 @@
 	PurpleAccount *account;
 	PurpleConnection *gc;
 	MsnUser *user;
-	MsnObject *msnobj;
+	MsnObject *msnobj = NULL;
 	unsigned long clientid;
-	int networkid;
-	const char *state, *passport, *friendly;
+	int networkid = 0;
+	const char *state, *passport;
+	char *friendly;
 
 	session = cmdproc->session;
 	account = session->account;
@@ -958,23 +962,47 @@
 
 	state    = cmd->params[1];
 	passport = cmd->params[2];
-	/*if a contact is actually on the WLM part or the yahoo part*/
-	networkid = atoi(cmd->params[3]);
-	friendly = purple_url_decode(cmd->params[4]);
 
 	user = msn_userlist_find_user(session->userlist, passport);
+	if (user == NULL)
+		/* Where'd this come from? */
+		return;
+
+	if (cmd->param_count == 7) {
+		/* MSNP14+ with Display Picture object */
+		networkid = atoi(cmd->params[3]);
+		friendly = g_strdup(purple_url_decode(cmd->params[4]));
+		clientid = strtoul(cmd->params[5], NULL, 10);
+		msnobj = msn_object_new_from_string(purple_url_decode(cmd->params[6]));
+	} else if (cmd->param_count == 6) {
+		/* Yes, this is 5. The friendly name could start with a number,
+		   but the display picture object can't... */
+		if (isdigit(cmd->params[5][0])) {
+			/* MSNP14 without Display Picture object */
+			networkid = atoi(cmd->params[3]);
+			friendly = g_strdup(purple_url_decode(cmd->params[4]));
+			clientid = strtoul(cmd->params[5], NULL, 10);
+		} else {
+			/* MSNP8+ with Display Picture object */
+			friendly = g_strdup(purple_url_decode(cmd->params[3]));
+			clientid = strtoul(cmd->params[4], NULL, 10);
+			msnobj = msn_object_new_from_string(purple_url_decode(cmd->params[5]));
+		}
+	} else if (cmd->param_count == 5) {
+		/* MSNP8+ without Display Picture object */
+		friendly = g_strdup(purple_url_decode(cmd->params[3]));
+		clientid = strtoul(cmd->params[4], NULL, 10);
+	} else {
+		purple_debug_warning("msn", "Received ILN with unknown number of parameters.\n");
+		return;
+	}
 
 	serv_got_alias(gc, passport, friendly);
-
 	msn_user_set_friendly_name(user, friendly);
+	g_free(friendly);
 
-	if (cmd->param_count == 7)
-	{
-		msnobj = msn_object_new_from_string(purple_url_decode(cmd->params[6]));
-		msn_user_set_object(user, msnobj);
-	}
+	msn_user_set_object(user, msnobj);
 
-	clientid = strtoul(cmd->params[5], NULL, 10);
 	user->mobile = (clientid & MSN_CLIENT_CAP_MSNMOBILE) || (user->phone.mobile && user->phone.mobile[0] == '+');
 	msn_user_set_clientid(user, clientid);
 	msn_user_set_network(user, networkid);
--- a/pidgin/gtkaccount.c	Thu Aug 21 20:52:51 2008 +0000
+++ b/pidgin/gtkaccount.c	Thu Aug 21 21:08:13 2008 +0000
@@ -2159,7 +2159,7 @@
 						 "press <b>Add</b> again to configure them all.\n\n"
 
 						 "You can come back to this window to add, edit, or remove "
-						 "accounts from <b>Accounts->Add/Edit</b> in the Buddy "
+						 "accounts from <b>Accounts->Manage Accounts</b> in the Buddy "
 						 "List window"), PIDGIN_NAME, PIDGIN_NAME, PIDGIN_NAME);
 	pretty = pidgin_make_pretty_arrows(tmp);
 	g_free(tmp);