Mercurial > pidgin
comparison src/conversation.c @ 11664:38bbb0f15453
[gaim-migrate @ 13949]
"This patch updates the colors of the tabs correctly. I
have removed the tab-highlighting stuff from the core
to the UI." Sadrul Habib Chowdhury
committer: Tailor Script <tailor@pidgin.im>
author | Luke Schierer <lschiere@pidgin.im> |
---|---|
date | Fri, 14 Oct 2005 11:30:37 +0000 |
parents | 243dd81341a7 |
children | ae9d9e2add8e |
comparison
equal
deleted
inserted
replaced
11663:03db7f366ae1 | 11664:38bbb0f15453 |
---|---|
669 | 669 |
670 gaim_conversation_set_title(conv, text); | 670 gaim_conversation_set_title(conv, text); |
671 } | 671 } |
672 | 672 |
673 void | 673 void |
674 gaim_conversation_set_unseen(GaimConversation *conv, GaimUnseenState state) | |
675 { | |
676 g_return_if_fail(conv != NULL); | |
677 | |
678 conv->unseen = state; | |
679 | |
680 gaim_conversation_update(conv, GAIM_CONV_UPDATE_UNSEEN); | |
681 } | |
682 | |
683 void | |
684 gaim_conversation_foreach(void (*func)(GaimConversation *conv)) | 674 gaim_conversation_foreach(void (*func)(GaimConversation *conv)) |
685 { | 675 { |
686 GaimConversation *conv; | 676 GaimConversation *conv; |
687 GList *l; | 677 GList *l; |
688 | 678 |
691 for (l = gaim_get_conversations(); l != NULL; l = l->next) { | 681 for (l = gaim_get_conversations(); l != NULL; l = l->next) { |
692 conv = (GaimConversation *)l->data; | 682 conv = (GaimConversation *)l->data; |
693 | 683 |
694 func(conv); | 684 func(conv); |
695 } | 685 } |
696 } | |
697 | |
698 GaimUnseenState | |
699 gaim_conversation_get_unseen(const GaimConversation *conv) | |
700 { | |
701 g_return_val_if_fail(conv != NULL, 0); | |
702 | |
703 return conv->unseen; | |
704 } | 686 } |
705 | 687 |
706 void | 688 void |
707 gaim_conversation_set_name(GaimConversation *conv, const char *name) | 689 gaim_conversation_set_name(GaimConversation *conv, const char *name) |
708 { | 690 { |
852 GaimConnection *gc = NULL; | 834 GaimConnection *gc = NULL; |
853 GaimAccount *account; | 835 GaimAccount *account; |
854 GaimConversationUiOps *ops; | 836 GaimConversationUiOps *ops; |
855 const char *alias; | 837 const char *alias; |
856 GaimBuddy *b; | 838 GaimBuddy *b; |
857 GaimUnseenState unseen; | |
858 /* int logging_font_options = 0; */ | 839 /* int logging_font_options = 0; */ |
859 | 840 |
860 g_return_if_fail(conv != NULL); | 841 g_return_if_fail(conv != NULL); |
861 g_return_if_fail(message != NULL); | 842 g_return_if_fail(message != NULL); |
862 | 843 |
920 } | 901 } |
921 } | 902 } |
922 ops->write_conv(conv, who, alias, message, flags, mtime); | 903 ops->write_conv(conv, who, alias, message, flags, mtime); |
923 | 904 |
924 | 905 |
925 /* Tab highlighting */ | |
926 if (!(flags & GAIM_MESSAGE_RECV) && !(flags & GAIM_MESSAGE_SYSTEM) && !(flags & GAIM_MESSAGE_ERROR)) | |
927 return; | |
928 | |
929 if (gaim_conversation_get_type(conv) == GAIM_CONV_TYPE_IM) { | 906 if (gaim_conversation_get_type(conv) == GAIM_CONV_TYPE_IM) { |
930 if ((flags & GAIM_MESSAGE_RECV) == GAIM_MESSAGE_RECV) | 907 if ((flags & GAIM_MESSAGE_RECV) == GAIM_MESSAGE_RECV) { |
931 gaim_conv_im_set_typing_state(GAIM_CONV_IM(conv), GAIM_NOT_TYPING); | 908 gaim_conv_im_set_typing_state(GAIM_CONV_IM(conv), GAIM_NOT_TYPING); |
932 } | 909 gaim_conversation_update(conv, GAIM_CONV_UPDATE_TITLE); |
933 | 910 } |
934 { | 911 } |
935 if ((flags & GAIM_MESSAGE_NICK) == GAIM_MESSAGE_NICK || | |
936 gaim_conversation_get_unseen(conv) == GAIM_UNSEEN_NICK) | |
937 unseen = GAIM_UNSEEN_NICK; | |
938 else if ((((flags & GAIM_MESSAGE_SYSTEM) == GAIM_MESSAGE_SYSTEM) || | |
939 ((flags & GAIM_MESSAGE_ERROR) == GAIM_MESSAGE_ERROR)) && | |
940 gaim_conversation_get_unseen(conv) != GAIM_UNSEEN_TEXT) | |
941 unseen = GAIM_UNSEEN_EVENT; | |
942 else | |
943 unseen = GAIM_UNSEEN_TEXT; | |
944 } | |
945 | |
946 gaim_conversation_set_unseen(conv, unseen); | |
947 } | 912 } |
948 | 913 |
949 gboolean | 914 gboolean |
950 gaim_conversation_has_focus(GaimConversation *conv) | 915 gaim_conversation_has_focus(GaimConversation *conv) |
951 { | 916 { |