Index: src/ephy-tab.c
===================================================================
--- src/ephy-tab.c	(revisione 7551)
+++ src/ephy-tab.c	(copia locale)
@@ -82,7 +82,6 @@ struct _EphyTabPrivate
 	guint id;
 
 	char *status_message;
-	char *link_message;
 	char *address;
 	char *typed_address;
 	char *title;
@@ -144,8 +143,6 @@ static GArray *tabs_id_array = NULL;
 static guint n_tabs = 0;
 
 /* internal functions, accessible only from this file */
-static void	ephy_tab_set_link_message	(EphyTab *tab,
-						 char *message);
 static void	ephy_tab_set_title		(EphyTab *tab,
 						 EphyEmbed *embed,
 						 char *new_title);
@@ -747,7 +744,6 @@ ephy_tab_finalize (GObject *object)
 	g_free (priv->address);
 	g_free (priv->typed_address);
 	g_free (priv->icon_address);
-	g_free (priv->link_message);
 	g_free (priv->status_message);
 	popups_manager_reset (tab);
 
@@ -895,79 +891,6 @@ ephy_tab_new (void)
 	return EPHY_TAB (g_object_new (EPHY_TYPE_TAB, NULL));
 }
 
-static void
-ephy_tab_set_link_message (EphyTab *tab, char *message)
-{
-	char *status_message;
-	char **splitted_message;
-	g_return_if_fail (EPHY_IS_TAB (tab));
-
-	g_free (tab->priv->link_message);
-	status_message = ephy_string_blank_chr (message);
-	
-	if (status_message && g_str_has_prefix (status_message, "mailto:"))
-	{
-		int i = 1;
-		char *p;
-		GString *tmp;
-		
-		/* We first want to eliminate all the things after "?", like
-		 * cc, subject and alike.
-		 */
-		
-		p = strchr (status_message, '?');
-		if (p != NULL) *p = '\0';
-		
-		/* Then we also want to check if there is more than an email address
-		 * in the mailto: list.
-		 */
-		
-		splitted_message = g_strsplit_set (status_message, ";", -1);
-		tmp = g_string_new (g_strdup_printf (_("Send an email message to “%s”"),
-						     (splitted_message[0] + 7)));
-		
-		while (splitted_message [i] != NULL)
-		{
-			g_string_append_printf (tmp, ", “%s”", splitted_message[i]);
-			i++;
-		}
-		
-		tab->priv->link_message = g_string_free (tmp, FALSE);
-		
-		g_free (status_message);
-		g_strfreev (splitted_message);
-	}
-	else
-	{
-		tab->priv->link_message = status_message;
-	}
-
-	g_object_notify (G_OBJECT (tab), "message");
-}
-
-/**
- * ephy_tab_get_link_message:
- * @tab: an #EphyTab
- *
- * Returns the message displayed in @tab's #EphyWindow's #EphyStatusbar when
- * the user hovers the mouse over a hyperlink.
- *
- * The message returned has a limited lifetime, and so should be copied with
- * g_strdup() if it must be stored.
- *
- * Listen to the "link_message" signal on the @tab's #EphyEmbed to be notified
- * when the link message changes.
- *
- * Return value: The current link statusbar message
- **/
-const char *
-ephy_tab_get_link_message (EphyTab *tab)
-{
-	g_return_val_if_fail (EPHY_IS_TAB (tab), NULL);
-
-	return tab->priv->link_message;
-}
-
 /**
  * ephy_tab_get_embed:
  * @tab: an #EphyTab
@@ -1365,13 +1288,6 @@ ephy_tab_favicon_cb (EphyEmbed *embed,
 	ephy_tab_set_icon_address (tab, address);
 }
 
-static void
-ephy_tab_link_message_cb (EphyEmbed *embed,
-			  EphyTab *tab)
-{
-	ephy_tab_set_link_message (tab, ephy_embed_get_link_message (embed));
-}
-
 static gboolean
 ephy_tab_open_uri_cb (EphyEmbed *embed,
 		      const char *uri,
@@ -1424,7 +1340,7 @@ ephy_tab_address_cb (EphyEmbed *embed,
 		ephy_tab_set_loading_title (tab, embed_address, TRUE);
 	}
 
-	ephy_tab_set_link_message (tab, NULL);
+	ephy_embed_set_link_message (embed, NULL);
 	ephy_tab_set_icon_address (tab, NULL);
 	ephy_embed_update_navigation_flags (embed);
 
@@ -1895,9 +1811,6 @@ ephy_tab_init (EphyTab *tab)
 	gtk_container_add (GTK_CONTAINER (tab), GTK_WIDGET (embed));
 	gtk_widget_show (GTK_WIDGET (embed));
 
-	g_signal_connect_object (embed, "link_message",
-				 G_CALLBACK (ephy_tab_link_message_cb),
-				 tab, 0);
 	g_signal_connect_object (embed, "open_uri",
 				 G_CALLBACK (ephy_tab_open_uri_cb),
 				 tab, 0);
@@ -1955,11 +1868,7 @@ ephy_tab_get_status_message (EphyTab *ta
 {
 	g_return_val_if_fail (EPHY_IS_TAB (tab), NULL);
 
-	if (tab->priv->link_message && tab->priv->link_message[0] != '\0')
-	{
-		return tab->priv->link_message;
-	}
-	else if (tab->priv->status_message)
+	if (tab->priv->status_message)
 	{
 		return tab->priv->status_message;
 	}
Index: src/ephy-window.c
===================================================================
--- src/ephy-window.c	(revisione 7551)
+++ src/ephy-window.c	(copia locale)
@@ -1449,6 +1449,27 @@ sync_tab_load_progress (EphyEmbed *embed
 				     ephy_embed_get_load_percent (embed));
 }
 
+/* FIXME: we need to move also the status message from EphyTab to EphyEmbed
+ * to avoid duplication here.
+ */
+static void
+sync_tab_link_message (EphyEmbed *embed, GParamSpec *pspec, EphyWindow *window)
+{
+	GtkStatusbar *s = GTK_STATUSBAR (window->priv->statusbar);
+	const char *message;
+
+	if (window->priv->closing) return;
+
+	message = ephy_embed_get_link_message (embed);
+
+	gtk_statusbar_pop (s, window->priv->tab_message_cid);
+
+	if (message)
+	{
+		gtk_statusbar_push (s, window->priv->tab_message_cid, message);
+	}
+}
+
 static void
 sync_tab_message (EphyTab *tab, GParamSpec *pspec, EphyWindow *window)
 {
@@ -2227,6 +2248,9 @@ ephy_window_set_active_tab (EphyWindow *
 					 G_CALLBACK (sync_tab_title),
 					 window, 0);
 
+		g_signal_connect_object (embed, "notify::link-message",
+					 G_CALLBACK (sync_tab_link_message),
+					 window, 0);
 		g_signal_connect_object (embed, "notify::security-level",
 					 G_CALLBACK (sync_tab_security),
 					 window, 0);
Index: src/epiphany.defs
===================================================================
--- src/epiphany.defs	(revisione 7551)
+++ src/epiphany.defs	(copia locale)
@@ -3349,12 +3349,6 @@
   )
 )
 
-(define-method get_link_message
-  (of-object "EphyTab")
-  (c-name "ephy_tab_get_link_message")
-  (return-type "const-char*")
-)
-
 (define-method get_address
   (of-object "EphyTab")
   (c-name "ephy_tab_get_address")
Index: embed/ephy-embed-utils.c
===================================================================
--- embed/ephy-embed-utils.c	(revisione 0)
+++ embed/ephy-embed-utils.c	(revisione 0)
@@ -0,0 +1,77 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
+/*
+ *  Copyright © 2000-2003 Marco Pesenti Gritti
+ *  Copyright © 2003, 2004, 2005 Christian Persch
+ *  Copyright © 2004 Crispin Flowerday
+ *  Copyright © 2004 Adam Hooper
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2, or (at your option)
+ *  any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ *  $Id: 
+ */
+
+#include "ephy-string.h"
+#include <string.h>
+
+#include <glib/gi18n.h>
+
+#include "ephy-embed-utils.h"
+
+char*
+ephy_embed_utils_link_message_parse (char *message)
+{
+	
+	char *status_message;
+	char **splitted_message;
+
+	status_message = ephy_string_blank_chr (message);
+	
+	if (status_message && g_str_has_prefix (status_message, "mailto:"))
+	{
+		int i = 1;
+		char *p;
+		GString *tmp;
+		
+		/* We first want to eliminate all the things after "?", like
+		 * cc, subject and alike.
+		 */
+		
+		p = strchr (status_message, '?');
+		if (p != NULL) *p = '\0';
+		
+		/* Then we also want to check if there is more than an email address
+		 * in the mailto: list.
+		 */
+		
+		splitted_message = g_strsplit_set (status_message, ";", -1);
+		tmp = g_string_new (g_strdup_printf (_("Send an email message to “%s”"),
+						     (splitted_message[0] + 7)));
+		
+		while (splitted_message [i] != NULL)
+		{
+			g_string_append_printf (tmp, ", “%s”", splitted_message[i]);
+			i++;
+		}
+
+		g_free (status_message);
+		g_strfreev (splitted_message);
+
+		return g_string_free (tmp, FALSE);
+	}
+	else
+	{
+		return status_message;
+	}
+}
Index: embed/ephy-embed.c
===================================================================
--- embed/ephy-embed.c	(revisione 7551)
+++ embed/ephy-embed.c	(copia locale)
@@ -467,6 +467,12 @@ ephy_embed_base_init (gpointer g_class)
                                                                          EPHY_TYPE_EMBED_NAVIGATION_FLAGS,
                                                                          0,
                                                                          G_PARAM_READABLE | G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB));
+		g_object_interface_install_property (g_class,
+						     g_param_spec_string ("link-message",
+									  "Link Message",
+									  "The embed's statusbar link message",
+									  NULL,
+									  G_PARAM_READABLE | G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB));
 
 		initialized = TRUE;
 	}
@@ -674,6 +680,14 @@ ephy_embed_get_link_message (EphyEmbed *
 	return iface->get_link_message (embed);
 }
 
+void
+ephy_embed_set_link_message (EphyEmbed *embed,
+			     char *message)
+{
+	EphyEmbedIface *iface = EPHY_EMBED_GET_IFACE (embed);
+	return iface->set_link_message (embed, message);
+}
+
 /**
  * ephy_embed_get_js_status:
  * @embed: an #EphyEmbed
@@ -1151,4 +1165,3 @@ ephy_embed_update_navigation_flags (Ephy
 	EphyEmbedIface *iface = EPHY_EMBED_GET_IFACE (embed);
 	return iface->update_navigation_flags (embed);
 }
-
Index: embed/ephy-embed-utils.h
===================================================================
--- embed/ephy-embed-utils.h	(revisione 0)
+++ embed/ephy-embed-utils.h	(revisione 0)
@@ -0,0 +1,34 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
+/*
+ *  Copyright © 2000-2003 Marco Pesenti Gritti
+ *  Copyright © 2003, 2004, 2005 Christian Persch
+ *  Copyright © 2004 Crispin Flowerday
+ *  Copyright © 2004 Adam Hooper
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2, or (at your option)
+ *  any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ *  $Id: 
+ */
+
+#ifndef EPHY_EMBED_UTILS_H
+#define EPHY_EMBED_UTILS_H
+
+G_BEGIN_DECLS
+
+char 	*ephy_embed_utils_link_message_parse (char *message);
+
+G_END_DECLS
+
+#endif /* EPHY_EMBED_UTILS_H */
Index: embed/ephy-embed.h
===================================================================
--- embed/ephy-embed.h	(revisione 7551)
+++ embed/ephy-embed.h	(copia locale)
@@ -193,6 +193,8 @@ struct _EphyEmbedIface
 	char *		   (* get_location)		(EphyEmbed *embed,
 							 gboolean toplevel);
 	char *		   (* get_link_message)		(EphyEmbed *embed);
+	void		   (* set_link_message)		(EphyEmbed *embed,
+							 char *message);
 	char *		   (* get_js_status)		(EphyEmbed *embed);
 	int		   (* shistory_n_items)		(EphyEmbed *embed);
 	void		   (* shistory_get_nth)		(EphyEmbed *embed,
@@ -276,6 +278,9 @@ char		 *ephy_embed_get_location		(EphyEm
 
 char		 *ephy_embed_get_link_message		(EphyEmbed *embed);
 
+void		  ephy_embed_set_link_message		(EphyEmbed *embed,
+							 char      *message);
+
 char		 *ephy_embed_get_js_status		(EphyEmbed *embed);
 
 /* Navigation */
Index: embed/mozilla/mozilla-embed.cpp
===================================================================
--- embed/mozilla/mozilla-embed.cpp	(revisione 7551)
+++ embed/mozilla/mozilla-embed.cpp	(copia locale)
@@ -41,6 +41,7 @@
 #include "ephy-debug.h"
 #include "ephy-embed-shell.h"
 #include "ephy-embed-single.h"
+#include "ephy-embed-utils.h"
 #include "ephy-history.h"
 #include "ephy-string.h"
 #include "mozilla-embed-event.h"
@@ -83,6 +84,8 @@ static void mozilla_embed_document_type_
 static void mozilla_embed_zoom_change_cb	(EphyEmbed *embed,
 						 float zoom,
 						 MozillaEmbed *membed);
+static void mozilla_embed_link_message_cb	(EphyEmbed *embed,
+						 MozillaEmbed *membed);
 
 static EphyEmbedSecurityLevel mozilla_embed_security_level (PRUint32 state);
 
@@ -106,6 +109,7 @@ struct MozillaEmbedPrivate
 	EphyEmbedDocumentType document_type;
 	EphyEmbedNavigationFlags nav_flags;
 	float zoom;
+	char *link_message;
 
 	/* Flags */
 	guint is_loading : 1;
@@ -122,6 +126,7 @@ enum
 	PROP_DOCUMENT_TYPE,
 	PROP_LOAD_PROGRESS,
 	PROP_LOAD_STATUS,
+	PROP_LINK_MESSAGE,
 	PROP_NAVIGATION,
 	PROP_SECURITY,
 	PROP_ZOOM
@@ -299,6 +304,7 @@ mozilla_embed_class_init (MozillaEmbedCl
 	g_object_class_override_property (object_class, PROP_ZOOM, "zoom");
 	g_object_class_override_property (object_class, PROP_LOAD_PROGRESS, "load-progress");
 	g_object_class_override_property (object_class, PROP_LOAD_STATUS, "load-status");
+	g_object_class_override_property (object_class, PROP_LINK_MESSAGE, "link-message");
 	g_object_class_override_property (object_class, PROP_NAVIGATION, "navigation");
 
 	g_type_class_add_private (object_class, sizeof(MozillaEmbedPrivate));
@@ -337,6 +343,9 @@ mozilla_embed_init (MozillaEmbed *embed)
 	g_signal_connect_object (embed, "ge_zoom_change",
 				 G_CALLBACK (mozilla_embed_zoom_change_cb),
 				 embed, (GConnectFlags) 0);
+	g_signal_connect_object (embed, "link_message",
+				 G_CALLBACK (mozilla_embed_link_message_cb),
+				 embed, (GConnectFlags) 0);
 
 	embed->priv->document_type = EPHY_EMBED_DOCUMENT_HTML;
 	embed->priv->security_level = EPHY_EMBED_STATE_IS_UNKNOWN;
@@ -344,6 +353,7 @@ mozilla_embed_init (MozillaEmbed *embed)
 	embed->priv->is_setting_zoom = FALSE;
 	embed->priv->load_percent = 0;
 	embed->priv->is_loading = FALSE;
+	embed->priv->link_message = NULL;
 }
 
 gpointer
@@ -568,10 +578,40 @@ impl_get_title (EphyEmbed *embed)
 	return gtk_moz_embed_get_title (GTK_MOZ_EMBED (embed));
 }
 
+static void
+mozilla_embed_set_link_message (MozillaEmbed *membed,
+				char *message)
+{
+	MozillaEmbedPrivate *mpriv = membed->priv;
+	char *link_message;
+	
+	g_free (mpriv->link_message);
+	link_message = ephy_embed_utils_link_message_parse (message);
+	mpriv->link_message = link_message;
+	
+	g_object_notify (G_OBJECT (membed), "link-message");	
+}
+
+static void
+mozilla_embed_link_message_cb (EphyEmbed *embed,
+			       MozillaEmbed *membed)
+{
+	mozilla_embed_set_link_message (membed,
+					gtk_moz_embed_get_link_message (GTK_MOZ_EMBED (embed)));
+}
+
 static char *
 impl_get_link_message (EphyEmbed *embed)
 {
-	return gtk_moz_embed_get_link_message (GTK_MOZ_EMBED (embed));
+	MozillaEmbedPrivate *mpriv = MOZILLA_EMBED (embed)->priv;
+	
+	return mpriv->link_message;
+}
+
+static void
+impl_set_link_message (EphyEmbed *embed, char *message)
+{
+	mozilla_embed_set_link_message (MOZILLA_EMBED (embed), message);
 }
 
 static char *
@@ -1436,6 +1476,7 @@ ephy_embed_iface_init (EphyEmbedIface *i
 	iface->get_title = impl_get_title;
 	iface->get_location = impl_get_location;
 	iface->get_link_message = impl_get_link_message;
+	iface->set_link_message = impl_set_link_message;
 	iface->get_js_status = impl_get_js_status;
 	iface->reload = impl_reload;
 	iface->set_zoom = impl_set_zoom;
Index: embed/Makefile.am
===================================================================
--- embed/Makefile.am	(revisione 7551)
+++ embed/Makefile.am	(copia locale)
@@ -31,6 +31,7 @@ INST_H_FILES = \
 	ephy-embed-prefs.h		\
 	ephy-embed-single.h		\
 	ephy-embed-shell.h		\
+	ephy-embed-utils.h		\
 	ephy-history.h			\
 	ephy-password-manager.h		\
 	ephy-permission-manager.h
@@ -53,6 +54,7 @@ libephyembed_la_SOURCES = \
 	ephy-embed-persist.c		\
 	ephy-embed-single.c		\
 	ephy-embed-shell.c		\
+	ephy-embed-utils.c		\
 	ephy-encodings.c		\
 	ephy-favicon-cache.c		\
 	ephy-history.c			\
