pidgin: 303f5453: In the Join/Part plugin, add the ability..

rlaager at pidgin.im rlaager at pidgin.im
Wed Aug 20 17:17:31 EDT 2008


-----------------------------------------------------------------
Revision: 303f54531000a45e354b49a4b13d135e551092ed
Ancestor: 7593fb28c6f2c07dc3ccd6d04e3480af65171158
Author: rlaager at pidgin.im
Date: 2008-08-20T21:10:01
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/303f54531000a45e354b49a4b13d135e551092ed

Modified files:
        ChangeLog libpurple/plugins/joinpart.c

ChangeLog: 

In the Join/Part plugin, add the ability to apply the rules to
buddies.  By default, joins and parts for buddies are still shown.

-------------- next part --------------
============================================================
--- ChangeLog	1aec78e5a34d020c603546baf47f657819b98f2c
+++ ChangeLog	18e10a4ed76e28bcd57230ef13c0ee22d0c595c5
@@ -1,5 +1,10 @@ Pidgin and Finch: The Pimpin' Penguin IM
 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
============================================================
--- libpurple/plugins/joinpart.c	4a66ac5df877da099ae88c03760bdbd7ab9300e2
+++ libpurple/plugins/joinpart.c	05c0e5ac8afef64171d2e1d44994fdec1914374e
@@ -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 @@ static gboolean should_hide_notice(Purpl
 	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 @@ get_plugin_pref_frame(PurplePlugin *plug
 	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 @@ init_plugin(PurplePlugin *plugin)
 
 	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)


More information about the Commits mailing list