Mercurial > pidgin
changeset 23950:ced4e7f27ff6
merge of 'a3016031fd5b2669070b7d99b301874a29269f18'
and 'a4c334b8d35bb414e74cc95f9ca21465182136de'
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Thu, 21 Aug 2008 21:17:42 +0000 |
parents | 0943e9c59a18 (diff) e22adcf53a1d (current diff) |
children | a0ea445b99de |
files | |
diffstat | 5 files changed, 63 insertions(+), 22 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Thu Aug 21 21:06:37 2008 +0000 +++ b/ChangeLog Thu Aug 21 21:17:42 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 21:06:37 2008 +0000 +++ b/configure.ac Thu Aug 21 21:17:42 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 21:06:37 2008 +0000 +++ b/libpurple/plugins/joinpart.c Thu Aug 21 21:17:42 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 21:06:37 2008 +0000 +++ b/libpurple/protocols/msn/notification.c Thu Aug 21 21:17:42 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 21:06:37 2008 +0000 +++ b/pidgin/gtkaccount.c Thu Aug 21 21:17:42 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);