aboutsummaryrefslogtreecommitdiffstats
path: root/src/ephy-notebook.c
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2006-12-18 03:13:13 +0800
committerChristian Persch <chpe@src.gnome.org>2006-12-18 03:13:13 +0800
commitf530d890b1edde32f350317fb9ef9459af53d0be (patch)
tree249b5a691595598dedd006426e5c97bef06838b2 /src/ephy-notebook.c
parent4e3a7f17f3720fc271ced8e5d04ddecddb21579f (diff)
downloadgsoc2013-epiphany-f530d890b1edde32f350317fb9ef9459af53d0be.tar
gsoc2013-epiphany-f530d890b1edde32f350317fb9ef9459af53d0be.tar.gz
gsoc2013-epiphany-f530d890b1edde32f350317fb9ef9459af53d0be.tar.bz2
gsoc2013-epiphany-f530d890b1edde32f350317fb9ef9459af53d0be.tar.lz
gsoc2013-epiphany-f530d890b1edde32f350317fb9ef9459af53d0be.tar.xz
gsoc2013-epiphany-f530d890b1edde32f350317fb9ef9459af53d0be.tar.zst
gsoc2013-epiphany-f530d890b1edde32f350317fb9ef9459af53d0be.zip
Limit tab tooltip length. Bug #324052, patch by Diego Escalante Urrelo.
2006-12-17 Christian Persch <chpe@cvs.gnome.org> * src/ephy-notebook.c: (ephy_notebook_init), (sync_label): Limit tab tooltip length. Bug #324052, patch by Diego Escalante Urrelo.
Diffstat (limited to 'src/ephy-notebook.c')
-rw-r--r--src/ephy-notebook.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/ephy-notebook.c b/src/ephy-notebook.c
index 9a81fe962..6b74b3651 100644
--- a/src/ephy-notebook.c
+++ b/src/ephy-notebook.c
@@ -54,6 +54,9 @@
#define INSANE_NUMBER_OF_URLS 20
+/* Tooltip related */
+#define TOOLTIP_MAX_LENGTH 256
+
/* Until https://bugzilla.mozilla.org/show_bug.cgi?id=296002 is fixed */
#define KEEP_TAB_IN_SAME_TOPLEVEL
@@ -491,6 +494,9 @@ ephy_notebook_init (EphyNotebook *notebook)
gtk_notebook_set_show_tabs (GTK_NOTEBOOK (notebook), FALSE);
notebook->priv->title_tips = gtk_tooltips_new ();
+ gtk_tooltips_force_window (notebook->priv->title_tips);
+ gtk_label_set_max_width_chars (GTK_LABEL (notebook->priv->title_tips->tip_label), TOOLTIP_MAX_LENGTH);
+ gtk_label_set_ellipsize (GTK_LABEL (notebook->priv->title_tips->tip_label), PANGO_ELLIPSIZE_END);
g_object_ref_sink (notebook->priv->title_tips);
notebook->priv->show_tabs = TRUE;
@@ -574,7 +580,7 @@ static void
sync_label (EphyTab *tab, GParamSpec *pspec, GtkWidget *proxy)
{
GtkWidget *label, *ebox;
- GtkTooltips *tips;
+ GtkTooltips *tips;
const char *title;
ebox = GTK_WIDGET (g_object_get_data (G_OBJECT (proxy), "label-ebox"));