[Xfce4-commits] [xfce/thunar] 04/06: Revert changes for restoring the trash in the session client (bug #9513)

noreply at xfce.org noreply at xfce.org
Fri May 15 18:37:08 CEST 2015


This is an automated email from the git hooks/post-receive script.

hjudt pushed a commit to branch master
in repository xfce/thunar.

commit 61e52c7d53bf612b532dd1b8d7d49352cee1597e
Author: Harald Judt <h.judt at gmx.at>
Date:   Fri May 15 17:17:28 2015 +0200

    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.
---
 thunar/thunar-session-client.c |   55 +---------------------------------------
 1 file changed, 1 insertion(+), 54 deletions(-)

diff --git a/thunar/thunar-session-client.c b/thunar/thunar-session-client.c
index 303e484..de8db1f 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);

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list