# HG changeset patch # User Luke Schierer # Date 1054531037 0 # Node ID 80682ac367fada310d205b270cef2c63e99b1200 # Parent 84221116b28e7539e8ec60622bf655924cee6508 [gaim-migrate @ 6064] i got foreground colors to work with alot of patience on chipx86's part as i sent him some truely horrific colors. background color preferences are still broke. using gimp, they _appear_ to be broke the same way fgcolors were, but the same fix doesn't seem to change the resulting color, as you can see with this code. committer: Tailor Script diff -r 84221116b28e -r 80682ac367fa src/gaimrc.c --- a/src/gaimrc.c Mon Jun 02 05:08:02 2003 +0000 +++ b/src/gaimrc.c Mon Jun 02 05:17:17 2003 +0000 @@ -922,22 +922,30 @@ gaim_prefs_set_int("/gaim/gtk/conversations/font_size", atoi(p->value[0])); } else if (!strcmp(p->option, "foreground")) { char buf[8]; + + /*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.green = atoi(p->value[1]); fgcolor.blue = atoi(p->value[2]); + fgcolor.green = atoi(p->value[1]); - g_snprintf(buf, sizeof(buf), "#%2x%2x%2x", - atoi(p->value[0]), atoi(p->value[1]), atoi(p->value[2])); + g_snprintf(buf, sizeof(buf), "#%02x%02x%02x", + atoi(p->value[0]), atoi(p->value[2]), atoi(p->value[1])); gaim_prefs_set_string("/gaim/gtk/conversations/fgcolor", buf); } else if (!strcmp(p->option, "background")) { char buf[8]; + bgcolor.red = atoi(p->value[0]); - bgcolor.green = atoi(p->value[1]); bgcolor.blue = atoi(p->value[2]); + bgcolor.green = atoi(p->value[1]); - g_snprintf(buf, sizeof(buf), "#%2x%2x%2x", - atoi(p->value[0]), atoi(p->value[1]), atoi(p->value[2])); + g_snprintf(buf, sizeof(buf), "#%02x%02x%02x", + atoi(p->value[0]), atoi(p->value[2]), atoi(p->value[1])); gaim_prefs_set_string("/gaim/gtk/conversations/bgcolor", buf); } else if (!strcmp(p->option, "report_idle")) {