Mercurial > pidgin.yaz
diff src/conversation.c @ 8998:3738d1eac0ad
[gaim-migrate @ 9773]
" This patch completes the removal of the Show
joins/leaves in chats preferences
It also (temporarily?) brings back the UI for the
IM/Chat buttons preferences by changing #if 0 to #if 1
so they're still easy to identify to revist later on.
The "Individual log file for each buddy's signons" pref
became obsolete a while ago and was incorrectly #if'd
out with a prefslash04 label. This patch completes it's
death.
With this patch applied the only prefslash thing that
should block release is the custom font/color/size/etc
stuff, I think we need to work out what to do there.
There's a bit of whitespace cleanup too." --Stu Tomlinson
committer: Tailor Script <tailor@pidgin.im>
author | Luke Schierer <lschiere@pidgin.im> |
---|---|
date | Fri, 21 May 2004 14:26:31 +0000 |
parents | e2ad3e04d248 |
children | 8f838ae3e710 |
line wrap: on
line diff
--- a/src/conversation.c Fri May 21 12:07:26 2004 +0000 +++ b/src/conversation.c Fri May 21 14:26:31 2004 +0000 @@ -1949,16 +1949,14 @@ if (ops != NULL && ops->chat_add_user != NULL) ops->chat_add_user(conv, user); - if (gaim_prefs_get_bool("/core/conversations/chat/show_join")) { - if (extra_msg == NULL) - g_snprintf(tmp, sizeof(tmp), _("%s entered the room."), user); - else - g_snprintf(tmp, sizeof(tmp), - _("%s [<I>%s</I>] entered the room."), - user, extra_msg); - - gaim_conversation_write(conv, NULL, tmp, GAIM_MESSAGE_SYSTEM, time(NULL)); - } + if (extra_msg == NULL) + g_snprintf(tmp, sizeof(tmp), _("%s entered the room."), user); + else + g_snprintf(tmp, sizeof(tmp), + _("%s [<I>%s</I>] entered the room."), + user, extra_msg); + + gaim_conversation_write(conv, NULL, tmp, GAIM_MESSAGE_SYSTEM, time(NULL)); gaim_signal_emit(gaim_conversations_get_handle(), "chat-buddy-joined", conv, user); @@ -2089,15 +2087,13 @@ /* NOTE: Don't remove them from ignored in case they re-enter. */ - if (gaim_prefs_get_bool("/core/conversations/chat/show_leave")) { - if (reason != NULL && *reason != '\0') - g_snprintf(tmp, sizeof(tmp), - _("%s left the room (%s)."), user, reason); - else - g_snprintf(tmp, sizeof(tmp), _("%s left the room."), user); - - gaim_conversation_write(conv, NULL, tmp, GAIM_MESSAGE_SYSTEM, time(NULL)); - } + if (reason != NULL && *reason != '\0') + g_snprintf(tmp, sizeof(tmp), + _("%s left the room (%s)."), user, reason); + else + g_snprintf(tmp, sizeof(tmp), _("%s left the room."), user); + + gaim_conversation_write(conv, NULL, tmp, GAIM_MESSAGE_SYSTEM, time(NULL)); gaim_signal_emit(gaim_conversations_get_handle(), "chat-buddy-left", conv, user, reason); @@ -2149,31 +2145,29 @@ /* NOTE: Don't remove them from ignored in case they re-enter. */ - if (gaim_prefs_get_bool("/core/conversations/chat/show_leave")) { - if (reason != NULL && *reason != '\0') { - int i; - int size = g_list_length(users); - int max = MIN(10, size); - GList *l; - - *tmp = '\0'; - - for (l = users, i = 0; i < max; i++, l = l->next) { - g_strlcat(tmp, (char *)l->data, sizeof(tmp)); - - if (i < max - 1) - g_strlcat(tmp, ", ", sizeof(tmp)); - } - - if (size > 10) - g_snprintf(tmp, sizeof(tmp), - _("(+%d more)"), size - 10); - - g_snprintf(tmp, sizeof(tmp), _(" left the room (%s)."), reason); - - gaim_conversation_write(conv, NULL, tmp, - GAIM_MESSAGE_SYSTEM, time(NULL)); + if (reason != NULL && *reason != '\0') { + int i; + int size = g_list_length(users); + int max = MIN(10, size); + GList *l; + + *tmp = '\0'; + + for (l = users, i = 0; i < max; i++, l = l->next) { + g_strlcat(tmp, (char *)l->data, sizeof(tmp)); + + if (i < max - 1) + g_strlcat(tmp, ", ", sizeof(tmp)); } + + if (size > 10) + g_snprintf(tmp, sizeof(tmp), + _("(+%d more)"), size - 10); + + g_snprintf(tmp, sizeof(tmp), _(" left the room (%s)."), reason); + + gaim_conversation_write(conv, NULL, tmp, + GAIM_MESSAGE_SYSTEM, time(NULL)); } } @@ -2644,8 +2638,6 @@ /* Conversations -> Chat */ gaim_prefs_add_none("/core/conversations/chat"); - gaim_prefs_add_bool("/core/conversations/chat/show_join", TRUE); - gaim_prefs_add_bool("/core/conversations/chat/show_leave", TRUE); gaim_prefs_add_bool("/core/conversations/chat/show_nick_change", TRUE); /* Conversations -> IM */