Ellipsize label in infobars created by MidoriView

So overly long messages don't cause the window to grow.
This commit is contained in:
Paweł Forysiuk 2011-04-21 20:51:03 +02:00 committed by Christian Dywan
parent 7614e319ce
commit 17d458b0ca

View file

@ -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);