# HG changeset patch # User Mark Doliner # Date 1126760066 0 # Node ID 8b494b5763c2079b36b49441ccc5a88bd139f273 # Parent 30ad548e8537393fec5271aee6cbc84314552973 [gaim-migrate @ 13804] We were both adding and removing /gaim/gtk/conversations/send_formatting, I figured that wasn't right so I removed it completely. Also, do we really want to be calling stylize in gtkutils.c? It seems like that would conflict with all the formatting done by the gtkimhtml. Can someone please look at that? It shouldn't take too long to figure it out if you're familiar with gtkimhtml. committer: Tailor Script diff -r 30ad548e8537 -r 8b494b5763c2 src/gtkconv.c --- a/src/gtkconv.c Thu Sep 15 03:43:18 2005 +0000 +++ b/src/gtkconv.c Thu Sep 15 04:54:26 2005 +0000 @@ -6439,7 +6439,6 @@ /* Conversations */ gaim_prefs_add_none("/gaim/gtk/conversations"); gaim_prefs_add_bool("/gaim/gtk/conversations/close_on_tabs", TRUE); - gaim_prefs_add_bool("/gaim/gtk/conversations/send_formatting", FALSE); gaim_prefs_add_bool("/gaim/gtk/conversations/send_bold", FALSE); gaim_prefs_add_bool("/gaim/gtk/conversations/send_italic", FALSE); gaim_prefs_add_bool("/gaim/gtk/conversations/send_underline", FALSE); diff -r 30ad548e8537 -r 8b494b5763c2 src/gtkutils.c --- a/src/gtkutils.c Thu Sep 15 03:43:18 2005 +0000 +++ b/src/gtkutils.c Thu Sep 15 04:54:26 2005 +0000 @@ -829,64 +829,65 @@ char *stylize(const gchar *text, int length) { + char *tmp; gchar *buf; - char *tmp = g_malloc(length); + const char *font; + GdkColor fg_color, bg_color; + tmp = g_malloc(length); buf = g_malloc(length); g_snprintf(buf, length, "%s", text); - if (gaim_prefs_get_bool("/gaim/gtk/conversations/send_formatting")) { - const char *font; - GdkColor fg_color, bg_color; - - if (gaim_prefs_get_bool("/gaim/gtk/conversations/send_bold")) { - g_snprintf(tmp, length, "%s", buf); - strcpy(buf, tmp); - } + if (gaim_prefs_get_bool("/gaim/gtk/conversations/send_bold")) + { + g_snprintf(tmp, length, "%s", buf); + strcpy(buf, tmp); + } - if (gaim_prefs_get_bool("/gaim/gtk/conversations/send_italic")) { - g_snprintf(tmp, length, "%s", buf); - strcpy(buf, tmp); - } + if (gaim_prefs_get_bool("/gaim/gtk/conversations/send_italic")) + { + g_snprintf(tmp, length, "%s", buf); + strcpy(buf, tmp); + } - if (gaim_prefs_get_bool("/gaim/gtk/conversations/send_underline")) { - g_snprintf(tmp, length, "%s", buf); - strcpy(buf, tmp); - } + if (gaim_prefs_get_bool("/gaim/gtk/conversations/send_underline")) + { + g_snprintf(tmp, length, "%s", buf); + strcpy(buf, tmp); + } - font = gaim_prefs_get_string("/gaim/gtk/conversations/font_face"); - - if (strcmp(font, "") != 0) { - g_snprintf(tmp, length, "%s", font, buf); - strcpy(buf, tmp); - } + font = gaim_prefs_get_string("/gaim/gtk/conversations/font_face"); - g_snprintf(tmp, length, "%s", - gaim_prefs_get_int("/gaim/gtk/conversations/font_size"), buf); + if (strcmp(font, "") != 0) + { + g_snprintf(tmp, length, "%s", font, buf); strcpy(buf, tmp); + } - if(strcmp(gaim_prefs_get_string("/gaim/gtk/conversations/fgcolor"), "") != 0) - { - gdk_color_parse(gaim_prefs_get_string("/gaim/gtk/conversations/fgcolor"), - &fg_color); + g_snprintf(tmp, length, "%s", + gaim_prefs_get_int("/gaim/gtk/conversations/font_size"), buf); + strcpy(buf, tmp); + + if (strcmp(gaim_prefs_get_string("/gaim/gtk/conversations/fgcolor"), "") != 0) + { + gdk_color_parse(gaim_prefs_get_string("/gaim/gtk/conversations/fgcolor"), + &fg_color); - g_snprintf(tmp, length, "%s", - fg_color.red/256, fg_color.green/256, - fg_color.blue/256, buf); - strcpy(buf, tmp); - } + g_snprintf(tmp, length, "%s", + fg_color.red/256, fg_color.green/256, + fg_color.blue/256, buf); + strcpy(buf, tmp); + } - if(strcmp(gaim_prefs_get_string("/gaim/gtk/conversations/bgcolor"), "") != 0) - { - gdk_color_parse(gaim_prefs_get_string("/gaim/gtk/conversations/bgcolor"), - &bg_color); + if (strcmp(gaim_prefs_get_string("/gaim/gtk/conversations/bgcolor"), "") != 0) + { + gdk_color_parse(gaim_prefs_get_string("/gaim/gtk/conversations/bgcolor"), + &bg_color); - g_snprintf(tmp, length, "%s", - bg_color.red/256, bg_color.green/256, - bg_color.blue/256, buf); - strcpy(buf, tmp); - } - + g_snprintf(tmp, length, "%s", + bg_color.red/256, bg_color.green/256, + bg_color.blue/256, buf); + strcpy(buf, tmp); } g_free(tmp);