changeset 687:02ef523db170

[gaim-migrate @ 697] remember fontface per conversation committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Tue, 15 Aug 2000 22:12:14 +0000
parents cd6772d0685a
children 6b1345121dd3
files src/conversation.c src/gaim.h
diffstat 2 files changed, 11 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/conversation.c	Tue Aug 15 18:32:56 2000 +0000
+++ b/src/conversation.c	Tue Aug 15 22:12:14 2000 +0000
@@ -405,6 +405,7 @@
 		pre_fontface = "<FONT FACE=\"Helvetica\">";
 	}
 
+	sprintf(c->fontface, "%s", newfont ? (newfont[0] ? newfont : "Helvetica") : "Helvetica");
 	surround(c->entry, pre_fontface, "</FONT>");
 	gtk_widget_grab_focus(c->entry);
 	
@@ -575,17 +576,17 @@
         }
 
         if (font_options & OPT_FONT_FACE) {
-                g_snprintf(buf2, BUF_LONG, "<FONT FACE=\"%s\">%s</FONT>", fontface, buf);
+                g_snprintf(buf2, BUF_LONG, "<FONT FACE=\"%s\">%s</FONT>", c->fontface, buf);
                 strcpy(buf, buf2);
         }
 
 	if (font_options & OPT_FONT_FGCOL) {
-		g_snprintf(buf2, BUF_LONG, "<FONT COLOR=\"#%x\">%s</FONT>", fgcolor, buf);
+		g_snprintf(buf2, BUF_LONG, "<FONT COLOR=\"#%x\">%s</FONT>", c->fgcol, buf);
 		strcpy(buf, buf2);
 	}
 
 	if (font_options & OPT_FONT_BGCOL) {
-		g_snprintf(buf2, BUF_LONG, "<BODY BGCOLOR=\"#%x\">%s</BODY>", bgcolor, buf);
+		g_snprintf(buf2, BUF_LONG, "<BODY BGCOLOR=\"#%x\">%s</BODY>", c->bgcol, buf);
 		strcpy(buf, buf2);
 	}
 
@@ -1587,6 +1588,9 @@
 	c->smiley_dialog = NULL;
 	c->link_dialog = NULL;
 	c->log_dialog = NULL;
+	sprintf(c->fontface, "%s", fontface);
+	c->bgcol = bgcolor;
+	c->fgcol = fgcolor;
 	
 	gtk_container_add(GTK_CONTAINER(win), paned);
         gtk_container_border_width(GTK_CONTAINER(win), 10);
--- a/src/gaim.h	Tue Aug 15 18:32:56 2000 +0000
+++ b/src/gaim.h	Tue Aug 15 22:12:14 2000 +0000
@@ -275,6 +275,9 @@
 	GtkWidget *link_dialog;
 	GtkWidget *log_dialog;
 	int makesound;
+	char fontface[128];
+	int bgcol;
+	int fgcol;
 
 	/* stuff used just for IM */
 	GtkWidget *add_button;
@@ -393,7 +396,7 @@
 #define TYPE_SIGNOFF   4
 #define TYPE_KEEPALIVE 5
 
-#define REVISION "gaim:$Revision: 694 $"
+#define REVISION "gaim:$Revision: 697 $"
 #define FLAPON "FLAPON\r\n\r\n"
 
 #define ROAST "Tic/Toc"