comparison src/server.c @ 12797:eda1572c788b

[gaim-migrate @ 15144] SF Patch #1390008 from Sadrul "GaimGtkConv: Update tab icons, and some other small changes" This seems to make the Send To menu update better. I haven't seen this patch make anything worse yet, so I'm committing it. If you start seeing weird update errors, let Sadrul or me know. I thought I had a case of the Send To menu not updating even with this patch, but I haven't yet been able to duplicate it. Sadrul's description: '1. Fixes the tab-icons/send-to menu updates by listening for the appropriate signals. This patch removes the "updated" field from conversation-uiops. There is an existing "-updated" signal which can replace the uiops. 2. If having conversations with more than one accounts of a contact, and the buddy-icon of an inactive account is changed, then the new icon is showed (I think), even though it is not the buddy icon for the currently active conversation. This patch fixes that. 3. Emit "buddy-typing" and "-stopped" signal whenever the typing-state is changed. Currently, the typing-state of a conversation is sometimes changed without emitting the signal. This patch fixes that.' I rejected #4. '5. Emits the "chat-left" signal *after* setting "chat->left" to TRUE. 6. Show a buddy for an account only once in the SendTo menu (currently Gaim shows the same buddy more than once if the buddy exists in more than one groups). This is done by keeping a list of GaimPresence -- since that's the only thing the blist-nodes for the same buddy share.' committer: Tailor Script <tailor@pidgin.im>
author Richard Laager <rlaager@wiktel.com>
date Mon, 09 Jan 2006 21:29:53 +0000
parents f5c72fd691ee
children c0fbdea8828b
comparison
equal deleted inserted replaced
12796:e8db8f94a2db 12797:eda1572c788b
591 if (conv != NULL) { 591 if (conv != NULL) {
592 im = GAIM_CONV_IM(conv); 592 im = GAIM_CONV_IM(conv);
593 593
594 gaim_conv_im_set_typing_state(im, state); 594 gaim_conv_im_set_typing_state(im, state);
595 gaim_conv_im_update_typing(im); 595 gaim_conv_im_update_typing(im);
596 } 596 } else {
597 597 if (state == GAIM_TYPING)
598 if (state == GAIM_TYPING) 598 {
599 { 599 gaim_signal_emit(gaim_conversations_get_handle(),
600 gaim_signal_emit(gaim_conversations_get_handle(), 600 "buddy-typing", gc->account, name);
601 "buddy-typing", gc->account, name); 601 }
602 } 602 else
603 else 603 {
604 { 604 gaim_signal_emit(gaim_conversations_get_handle(),
605 gaim_signal_emit(gaim_conversations_get_handle(), 605 "buddy-typing-stopped", gc->account, name);
606 "buddy-typing-stopped", gc->account, name); 606 }
607 } 607 }
608 608
609 if (conv != NULL && timeout > 0) 609 if (conv != NULL && timeout > 0)
610 gaim_conv_im_start_typing_timeout(im, timeout); 610 gaim_conv_im_start_typing_timeout(im, timeout);
611 } 611 }
717 if (!g_slist_find(gc->buddy_chats, conv)) 717 if (!g_slist_find(gc->buddy_chats, conv))
718 gc->buddy_chats = g_slist_append(gc->buddy_chats, conv); 718 gc->buddy_chats = g_slist_append(gc->buddy_chats, conv);
719 719
720 gaim_conv_chat_set_id(chat, id); 720 gaim_conv_chat_set_id(chat, id);
721 721
722
723 gaim_signal_emit(gaim_conversations_get_handle(), "chat-joined", conv); 722 gaim_signal_emit(gaim_conversations_get_handle(), "chat-joined", conv);
724 723
725 return conv; 724 return conv;
726 } 725 }
727 726
746 } 745 }
747 746
748 if (!conv) 747 if (!conv)
749 return; 748 return;
750 749
751 gaim_signal_emit(gaim_conversations_get_handle(), "chat-left", conv);
752
753 gaim_debug(GAIM_DEBUG_INFO, "server", "Leaving room: %s\n", 750 gaim_debug(GAIM_DEBUG_INFO, "server", "Leaving room: %s\n",
754 gaim_conversation_get_name(conv)); 751 gaim_conversation_get_name(conv));
755 752
756 g->buddy_chats = g_slist_remove(g->buddy_chats, conv); 753 g->buddy_chats = g_slist_remove(g->buddy_chats, conv);
757 754
758 gaim_conv_chat_left(GAIM_CONV_CHAT(conv)); 755 gaim_conv_chat_left(GAIM_CONV_CHAT(conv));
756
757 gaim_signal_emit(gaim_conversations_get_handle(), "chat-left", conv);
759 } 758 }
760 759
761 void serv_got_chat_in(GaimConnection *g, int id, const char *who, 760 void serv_got_chat_in(GaimConnection *g, int id, const char *who,
762 GaimMessageFlags flags, const char *message, time_t mtime) 761 GaimMessageFlags flags, const char *message, time_t mtime)
763 { 762 {