From 67247db727a6fc1724de9c94c4030e9c02b250d5 Mon Sep 17 00:00:00 2001 From: Cosimo Cecchi Date: Wed, 14 Mar 2012 09:53:29 -0400 Subject: 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 --- lib/widgets/nautilus-floating-bar.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib') 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); -- cgit v1.2.3