Mercurial > pidgin
diff src/gtkhtml.c @ 26:b9e90a914e20
[gaim-migrate @ 35]
Peter Teichman sent me another huge list of patches. Here they are :)
committer: Tailor Script <tailor@pidgin.im>
| author | Rob Flynn <gaim@robflynn.com> |
|---|---|
| date | Fri, 24 Mar 2000 19:17:34 +0000 |
| parents | 76ab3403bf02 |
| children | 4d25b98a9d09 |
line wrap: on
line diff
--- a/src/gtkhtml.c Fri Mar 24 08:55:32 2000 +0000 +++ b/src/gtkhtml.c Fri Mar 24 19:17:34 2000 +0000 @@ -1510,6 +1510,8 @@ if ((realx > hb->x && realx < (hb->x + hb->width)) && (realy < hb->y && realy > (hb->y - hb->height))) { + GdkCursor *cursor = NULL; + if (html->tooltip_hb != hb) { html->tooltip_hb = hb; @@ -1524,8 +1526,11 @@ gtk_timeout_add(HTML_TOOLTIP_DELAY, gtk_html_tooltip_timeout, html); } - gdk_window_set_cursor(html->html_area, - gdk_cursor_new(GDK_HAND2)); + + cursor = gdk_cursor_new(GDK_HAND2); + gdk_window_set_cursor(html->html_area, cursor); + gdk_cursor_destroy(cursor); + return TRUE; } urls = urls->next; @@ -2856,17 +2861,19 @@ num--; else { - - html->current_x = 0; - if (nl) - { - text[length] = '\n'; - length++; + if (html->current_x != 0) { + html->current_x = 0; + if (nl) { + text[length] = '\n'; + length++; + } + gtk_html_add_text(html, cfont, fore, back, text, length, uline, strike, url); + g_free(text); + return; + } else { + num = strlen (text); + break; } - gtk_html_add_text(html, cfont, fore, back, text, length, uline, - strike, url); - g_free(text); - return; } } @@ -2922,17 +2929,9 @@ * This is kinda cheesy but it may make things * * much better lookin */ - for (i = 2; i < 15; i++) - { - if ((num - i) < 0) - { - html->current_x = 0; - gtk_html_add_text(html, cfont, fore, back, text, strlen(text), - uline, strike, url); - return; - } - else if (text[num - i] == ' ') - { + + for (i=2; (num - i > 0); i++) { + if (text[num - i] == ' ') { num = num - (i - 1); nl2 = 1; break;
