Commit 92e9e445 authored by Christian Neumair's avatar Christian Neumair Committed by Christian Neumair

Automount volumes in idle callback rather than during startup (#526471).

2008-04-07  Christian Neumair  <cneumair@gnome.org>

	* src/nautilus-application.c (nautilus_application_destroy),
	(automount_all_volumes_idle_cb), (finish_startup):
	* src/nautilus-application.h:
	Automount volumes in idle callback rather than during startup
	(#526471).

svn path=/trunk/; revision=14047
parent e9d9dc32
2008-04-07 Christian Neumair <cneumair@gnome.org>
* src/nautilus-application.c (nautilus_application_destroy),
(automount_all_volumes_idle_cb), (finish_startup):
* src/nautilus-application.h:
Automount volumes in idle callback rather than during startup
(#526471).
2008-04-07 Christian Neumair <cneumair@gnome.org>
* libnautilus-private/nautilus-column-chooser.c (update_buttons),
......
......@@ -272,6 +272,11 @@ nautilus_application_destroy (BonoboObject *object)
}
bonobo_object_unref (application->shell);
if (application->automount_idle_id != 0) {
g_source_remove (application->automount_idle_id);
application->automount_idle_id = 0;
}
EEL_CALL_PARENT (BONOBO_OBJECT_CLASS, destroy, (object));
}
......@@ -400,6 +405,17 @@ menu_provider_init_callback (void)
nautilus_module_extension_list_free (providers);
}
static gboolean
automount_all_volumes_idle_cb (gpointer data)
{
NautilusApplication *application = NAUTILUS_APPLICATION (data);
automount_all_volumes (application);
application->automount_idle_id = 0;
return FALSE;
}
static void
finish_startup (NautilusApplication *application)
{
......@@ -440,7 +456,10 @@ finish_startup (NautilusApplication *application)
g_list_foreach (drives, (GFunc) g_object_unref, NULL);
g_list_free (drives);
automount_all_volumes (application);
application->automount_idle_id =
g_idle_add_full (G_PRIORITY_LOW,
automount_all_volumes_idle_cb,
application, NULL);
}
static void
......
......@@ -58,6 +58,7 @@ typedef struct {
NautilusShell *shell;
gboolean shell_registered;
GVolumeMonitor *volume_monitor;
unsigned int automount_idle_id;
} NautilusApplication;
typedef struct {
......
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