Revision: 16489
Author: amc_grim
Date: 2006-07-12 16:52:56 -0700 (Wed, 12 Jul 2006)
ViewCVS: http://svn.sourceforge.net/gaim/?rev=16489&view=rev
Log Message:
-----------
Patch from sadrul for:
If you have a markup "abc </i> def", then the "def"
part of the message shows up in italic. The same error
happens for broken markup for underline/bold
attributes. This patch is a fix that.
Compiles fine here...
Modified Paths:
--------------
trunk/src/gtkimhtml.c
Modified: trunk/src/gtkimhtml.c
===================================================================
--- trunk/src/gtkimhtml.c 2006-07-11 20:49:41 UTC (rev 16488)
+++ trunk/src/gtkimhtml.c 2006-07-12 23:52:56 UTC (rev 16489)
@@ -2461,10 +2461,11 @@
gtk_text_buffer_insert(imhtml->text_buffer, iter, ws, wpos);
ws[0] = '\0'; wpos = 0;
- if (bold)
+ if (bold) {
bold--;
- if ((bold == 0) && (imhtml->format_functions & GTK_IMHTML_BOLD) && !imhtml->wbfo)
- gtk_imhtml_toggle_bold(imhtml);
+ if ((bold == 0) && (imhtml->format_functions & GTK_IMHTML_BOLD) && !imhtml->wbfo)
+ gtk_imhtml_toggle_bold(imhtml);
+ }
}
break;
case 5: /* I */
@@ -2484,10 +2485,11 @@
if (!(options & GTK_IMHTML_NO_FORMATTING)) {
gtk_text_buffer_insert(imhtml->text_buffer, iter, ws, wpos);
ws[0] = '\0'; wpos = 0;
- if (italics)
+ if (italics) {
italics--;
- if ((italics == 0) && (imhtml->format_functions & GTK_IMHTML_ITALIC) && !imhtml->wbfo)
- gtk_imhtml_toggle_italic(imhtml);
+ if ((italics == 0) && (imhtml->format_functions & GTK_IMHTML_ITALIC) && !imhtml->wbfo)
+ gtk_imhtml_toggle_italic(imhtml);
+ }
}
break;
case 9: /* U */
@@ -2505,10 +2507,11 @@
if (!(options & GTK_IMHTML_NO_FORMATTING)) {
gtk_text_buffer_insert(imhtml->text_buffer, iter, ws, wpos);
ws[0] = '\0'; wpos = 0;
- if (underline)
+ if (underline) {
underline--;
- if ((underline == 0) && (imhtml->format_functions & GTK_IMHTML_UNDERLINE) && !imhtml->wbfo)
- gtk_imhtml_toggle_underline(imhtml);
+ if ((underline == 0) && (imhtml->format_functions & GTK_IMHTML_UNDERLINE) && !imhtml->wbfo)
+ gtk_imhtml_toggle_underline(imhtml);
+ }
}
break;
case 13: /* S */
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|