changeset 1294:7f486375bfd5

[gaim-migrate @ 1304] um committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Mon, 18 Dec 2000 22:56:13 +0000
parents fbc0cbf24a62
children 13e68fb13744
files src/gtkhtml.c
diffstat 1 files changed, 15 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/src/gtkhtml.c	Mon Dec 18 18:06:46 2000 +0000
+++ b/src/gtkhtml.c	Mon Dec 18 22:56:13 2000 +0000
@@ -1400,14 +1400,21 @@
 		else if (x < 0)
 			x = 0;
 
-		if ((y + h + 4) > scr_h)
-			y =
-				y - html->tooltip_hb->font->ascent +
-				html->tooltip_hb->font->descent;
-		else
-			y =
-				y + html->tooltip_hb->font->ascent +
-				html->tooltip_hb->font->descent;
+		if (html->tooltip_hb->font) {
+			if ((y + h + 4) > scr_h)
+				y =
+					y - html->tooltip_hb->font->ascent +
+					html->tooltip_hb->font->descent;
+			else
+				y =
+					y + html->tooltip_hb->font->ascent +
+					html->tooltip_hb->font->descent;
+		} else {
+			if ((y + h + 4) > scr_h)
+				y = y - 10 + 4;
+			else
+				y = y + 10 + 4;
+		}
 
 		gtk_widget_set_usize(html->tooltip_window, w, h);
 		gtk_widget_popup(html->tooltip_window, x, y);