Mercurial > pidgin.yaz
comparison src/gtknotify.c @ 9797:62eb9fe24692
[gaim-migrate @ 10665]
"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
committer: Tailor Script <tailor@pidgin.im>
author | Luke Schierer <lschiere@pidgin.im> |
---|---|
date | Fri, 20 Aug 2004 22:05:18 +0000 |
parents | 4a15962c344a |
children | cc68a8c6e741 |
comparison
equal
deleted
inserted
replaced
9796:68574cef02e2 | 9797:62eb9fe24692 |
---|---|
386 gtk_widget_show(window); | 386 gtk_widget_show(window); |
387 | 387 |
388 return window; | 388 return window; |
389 } | 389 } |
390 | 390 |
391 static void * | |
392 gaim_gtk_notify_userinfo(GaimConnection *gc, const char *who, | |
393 const char *title, const char *primary, | |
394 const char *secondary, const char *text, | |
395 GCallback cb, void *user_data) | |
396 { | |
397 return (gaim_gtk_notify_formatted(title, primary, secondary, | |
398 text, cb, user_data)); | |
399 } | |
400 | |
391 static void | 401 static void |
392 gaim_gtk_close_notify(GaimNotifyType type, void *ui_handle) | 402 gaim_gtk_close_notify(GaimNotifyType type, void *ui_handle) |
393 { | 403 { |
394 if (type == GAIM_NOTIFY_EMAIL || type == GAIM_NOTIFY_EMAILS) | 404 if (type == GAIM_NOTIFY_EMAIL || type == GAIM_NOTIFY_EMAILS) |
395 { | 405 { |
620 { | 630 { |
621 gaim_gtk_notify_message, | 631 gaim_gtk_notify_message, |
622 gaim_gtk_notify_email, | 632 gaim_gtk_notify_email, |
623 gaim_gtk_notify_emails, | 633 gaim_gtk_notify_emails, |
624 gaim_gtk_notify_formatted, | 634 gaim_gtk_notify_formatted, |
635 gaim_gtk_notify_userinfo, | |
625 gaim_gtk_notify_uri, | 636 gaim_gtk_notify_uri, |
626 gaim_gtk_close_notify | 637 gaim_gtk_close_notify |
627 }; | 638 }; |
628 | 639 |
629 GaimNotifyUiOps * | 640 GaimNotifyUiOps * |