Mercurial > pidgin.yaz
comparison src/gtkconv.c @ 11276:17ebda61c6ce
[gaim-migrate @ 13463]
Revert part of my last commit because I'm dumb. Then, fix the Ctrl-Up and Ctrl-Down that I broke when fixing the clear button. Now both of those (along with everything else I fixed) should work... I hope!
committer: Tailor Script <tailor@pidgin.im>
author | Richard Laager <rlaager@wiktel.com> |
---|---|
date | Mon, 15 Aug 2005 22:48:20 +0000 |
parents | ffc86d9ad8b7 |
children | ed5302df41b0 |
comparison
equal
deleted
inserted
replaced
11275:ffc86d9ad8b7 | 11276:17ebda61c6ce |
---|---|
1763 | 1763 |
1764 conv->send_history->data = | 1764 conv->send_history->data = |
1765 gtk_imhtml_get_markup(GTK_IMHTML(gtkconv->entry)); | 1765 gtk_imhtml_get_markup(GTK_IMHTML(gtkconv->entry)); |
1766 } | 1766 } |
1767 | 1767 |
1768 if (conv->send_history->next && | 1768 if (conv->send_history->next && conv->send_history->next->data) { |
1769 conv->send_history->next->data) { | 1769 GObject *object; |
1770 GtkTextIter iter; | 1770 GtkTextIter iter; |
1771 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)); |
1772 | 1772 |
1773 conv->send_history = conv->send_history->next; | 1773 conv->send_history = conv->send_history->next; |
1774 | |
1775 /* Block the signal to prevent application of default formatting. */ | |
1776 object = g_object_ref(G_OBJECT(gtkconv->entry)); | |
1777 g_signal_handlers_block_matched(object, G_SIGNAL_MATCH_DATA, 0, 0, NULL, | |
1778 NULL, gtkconv); | |
1779 /* Clear the formatting. */ | |
1780 gtk_imhtml_clear_formatting(GTK_IMHTML(gtkconv->entry)); | |
1781 /* Unblock the signal. */ | |
1782 g_signal_handlers_unblock_matched(object, G_SIGNAL_MATCH_DATA, 0, 0, NULL, | |
1783 NULL, gtkconv); | |
1784 g_object_unref(object); | |
1785 | |
1774 gtk_imhtml_clear(GTK_IMHTML(gtkconv->entry)); | 1786 gtk_imhtml_clear(GTK_IMHTML(gtkconv->entry)); |
1775 gtk_imhtml_append_text_with_images( | 1787 gtk_imhtml_append_text_with_images( |
1776 GTK_IMHTML(gtkconv->entry), conv->send_history->data, | 1788 GTK_IMHTML(gtkconv->entry), conv->send_history->data, |
1777 0, NULL); | 1789 0, NULL); |
1778 /* this is mainly just a hack so the formatting at the | 1790 /* this is mainly just a hack so the formatting at the |
1786 | 1798 |
1787 case GDK_Down: | 1799 case GDK_Down: |
1788 if (!conv->send_history) | 1800 if (!conv->send_history) |
1789 break; | 1801 break; |
1790 | 1802 |
1791 if (conv->send_history->prev && | 1803 if (conv->send_history->prev && conv->send_history->prev->data) { |
1792 conv->send_history->prev->data) { | 1804 GObject *object; |
1793 GtkTextIter iter; | 1805 GtkTextIter iter; |
1794 GtkTextBuffer *buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(gtkconv->entry)); | 1806 GtkTextBuffer *buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(gtkconv->entry)); |
1795 | 1807 |
1796 conv->send_history = conv->send_history->prev; | 1808 conv->send_history = conv->send_history->prev; |
1809 | |
1810 /* Block the signal to prevent application of default formatting. */ | |
1811 object = g_object_ref(G_OBJECT(gtkconv->entry)); | |
1812 g_signal_handlers_block_matched(object, G_SIGNAL_MATCH_DATA, 0, 0, NULL, | |
1813 NULL, gtkconv); | |
1814 /* Clear the formatting. */ | |
1815 gtk_imhtml_clear_formatting(GTK_IMHTML(gtkconv->entry)); | |
1816 /* Unblock the signal. */ | |
1817 g_signal_handlers_unblock_matched(object, G_SIGNAL_MATCH_DATA, 0, 0, NULL, | |
1818 NULL, gtkconv); | |
1819 g_object_unref(object); | |
1820 | |
1797 gtk_imhtml_clear(GTK_IMHTML(gtkconv->entry)); | 1821 gtk_imhtml_clear(GTK_IMHTML(gtkconv->entry)); |
1798 gtk_imhtml_append_text_with_images( | 1822 gtk_imhtml_append_text_with_images( |
1799 GTK_IMHTML(gtkconv->entry), conv->send_history->data, | 1823 GTK_IMHTML(gtkconv->entry), conv->send_history->data, |
1800 0, NULL); | 1824 0, NULL); |
1801 /* this is mainly just a hack so the formatting at the | 1825 /* this is mainly just a hack so the formatting at the |