From: Paweł Forysiuk Date: Thu, 21 Apr 2011 18:51:03 +0000 (+0200) Subject: Ellipsize label in infobars created by MidoriView X-Git-Url: https://spindle.queued.net/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=17d458b0ca9cde577c679bfcd666e4f9a865b8b2;p=midori Ellipsize label in infobars created by MidoriView So overly long messages don't cause the window to grow. --- diff --git a/midori/midori-view.c b/midori/midori-view.c index f8d0fd88..f7b40e53 100644 --- a/midori/midori-view.c +++ b/midori/midori-view.c @@ -1271,6 +1271,7 @@ midori_view_add_info_bar (MidoriView* view, GtkWidget* infobar; GtkWidget* action_area; GtkWidget* content_area; + GtkWidget* label; va_list args; const gchar* button_text; @@ -1320,7 +1321,9 @@ midori_view_add_info_bar (MidoriView* view, #endif va_end (args); - gtk_container_add (GTK_CONTAINER (content_area), gtk_label_new (message)); + label = gtk_label_new (message); + gtk_label_set_ellipsize (GTK_LABEL (label), PANGO_ELLIPSIZE_END); + gtk_container_add (GTK_CONTAINER (content_area), label); gtk_widget_show_all (infobar); gtk_box_pack_start (GTK_BOX (view), infobar, FALSE, FALSE, 0); gtk_box_reorder_child (GTK_BOX (view), infobar, 0);