Mercurial > pidgin.yaz
diff src/gtkpounce.c @ 9191:06b28fb24300
[gaim-migrate @ 9986]
" This patch was inspired by Robert Story's previous
timestamp patch (#944943). That was rejected because
of a timing inconsistency issue mentioned by Faceprint.
This patch disables timestamps in a given conversation
when no messages have been displayed since the last
timestamp. When a new message is about to be displayed
in a disabled timestamp conversation, a timestamp is
inserted first to maintain timing consistency. Then
the timestamp display is reenabled and the IM message
is printed.
This patch also handles a bug in the original timestamp
plugin. Previously, when the timestamp interval was
modified in the preferences, no current open
conversations are affected. I have modified it so that
all open conversations use the new interval. I would
have sent this as a separate patch, but this is my
first patch and didn't want to mess it up :)." --Eddie Sohn
i liked the original patch and was somewhat disappointed that it didn't get
fixed to address Nathan's concern, so i'm happy to merge this one in.
committer: Tailor Script <tailor@pidgin.im>
author | Luke Schierer <lschiere@pidgin.im> |
---|---|
date | Sun, 06 Jun 2004 02:08:57 +0000 |
parents | f17670a9e4ef |
children | 5b35a6b96726 |
line wrap: on
line diff
--- a/src/gtkpounce.c Sun Jun 06 02:07:59 2004 +0000 +++ b/src/gtkpounce.c Sun Jun 06 02:08:57 2004 +0000 @@ -879,9 +879,11 @@ GaimConversation *conv; GaimAccount *account; GaimBuddy *buddy; + GaimPlugin *proto; const char *pouncee; const char *alias; - + const char *proto_id; + pouncee = gaim_pounce_get_pouncee(pounce); account = gaim_pounce_get_pouncer(pounce); @@ -889,6 +891,10 @@ alias = gaim_get_buddy_alias(buddy); + /*find the protocol id for the window title and/or message*/ + proto = gaim_find_prpl(gaim_account_get_protocol_id(account)); + proto_id = proto->info->name; + if (gaim_pounce_action_is_enabled(pounce, "open-window")) { conv = gaim_find_conversation_with_account(pouncee, account); @@ -899,19 +905,28 @@ if (gaim_pounce_action_is_enabled(pounce, "popup-notify")) { char tmp[1024]; + /*Here we place the protocol name in the pounce dialog to lessen confusion about what + protocol a pounce is for*/ g_snprintf(tmp, sizeof(tmp), - (events & GAIM_POUNCE_TYPING) ? _("%s has started typing to you") : - (events & GAIM_POUNCE_SIGNON) ? _("%s has signed on") : - (events & GAIM_POUNCE_IDLE_RETURN) ? _("%s has returned from being idle") : - (events & GAIM_POUNCE_AWAY_RETURN) ? _("%s has returned from being away") : - (events & GAIM_POUNCE_TYPING_STOPPED) ? _("%s has stopped typing to you") : - (events & GAIM_POUNCE_SIGNOFF) ? _("%s has signed off") : - (events & GAIM_POUNCE_IDLE) ? _("%s has become idle") : - (events & GAIM_POUNCE_AWAY) ? _("%s has gone away.") : + (events & GAIM_POUNCE_TYPING) ? _("%s has started typing to you (%s)") : + (events & GAIM_POUNCE_SIGNON) ? _("%s has signed on (%s)") : + (events & GAIM_POUNCE_IDLE_RETURN) ? _("%s has returned from being idle (%s)") : + (events & GAIM_POUNCE_AWAY_RETURN) ? _("%s has returned from being away (%s)") : + (events & GAIM_POUNCE_TYPING_STOPPED) ? _("%s has stopped typing to you %s") : + (events & GAIM_POUNCE_SIGNOFF) ? _("%s has signed off (%s)") : + (events & GAIM_POUNCE_IDLE) ? _("%s has become idle (%s)") : + (events & GAIM_POUNCE_AWAY) ? _("%s has gone away. (%s)") : _("Unknown pounce event. Please report this!"), - alias); + alias,proto_id); - gaim_notify_info(NULL, NULL, tmp, (char*)gaim_date_full()); + /*Ok here is where I change the second argument, title, + from NULL to the account name if that's all we have + or the account alias if we have that*/ + if(gaim_account_get_alias(account)) { + gaim_notify_info(NULL, gaim_account_get_alias(account), tmp, (char*)gaim_date_full()); + } else { + gaim_notify_info(NULL, gaim_account_get_username(account), tmp, (char*)gaim_date_full()); + } } if (gaim_pounce_action_is_enabled(pounce, "send-message")) {