diff --git a/thunar/main.c b/thunar/main.c index fc0c91b01c8ef98975f99335e62c2059977c61bf..e2eff3eda3fe9a579c1d5e5abf7d5dc6fce67b62 100644 --- a/thunar/main.c +++ b/thunar/main.c @@ -53,7 +53,7 @@ static gboolean opt_daemon = FALSE; static gchar *opt_sm_client_id = NULL; static gboolean opt_quit = FALSE; static gboolean opt_version = FALSE; -static ThunarFile *thunar_trash_file = NULL; + /* --- command line options --- */ @@ -97,13 +97,6 @@ thunar_delayed_exit_check (gpointer user_data) } else { - /* unref the trash bin */ - if (thunar_trash_file != NULL) - { - g_object_unref (thunar_trash_file); - thunar_trash_file = NULL; - } - /* no command line arguments opened in Thunar, exit now */ gtk_main_quit (); @@ -115,38 +108,6 @@ thunar_delayed_exit_check (gpointer user_data) -static void -thunar_force_spawn_trash (void) -{ - GFile *trash; - - /* check that this has not happened yet */ - if (thunar_trash_file != NULL) - return; - - /* gvfs has no trash support */ - if (!thunar_g_vfs_is_uri_scheme_supported ("trash")) - return; - - trash = thunar_g_file_new_for_trash (); - thunar_trash_file = thunar_file_cache_lookup (trash); - if (thunar_trash_file == NULL) - { - thunar_trash_file = thunar_file_get (trash, NULL); - if (thunar_trash_file) - { - /* schedule a few reloads */ - thunar_file_reload_idle (thunar_trash_file); - thunar_file_reload_idle_timeout (thunar_trash_file, 2000); - thunar_file_reload_idle_timeout (thunar_trash_file, 3000); - thunar_file_reload_idle_timeout (thunar_trash_file, 5000); - } - } - g_object_unref (trash); -} - - - int main (int argc, char **argv) { @@ -290,14 +251,6 @@ main (int argc, char **argv) /* initialize the thunar stock items/icons */ thunar_stock_init (); - /* For the trash state to be correct, gvfsd-trash needs to have been - * spawned. If the trash file is not in cache, this means we could - * access it the first time and the daemon might not have been - * spawned yet. So let's reload the trash later in idle, so that - * the state gets updated correctly (bug #9513). - */ - thunar_force_spawn_trash (); - /* acquire a reference on the global application */ application = thunar_application_get (); @@ -363,13 +316,6 @@ error0: g_object_unref (G_OBJECT (dbus_service)); #endif - /* unreference the trash file */ - if (thunar_trash_file != NULL) - { - g_object_unref (thunar_trash_file); - thunar_trash_file = NULL; - } - /* disconnect from the session manager */ g_object_unref (G_OBJECT (session_client)); diff --git a/thunar/thunar-file.c b/thunar/thunar-file.c index 4ab921fbf9b5f9e7ddc581e95afa103141d37e65..44c12132cde9bd70131c5ea1bbcc48bfd1cbe56c 100644 --- a/thunar/thunar-file.c +++ b/thunar/thunar-file.c @@ -3951,27 +3951,6 @@ thunar_file_reload_idle (ThunarFile *file) -/** - * thunar_file_reload_idle_timeout: - * @file : a #ThunarFile instance. - * @timeout : the timeout in ms after which the reload should happen - * - * Schedules a reload of the @file by calling thunar_file_reload in - * idle after @timeout milliseconds have passed. - * - **/ -void -thunar_file_reload_idle_timeout (ThunarFile *file, - guint timeout) -{ - _thunar_return_if_fail (THUNAR_IS_FILE (file)); - - g_timeout_add_full (G_PRIORITY_DEFAULT_IDLE, timeout, - (GSourceFunc) thunar_file_reload, file, NULL); -} - - - /** * thunar_file_destroy: * @file : a #ThunarFile instance. diff --git a/thunar/thunar-file.h b/thunar/thunar-file.h index 1704aca50ca1a1ffe44e7ae3c9efe7b53fe4364d..9a3de178273cc243c218f4f6495aed54344b3b56 100644 --- a/thunar/thunar-file.h +++ b/thunar/thunar-file.h @@ -241,8 +241,6 @@ void thunar_file_unwatch (ThunarFile void thunar_file_reload (ThunarFile *file); void thunar_file_reload_idle (ThunarFile *file); -void thunar_file_reload_idle_timeout (ThunarFile *file, - guint timeout); void thunar_file_reload_parent (ThunarFile *file); void thunar_file_destroy (ThunarFile *file);