aboutsummaryrefslogtreecommitdiff
path: root/src/web.cc
diff options
context:
space:
mode:
authorJorge Arellano Cid <jcid@dillo.org>2011-06-14 17:48:29 -0400
committerJorge Arellano Cid <jcid@dillo.org>2011-06-14 17:48:29 -0400
commitb7a43cd0266d6b58db91461bba65f0f2dcdd3b6c (patch)
tree9f51102fe5ef6bb229e101953de10b03a1b292ab /src/web.cc
parent5e21a2d857ed05132d9eb10fbddff5f37cf6828b (diff)
Made tab and window titles more informative (WRT length)
Diffstat (limited to 'src/web.cc')
-rw-r--r--src/web.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/web.cc b/src/web.cc
index 83700845..9daccdec 100644
--- a/src/web.cc
+++ b/src/web.cc
@@ -78,8 +78,11 @@ int a_Web_dispatch_by_type (const char *Type, DilloWeb *Web,
/* This method frees the old dw if any */
layout->setWidget(dw);
- /* Clear the title bar for pages without a <TITLE> tag */
- a_UIcmd_set_page_title(Web->bw, "");
+ /* Set the page title with the bare filename (e.g. for images),
+ * HTML pages with a <TITLE> tag will overwrite it later */
+ const char *p = strrchr(URL_STR(Web->url), '/');
+ a_UIcmd_set_page_title(Web->bw, p ? p+1 : "");
+
a_UIcmd_set_location_text(Web->bw, URL_STR(Web->url));
/* Reset both progress bars */
a_UIcmd_set_page_prog(Web->bw, 0, 2);