changeset 6405:96de6d9eb422

[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 <tailor@pidgin.im>
author Christian Hammond <chipx86@chipx86.com>
date Thu, 07 Aug 2003 01:09:38 +0000
parents db32fee4fa69
children efaff39618a5
files src/conversation.c src/conversation.h src/gtkconv.c src/server.c
diffstat 4 files changed, 18 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- 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;
 	}
--- 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;
 
--- 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;
--- 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;