Commit 3daa4850 authored by Darin Adler's avatar Darin Adler
Browse files

Make a new window even when you say --manage-desktop for now, because

	* src/nautilus-application.c: (nautilus_app_startup):
	Make a new window even when you say --manage-desktop for now,
	because closing the last window or Quit is the only way to get
	rid of the desktop until we do some more work on it.

	* src/nautilus-window-manage-views.c:
	(nautilus_window_request_location_change):
	Always open in a new window when starting with the desktop.

	* src/nautilus-window.c: (nautilus_window_goto_uri_callback),
	(nautilus_window_constructed): Tiny formatting tweak.
parent 92d3ad35
......@@ -348,7 +348,11 @@ nautilus_app_startup (NautilusApp *app,
}
}
}
if (!manage_desktop && first_window == NULL) {
/* FIXME bugzilla.eazel.com 1051: Change this logic back so it won't
* make a new window when asked to manage the desktop, once we have
* a way to get rid of the desktop.
*/
if (/* !manage_desktop && */ first_window == NULL) {
first_window = nautilus_app_create_window (app);
nautilus_window_go_home (first_window);
}
......
......@@ -315,10 +315,10 @@ nautilus_window_goto_uri (NautilusWindow *window, const char *uri)
static void
nautilus_window_goto_uri_callback (GtkWidget *widget,
const char *uri,
GtkWidget *window)
const char *uri,
GtkWidget *window)
{
nautilus_window_goto_uri(NAUTILUS_WINDOW(window), uri);
nautilus_window_goto_uri (NAUTILUS_WINDOW (window), uri);
}
static void
......@@ -428,7 +428,7 @@ nautilus_window_constructed (NautilusWindow *window)
window->sidebar = nautilus_sidebar_new ();
gtk_widget_show (GTK_WIDGET (window->sidebar));
gtk_container_add (GTK_CONTAINER (temp_frame), GTK_WIDGET (window->sidebar));
gtk_signal_connect (GTK_OBJECT(window->sidebar), "location_changed",
gtk_signal_connect (GTK_OBJECT (window->sidebar), "location_changed",
nautilus_window_goto_uri_callback, window);
/* FIXME: We should use inheritance instead of these special cases
......
......@@ -315,10 +315,10 @@ nautilus_window_goto_uri (NautilusWindow *window, const char *uri)
static void
nautilus_window_goto_uri_callback (GtkWidget *widget,
const char *uri,
GtkWidget *window)
const char *uri,
GtkWidget *window)
{
nautilus_window_goto_uri(NAUTILUS_WINDOW(window), uri);
nautilus_window_goto_uri (NAUTILUS_WINDOW (window), uri);
}
static void
......@@ -428,7 +428,7 @@ nautilus_window_constructed (NautilusWindow *window)
window->sidebar = nautilus_sidebar_new ();
gtk_widget_show (GTK_WIDGET (window->sidebar));
gtk_container_add (GTK_CONTAINER (temp_frame), GTK_WIDGET (window->sidebar));
gtk_signal_connect (GTK_OBJECT(window->sidebar), "location_changed",
gtk_signal_connect (GTK_OBJECT (window->sidebar), "location_changed",
nautilus_window_goto_uri_callback, window);
/* FIXME: We should use inheritance instead of these special cases
......
......@@ -315,10 +315,10 @@ nautilus_window_goto_uri (NautilusWindow *window, const char *uri)
static void
nautilus_window_goto_uri_callback (GtkWidget *widget,
const char *uri,
GtkWidget *window)
const char *uri,
GtkWidget *window)
{
nautilus_window_goto_uri(NAUTILUS_WINDOW(window), uri);
nautilus_window_goto_uri (NAUTILUS_WINDOW (window), uri);
}
static void
......@@ -428,7 +428,7 @@ nautilus_window_constructed (NautilusWindow *window)
window->sidebar = nautilus_sidebar_new ();
gtk_widget_show (GTK_WIDGET (window->sidebar));
gtk_container_add (GTK_CONTAINER (temp_frame), GTK_WIDGET (window->sidebar));
gtk_signal_connect (GTK_OBJECT(window->sidebar), "location_changed",
gtk_signal_connect (GTK_OBJECT (window->sidebar), "location_changed",
nautilus_window_goto_uri_callback, window);
/* FIXME: We should use inheritance instead of these special cases
......
......@@ -50,6 +50,11 @@
#include "nautilus-window-private.h"
#include "nautilus-location-bar.h"
/* FIXME: We should use inheritance instead of these special cases
* for the desktop window.
*/
#include "nautilus-desktop-window.h"
/*#define EXTREME_DEBUGGING*/
#ifdef EXTREME_DEBUGGING
......@@ -640,6 +645,7 @@ nautilus_window_request_location_change (NautilusWindow *window,
NautilusViewFrame *requesting_view)
{
NautilusWindow *new_window;
gboolean create_new_window;
loc->requested_uri = gnome_vfs_unescape_string (loc->requested_uri);
......@@ -647,13 +653,23 @@ nautilus_window_request_location_change (NautilusWindow *window,
return;
}
if (loc->new_window_requested) {
create_new_window = loc->new_window_requested;
/* FIXME: We should use inheritance instead of these special cases
* for the desktop window.
*/
if (NAUTILUS_IS_DESKTOP_WINDOW (window) && window->content_view != NULL) {
create_new_window = TRUE;
}
if (create_new_window) {
new_window = nautilus_app_create_window (NAUTILUS_APP(window->app));
nautilus_window_goto_uri (new_window, loc->requested_uri);
} else {
nautilus_window_begin_location_change (window, loc,
requesting_view,
NAUTILUS_LOCATION_CHANGE_STANDARD, 0);
nautilus_window_begin_location_change
(window, loc,
requesting_view,
NAUTILUS_LOCATION_CHANGE_STANDARD, 0);
}
}
......
......@@ -315,10 +315,10 @@ nautilus_window_goto_uri (NautilusWindow *window, const char *uri)
static void
nautilus_window_goto_uri_callback (GtkWidget *widget,
const char *uri,
GtkWidget *window)
const char *uri,
GtkWidget *window)
{
nautilus_window_goto_uri(NAUTILUS_WINDOW(window), uri);
nautilus_window_goto_uri (NAUTILUS_WINDOW (window), uri);
}
static void
......@@ -428,7 +428,7 @@ nautilus_window_constructed (NautilusWindow *window)
window->sidebar = nautilus_sidebar_new ();
gtk_widget_show (GTK_WIDGET (window->sidebar));
gtk_container_add (GTK_CONTAINER (temp_frame), GTK_WIDGET (window->sidebar));
gtk_signal_connect (GTK_OBJECT(window->sidebar), "location_changed",
gtk_signal_connect (GTK_OBJECT (window->sidebar), "location_changed",
nautilus_window_goto_uri_callback, window);
/* FIXME: We should use inheritance instead of these special cases
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment