Mercurial > pidgin.yaz
changeset 30040:fdeb9a9543ce
merged with im.pidgin.pidgin
author | Yoshiki Yazawa <yaz@honeyplanet.jp> |
---|---|
date | Thu, 25 Mar 2010 18:03:55 +0900 |
parents | f988f25259c7 (current diff) 9bc297399b98 (diff) |
children | 70b0f46f2966 |
files | libpurple/protocols/msn/README pidgin/gtkblist.c |
diffstat | 5 files changed, 35 insertions(+), 60 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Wed Mar 24 17:44:40 2010 +0900 +++ b/ChangeLog Thu Mar 25 18:03:55 2010 +0900 @@ -28,6 +28,8 @@ * Default binding of Ctrl+Shift+v to 'Paste as Plain Text' in conversation windows. This can be changed in .gtkrc-2.0. For example, Ctrl+v can be bound to 'Paste as Plain Text' by default. + * Plugins can now handle markup in buddy names by attaching to the signal + "drawing-buddy". Bonjour: * Added support for IPv6. (Thanks to T_X for testing)
--- a/ChangeLog.API Wed Mar 24 17:44:40 2010 +0900 +++ b/ChangeLog.API Thu Mar 25 18:03:55 2010 +0900 @@ -32,6 +32,7 @@ * pidgin_dialogs_translators (should not be used by anything but Pidgin) * gtk_imhtmltoolbar_switch_active_conversation * 'paste' signal for GtkIMHtml (more in gtkimhtml-signals.dox) + * 'drawing-buddy' signal for gtkblist (more in gtkblist-signals.dox) version 2.6.6 (02/18/2010): libpurple:
--- a/doc/gtkblist-signals.dox Wed Mar 24 17:44:40 2010 +0900 +++ b/doc/gtkblist-signals.dox Thu Mar 25 18:03:55 2010 +0900 @@ -5,6 +5,7 @@ @signal gtkblist-unhiding @signal gtkblist-created @signal drawing-tooltip + @signal drawing-buddy @endsignals @see gtkblist.h @@ -53,5 +54,17 @@ @param full Whether we're doing a full tooltip for the priority buddy or a compact tooltip for a non-priority buddy. @endsignaldef + + @signaldef drawing-buddy + @signalproto +char *(*drawing-buddy)(PurpleBuddy *buddy); + @endsignalproto + @signaldesc + Emitted to allow plugins to handle markup within a buddy's name or to + override the default of no formatting for names shown in the buddy list. + @param buddy A pointer to the PurpleBuddy that will be displayed. + @return The text to display (must be allocated), or @c NULL if no + changes to the default behavior are desired. + @endsignaldef */ // vim: syntax=c.doxygen tw=75 et
--- a/libpurple/protocols/msn/README Wed Mar 24 17:44:40 2010 +0900 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,55 +0,0 @@ -MSNP14 Implementation -by Ma Yuan<mayuan2006@gmail.com> - -1. Introduction -------------- - -MSNP14 Protocol, proposed by Windows Live Messenger, is new, and there is no available implementation except the official one on Windows Platform. - -It has introduced many new features attractable to many users, such as: -* Offline Instant Message - You can send the offline Message to the offline User, - The message will be posted to that user the next time when he is online. - -* Communicate with Yahoo User - U can chat with the Yahoo User in MSN, That's Fantastic! Till now , - you can send text/Nudge to Yahoo User. - -* Windows Live ID authentition - WLM use the Window Live ID Authentication process,Known as Passport 3.0, - The procedure is totally different to the previous Passport 2.0 - -* Video/Audio Conversation - U can communicate with other's via Video/Audio. -(Though very interesting, not implemented in this version) - -2.New Features Added ------------------ - -Till now, This project has implemented the following Feature: -* Windows Live ID authentication. - -* Offline Instant Message -Now can send and receive the Offline Instant Message to MSN user and Yahoo User. - -*contact management -Can add/delete Contact -Can add/delete Group - -* Communicate with Yahoo User -Can send/receive Message/Nudge to Yahoo User. - -*. Changes to made to fit MSNP14 Protocol - -3. Reference -------------- - -The very useful sites of MSN Protocol: -MSNpiki site: -reverse engineer of MSN Protocol.up to dated. -http://msnpiki.msnfanatic.com/index.php/MSN_Protocol_Version_13 - -hypothetic site: -old MSN Protocol Introduction,but very useful for basic idea of MSN protocol -http://www.hypothetic.org/docs/msn/index.php -
--- a/pidgin/gtkblist.c Wed Mar 24 17:44:40 2010 +0900 +++ b/pidgin/gtkblist.c Thu Mar 25 18:03:55 2010 +0900 @@ -4277,7 +4277,12 @@ else name = purple_buddy_get_alias(b); - nametext = g_markup_escape_text(name, strlen(name)); + /* Raise a contact pre-draw signal here. THe callback will return an + * escaped version of the name. */ + nametext = purple_signal_emit_return_1(pidgin_blist_get_handle(), "drawing-buddy", b); + + if(!nametext) + nametext = g_markup_escape_text(name, strlen(name)); presence = purple_buddy_get_presence(b); @@ -7601,10 +7606,19 @@ purple_value_new_outgoing(PURPLE_TYPE_BOXED, "GString *"), purple_value_new(PURPLE_TYPE_BOOLEAN)); - - purple_signal_connect(purple_blist_get_handle(), "buddy-signed-on", gtk_blist_handle, PURPLE_CALLBACK(buddy_signonoff_cb), NULL); - purple_signal_connect(purple_blist_get_handle(), "buddy-signed-off", gtk_blist_handle, PURPLE_CALLBACK(buddy_signonoff_cb), NULL); - purple_signal_connect(purple_blist_get_handle(), "buddy-privacy-changed", gtk_blist_handle, PURPLE_CALLBACK(pidgin_blist_update_privacy_cb), NULL); + purple_signal_register(gtk_blist_handle, "drawing-buddy", + purple_marshal_POINTER__POINTER, + purple_value_new(PURPLE_TYPE_STRING), 1, + purple_value_new(PURPLE_TYPE_SUBTYPE, + PURPLE_SUBTYPE_BLIST_BUDDY)); + + purple_signal_connect(purple_blist_get_handle(), "buddy-signed-on", + gtk_blist_handle, PURPLE_CALLBACK(buddy_signonoff_cb), NULL); + purple_signal_connect(purple_blist_get_handle(), "buddy-signed-off", + gtk_blist_handle, PURPLE_CALLBACK(buddy_signonoff_cb), NULL); + purple_signal_connect(purple_blist_get_handle(), "buddy-privacy-changed", + gtk_blist_handle, PURPLE_CALLBACK(pidgin_blist_update_privacy_cb), NULL); + } void