From 8ca2ec907c5ccb03d7edf22ef2902911a7d8df07 Mon Sep 17 00:00:00 2001 From: Marius Tolzmann Date: Fri, 3 Jul 2015 10:32:01 +0200 Subject: [PATCH] Quickfix against automount hammering do not monitor shortcuts. if shortcuts are set thunar will remount automount pathes everytime they get expired by autmount -> so they will never really expire even if totally unused all automount pathes in bookmarks are always mounted. this fix lets automount decide when a path is not needed. --- thunar/thunar-shortcuts-model.c | 4 ++++ thunar/thunar-window.c | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/thunar/thunar-shortcuts-model.c b/thunar/thunar-shortcuts-model.c index 40fcc1cbf..a4466ecbd 100644 --- a/thunar/thunar-shortcuts-model.c +++ b/thunar/thunar-shortcuts-model.c @@ -1131,6 +1131,7 @@ thunar_shortcuts_model_add_shortcut_with_path (ThunarShortcutsModel *model, _thunar_return_if_fail (shortcut->file == NULL || THUNAR_IS_FILE (shortcut->file)); /* we want to stay informed about changes to the file */ +#if 0 if (G_LIKELY (shortcut->file != NULL)) { /* watch the file for changes */ @@ -1142,6 +1143,7 @@ thunar_shortcuts_model_add_shortcut_with_path (ThunarShortcutsModel *model, g_signal_connect (G_OBJECT (shortcut->file), "destroy", G_CALLBACK (thunar_shortcuts_model_file_destroy), model); } +#endif if (path == NULL) { @@ -1655,6 +1657,7 @@ static void thunar_shortcut_free (ThunarShortcut *shortcut, ThunarShortcutsModel *model) { +#if 0 if (G_LIKELY (shortcut->file != NULL)) { /* drop the file watch */ @@ -1666,6 +1669,7 @@ thunar_shortcut_free (ThunarShortcut *shortcut, 0, NULL, NULL, model); g_object_unref (shortcut->file); } +#endif if (G_LIKELY (shortcut->device != NULL)) g_object_unref (shortcut->device); diff --git a/thunar/thunar-window.c b/thunar/thunar-window.c index 4f520585d..3bf8118e6 100644 --- a/thunar/thunar-window.c +++ b/thunar/thunar-window.c @@ -2001,6 +2001,7 @@ thunar_window_bookmark_release_file (gpointer data) { ThunarFile *file = THUNAR_FILE (data); +#if 0 /* stop watching */ thunar_file_unwatch (file); @@ -2010,6 +2011,7 @@ thunar_window_bookmark_release_file (gpointer data) 0, NULL, G_CALLBACK (thunar_window_bookmark_changed), NULL); +#endif g_object_unref (file); } @@ -2071,6 +2073,7 @@ thunar_window_bookmark_merge_line (GFile *file_path, g_object_set_data_full (G_OBJECT (action), I_("thunar-file"), file, thunar_window_bookmark_release_file); +#if 0 /* watch the file */ thunar_file_watch (file); @@ -2078,6 +2081,7 @@ thunar_window_bookmark_merge_line (GFile *file_path, G_CALLBACK (thunar_window_bookmark_changed), window); g_signal_connect_swapped (G_OBJECT (file), "changed", G_CALLBACK (thunar_window_bookmark_changed), window); +#endif } else {