From 2eb4aa3ecbad3c8fe62bd61fc85cd6626877361c Mon Sep 17 00:00:00 2001 From: Marco Pesenti Gritti Date: Sun, 22 Jun 2003 00:12:18 +0000 Subject: Set address as title only when there is no title, on the second page load 2003-06-22 Marco Pesenti Gritti * src/ephy-tab.c: (ensure_page_info), (ephy_tab_net_state_cb), (ephy_tab_init): Set address as title only when there is no title, on the second page load just keep the old one until the new one is available. --- src/ephy-tab.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/ephy-tab.c b/src/ephy-tab.c index c3630fc6b..52bdebebb 100644 --- a/src/ephy-tab.c +++ b/src/ephy-tab.c @@ -712,13 +712,18 @@ build_progress_from_requests (EphyTab *tab, EmbedState state) } static void -ensure_address (EphyTab *tab, const char *address) +ensure_page_info (EphyTab *tab, const char *address) { if (tab->priv->address == NULL && tab->priv->address_expire == TAB_ADDRESS_EXPIRE_NOW) { ephy_tab_set_location (tab, address, TAB_ADDRESS_EXPIRE_NOW); } + + if (tab->priv->title == NULL) + { + ephy_tab_set_title (tab, NULL); + } } static void @@ -742,9 +747,8 @@ ephy_tab_net_state_cb (EphyEmbed *embed, const char *uri, { tab->priv->total_requests = 0; tab->priv->cur_requests = 0; - ensure_address (tab, uri); + ensure_page_info (tab, uri); - ephy_tab_set_title (tab, NULL); ephy_tab_set_load_percent (tab, 0); ephy_tab_set_load_status (tab, TRUE); ephy_tab_update_navigation_flags (tab); @@ -942,7 +946,7 @@ ephy_tab_init (EphyTab *tab) tab->priv->cur_requests = 0; tab->priv->width = -1; tab->priv->height = -1; - tab->priv->title = g_strdup (_("Loading...")); + tab->priv->title = NULL; tab->priv->address = NULL; tab->priv->icon_address = NULL; tab->priv->load_percent = 0; -- cgit v1.2.3