aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCosimo Cecchi <cosimoc@gnome.org>2012-03-14 21:53:29 +0800
committerCosimo Cecchi <cosimoc@gnome.org>2012-03-14 21:53:29 +0800
commit67247db727a6fc1724de9c94c4030e9c02b250d5 (patch)
treea98151eaca86f53090857cf9df0bd9f0076be502
parent035fbe726fca2110054ac45965fe699ca8e30eed (diff)
downloadgsoc2013-epiphany-67247db727a6fc1724de9c94c4030e9c02b250d5.tar
gsoc2013-epiphany-67247db727a6fc1724de9c94c4030e9c02b250d5.tar.gz
gsoc2013-epiphany-67247db727a6fc1724de9c94c4030e9c02b250d5.tar.bz2
gsoc2013-epiphany-67247db727a6fc1724de9c94c4030e9c02b250d5.tar.lz
gsoc2013-epiphany-67247db727a6fc1724de9c94c4030e9c02b250d5.tar.xz
gsoc2013-epiphany-67247db727a6fc1724de9c94c4030e9c02b250d5.tar.zst
gsoc2013-epiphany-67247db727a6fc1724de9c94c4030e9c02b250d5.zip
floating-bar: set a max-width to the label
We don't want the floating bar to extend without boundaries in the available size, since some hyperlinks can be very long (and make the bar cover the whole screen). https://bugzilla.gnome.org/show_bug.cgi?id=671520
-rw-r--r--lib/widgets/nautilus-floating-bar.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/widgets/nautilus-floating-bar.c b/lib/widgets/nautilus-floating-bar.c
index e37a81a27..066a27aac 100644
--- a/lib/widgets/nautilus-floating-bar.c
+++ b/lib/widgets/nautilus-floating-bar.c
@@ -233,13 +233,14 @@ nautilus_floating_bar_constructed (GObject *obj)
gtk_widget_set_margin_left (w, 8);
w = gtk_label_new (NULL);
- gtk_label_set_ellipsize (GTK_LABEL (w), PANGO_ELLIPSIZE_END);
+ gtk_label_set_ellipsize (GTK_LABEL (w), PANGO_ELLIPSIZE_MIDDLE);
gtk_box_pack_start (GTK_BOX (box), w, FALSE, FALSE, 0);
g_object_set (w,
"margin-top", 2,
"margin-bottom", 2,
"margin-left", 12,
"margin-right", 12,
+ "max-width-chars", 60,
NULL);
self->priv->label_widget = w;
gtk_widget_show (w);