summaryrefslogtreecommitdiff
path: root/src/nautilus-window-manage-views.c
diff options
context:
space:
mode:
authorMichael Meeks <michael@ximian.com>2002-02-19 10:51:08 +0000
committerMichael Meeks <michael@src.gnome.org>2002-02-19 10:51:08 +0000
commitefac48236b4ce8560b4dfacc20bbd80757d17901 (patch)
treef1b8eebf9f3a05f46dd67169b5708adbdb95971b /src/nautilus-window-manage-views.c
parentb99fa35032b4bfae4b4ea1d7d5721ba187efb104 (diff)
downloadnautilus-efac48236b4ce8560b4dfacc20bbd80757d17901.tar.gz
ensure we survive without trashing the WM, even if we can get no working
2002-02-19 Michael Meeks <michael@ximian.com> * src/nautilus-window-manage-views.c (determined_initial_view_callback): ensure we survive without trashing the WM, even if we can get no working mime data at all. * libnautilus-private/nautilus-icon-container.c (nautilus_icon_container_init): g_signal_connect_object is not like gtk_signal_connect_object_while_alive, it's missing a vital arg. swap.
Diffstat (limited to 'src/nautilus-window-manage-views.c')
-rw-r--r--src/nautilus-window-manage-views.c22
1 files changed, 12 insertions, 10 deletions
diff --git a/src/nautilus-window-manage-views.c b/src/nautilus-window-manage-views.c
index 72a5a20b3..165419737 100644
--- a/src/nautilus-window-manage-views.c
+++ b/src/nautilus-window-manage-views.c
@@ -1348,18 +1348,20 @@ determined_initial_view_callback (NautilusDetermineViewHandle *handle,
/* the user could have typed in a home directory that doesn't exist,
in which case going home would cause an infinite loop, so we
better test for that */
-
- home_uri = eel_preferences_get (NAUTILUS_PREFERENCES_HOME_URI);
- if (!eel_uris_match (home_uri, location)) {
- nautilus_window_go_home (NAUTILUS_WINDOW (window));
- } else {
+
+ if (!eel_uris_match (location, "file:///")) {
+ home_uri = eel_preferences_get (NAUTILUS_PREFERENCES_HOME_URI);
+ if (!eel_uris_match (home_uri, location)) {
+ nautilus_window_go_home (NAUTILUS_WINDOW (window));
+ } else {
/* the last fallback is to go to a known place that can't be deleted! */
- nautilus_window_go_to (NAUTILUS_WINDOW (window), "file:///");
- }
- g_free (home_uri);
+ nautilus_window_go_to (NAUTILUS_WINDOW (window), "file:///");
+ }
+ g_free (home_uri);
+ }
} else {
- /* Since this is a window, destroying it will also unref it. */
- gtk_object_destroy (GTK_OBJECT (window));
+ /* Since this is a window, destroying it will also unref it. */
+ gtk_object_destroy (GTK_OBJECT (window));
}
} else {
/* Clean up state of already-showing window */