diff options
author | Jorge Arellano Cid <jcid@dillo.org> | 2011-06-14 17:53:55 -0400 |
---|---|---|
committer | Jorge Arellano Cid <jcid@dillo.org> | 2011-06-14 17:53:55 -0400 |
commit | 59bf704468726f6d3c7158e236bbec63b6afeeda (patch) | |
tree | a12733def84db82e57b679f3d2204a302da662cf | |
parent | 4394260251412ccb4a7cca9912a7780a8cda3990 (diff) | |
parent | b7a43cd0266d6b58db91461bba65f0f2dcdd3b6c (diff) |
merge
-rw-r--r-- | src/html.cc | 12 | ||||
-rw-r--r-- | src/uicmd.cc | 5 | ||||
-rw-r--r-- | src/web.cc | 7 |
3 files changed, 16 insertions, 8 deletions
diff --git a/src/html.cc b/src/html.cc index c3235209..83be4f7a 100644 --- a/src/html.cc +++ b/src/html.cc @@ -2456,12 +2456,14 @@ static void Html_tag_open_a(DilloHtml *html, const char *tag, int tagsize) html->InVisitedLink = true; html->styleEngine->setPseudoVisited (); if (html->non_css_visited_color != -1) - html->styleEngine->setNonCssHint(CSS_PROPERTY_COLOR, CSS_TYPE_COLOR, + html->styleEngine->setNonCssHint(CSS_PROPERTY_COLOR, + CSS_TYPE_COLOR, html->non_css_visited_color); } else { html->styleEngine->setPseudoLink (); if (html->non_css_link_color != -1) - html->styleEngine->setNonCssHint(CSS_PROPERTY_COLOR, CSS_TYPE_COLOR, + html->styleEngine->setNonCssHint(CSS_PROPERTY_COLOR, + CSS_TYPE_COLOR, html->non_css_link_color); } @@ -2739,9 +2741,11 @@ static void Html_tag_open_hr(DilloHtml *html, const char *tag, int tagsize) html->styleEngine->setNonCssHint (CSS_PROPERTY_BORDER_LEFT_WIDTH, CSS_TYPE_LENGTH_PERCENTAGE, size_top); html->styleEngine->setNonCssHint (CSS_PROPERTY_BORDER_BOTTOM_WIDTH, - CSS_TYPE_LENGTH_PERCENTAGE, size_bottom); + CSS_TYPE_LENGTH_PERCENTAGE, + size_bottom); html->styleEngine->setNonCssHint (CSS_PROPERTY_BORDER_RIGHT_WIDTH, - CSS_TYPE_LENGTH_PERCENTAGE, size_bottom); + CSS_TYPE_LENGTH_PERCENTAGE, + size_bottom); } HT2TB(html)->addParbreak (5, html->styleEngine->wordStyle ()); diff --git a/src/uicmd.cc b/src/uicmd.cc index 10b90a50..5e30d72b 100644 --- a/src/uicmd.cc +++ b/src/uicmd.cc @@ -296,8 +296,8 @@ void CustTabs::switch_tab(CustTabButton *cbtn) // Update window title if ((bw = a_UIcmd_get_bw_by_widget(cbtn->ui()))) { - const char *title = a_History_get_title(NAV_TOP_UIDX(bw), 1); - a_UIcmd_set_page_title(bw, title ? title : ""); + const char *title = (cbtn->ui())->label(); + cbtn->window()->copy_label(title ? title : ""); } } } @@ -1157,6 +1157,7 @@ void a_UIcmd_set_page_title(BrowserWindow *bw, const char *label) uint_t i = MIN(size - 4, 1 + a_Utf8_end_of_char(title, size - 8)); snprintf(title + i, 4, "..."); } + BW2UI(bw)->copy_label(title); BW2UI(bw)->window()->copy_label(title); } BW2UI(bw)->tabs()->set_tab_label(BW2UI(bw), label); @@ -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); |