Ellipsize label in infobars created by MidoriView
So overly long messages don't cause the window to grow.
This commit is contained in:
parent
7614e319ce
commit
17d458b0ca
1 changed files with 4 additions and 1 deletions
|
@ -1271,6 +1271,7 @@ midori_view_add_info_bar (MidoriView* view,
|
||||||
GtkWidget* infobar;
|
GtkWidget* infobar;
|
||||||
GtkWidget* action_area;
|
GtkWidget* action_area;
|
||||||
GtkWidget* content_area;
|
GtkWidget* content_area;
|
||||||
|
GtkWidget* label;
|
||||||
va_list args;
|
va_list args;
|
||||||
const gchar* button_text;
|
const gchar* button_text;
|
||||||
|
|
||||||
|
@ -1320,7 +1321,9 @@ midori_view_add_info_bar (MidoriView* view,
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
va_end (args);
|
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_widget_show_all (infobar);
|
||||||
gtk_box_pack_start (GTK_BOX (view), infobar, FALSE, FALSE, 0);
|
gtk_box_pack_start (GTK_BOX (view), infobar, FALSE, FALSE, 0);
|
||||||
gtk_box_reorder_child (GTK_BOX (view), infobar, 0);
|
gtk_box_reorder_child (GTK_BOX (view), infobar, 0);
|
||||||
|
|
Loading…
Reference in a new issue