Mercurial > pidgin
diff src/gtkconv.c @ 11269:1cbe76d30e81
[gaim-migrate @ 13451]
Refactoring the duplicate format clearing code.
Also:
(23:29:52) Etan Reisner (deryni): Since you are removing send_formatting, do we still want to be renaming use_custom_font to it?
(23:30:04) rlaager: probably not
committer: Tailor Script <tailor@pidgin.im>
author | Richard Laager <rlaager@wiktel.com> |
---|---|
date | Mon, 15 Aug 2005 04:51:53 +0000 |
parents | 477e5cca8287 |
children | ffc86d9ad8b7 |
line wrap: on
line diff
--- a/src/gtkconv.c Mon Aug 15 04:35:40 2005 +0000 +++ b/src/gtkconv.c Mon Aug 15 04:51:53 2005 +0000 @@ -300,30 +300,6 @@ } static void -clear_format(GaimGtkConversation *c) -{ - gboolean bold, italic, uline; - bold = italic = uline = FALSE; - - gtk_imhtml_get_current_format(GTK_IMHTML(c->entry), &bold, &italic, &uline); - if (bold) - gtk_imhtml_toggle_bold(GTK_IMHTML(c->entry)); - if (italic) - gtk_imhtml_toggle_italic(GTK_IMHTML(c->entry)); - if (uline) - gtk_imhtml_toggle_underline(GTK_IMHTML(c->entry)); - - gtk_imhtml_font_set_size(GTK_IMHTML(c->entry), 3); - gtk_imhtml_toggle_fontface(GTK_IMHTML(c->entry), NULL); - - gtk_imhtml_toggle_forecolor(GTK_IMHTML(c->entry), NULL); - gtk_imhtml_toggle_backcolor(GTK_IMHTML(c->entry), NULL); - gtk_imhtml_toggle_background(GTK_IMHTML(c->entry), NULL); - - gtk_widget_grab_focus(c->entry); -} - -static void default_formatize(GaimGtkConversation *c) { GaimConversation *conv = c->active_conv; @@ -1790,7 +1766,7 @@ conv->send_history = conv->send_history->next; gtk_imhtml_clear(GTK_IMHTML(gtkconv->entry)); - clear_format(gtkconv); + gtk_imhtml_clear_formatting(GTK_IMHTML(gtkconv->entry)); gtk_imhtml_append_text_with_images( GTK_IMHTML(gtkconv->entry), conv->send_history->data, 0, NULL); @@ -1814,7 +1790,7 @@ conv->send_history = conv->send_history->prev; gtk_imhtml_clear(GTK_IMHTML(gtkconv->entry)); - clear_format(gtkconv); + gtk_imhtml_clear_formatting(GTK_IMHTML(gtkconv->entry)); gtk_imhtml_append_text_with_images( GTK_IMHTML(gtkconv->entry), conv->send_history->data, 0, NULL);