im.pidgin.pidgin: 53558acaab3e3ec1ac0d96de3aca88b017340724
sadrul at pidgin.im
sadrul at pidgin.im
Tue Dec 4 19:22:56 EST 2007
-----------------------------------------------------------------
Revision: 53558acaab3e3ec1ac0d96de3aca88b017340724
Ancestor: ec67b1544528adb30f7d2edac30b22912b2da19b
Author: sadrul at pidgin.im
Date: 2007-12-05T00:14:13
Branch: im.pidgin.pidgin
Modified files:
pidgin/gtkblist.c pidgin/gtkconv.c
ChangeLog:
Fix boldifying the chat entries in the buddylist.
-------------- next part --------------
============================================================
--- pidgin/gtkblist.c 3158c1c8d473795c4f8f7f2d8270829fc7c104ea
+++ pidgin/gtkblist.c 46f11d4ba51bf814f214eee65f5ae5188e4dc643
@@ -4097,7 +4097,7 @@ written_msg_update_ui_cb(PurpleAccount *
PurpleConversation *conv, PurpleMessageFlags flag, PurpleBlistNode *node)
{
PidginBlistNode *ui = node->ui_data;
- if (ui->conv.conv != conv || PIDGIN_CONVERSATION(conv) ||
+ if (ui->conv.conv != conv || !pidgin_conv_is_hidden(PIDGIN_CONVERSATION(conv)) ||
!(flag & (PURPLE_MESSAGE_SEND | PURPLE_MESSAGE_RECV)))
return;
ui->conv.flags |= PIDGIN_BLIST_NODE_HAS_PENDING_MESSAGE;
@@ -4106,11 +4106,10 @@ static void
}
static void
-displayed_msg_update_ui_cb(PurpleAccount *account, const char *who, const char *message,
- PurpleConversation *conv, PurpleMessageFlags flag, PurpleBlistNode *node)
+displayed_msg_update_ui_cb(PidginConversation *gtkconv, PurpleBlistNode *node)
{
PidginBlistNode *ui = node->ui_data;
- if (ui->conv.conv != conv)
+ if (ui->conv.conv != gtkconv->active_conv)
return;
ui->conv.flags &= ~PIDGIN_BLIST_NODE_HAS_PENDING_MESSAGE;
pidgin_blist_update(purple_get_blist(), node);
@@ -4136,10 +4135,11 @@ conversation_created_cb(PurpleConversati
ui, PURPLE_CALLBACK(conversation_deleted_update_ui_cb), ui);
purple_signal_connect(purple_conversations_get_handle(), "wrote-im-msg",
ui, PURPLE_CALLBACK(written_msg_update_ui_cb), buddy);
- purple_signal_connect(pidgin_conversations_get_handle(), "displayed-im-msg",
+ purple_signal_connect(pidgin_conversations_get_handle(), "conversation-displayed",
ui, PURPLE_CALLBACK(displayed_msg_update_ui_cb), buddy);
}
}
+ break;
case PURPLE_CONV_TYPE_CHAT:
{
PurpleChat *chat = purple_blist_find_chat(conv->account, conv->name);
@@ -4156,9 +4156,10 @@ conversation_created_cb(PurpleConversati
ui, PURPLE_CALLBACK(conversation_deleted_update_ui_cb), ui);
purple_signal_connect(purple_conversations_get_handle(), "wrote-chat-msg",
ui, PURPLE_CALLBACK(written_msg_update_ui_cb), chat);
- purple_signal_connect(pidgin_conversations_get_handle(), "displayed-chat-msg",
+ purple_signal_connect(pidgin_conversations_get_handle(), "conversation-displayed",
ui, PURPLE_CALLBACK(displayed_msg_update_ui_cb), chat);
}
+ break;
default:
break;
}
@@ -5967,7 +5968,8 @@ static void pidgin_blist_update_chat(Pur
ui = node->ui_data;
conv = ui->conv.conv;
- hidden = (conv && (ui->conv.flags & PIDGIN_BLIST_NODE_HAS_PENDING_MESSAGE));
+ hidden = (conv && (ui->conv.flags & PIDGIN_BLIST_NODE_HAS_PENDING_MESSAGE) &&
+ pidgin_conv_is_hidden(PIDGIN_CONVERSATION(conv)));
status = pidgin_blist_get_status_icon(node,
biglist ? PIDGIN_STATUS_ICON_LARGE : PIDGIN_STATUS_ICON_SMALL);
============================================================
--- pidgin/gtkconv.c 52cc7309bb01456bebe58ae371d249807b7a1e64
+++ pidgin/gtkconv.c bf278893ad53b3afc1f75dc89bd3951f90a6429e
@@ -5093,7 +5093,7 @@ received_im_msg_cb(PurpleAccount *accoun
!purple_status_is_available(purple_account_get_active_status(account)))
hide = TRUE;
- if (PIDGIN_IS_PIDGIN_CONVERSATION(conv) && !hide) {
+ if (conv && PIDGIN_IS_PIDGIN_CONVERSATION(conv) && !hide) {
PidginConversation *gtkconv = PIDGIN_CONVERSATION(conv);
if (gtkconv->win == hidden_convwin) {
pidgin_conv_window_remove_gtkconv(gtkconv->win, gtkconv);
@@ -6638,7 +6638,6 @@ wrote_msg_update_unseen_cb(PurpleAccount
unseen = PIDGIN_UNSEEN_TEXT;
conv_set_unseen(conv, unseen);
- purple_conversation_update(conv, PURPLE_CONV_UPDATE_UNSEEN);
}
}
@@ -7495,6 +7494,8 @@ gboolean pidgin_conv_attach_to_conversat
return FALSE;
pidgin_conv_window_remove_gtkconv(hidden_convwin, gtkconv);
pidgin_conv_placement_place(gtkconv);
+ purple_signal_emit(pidgin_conversations_get_handle(),
+ "conversation-displayed", gtkconv);
return TRUE;
}
@@ -7714,17 +7715,17 @@ pidgin_conversations_init(void)
purple_value_new(PURPLE_TYPE_INT));
purple_signal_register(handle, "conversation-switched",
- purple_marshal_VOID__POINTER_POINTER, NULL, 1,
+ purple_marshal_VOID__POINTER, NULL, 1,
purple_value_new(PURPLE_TYPE_SUBTYPE,
PURPLE_SUBTYPE_CONVERSATION));
purple_signal_register(handle, "conversation-hiding",
- purple_marshal_VOID__POINTER_POINTER, NULL, 1,
+ purple_marshal_VOID__POINTER, NULL, 1,
purple_value_new(PURPLE_TYPE_BOXED,
"PidginConversation *"));
purple_signal_register(handle, "conversation-displayed",
- purple_marshal_VOID__POINTER_POINTER, NULL, 1,
+ purple_marshal_VOID__POINTER, NULL, 1,
purple_value_new(PURPLE_TYPE_BOXED,
"PidginConversation *"));
More information about the Commits
mailing list