changeset 699:f8acdd22065a

[gaim-migrate @ 709] log chat logon/logoffs to whatever.chat.log committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Wed, 16 Aug 2000 07:13:18 +0000
parents b2ab04e04194
children d904bf694bd7
files src/conversation.c src/dialogs.c src/gaim.h
diffstat 3 files changed, 15 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/conversation.c	Wed Aug 16 06:26:08 2000 +0000
+++ b/src/conversation.c	Wed Aug 16 07:13:18 2000 +0000
@@ -578,12 +578,12 @@
                 strcpy(buf, buf2);
         }
 
-	if (font_options & OPT_FONT_FGCOL) {
+	if ((font_options & OPT_FONT_FGCOL) || c->hasfg) {
 		g_snprintf(buf2, BUF_LONG, "<FONT COLOR=\"#%02X%02X%02X\">%s</FONT>", c->fgcol.red, c->fgcol.green, c->fgcol.blue, buf);
 		strcpy(buf, buf2);
 	}
 
-	if (font_options & OPT_FONT_BGCOL) {
+	if ((font_options & OPT_FONT_BGCOL) || c->hasbg) {
 		g_snprintf(buf2, BUF_LONG, "<BODY BGCOLOR=\"#%02X%02X%02X\">%s</BODY>", c->bgcol.red, c->bgcol.green, c->bgcol.blue, buf);
 		strcpy(buf, buf2);
 	}
@@ -1116,13 +1116,18 @@
 
                 if ((general_options & OPT_GEN_LOG_ALL) || find_log_info(c->name)) {
                         char *t1;
+			char nm[256];
 
                         if (general_options & OPT_GEN_STRIP_HTML) {
                                 t1 = strip_html(what);
                         } else {
                                 t1 = what;
                         }
-                        fd = open_log_file(c->name);
+			if (c->is_chat)
+				g_snprintf(nm, 256, "%s.chat", c->name);
+			else
+				g_snprintf(nm, 256, "%s", c->name);
+                        fd = open_log_file(nm);
                         fprintf(fd, "%s\n", t1);
                         fclose(fd);
                         if (general_options & OPT_GEN_STRIP_HTML) {
@@ -1589,7 +1594,9 @@
 	sprintf(c->fontface, "%s", fontface);
 	c->hasfont = 0;
 	c->bgcol = bgcolor;
+	c->hasbg = 0;
 	c->fgcol = fgcolor;
+	c->hasfg = 0;
 	
 	gtk_container_add(GTK_CONTAINER(win), paned);
         gtk_container_border_width(GTK_CONTAINER(win), 10);
--- a/src/dialogs.c	Wed Aug 16 06:26:08 2000 +0000
+++ b/src/dialogs.c	Wed Aug 16 07:13:18 2000 +0000
@@ -2336,6 +2336,8 @@
 	text_color.red = ((guint16)(color[0]*65535))>>8;
 	text_color.green = ((guint16)(color[1]*65535))>>8;
 	text_color.blue = ((guint16)(color[2]*65535))>>8;
+	c->fgcol = text_color;
+	c->hasfg = 1;
 	
 	g_snprintf(open_tag, 23, "<FONT COLOR=\"#%02X%02X%02X\">", text_color.red, text_color.green, text_color.blue);
 	surround(c->entry, open_tag, "</FONT>");
--- a/src/gaim.h	Wed Aug 16 06:26:08 2000 +0000
+++ b/src/gaim.h	Wed Aug 16 07:13:18 2000 +0000
@@ -278,7 +278,9 @@
 	char fontface[128];
 	int hasfont;
 	GdkColor bgcol;
+	int hasbg;
 	GdkColor fgcol;
+	int hasfg;
 
 	/* stuff used just for IM */
 	GtkWidget *add_button;
@@ -397,7 +399,7 @@
 #define TYPE_SIGNOFF   4
 #define TYPE_KEEPALIVE 5
 
-#define REVISION "gaim:$Revision: 707 $"
+#define REVISION "gaim:$Revision: 709 $"
 #define FLAPON "FLAPON\r\n\r\n"
 
 #define ROAST "Tic/Toc"