From: Daniel Carl Date: Sat, 22 Apr 2017 20:53:49 +0000 (+0200) Subject: Show profile name in url bar #343. X-Git-Url: https://git.owens.tech///git?a=commitdiff_plain;h=5a14c82381bd11c4b7be4f9e6d0030aaba84c7d4;p=vimb.git Show profile name in url bar #343. --- diff --git a/src/main.c b/src/main.c index 6b014ea..32c50d7 100644 --- a/src/main.c +++ b/src/main.c @@ -1382,13 +1382,21 @@ static void update_title(Client *c) */ static void update_urlbar(Client *c) { - GString *str = g_string_new(c->state.uri); + GString *str; gboolean back, fwd; - back = webkit_web_view_can_go_back(c->webview); - fwd = webkit_web_view_can_go_forward(c->webview); + str = g_string_new(""); + /* show profile name */ + if (vb.profile) { + g_string_append_printf(str, "[%s] ", vb.profile); + } + + /* show current url */ + g_string_append_printf(str, "%s", c->state.uri); /* show history indicator only if there is something to show */ + back = webkit_web_view_can_go_back(c->webview); + fwd = webkit_web_view_can_go_forward(c->webview); if (back || fwd) { g_string_append_printf(str, " [%s]", back ? (fwd ? "-+" : "-") : "+"); }