comparison src/gtkimhtml.c @ 8548:fae482a76700

[gaim-migrate @ 9290] I'm not sure why this fixes things, but it does. Gaim development at its finest. If you have any reasons to protest a Gaim release within the hour speak now or forever hold your peace. committer: Tailor Script <tailor@pidgin.im>
author Sean Egan <seanegan@gmail.com>
date Thu, 01 Apr 2004 19:25:11 +0000
parents e0f659e4323e
children 6eb60b70491e
comparison
equal deleted inserted replaced
8547:9b2f06d7412a 8548:fae482a76700
3006 GtkTextIter ia, ib; 3006 GtkTextIter ia, ib;
3007 gtk_text_buffer_get_iter_at_mark(a->buffer, &ia, a->start); 3007 gtk_text_buffer_get_iter_at_mark(a->buffer, &ia, a->start);
3008 gtk_text_buffer_get_iter_at_mark(b->buffer, &ib, b->start); 3008 gtk_text_buffer_get_iter_at_mark(b->buffer, &ib, b->start);
3009 /* The -1 here makes it so that if I have two spans that close at the same point, the 3009 /* The -1 here makes it so that if I have two spans that close at the same point, the
3010 * span added second will be closed first, as in <b><i>Hello</i></b>. Without this, 3010 * span added second will be closed first, as in <b><i>Hello</i></b>. Without this,
3011 * it would be <b><i>Hello</b></i> */ 3011 * it would be <b><i>Hello</b></i> I took it out. It started breaking things, and I don't know why*/
3012 return gtk_text_iter_compare(&ia, &ib) - 1; 3012 return gtk_text_iter_compare(&ia, &ib);
3013 } 3013 }
3014 3014
3015 /* Basic notion here: traverse through the text buffer one-by-one, non-character elements, such 3015 /* Basic notion here: traverse through the text buffer one-by-one, non-character elements, such
3016 * as smileys and IM images are represented by the Unicode "unknown" character. Handle them. Else 3016 * as smileys and IM images are represented by the Unicode "unknown" character. Handle them. Else
3017 * check the list of formatted strings, sorted by the position of the starting tags and apply them as 3017 * check the list of formatted strings, sorted by the position of the starting tags and apply them as
3062 * I don't really know anything about gtkimhtml, but it almost seems like 3062 * I don't really know anything about gtkimhtml, but it almost seems like
3063 * the line above this comments expects to find a closing html tag, but 3063 * the line above this comments expects to find a closing html tag, but
3064 * can't, for some reason. The warning depends on how much HTML I send 3064 * can't, for some reason. The warning depends on how much HTML I send
3065 * in my message, kind of. 3065 * in my message, kind of.
3066 */ 3066 */
3067 /* comment this out until myself or someone else finishes
3068 * it. This is supposed to apply a tag to selected text,
3069 * i believe...
3070 gtk_text_buffer_get_iter_at_mark(imhtml->text_buffer, &eiter, espan->end);
3071 */
3072 } 3067 }
3073 sspan = (GtkIMHtmlFormatSpan*)starters->data; 3068 sspan = (GtkIMHtmlFormatSpan*)starters->data;
3074 gtk_text_buffer_get_iter_at_mark(imhtml->text_buffer, &siter, sspan->start); 3069 gtk_text_buffer_get_iter_at_mark(imhtml->text_buffer, &siter, sspan->start);
3075 starters = starters->next; 3070 starters = starters->next;
3076 } 3071 }
3096 gtk_text_buffer_get_end_iter(imhtml->text_buffer, &eiter); 3091 gtk_text_buffer_get_end_iter(imhtml->text_buffer, &eiter);
3097 } else { 3092 } else {
3098 espan = (GtkIMHtmlFormatSpan*)closers->data; 3093 espan = (GtkIMHtmlFormatSpan*)closers->data;
3099 if (espan->end) 3094 if (espan->end)
3100 gtk_text_buffer_get_iter_at_mark(imhtml->text_buffer, &eiter, espan->end); 3095 gtk_text_buffer_get_iter_at_mark(imhtml->text_buffer, &eiter, espan->end);
3101 else 3096 else {
3102 gtk_text_iter_forward_to_end(&eiter); 3097 gtk_text_iter_forward_to_end(&eiter);
3098 }
3103 } 3099 }
3104 } 3100 }
3105 while (gtk_text_iter_equal(&siter, &iter)) { 3101 while (gtk_text_iter_equal(&siter, &iter)) {
3106 /* This is where we shall insert the starting tag of 3102 /* This is where we shall insert the starting tag of
3107 * this format span */ 3103 * this format span */