Mercurial > pidgin
comparison src/gtkimhtml.c @ 10761:7c6b69eb82f2
[gaim-migrate @ 12365]
background colors don't crash anymore
committer: Tailor Script <tailor@pidgin.im>
author | Nathan Walp <nwalp@pidgin.im> |
---|---|
date | Tue, 29 Mar 2005 15:12:14 +0000 |
parents | c4cb90065e1d |
children | 3e4991079b2f |
comparison
equal
deleted
inserted
replaced
10760:f93ed7f6ecc7 | 10761:7c6b69eb82f2 |
---|---|
2319 g_free (font->sml); | 2319 g_free (font->sml); |
2320 | 2320 |
2321 if ((font->size != 3) && (imhtml->format_functions & (GTK_IMHTML_GROW|GTK_IMHTML_SHRINK))) | 2321 if ((font->size != 3) && (imhtml->format_functions & (GTK_IMHTML_GROW|GTK_IMHTML_SHRINK))) |
2322 gtk_imhtml_font_set_size(imhtml, 3); | 2322 gtk_imhtml_font_set_size(imhtml, 3); |
2323 | 2323 |
2324 | |
2325 fonts = g_slist_remove (fonts, font); | |
2324 g_free(font); | 2326 g_free(font); |
2325 | 2327 |
2326 fonts = fonts->next; | |
2327 if (fonts) { | 2328 if (fonts) { |
2328 GtkIMHtmlFontDetail *font = fonts->data; | 2329 GtkIMHtmlFontDetail *font = fonts->data; |
2329 | 2330 |
2330 if (font->face && (imhtml->format_functions & GTK_IMHTML_FACE)) | 2331 if (font->face && (imhtml->format_functions & GTK_IMHTML_FACE)) |
2331 gtk_imhtml_toggle_fontface(imhtml, font->face); | 2332 gtk_imhtml_toggle_fontface(imhtml, font->face); |
3812 gboolean gtk_imhtml_toggle_backcolor(GtkIMHtml *imhtml, const char *color) | 3813 gboolean gtk_imhtml_toggle_backcolor(GtkIMHtml *imhtml, const char *color) |
3813 { | 3814 { |
3814 GObject *object; | 3815 GObject *object; |
3815 GtkTextIter start, end; | 3816 GtkTextIter start, end; |
3816 struct backcolor_tag *bct = NULL; | 3817 struct backcolor_tag *bct = NULL; |
3818 | |
3817 if (imhtml->edit.backcolor != NULL) | 3819 if (imhtml->edit.backcolor != NULL) |
3818 g_free(imhtml->edit.backcolor); | 3820 g_free(imhtml->edit.backcolor); |
3821 | |
3822 imhtml->edit.backcolor = NULL; | |
3819 | 3823 |
3820 if (color && strcmp(color, "") != 0) { | 3824 if (color && strcmp(color, "") != 0) { |
3821 imhtml->edit.backcolor = g_strdup(color); | 3825 imhtml->edit.backcolor = g_strdup(color); |
3822 | 3826 |
3823 if (imhtml->wbfo) { | 3827 if (imhtml->wbfo) { |