diff options
author | Harald Judt <h.judt@gmx.at> | 2015-05-15 17:17:28 +0200 |
---|---|---|
committer | Harald Judt <h.judt@gmx.at> | 2015-05-15 18:33:12 +0200 |
commit | 61e52c7d53bf612b532dd1b8d7d49352cee1597e (patch) | |
tree | 8957296d6acfc7edb403f4226474f1aed2d16f7a /thunar | |
parent | 2d5567b2f6ae6223c8865547704797a5c785ec1f (diff) | |
download | thunar-61e52c7d53bf612b532dd1b8d7d49352cee1597e.tar.gz |
Revert changes for restoring the trash in the session client (bug #9513)
Because we now force-spawn the gvfs trash daemon in main(), this code
is no longer necessary and can be removed.
Diffstat (limited to 'thunar')
-rw-r--r-- | thunar/thunar-session-client.c | 55 |
1 files changed, 1 insertions, 54 deletions
diff --git a/thunar/thunar-session-client.c b/thunar/thunar-session-client.c index 303e484f..de8db1f6 100644 --- a/thunar/thunar-session-client.c +++ b/thunar/thunar-session-client.c @@ -79,9 +79,6 @@ struct _ThunarSessionClient gchar *path; gchar *id; - guint trash_load_idle; - guint trash_checks; - #ifdef HAVE_LIBSM SmcConn connection; #endif @@ -118,9 +115,6 @@ thunar_session_client_finalize (GObject *object) { ThunarSessionClient *session_client = THUNAR_SESSION_CLIENT (object); - if (session_client->trash_load_idle != 0) - g_source_remove (session_client->trash_load_idle); - #ifdef HAVE_LIBSM /* disconnect from the session manager */ if (G_LIKELY (session_client->connection != NULL)) @@ -275,43 +269,6 @@ thunar_session_client_connect (ThunarSessionClient *session_client, -static gboolean -thunar_session_client_restore_trash (gpointer data) -{ - ThunarSessionClient *session_client = THUNAR_SESSION_CLIENT (data); - GFile *trash; - ThunarFile *directory; - guint32 item_count = 0; - - /* make sure the trash is loaded */ - trash = thunar_g_file_new_for_trash (); - directory = thunar_file_cache_lookup (trash); - g_object_unref (trash); - - if (G_LIKELY (directory != NULL)) - { - thunar_file_reload (directory); - item_count = thunar_file_get_item_count (directory); - g_object_unref (directory); - } - - /* continue checking for 15 seconds or files are found */ - return (session_client->trash_checks++ < 5 && item_count == 0); -} - - - -static void -thunar_session_client_restore_finised (gpointer data) -{ - ThunarSessionClient *session_client = THUNAR_SESSION_CLIENT (data); - - session_client->trash_load_idle = 0; - session_client->trash_checks = 0; -} - - - static void thunar_session_client_restore (ThunarSessionClient *session_client) { @@ -356,17 +313,7 @@ thunar_session_client_restore (ThunarSessionClient *session_client) gtk_widget_show (window); /* open tabs */ - if (thunar_window_set_directories (THUNAR_WINDOW (window), uris, active_tab)) - { - /* add idle to make sure the trash status is up2date (bug #9513) */ - if (session_client->trash_load_idle == 0) - { - session_client->trash_load_idle = - g_timeout_add_seconds_full (G_PRIORITY_DEFAULT_IDLE, 3, thunar_session_client_restore_trash, - session_client, thunar_session_client_restore_finised); - } - } - else + if (!thunar_window_set_directories (THUNAR_WINDOW (window), uris, active_tab)) { /* no tabs were opened */ gtk_widget_destroy (window); |