From: Luke S. <lsc...@us...> - 2004-08-20 22:05:41
|
Update of /cvsroot/gaim/gaim/src/protocols/zephyr In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8587/src/protocols/zephyr Modified Files: zephyr.c Log Message: "This patch adds gaim_notify_userinfo() and a notify_userinfo() UI callback. gaim_notify_userinfo() is much like gaim_notify_formatted() except that it always takes a GaimConnection* as its handle and has an additional argument, const char* who. gaim_gtk_notify_userinfo() currently passes all the information except the GaimConnection* and the const char* who to gaim_gtk_notify_formatted(). This could be changed in the future to, for example, have a standardized window title which would note the account and/or user associated with the information. This is needed because some UIs (Adium, for example) don't want to present the information in a standalone window - they want to associate the information with a particular contact / buddy and display it with that object's other information. Previously, gaim_notify_formatted() was not useful for this purpose as it could not be determined what user's info it was; gaim_notify_userinfo() makes this possible. This patch modifies notify.c and notify.h for the new function, modifies gtknotify.c to register the ui op and pass calls to it on the gaim_gtk_notify_formatted, and modifies all prpls except SILC (which I don't understand well enough to modify, but there's no actual harm in leaving it as gaim_notify_formatted() for now) to use gaim_notify_userinfo() and pass their gc and username when calling the function." -- Evan Schoenberg Index: zephyr.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/zephyr/zephyr.c,v retrieving revision 1.114 retrieving revision 1.115 diff -u -d -p -r1.114 -r1.115 --- zephyr.c 19 Aug 2004 01:06:34 -0000 1.114 +++ zephyr.c 20 Aug 2004 22:05:18 -0000 1.115 @@ -640,7 +640,8 @@ static void handle_message(GaimConnectio ZGetLocations(&locs, &one); g_string_append_printf(str, _("<br>At %s since %s"), locs.host, locs.time); } - gaim_notify_formatted(gc, NULL, _("Buddy Information"), NULL, str->str, NULL, NULL); + gaim_notify_userinfo(gc, b ? b->name : user, NULL, _("Buddy Information"), NULL, + str->str, NULL, NULL); g_string_free(str, TRUE); } else serv_got_update(gc, b->name, nlocs, 0, 0, 0, 0); |