[evolution-patches] Check point fix for anchors.
- From: Larry Ewing <lewing ximian com>
- To: patches <evolution-patches ximian com>, Radek Doulik <rodo ximian com>
- Subject: [evolution-patches] Check point fix for anchors.
- Date: 22 Apr 2003 23:43:03 -0500
named HtmlAnchors were inheriting the default check_point method from
HtmlObject and incorrectly stealing the point method from actual links.
This patch makes the check point method a noop for the class. The bug
this was causing is easy to see on www.scriping.com.
--Larry
Index: htmlanchor.c
===================================================================
RCS file: /cvs/gnome/gtkhtml/src/htmlanchor.c,v
retrieving revision 1.13
diff -u -p -r1.13 htmlanchor.c
--- htmlanchor.c 15 Jul 2002 21:52:06 -0000 1.13
+++ htmlanchor.c 23 Apr 2003 03:47:51 -0000
@@ -65,6 +65,28 @@ find_anchor (HTMLObject *o, const char *
return NULL;
}
+static gboolean
+check_point (HTMLObject *self,
+ HTMLPainter *painter,
+ gint x, gint y,
+ guint *offset_return,
+ gboolean for_cursor)
+{
+ return NULL;
+}
+
+static gboolean
+calc_size (HTMLObject *self, HTMLPainter *painter, GList **changed_objs)
+{
+ /* RM2 HTMLText *text = HTML_TEXT (self);
+ GtkHTMLFontStyle style = html_text_get_font_style (text); */
+
+ self->width = 0;
+ self->ascent = 1;
+ self->descent = 0;
+
+ return FALSE;
+}
void
html_anchor_type_init (void)
@@ -86,6 +108,8 @@ html_anchor_class_init (HTMLAnchorClass
object_class->destroy = destroy;
object_class->copy = copy;
object_class->find_anchor = find_anchor;
+ object_class->check_point = check_point;
+ object_class->calc_size = calc_size;
parent_class = &html_object_class;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]