aboutsummaryrefslogtreecommitdiffstats
path: root/src/ephy-tab.c
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <marco@it.gnome.org>2003-06-21 00:52:49 +0800
committerMarco Pesenti Gritti <mpeseng@src.gnome.org>2003-06-21 00:52:49 +0800
commit5d5fe667968ae5e9b4a4fe97ba36a06a7616d718 (patch)
treef0a28b1067282fdc4d7aed8aabc1a2ad39cd2bf2 /src/ephy-tab.c
parenta838f6d5ab82bac98a25fb3ce9cb2c0cd575146c (diff)
downloadgsoc2013-epiphany-5d5fe667968ae5e9b4a4fe97ba36a06a7616d718.tar
gsoc2013-epiphany-5d5fe667968ae5e9b4a4fe97ba36a06a7616d718.tar.gz
gsoc2013-epiphany-5d5fe667968ae5e9b4a4fe97ba36a06a7616d718.tar.bz2
gsoc2013-epiphany-5d5fe667968ae5e9b4a4fe97ba36a06a7616d718.tar.lz
gsoc2013-epiphany-5d5fe667968ae5e9b4a4fe97ba36a06a7616d718.tar.xz
gsoc2013-epiphany-5d5fe667968ae5e9b4a4fe97ba36a06a7616d718.tar.zst
gsoc2013-epiphany-5d5fe667968ae5e9b4a4fe97ba36a06a7616d718.zip
Set a title on NET_START (nicified url).
2003-06-20 Marco Pesenti Gritti <marco@it.gnome.org> * src/ephy-tab.c: (ephy_tab_net_state_cb), (ephy_tab_set_title): Set a title on NET_START (nicified url). * src/prefs-dialog.c: (prefs_homepage_current_button_clicked_cb): * src/session.c: (save_tab): * src/window-commands.c: (window_cmd_file_send_to), (window_cmd_file_bookmark_page): Use embed_get_location when we want the real location, tab can contain user changes.
Diffstat (limited to 'src/ephy-tab.c')
-rw-r--r--src/ephy-tab.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/ephy-tab.c b/src/ephy-tab.c
index 2c34b0542..c3630fc6b 100644
--- a/src/ephy-tab.c
+++ b/src/ephy-tab.c
@@ -744,6 +744,7 @@ ephy_tab_net_state_cb (EphyEmbed *embed, const char *uri,
tab->priv->cur_requests = 0;
ensure_address (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);
@@ -1104,7 +1105,7 @@ ephy_tab_get_status_message (EphyTab *tab)
}
#define MAX_LABEL_LENGTH 32
-
+
static void
ephy_tab_set_title (EphyTab *tab, const char *new_title)
{
@@ -1118,7 +1119,11 @@ ephy_tab_set_title (EphyTab *tab, const char *new_title)
if (new_title == NULL || new_title[0] == '\0')
{
- uri = gnome_vfs_uri_new (tab->priv->address);
+ char *address;
+
+ ephy_embed_get_location (tab->priv->embed, TRUE, &address);
+ uri = gnome_vfs_uri_new (address);
+
if (uri)
{
title = gnome_vfs_uri_to_string (uri,
@@ -1129,12 +1134,19 @@ ephy_tab_set_title (EphyTab *tab, const char *new_title)
GNOME_VFS_URI_HIDE_FRAGMENT_IDENTIFIER);
gnome_vfs_uri_unref (uri);
}
+ else if (address != NULL)
+ {
+ title = g_strdup (address);
+ }
if (title == NULL || title[0] == '\0')
{
g_free (title);
title = g_strdup (_("Blank page"));
}
+
+
+ g_free (address);
}
else
{