comparison src/gtkimhtml.c @ 4343:36cb0bb95b9c

[gaim-migrate @ 4608] HR works again. Thanks, KingAnt (Mark Doliner). This is rather hackish (The 5000 width) but hey.. it seems to work okay. Let me know if you have any problems with it. If someone wants to do this The Right Way (tm) then please feel free to do so.. committer: Tailor Script <tailor@pidgin.im>
author Rob Flynn <gaim@robflynn.com>
date Sun, 19 Jan 2003 03:29:00 +0000
parents cddb50734169
children 8299114f5693
comparison
equal deleted inserted replaced
4342:051265d35a36 4343:36cb0bb95b9c
576 576
577 577
578 578
579 #define NEW_TEXT_BIT 0 579 #define NEW_TEXT_BIT 0
580 #define NEW_HR_BIT 1 580 #define NEW_HR_BIT 1
581 #define NEW_COMMENT_BIT 2
581 #define NEW_BIT(x) ws [wpos] = '\0'; \ 582 #define NEW_BIT(x) ws [wpos] = '\0'; \
582 mark2 = gtk_text_buffer_create_mark(imhtml->text_buffer, NULL, &iter, TRUE); \ 583 mark2 = gtk_text_buffer_create_mark(imhtml->text_buffer, NULL, &iter, TRUE); \
583 gtk_text_buffer_insert(imhtml->text_buffer, &iter, ws, -1); \ 584 gtk_text_buffer_insert(imhtml->text_buffer, &iter, ws, -1); \
584 gtk_text_buffer_get_end_iter(imhtml->text_buffer, &iter); \ 585 gtk_text_buffer_get_end_iter(imhtml->text_buffer, &iter); \
585 gtk_text_buffer_get_iter_at_mark(imhtml->text_buffer, &siter, mark2); \ 586 gtk_text_buffer_get_iter_at_mark(imhtml->text_buffer, &siter, mark2); \
627 gtk_text_buffer_apply_tag(imhtml->text_buffer, texttag, &siter, &iter); \ 628 gtk_text_buffer_apply_tag(imhtml->text_buffer, texttag, &siter, &iter); \
628 } \ 629 } \
629 wpos = 0; \ 630 wpos = 0; \
630 ws[0] = 0; \ 631 ws[0] = 0; \
631 gtk_text_buffer_get_end_iter(imhtml->text_buffer, &iter); \ 632 gtk_text_buffer_get_end_iter(imhtml->text_buffer, &iter); \
632 633 if (x == NEW_HR_BIT) { \
633 634 GtkTextChildAnchor *anchor = gtk_text_buffer_create_child_anchor(imhtml->text_buffer, &iter); \
634 /* if (x == NEW_HR_BIT) { \ 635 GtkWidget *sep = gtk_hseparator_new(); \
635 sep = gtk_hseparator_new(); \ 636 gtk_widget_set_size_request(GTK_WIDGET(sep), 5000, 2); \
636 gtk_widget_size_request(GTK_WIDGET(imhtml), &req); \
637 gtk_widget_set_size_request(sep, 20, -1); \
638 anchor = gtk_text_buffer_create_child_anchor(imhtml->text_buffer, &iter); \
639 gtk_text_view_add_child_at_anchor(GTK_TEXT_VIEW(imhtml), sep, anchor); \ 637 gtk_text_view_add_child_at_anchor(GTK_TEXT_VIEW(imhtml), sep, anchor); \
640 gtk_widget_show(sep); \ 638 gtk_widget_show(sep); \
641 } */ 639 } \
642 640
643 GString* gtk_imhtml_append_text (GtkIMHtml *imhtml, 641 GString* gtk_imhtml_append_text (GtkIMHtml *imhtml,
644 const gchar *text, 642 const gchar *text,
645 gint len, 643 gint len,
646 GtkIMHtmlOptions options) 644 GtkIMHtmlOptions options)
783 break; 781 break;
784 case 26: /* HR */ 782 case 26: /* HR */
785 case 42: /* HR (opt) */ 783 case 42: /* HR (opt) */
786 ws[wpos++] = '\n'; 784 ws[wpos++] = '\n';
787 NEW_BIT(NEW_HR_BIT); 785 NEW_BIT(NEW_HR_BIT);
786 ws[wpos++] = '\n';
788 break; 787 break;
789 case 27: /* /FONT */ 788 case 27: /* /FONT */
790 if (fonts) { 789 if (fonts) {
791 FontDetail *font = fonts->data; 790 FontDetail *font = fonts->data;
792 NEW_BIT (NEW_TEXT_BIT); 791 NEW_BIT (NEW_TEXT_BIT);