[nautilus/autorun-cleanup: 1/9] Don't automount volumes on nautilus startup
- From: Tomas Bzatek <tbzatek src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus/autorun-cleanup: 1/9] Don't automount volumes on nautilus startup
- Date: Tue, 23 Nov 2010 15:42:49 +0000 (UTC)
commit 8860153a3da68bf6144c719053149cc081ae3630
Author: Tomas Bzatek <tbzatek redhat com>
Date: Tue Nov 23 15:05:15 2010 +0100
Don't automount volumes on nautilus startup
src/nautilus-application.c | 61 --------------------------------------------
src/nautilus-application.h | 1 -
2 files changed, 0 insertions(+), 62 deletions(-)
---
diff --git a/src/nautilus-application.c b/src/nautilus-application.c
index a0a1e56..ec638f3 100644
--- a/src/nautilus-application.c
+++ b/src/nautilus-application.c
@@ -121,46 +121,6 @@ nautilus_application_get_spatial_window_list (void)
return nautilus_application_spatial_window_list;
}
-static void
-startup_volume_mount_cb (GObject *source_object,
- GAsyncResult *res,
- gpointer user_data)
-{
- g_volume_mount_finish (G_VOLUME (source_object), res, NULL);
-}
-
-static void
-automount_all_volumes (NautilusApplication *application)
-{
- GList *volumes, *l;
- GMount *mount;
- GVolume *volume;
-
- if (g_settings_get_boolean (nautilus_media_preferences, NAUTILUS_PREFERENCES_MEDIA_AUTOMOUNT)) {
- /* automount all mountable volumes at start-up */
- volumes = g_volume_monitor_get_volumes (application->volume_monitor);
- for (l = volumes; l != NULL; l = l->next) {
- volume = l->data;
-
- if (!g_volume_should_automount (volume) ||
- !g_volume_can_mount (volume)) {
- continue;
- }
-
- mount = g_volume_get_mount (volume);
- if (mount != NULL) {
- g_object_unref (mount);
- continue;
- }
-
- /* pass NULL as GMountOperation to avoid user interaction */
- g_volume_mount (volume, 0, NULL, NULL, startup_volume_mount_cb, NULL);
- }
- g_list_free_full (volumes, g_object_unref);
- }
-
-}
-
static gboolean
check_required_directories (NautilusApplication *application)
{
@@ -260,17 +220,6 @@ 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
mark_desktop_files_trusted (void)
{
@@ -564,11 +513,6 @@ finish_startup (NautilusApplication *application,
g_list_foreach (drives, (GFunc) drive_listen_for_eject_button, application);
g_list_foreach (drives, (GFunc) g_object_unref, NULL);
g_list_free (drives);
-
- application->automount_idle_id =
- g_idle_add_full (G_PRIORITY_LOW,
- automount_all_volumes_idle_cb,
- application, NULL);
}
static void
@@ -1438,11 +1382,6 @@ nautilus_application_finalize (GObject *object)
application->volume_monitor = NULL;
}
- if (application->automount_idle_id != 0) {
- g_source_remove (application->automount_idle_id);
- application->automount_idle_id = 0;
- }
-
if (application->proxy != NULL) {
g_object_unref (application->proxy);
application->proxy = NULL;
diff --git a/src/nautilus-application.h b/src/nautilus-application.h
index 25b6d52..59d0d67 100644
--- a/src/nautilus-application.h
+++ b/src/nautilus-application.h
@@ -61,7 +61,6 @@ typedef struct {
EggSMClient *smclient;
NautilusUndoManager *undo_manager;
GVolumeMonitor *volume_monitor;
- unsigned int automount_idle_id;
GDBusProxy *proxy;
gboolean session_is_active;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]