# HG changeset patch # User Christian Hammond # Date 1060218578 0 # Node ID 96de6d9eb4228b5cb1c4ffd82f93972b15b2dacb # Parent db32fee4fa699d7d4c8496e7aa1d6e8918a3186e [gaim-migrate @ 6910] Added a new unseen type: GAIM_CONV_UNSEEN_EVENT. Now window closing, timing out, logins, logouts, etc. (any of those black bold messages) grey the tab instead of the tab looking like someone talked in it. committer: Tailor Script diff -r db32fee4fa69 -r 96de6d9eb422 src/conversation.c --- a/src/conversation.c Thu Aug 07 00:48:48 2003 +0000 +++ b/src/conversation.c Thu Aug 07 01:09:38 2003 +0000 @@ -1486,6 +1486,9 @@ if ((flags & WFLAG_NICK) == WFLAG_NICK || gaim_conversation_get_unseen(conv) == GAIM_UNSEEN_NICK) unseen = GAIM_UNSEEN_NICK; + else if ((flags & WFLAG_SYSTEM) == WFLAG_SYSTEM && + gaim_conversation_get_unseen(conv) != GAIM_UNSEEN_TEXT) + unseen = GAIM_UNSEEN_EVENT; else unseen = GAIM_UNSEEN_TEXT; } diff -r db32fee4fa69 -r 96de6d9eb422 src/conversation.h --- a/src/conversation.h Thu Aug 07 00:48:48 2003 +0000 +++ b/src/conversation.h Thu Aug 07 01:09:38 2003 +0000 @@ -54,7 +54,8 @@ { GAIM_UNSEEN_NONE = 0, /**< No unseen text in the conversation. */ GAIM_UNSEEN_TEXT, /**< Unseen text in the conversation. */ - GAIM_UNSEEN_NICK /**< Unseen text and the nick was said. */ + GAIM_UNSEEN_NICK, /**< Unseen text and the nick was said. */ + GAIM_UNSEEN_EVENT /**< Unseen events in the conversation. */ } GaimUnseenState; diff -r db32fee4fa69 -r 96de6d9eb422 src/gtkconv.c --- a/src/gtkconv.c Thu Aug 07 00:48:48 2003 +0000 +++ b/src/gtkconv.c Thu Aug 07 01:09:38 2003 +0000 @@ -4841,6 +4841,12 @@ style->fg[GTK_STATE_ACTIVE].blue = 0x6C6C; style->fg[GTK_STATE_NORMAL] = style->fg[GTK_STATE_ACTIVE]; } + else if (gaim_conversation_get_unseen(conv) == GAIM_UNSEEN_EVENT) { + style->fg[GTK_STATE_ACTIVE].red = 0x8686;; + style->fg[GTK_STATE_ACTIVE].green = 0x8282; + style->fg[GTK_STATE_ACTIVE].blue = 0x7272; + style->fg[GTK_STATE_NORMAL] = style->fg[GTK_STATE_ACTIVE]; + } else if (gaim_conversation_get_unseen(conv) == GAIM_UNSEEN_TEXT) { style->fg[GTK_STATE_ACTIVE].red = 0xDFDF; style->fg[GTK_STATE_ACTIVE].green = 0x4242; diff -r db32fee4fa69 -r 96de6d9eb422 src/server.c --- a/src/server.c Thu Aug 07 00:48:48 2003 +0000 +++ b/src/server.c Thu Aug 07 01:09:38 2003 +0000 @@ -1083,17 +1083,17 @@ if (c != NULL) { char *tmp = g_strdup_printf(_("%s logged in."), - gaim_get_buddy_alias(b)); + gaim_get_buddy_alias(b)); - gaim_conversation_write(c, NULL, tmp, -1, - WFLAG_SYSTEM, time(NULL)); + gaim_conversation_write(c, NULL, tmp, -1, WFLAG_SYSTEM, + time(NULL)); g_free(tmp); } else if (awayqueue && find_queue_total_by_name(b->name)) { struct queued_message *qm = g_new0(struct queued_message, 1); g_snprintf(qm->name, sizeof(qm->name), "%s", b->name); qm->message = g_strdup_printf(_("%s logged in."), - gaim_get_buddy_alias(b)); + gaim_get_buddy_alias(b)); qm->account = gc->account; qm->tm = time(NULL); qm->flags = WFLAG_SYSTEM; @@ -1112,15 +1112,15 @@ if (c != NULL) { char *tmp = g_strdup_printf(_("%s logged out."), - gaim_get_buddy_alias(b)); + gaim_get_buddy_alias(b)); gaim_conversation_write(c, NULL, tmp, -1, - WFLAG_SYSTEM, time(NULL)); + WFLAG_SYSTEM, time(NULL)); g_free(tmp); } else if (awayqueue && find_queue_total_by_name(b->name)) { struct queued_message *qm = g_new0(struct queued_message, 1); g_snprintf(qm->name, sizeof(qm->name), "%s", b->name); qm->message = g_strdup_printf(_("%s logged out."), - gaim_get_buddy_alias(b)); + gaim_get_buddy_alias(b)); qm->account = gc->account; qm->tm = time(NULL); qm->flags = WFLAG_SYSTEM;