From: Daniel Carl <danielcarl@gmx.de>
Date: Sun, 10 Aug 2014 18:36:08 +0000 (+0200)
Subject: Shorten the status messages to prevent window resizing (#99).
X-Git-Url: https://git.owens.tech/projects.html/projects.html/git?a=commitdiff_plain;h=18dae1483076565151a4cd1c54e57387fa4e257d;p=vimb.git

Shorten the status messages to prevent window resizing (#99).

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.
---

diff --git a/src/main.c b/src/main.c
index 10199f6..682b476 100644
--- a/src/main.c
+++ b/src/main.c
@@ -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);