Commit fe6e7d4c authored by Alexander Larsson's avatar Alexander Larsson Committed by Alexander Larsson
Browse files

Make the session restart work again (from 2006-11-03 change) Make the

2006-11-07  Alexander Larsson  <alexl@redhat.com>

	* src/nautilus-application.c:
	* src/nautilus-shell.c:
	* src/nautilus-main.[ch]:
	Make the session restart work again (from 2006-11-03 change)
	Make the session not restart nautilus on --quit
parent 3dfdf85c
2006-11-07 Alexander Larsson <alexl@redhat.com>
* src/nautilus-application.c:
* src/nautilus-shell.c:
* src/nautilus-main.[ch]:
Make the session restart work again (from 2006-11-03 change)
Make the session not restart nautilus on --quit
2006-11-06 Federico Mena Quintero <federico@novell.com>
http://bugzilla.gnome.org/show_bug.cgi?id=330298
......
......@@ -803,6 +803,9 @@ nautilus_application_open_desktop (NautilusApplication *application)
{
if (nautilus_application_desktop_windows == NULL) {
nautilus_application_create_desktop_windows (application);
/* Make sure we update the session when the desktop is created */
update_session (gnome_master_client ());
}
}
......@@ -814,6 +817,9 @@ nautilus_application_close_desktop (void)
(GFunc) gtk_widget_destroy, NULL);
g_list_free (nautilus_application_desktop_windows);
nautilus_application_desktop_windows = NULL;
/* Make sure we update the session when the desktop goes away */
update_session (gnome_master_client ());
}
}
......@@ -1258,11 +1264,6 @@ desktop_changed_callback (gpointer user_data)
} else {
nautilus_application_close_desktop ();
}
/* Can't make this function just watch the preference
* itself changing since ordering is important
*/
update_session (gnome_master_client ());
}
static gboolean
......@@ -1359,7 +1360,7 @@ volume_unmounted_callback (GnomeVFSVolumeMonitor *monitor,
static void
removed_from_session (GnomeClient *client, gpointer data)
{
nautilus_main_event_loop_quit ();
nautilus_main_event_loop_quit (FALSE);
}
static char *
......
......@@ -48,6 +48,7 @@
#include <glib/gi18n.h>
#include <libgnome/gnome-init.h>
#include <libgnomeui/gnome-ui-init.h>
#include <libgnomeui/gnome-client.h>
#include <libgnomevfs/gnome-vfs-init.h>
#include <libnautilus-private/nautilus-directory-metafile.h>
#include <libnautilus-private/nautilus-global-preferences.h>
......@@ -132,8 +133,13 @@ nautilus_main_is_event_loop_mainstay (GtkObject *object)
}
void
nautilus_main_event_loop_quit (void)
nautilus_main_event_loop_quit (gboolean explicit)
{
if (explicit) {
/* Explicit --quit, make sure we don't restart */
gnome_client_set_restart_style (gnome_master_client (),
GNOME_RESTART_IF_RUNNING);
}
while (event_loop_registrants != NULL) {
gtk_object_destroy (event_loop_registrants->data);
}
......
......@@ -31,7 +31,7 @@
void nautilus_main_event_loop_register (GtkObject *object);
gboolean nautilus_main_is_event_loop_mainstay (GtkObject *object);
void nautilus_main_event_loop_quit (void);
void nautilus_main_event_loop_quit (gboolean explicit);
#endif /* NAUTILUS_MAIN_H */
......@@ -302,7 +302,7 @@ start_desktop_at_idle (gpointer _data)
application = NAUTILUS_APPLICATION (data->shell->details->application);
nautilus_application_open_desktop (application);
g_free (data);
return FALSE;
}
......@@ -337,7 +337,7 @@ corba_stop_desktop (PortableServer_Servant servant,
static gboolean
quit_at_idle (gpointer data)
{
nautilus_main_event_loop_quit ();
nautilus_main_event_loop_quit (TRUE);
return FALSE;
}
......@@ -508,7 +508,7 @@ restart_at_idle (gpointer data)
{
save_window_states ();
nautilus_main_event_loop_quit ();
nautilus_main_event_loop_quit (TRUE);
g_setenv ("_NAUTILUS_RESTART", "yes", 1);
return FALSE;
}
......
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