--- epiphany-2.16.1/src/ephy-notebook.c	2006-09-13 06:48:52.000000000 -0500
+++ epiphany-2.16.1d/src/ephy-notebook.c	2006-11-11 03:23:14.000000000 -0500
@@ -22,6 +22,7 @@
 
 #include "config.h"
 
+#include "string.h"
 #include "ephy-notebook.h"
 #include "eel-gconf-extensions.h"
 #include "ephy-prefs.h"
@@ -54,6 +55,10 @@
 
 #define INSANE_NUMBER_OF_URLS 20
 
+/* Tooltip related */
+#define TOOLTIP_MAX_LENGTH 50
+#define TOOLTIP_SUFFIX "..."
+
 /* Until https://bugzilla.mozilla.org/show_bug.cgi?id=296002 is fixed */
 #define KEEP_TAB_IN_SAME_TOPLEVEL
 
@@ -566,8 +571,8 @@
 sync_label (EphyTab *tab, GParamSpec *pspec, GtkWidget *proxy)
 {
 	GtkWidget *label, *ebox;
-	GtkTooltips *tips;	
-	const char *title;
+	GtkTooltips *tips;
+	const char *title, *short_title;
 
 	ebox = GTK_WIDGET (g_object_get_data (G_OBJECT (proxy), "label-ebox"));
 	tips = GTK_TOOLTIPS (g_object_get_data (G_OBJECT (proxy), "tooltips"));
@@ -576,11 +581,18 @@
 	g_return_if_fail (ebox != NULL && tips != NULL && label != NULL);
 
 	title = ephy_tab_get_title (tab);
+        short_title = g_strdup (title);
 
 	if (title)
 	{
 		gtk_label_set_text (GTK_LABEL (label), title);
-		gtk_tooltips_set_tip (tips, ebox, title, NULL);
+		if (g_utf8_strlen (short_title, -1) > TOOLTIP_MAX_LENGTH)
+		{
+			strcpy (g_utf8_offset_to_pointer (short_title, 
+					(TOOLTIP_MAX_LENGTH - strlen (TOOLTIP_SUFFIX))),
+				TOOLTIP_SUFFIX);
+		}
+		gtk_tooltips_set_tip (tips, ebox, short_title, NULL);
 	}
 }
 
