From 066f59e93ee61f907a6a061ccc93f919259743ea Mon Sep 17 00:00:00 2001 From: Christian Persch Date: Sun, 21 Aug 2005 19:04:24 +0000 Subject: Fix the check for unchanged address to check if we even have a monitor at 2005-08-21 Christian Persch * src/ephy-tab.c: (ephy_tab_update_file_monitor): Fix the check for unchanged address to check if we even have a monitor at all. Fixes auto-reload on a file:// URI loaded after a blank page. Also modify the 'is local' check to just check for file:// prefix on URI. --- src/ephy-tab.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'src') diff --git a/src/ephy-tab.c b/src/ephy-tab.c index d23667c12..236e946ac 100644 --- a/src/ephy-tab.c +++ b/src/ephy-tab.c @@ -1324,11 +1324,12 @@ ephy_tab_update_file_monitor (EphyTab *tab, { EphyTabPrivate *priv = tab->priv; GnomeVFSMonitorHandle *handle = NULL; - GnomeVFSURI *uri; gboolean local; - if (priv->address != NULL && address != NULL && + if (priv->monitor != NULL && + priv->address != NULL && address != NULL && strcmp (priv->address, address) == 0) + { /* same address, no change needed */ return; @@ -1336,12 +1337,7 @@ ephy_tab_update_file_monitor (EphyTab *tab, ephy_tab_file_monitor_cancel (tab); - uri = gnome_vfs_uri_new (address); - if (uri == NULL) return; - - local = gnome_vfs_uri_is_local (uri); - gnome_vfs_uri_unref (uri); - + local = g_str_has_prefix (address, "file://"); if (local == FALSE) return; if (gnome_vfs_monitor_add (&handle, address, -- cgit v1.2.3