src/dialogs.c

changeset 7714
b66882cbab6a
parent 7707
571801b698e4
child 7735
716fd57a8d2d
equal deleted inserted replaced
7713:a400861e425d 7714:b66882cbab6a
1091 /* GTK_IS_EDITABLE(c->entry); huh? */ 1091 /* GTK_IS_EDITABLE(c->entry); huh? */
1092 1092
1093 gtkconv = GAIM_GTK_CONVERSATION(c); 1093 gtkconv = GAIM_GTK_CONVERSATION(c);
1094 1094
1095 gtkconv->fg_color = text_color; 1095 gtkconv->fg_color = text_color;
1096 g_snprintf(open_tag, 23, "<FONT COLOR=\"#%02X%02X%02X\">", 1096 g_snprintf(open_tag, 23, "#%02X%02X%02X",
1097 text_color.red / 256, 1097 text_color.red / 256,
1098 text_color.green / 256, 1098 text_color.green / 256,
1099 text_color.blue / 256); 1099 text_color.blue / 256);
1100 gaim_gtk_surround(gtkconv, open_tag, "</FONT>"); 1100 gtk_imhtml_toggle_forecolor(GTK_IMHTML(gtkconv->entry), open_tag);
1101 1101
1102 gaim_debug(GAIM_DEBUG_MISC, "fgcolor dialog", "#%02X%02X%02X\n",
1103 text_color.red / 256,
1104 text_color.green / 256,
1105 text_color.blue / 256);
1106 g_free(open_tag); 1102 g_free(open_tag);
1107 cancel_fgcolor(NULL, c); 1103 cancel_fgcolor(NULL, c);
1108 } 1104 }
1109 1105
1110 void do_bgcolor(GtkWidget *widget, GtkColorSelection *colorsel) 1106 void do_bgcolor(GtkWidget *widget, GtkColorSelection *colorsel)
1122 /* GTK_IS_EDITABLE(c->entry); huh? */ 1118 /* GTK_IS_EDITABLE(c->entry); huh? */
1123 1119
1124 gtkconv = GAIM_GTK_CONVERSATION(c); 1120 gtkconv = GAIM_GTK_CONVERSATION(c);
1125 1121
1126 gtkconv->bg_color = text_color; 1122 gtkconv->bg_color = text_color;
1127 g_snprintf(open_tag, 25, "<BODY BGCOLOR=\"#%02X%02X%02X\">", 1123 g_snprintf(open_tag, 25, "#%02X%02X%02X",
1128 text_color.red / 256, 1124 text_color.red / 256,
1129 text_color.green / 256, 1125 text_color.green / 256,
1130 text_color.blue / 256); 1126 text_color.blue / 256);
1131 gaim_gtk_surround(gtkconv, open_tag, "</BODY>"); 1127 gtk_imhtml_toggle_backcolor(GTK_IMHTML(gtkconv->entry), open_tag);
1132 gaim_debug(GAIM_DEBUG_MISC, "bgcolor dialog", "#%02X%02X%02X\n", 1128
1133 text_color.red / 256,
1134 text_color.green / 256,
1135 text_color.blue / 256);
1136
1137 g_free(open_tag); 1129 g_free(open_tag);
1138 cancel_bgcolor(NULL, c); 1130 cancel_bgcolor(NULL, c);
1139 } 1131 }
1140 1132
1141 void show_fgcolor_dialog(GaimConversation *c, GtkWidget *color) 1133 void show_fgcolor_dialog(GaimConversation *c, GtkWidget *color)

mercurial