aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRadek Doulik <rodo@src.gnome.org>2001-03-23 06:49:21 +0800
committerRadek Doulik <rodo@src.gnome.org>2001-03-23 06:49:21 +0800
commitbcfe4d37c2b66b657be0126005de1b3b2157885e (patch)
treec649020b665eeca55d63af491bf3b8e912776ea4
parent621a72697a1459353af7960149fe6ba1b96cb9b6 (diff)
downloadgsoc2013-evolution-bcfe4d37c2b66b657be0126005de1b3b2157885e.tar
gsoc2013-evolution-bcfe4d37c2b66b657be0126005de1b3b2157885e.tar.gz
gsoc2013-evolution-bcfe4d37c2b66b657be0126005de1b3b2157885e.tar.bz2
gsoc2013-evolution-bcfe4d37c2b66b657be0126005de1b3b2157885e.tar.lz
gsoc2013-evolution-bcfe4d37c2b66b657be0126005de1b3b2157885e.tar.xz
gsoc2013-evolution-bcfe4d37c2b66b657be0126005de1b3b2157885e.tar.zst
gsoc2013-evolution-bcfe4d37c2b66b657be0126005de1b3b2157885e.zip
(update_active): move to absolute coordinates
(html_button_press_event): ditto svn path=/trunk/; revision=8907
-rw-r--r--mail/ChangeLog2
-rw-r--r--mail/mail-display.c16
2 files changed, 12 insertions, 6 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index a41ef4bf87..1679f25074 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -14,6 +14,8 @@
(html_enter_notify_event): take care of enter event
(update_active): helper function, extracted from
html_motion_notify_event
+ (update_active): move to absolute coordinates
+ (html_button_press_event): ditto
* mail-format.c (write_address): revert back to raw HTML text,
store name and email to Text objects, workaround gtkhtml tables
diff --git a/mail/mail-display.c b/mail/mail-display.c
index 5db433513a..12f9711826 100644
--- a/mail/mail-display.c
+++ b/mail/mail-display.c
@@ -1098,20 +1098,21 @@ html_button_press_event (GtkWidget *widget, GdkEventButton *event, MailDisplay *
if (event->type == GDK_BUTTON_PRESS) {
if (event->button == 3) {
+ HTMLEngine *e;
HTMLPoint *point;
const gchar *email;
const gchar *name;
const gchar *link;
- point = html_engine_get_point_at (GTK_HTML (widget)->engine, event->x, event->y, FALSE);
+ e = GTK_HTML (widget)->engine;
+ point = html_engine_get_point_at (e, event->x + e->x_offset, event->y + e->y_offset, FALSE);
if (point) {
email = (const gchar *) html_object_get_data (point->object, "email");
if (email) {
name = (const gchar *) html_object_get_data (point->object, "name");
g_print ("address: %s name: %s\n", email, name);
e_popup_menu_run (address_menu, (GdkEvent *) event, 0, 0, mail_display);
- } else if ((link = html_engine_get_link_at (GTK_HTML (widget)->engine,
- event->x, event->y))) {
+ } else if ((link = html_object_get_url (point->object))) {
e_popup_menu_run (link_menu, (GdkEvent *) event, 0, 0, mail_display);
}
html_point_destroy (point);
@@ -1137,18 +1138,21 @@ set_underline (HTMLEngine *e, HTMLObject *o, gboolean underline)
static void
update_active (GtkWidget *widget, gint x, gint y, MailDisplay *mail_display)
{
+ HTMLEngine *e;
HTMLPoint *point;
const gchar *email;
- point = html_engine_get_point_at (GTK_HTML (widget)->engine, x, y, FALSE);
+ e = GTK_HTML (widget)->engine;
+
+ point = html_engine_get_point_at (e, x + e->x_offset, y + e->y_offset, FALSE);
if (mail_display->last_active && (!point || mail_display->last_active != point->object)) {
- set_underline (GTK_HTML (widget)->engine, HTML_OBJECT (mail_display->last_active), FALSE);
+ set_underline (e, HTML_OBJECT (mail_display->last_active), FALSE);
mail_display->last_active = NULL;
}
if (point) {
email = (const gchar *) html_object_get_data (point->object, "email");
if (email && html_object_is_text (point->object)) {
- set_underline (GTK_HTML (widget)->engine, point->object, TRUE);
+ set_underline (e, point->object, TRUE);
mail_display->last_active = point->object;
}
html_point_destroy (point);