# HG changeset patch # User Richard Laager # Date 1219266601 0 # Node ID 13ca254ea7db6a11dbc23825db4eb56aa739a2ad # Parent 9f1d3db77fc37b1b58493c17b5a087985397fe1d In the Join/Part plugin, add the ability to apply the rules to buddies. By default, joins and parts for buddies are still shown. diff -r 9f1d3db77fc3 -r 13ca254ea7db ChangeLog --- a/ChangeLog Wed Aug 20 21:09:50 2008 +0000 +++ b/ChangeLog Wed Aug 20 21:10:01 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 diff -r 9f1d3db77fc3 -r 13ca254ea7db libpurple/plugins/joinpart.c --- a/libpurple/plugins/joinpart.c Wed Aug 20 21:09:50 2008 +0000 +++ b/libpurple/plugins/joinpart.c Wed Aug 20 21:10:01 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)