Mercurial > pidgin.yaz
comparison src/gtkconv.c @ 4421:31834b4598eb
[gaim-migrate @ 4694]
(23:26:06) deryni: Black on Black is not the best color choice
this should let you use custom colors again. thanks deryni!
committer: Tailor Script <tailor@pidgin.im>
author | Luke Schierer <lschiere@pidgin.im> |
---|---|
date | Sun, 26 Jan 2003 04:27:14 +0000 |
parents | c90039137172 |
children | 2054d8429925 |
comparison
equal
deleted
inserted
replaced
4420:64d845f2a0fb | 4421:31834b4598eb |
---|---|
416 g_snprintf(buf2, limit, | 416 g_snprintf(buf2, limit, |
417 "<FONT SIZE=\"%d\">%s</FONT>", fontsize, buf); | 417 "<FONT SIZE=\"%d\">%s</FONT>", fontsize, buf); |
418 strcpy(buf, buf2); | 418 strcpy(buf, buf2); |
419 } | 419 } |
420 | 420 |
421 if ((font_options & OPT_FONT_FGCOL) || gtkconv->has_fg) { | 421 if (font_options & OPT_FONT_FGCOL) { |
422 g_snprintf(buf2, limit, | 422 g_snprintf(buf2, limit, |
423 "<FONT COLOR=\"#%02X%02X%02X\">%s</FONT>", | 423 "<FONT COLOR=\"#%02X%02X%02X\">%s</FONT>", |
424 gtkconv->fg_color.red / 256, | 424 gtkconv->fg_color.red / 256, |
425 gtkconv->fg_color.green / 256, | 425 gtkconv->fg_color.green / 256, |
426 gtkconv->fg_color.blue / 256, buf); | 426 gtkconv->fg_color.blue / 256, buf); |
427 strcpy(buf, buf2); | 427 strcpy(buf, buf2); |
428 } | 428 } |
429 | 429 |
430 if ((font_options & OPT_FONT_BGCOL) || gtkconv->has_bg) { | 430 if (font_options & OPT_FONT_BGCOL) { |
431 g_snprintf(buf2, limit, | 431 g_snprintf(buf2, limit, |
432 "<BODY BGCOLOR=\"#%02X%02X%02X\">%s</BODY>", | 432 "<BODY BGCOLOR=\"#%02X%02X%02X\">%s</BODY>", |
433 gtkconv->fg_color.red / 256, | 433 gtkconv->bg_color.red / 256, |
434 gtkconv->fg_color.green / 256, | 434 gtkconv->bg_color.green / 256, |
435 gtkconv->fg_color.blue / 256, buf); | 435 gtkconv->bg_color.blue / 256, buf); |
436 strcpy(buf, buf2); | 436 strcpy(buf, buf2); |
437 } | 437 } |
438 } | 438 } |
439 | 439 |
440 g_free(buf2); | 440 g_free(buf2); |
3299 | 3299 |
3300 /* Setup some initial variables. */ | 3300 /* Setup some initial variables. */ |
3301 gtkconv->sg = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL); | 3301 gtkconv->sg = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL); |
3302 gtkconv->tooltips = gtk_tooltips_new(); | 3302 gtkconv->tooltips = gtk_tooltips_new(); |
3303 | 3303 |
3304 /* Setup the foreground and background colors */ | |
3305 gaim_gtkconv_update_font_colors(conv); | |
3306 | |
3304 if (conv_type == GAIM_CONV_CHAT) { | 3307 if (conv_type == GAIM_CONV_CHAT) { |
3305 gtkconv->u.chat = g_malloc0(sizeof(struct gaim_gtk_chat_pane)); | 3308 gtkconv->u.chat = g_malloc0(sizeof(struct gaim_gtk_chat_pane)); |
3306 | 3309 |
3307 pane = setup_chat_pane(conv); | 3310 pane = setup_chat_pane(conv); |
3308 } | 3311 } |
4595 (!(font_options & OPT_FONT_UNDERLINE))); | 4598 (!(font_options & OPT_FONT_UNDERLINE))); |
4596 } | 4599 } |
4597 } | 4600 } |
4598 | 4601 |
4599 void | 4602 void |
4603 gaim_gtkconv_update_font_colors(struct gaim_conversation *conv) | |
4604 { | |
4605 struct gaim_gtk_conversation *gtkconv = GAIM_GTK_CONVERSATION(conv); | |
4606 | |
4607 gtkconv->fg_color.red = fgcolor.red; | |
4608 gtkconv->fg_color.blue = fgcolor.blue; | |
4609 gtkconv->fg_color.green = fgcolor.green; | |
4610 | |
4611 gtkconv->bg_color.red = bgcolor.red; | |
4612 gtkconv->bg_color.blue = bgcolor.blue; | |
4613 gtkconv->bg_color.green = bgcolor.green; | |
4614 | |
4615 } | |
4616 | |
4617 void | |
4600 gaim_gtkconv_update_tabs(void) | 4618 gaim_gtkconv_update_tabs(void) |
4601 { | 4619 { |
4602 GList *l; | 4620 GList *l; |
4603 GtkPositionType pos; | 4621 GtkPositionType pos; |
4604 struct gaim_window *win; | 4622 struct gaim_window *win; |