Mercurial > pidgin
comparison src/gtkimhtml.c @ 13223:3a3538be5b6a
[gaim-migrate @ 15587]
While tracking down a formatting bug that occurred when switching protocols in a contact-aware convo, SimGuy noticed that imhtml_clear_formatting didn't clear imhtml->edit.fontface. We both noticed that those values should be g_free()d before clearing them. I noticed that formatting wasn't clearing properly when I was testing a plain old AIM conversation and just hit Ctrl-R.
committer: Tailor Script <tailor@pidgin.im>
author | Richard Laager <rlaager@wiktel.com> |
---|---|
date | Sat, 11 Feb 2006 07:23:29 +0000 |
parents | 1ed228c65e89 |
children | 2f6c932e5742 |
comparison
equal
deleted
inserted
replaced
13222:ca677053ac11 | 13223:3a3538be5b6a |
---|---|
3736 | 3736 |
3737 gtk_text_buffer_remove_tag_by_name(imhtml->text_buffer, "BOLD", &start, &end); | 3737 gtk_text_buffer_remove_tag_by_name(imhtml->text_buffer, "BOLD", &start, &end); |
3738 gtk_text_buffer_remove_tag_by_name(imhtml->text_buffer, "ITALICS", &start, &end); | 3738 gtk_text_buffer_remove_tag_by_name(imhtml->text_buffer, "ITALICS", &start, &end); |
3739 gtk_text_buffer_remove_tag_by_name(imhtml->text_buffer, "UNDERLINE", &start, &end); | 3739 gtk_text_buffer_remove_tag_by_name(imhtml->text_buffer, "UNDERLINE", &start, &end); |
3740 gtk_text_buffer_remove_tag_by_name(imhtml->text_buffer, "STRIKE", &start, &end); | 3740 gtk_text_buffer_remove_tag_by_name(imhtml->text_buffer, "STRIKE", &start, &end); |
3741 remove_font_size(imhtml, &start, &end, TRUE); | 3741 remove_font_size(imhtml, &start, &end, FALSE); |
3742 remove_font_face(imhtml, &start, &end, TRUE); | 3742 remove_font_face(imhtml, &start, &end, FALSE); |
3743 remove_font_forecolor(imhtml, &start, &end, TRUE); | 3743 remove_font_forecolor(imhtml, &start, &end, FALSE); |
3744 remove_font_backcolor(imhtml, &start, &end, TRUE); | 3744 remove_font_backcolor(imhtml, &start, &end, FALSE); |
3745 remove_font_background(imhtml, &start, &end, TRUE); | 3745 remove_font_background(imhtml, &start, &end, FALSE); |
3746 remove_font_link(imhtml, &start, &end, TRUE); | 3746 remove_font_link(imhtml, &start, &end, FALSE); |
3747 | 3747 |
3748 imhtml->edit.bold = 0; | 3748 imhtml->edit.bold = 0; |
3749 imhtml->edit.italic = 0; | 3749 imhtml->edit.italic = 0; |
3750 imhtml->edit.underline = 0; | 3750 imhtml->edit.underline = 0; |
3751 imhtml->edit.strike = 0; | 3751 imhtml->edit.strike = 0; |
3752 imhtml->edit.fontsize = 0; | 3752 imhtml->edit.fontsize = 0; |
3753 | |
3754 g_free(imhtml->edit.fontface); | |
3755 imhtml->edit.fontface = NULL; | |
3756 | |
3757 g_free(imhtml->edit.forecolor); | |
3753 imhtml->edit.forecolor = NULL; | 3758 imhtml->edit.forecolor = NULL; |
3759 | |
3760 g_free(imhtml->edit.backcolor); | |
3754 imhtml->edit.backcolor = NULL; | 3761 imhtml->edit.backcolor = NULL; |
3762 | |
3763 g_free(imhtml->edit.background); | |
3755 imhtml->edit.background = NULL; | 3764 imhtml->edit.background = NULL; |
3756 } | 3765 } |
3757 | 3766 |
3758 /* Editable stuff */ | 3767 /* Editable stuff */ |
3759 static void preinsert_cb(GtkTextBuffer *buffer, GtkTextIter *iter, gchar *text, gint len, GtkIMHtml *imhtml) | 3768 static void preinsert_cb(GtkTextBuffer *buffer, GtkTextIter *iter, gchar *text, gint len, GtkIMHtml *imhtml) |