1 # msnplus_patch.patch by daniele_athome, jgoguen
2 # Taken from http://developer.pidgin.im/ticket/4598
3 # Allows to activate Plus! plugin, to show colored nicks with MSN Plus! Tags
5 --- ./pidgin/gtkblist.c 2009-06-16 10:54:35.000000000 +0200
6 +++ ./pidgin/gtkblist.c 2009-06-18 16:37:38.000000000 +0200
8 PurplePresence *presence;
9 struct _pidgin_blist_node *gtkcontactnode = NULL;
10 char *idletime = NULL, *statustext = NULL, *nametext = NULL;
12 PurpleConversation *conv = find_conversation_with_buddy(b);
13 gboolean hidden_conv = FALSE;
14 gboolean biglist = purple_prefs_get_bool(PIDGIN_PREFS_ROOT "/blist/show_buddy_icons");
15 @@ -4039,8 +4040,22 @@
17 name = purple_buddy_get_alias(b);
19 - nametext = g_markup_escape_text(name, strlen(name));
21 + /* Raise a contact pre-draw signal here. The callback will return an already
22 + * escaped version of name.
24 + ret = purple_signal_emit_return_1(pidgin_blist_get_handle(), "drawing-buddy", b);
27 + purple_debug_warning("gtkblist", "drawing-buddy signal returned \"%s\"\n", ret);
28 + nametext = g_strdup(ret);
32 + purple_debug_info("gtkblist", "using default escaped name\n");
33 + nametext = g_markup_escape_text(name, strlen(name));
37 presence = purple_buddy_get_presence(b);
39 /* Name is all that is needed */
40 @@ -7398,6 +7412,10 @@
41 purple_signal_connect(purple_blist_get_handle(), "buddy-signed-on", gtk_blist_handle, PURPLE_CALLBACK(buddy_signonoff_cb), NULL);
42 purple_signal_connect(purple_blist_get_handle(), "buddy-signed-off", gtk_blist_handle, PURPLE_CALLBACK(buddy_signonoff_cb), NULL);
43 purple_signal_connect(purple_blist_get_handle(), "buddy-privacy-changed", gtk_blist_handle, PURPLE_CALLBACK(pidgin_blist_update_privacy_cb), NULL);
44 + /* Signal for pre-markup buddy draw. */
45 + purple_signal_register(gtk_blist_handle, "drawing-buddy",
46 + purple_marshal_POINTER__POINTER_INT, purple_value_new(PURPLE_TYPE_STRING), 1,
47 + purple_value_new(PURPLE_TYPE_SUBTYPE, PURPLE_SUBTYPE_BLIST_BUDDY));