Shorten the status messages to prevent window resizing (#99).
authorDaniel Carl <danielcarl@gmx.de>
Sun, 10 Aug 2014 18:36:08 +0000 (20:36 +0200)
committerDaniel Carl <danielcarl@gmx.de>
Sun, 10 Aug 2014 18:39:25 +0000 (20:39 +0200)
For GTK3 the gtk labels text isn't ellipsized or cut off by default. If an
page with a really long url is opened or a link with a long url is hovered the
window was resized to fit the long shown url in statusbar.

src/main.c

index 10199f6..682b476 100644 (file)
@@ -761,6 +761,7 @@ static void init_core(void)
     gtk_container_add(GTK_CONTAINER(gui->eventbox), GTK_WIDGET(gui->statusbar.box));
     gtk_container_add(GTK_CONTAINER(gui->window), GTK_WIDGET(gui->pane));
     gtk_misc_set_alignment(GTK_MISC(gui->statusbar.left), 0.0, 0.0);
+    gtk_label_set_ellipsize(GTK_LABEL(gui->statusbar.left), PANGO_ELLIPSIZE_END);
     gtk_misc_set_alignment(GTK_MISC(gui->statusbar.right), 1.0, 0.0);
     gtk_misc_set_alignment(GTK_MISC(gui->statusbar.cmd), 1.0, 0.0);
     gtk_box_pack_start(gui->statusbar.box, gui->statusbar.left, true, true, 2);