Mercurial > pidgin.yaz
comparison src/gtkconv.c @ 11275:ffc86d9ad8b7
[gaim-migrate @ 13461]
Make the new clear formatting button work.
committer: Tailor Script <tailor@pidgin.im>
author | Richard Laager <rlaager@wiktel.com> |
---|---|
date | Mon, 15 Aug 2005 19:46:32 +0000 |
parents | 1cbe76d30e81 |
children | 17ebda61c6ce |
comparison
equal
deleted
inserted
replaced
11274:67a929d50cfe | 11275:ffc86d9ad8b7 |
---|---|
362 else | 362 else |
363 gtk_imhtml_set_whole_buffer_formatting_only(GTK_IMHTML(c->entry), FALSE); | 363 gtk_imhtml_set_whole_buffer_formatting_only(GTK_IMHTML(c->entry), FALSE); |
364 } | 364 } |
365 } | 365 } |
366 | 366 |
367 static void | |
368 clear_formatting_cb(GtkIMHtml *imhtml, GaimGtkConversation *gtkconv) | |
369 { | |
370 default_formatize(gtkconv); | |
371 } | |
372 | |
367 static const char * | 373 static const char * |
368 gaim_gtk_get_cmd_prefix(void) | 374 gaim_gtk_get_cmd_prefix(void) |
369 { | 375 { |
370 return "/"; | 376 return "/"; |
371 } | 377 } |
1764 GtkTextIter iter; | 1770 GtkTextIter iter; |
1765 GtkTextBuffer *buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(gtkconv->entry)); | 1771 GtkTextBuffer *buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(gtkconv->entry)); |
1766 | 1772 |
1767 conv->send_history = conv->send_history->next; | 1773 conv->send_history = conv->send_history->next; |
1768 gtk_imhtml_clear(GTK_IMHTML(gtkconv->entry)); | 1774 gtk_imhtml_clear(GTK_IMHTML(gtkconv->entry)); |
1769 gtk_imhtml_clear_formatting(GTK_IMHTML(gtkconv->entry)); | |
1770 gtk_imhtml_append_text_with_images( | 1775 gtk_imhtml_append_text_with_images( |
1771 GTK_IMHTML(gtkconv->entry), conv->send_history->data, | 1776 GTK_IMHTML(gtkconv->entry), conv->send_history->data, |
1772 0, NULL); | 1777 0, NULL); |
1773 /* this is mainly just a hack so the formatting at the | 1778 /* this is mainly just a hack so the formatting at the |
1774 * cursor gets picked up. */ | 1779 * cursor gets picked up. */ |
1788 GtkTextIter iter; | 1793 GtkTextIter iter; |
1789 GtkTextBuffer *buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(gtkconv->entry)); | 1794 GtkTextBuffer *buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(gtkconv->entry)); |
1790 | 1795 |
1791 conv->send_history = conv->send_history->prev; | 1796 conv->send_history = conv->send_history->prev; |
1792 gtk_imhtml_clear(GTK_IMHTML(gtkconv->entry)); | 1797 gtk_imhtml_clear(GTK_IMHTML(gtkconv->entry)); |
1793 gtk_imhtml_clear_formatting(GTK_IMHTML(gtkconv->entry)); | |
1794 gtk_imhtml_append_text_with_images( | 1798 gtk_imhtml_append_text_with_images( |
1795 GTK_IMHTML(gtkconv->entry), conv->send_history->data, | 1799 GTK_IMHTML(gtkconv->entry), conv->send_history->data, |
1796 0, NULL); | 1800 0, NULL); |
1797 /* this is mainly just a hack so the formatting at the | 1801 /* this is mainly just a hack so the formatting at the |
1798 * cursor gets picked up. */ | 1802 * cursor gets picked up. */ |
4179 | 4183 |
4180 /* had to move this after the imtoolbar is attached so that the | 4184 /* had to move this after the imtoolbar is attached so that the |
4181 * signals get fired to toggle the buttons on the toolbar as well. | 4185 * signals get fired to toggle the buttons on the toolbar as well. |
4182 */ | 4186 */ |
4183 default_formatize(gtkconv); | 4187 default_formatize(gtkconv); |
4188 | |
4189 g_signal_connect_after(G_OBJECT(gtkconv->entry), "format_function_clear", | |
4190 G_CALLBACK(clear_formatting_cb), gtkconv); | |
4184 | 4191 |
4185 gtkconv->u.im->animate = gaim_prefs_get_bool("/gaim/gtk/conversations/im/animate_buddy_icons"); | 4192 gtkconv->u.im->animate = gaim_prefs_get_bool("/gaim/gtk/conversations/im/animate_buddy_icons"); |
4186 gtkconv->u.im->show_icon = TRUE; | 4193 gtkconv->u.im->show_icon = TRUE; |
4187 | 4194 |
4188 /* | 4195 /* |