diff src/gaimrc.c @ 5671:d43a00b81d2a

[gaim-migrate @ 6088] color conversion and setting now works correctly. now maybe my eyes will stop bleeding. committer: Tailor Script <tailor@pidgin.im>
author Nathan Walp <nwalp@pidgin.im>
date Mon, 02 Jun 2003 17:04:46 +0000
parents 18f7a2abc3fc
children 5c5678c7b900
line wrap: on
line diff
--- a/src/gaimrc.c	Mon Jun 02 14:41:22 2003 +0000
+++ b/src/gaimrc.c	Mon Jun 02 17:04:46 2003 +0000
@@ -191,9 +191,6 @@
 				      * was loaded from the file
 				      * or otherwise explicitly requested */
 
-static GdkColor fgcolor;
-static GdkColor bgcolor;
-
 struct parse {
 	char option[256];
 	char value[MAX_VALUES][4096];
@@ -929,33 +926,18 @@
 		} else if (!strcmp(p->option, "font_size")) {
 			gaim_prefs_set_int("/gaim/gtk/conversations/font_size", atoi(p->value[0]));
 		} else if (!strcmp(p->option, "foreground")) {
-			char buf[8];
+			char buf[14];
 
-			/*this is totally counter intuitive. why would you read in 2 before 1? 
-			 *because gaim 0.6x stored it badly, and to get the intended color
-			 *we have to read it in equally oddly.
-			 * --luke
-			 */
-
-			fgcolor.red = atoi(p->value[0]);
-			fgcolor.blue = atoi(p->value[2]);
-			fgcolor.green = atoi(p->value[1]);
-
-			g_snprintf(buf, sizeof(buf), "#%03x%03x%03x",
-					   atoi(p->value[0]), atoi(p->value[2]), atoi(p->value[1]));
+			g_snprintf(buf, sizeof(buf), "#%04x%04x%04x",
+					   atoi(p->value[0]), atoi(p->value[1]), atoi(p->value[2]));
 			gaim_prefs_set_string("/gaim/gtk/conversations/fgcolor", buf);
 
 		} else if (!strcmp(p->option, "background")) {
-			char buf[8];
+			char buf[14];
 
-			bgcolor.red = atoi(p->value[0]);
-			bgcolor.blue = atoi(p->value[2]);
-			bgcolor.green = atoi(p->value[1]);
-
-			g_snprintf(buf, sizeof(buf), "#%03x%03x%03x",
-					   atoi(p->value[0]), atoi(p->value[2]), atoi(p->value[1]));
+			g_snprintf(buf, sizeof(buf), "#%04x%04x%04x",
+					   atoi(p->value[0]), atoi(p->value[1]), atoi(p->value[2]));
 			gaim_prefs_set_string("/gaim/gtk/conversations/bgcolor", buf);
-			printf("\n\n%s\n\n",buf);
 
 		} else if (!strcmp(p->option, "report_idle")) {
 			switch(atoi(p->value[0])) {