[Xfce4-commits] <thunar:master> Set progress bar text to "Cancelling..." when a job is cancelled.

Jannis Pohlmann jannis at xfce.org
Sun Sep 13 15:52:09 CEST 2009


Updating branch refs/heads/master
         to 60aa22b74f9fa41e351449d5282e47b336dbf269 (commit)
       from a6e275939ec75ba9237ba30dd9ae3d88c57e18e9 (commit)

commit 60aa22b74f9fa41e351449d5282e47b336dbf269
Author: Jannis Pohlmann <jannis at xfce.org>
Date:   Sun Sep 13 14:34:34 2009 +0200

    Set progress bar text to "Cancelling..." when a job is cancelled.
    
    This makes it more obvious that Thunar has recognized the user's cancel
    action and is about to cancel the job. Sometimes this takes a while, so
    this text will help users in being patient. Suggested by Steve Dodier.

 thunar/thunar-progress-view.c |   17 ++++++++++++++++-
 1 files changed, 16 insertions(+), 1 deletions(-)

diff --git a/thunar/thunar-progress-view.c b/thunar/thunar-progress-view.c
index 854bb18..d51867a 100644
--- a/thunar/thunar-progress-view.c
+++ b/thunar/thunar-progress-view.c
@@ -309,7 +309,22 @@ thunar_progress_view_cancel_job (ThunarProgressView *view)
   _thunar_return_if_fail (THUNAR_IS_JOB (view->job));
 
   if (view->job != NULL)
-    exo_job_cancel (EXO_JOB (view->job));
+    {
+      /* cancel the job */
+      exo_job_cancel (EXO_JOB (view->job));
+
+      /* don't listen to percentage updates any more */
+      g_signal_handlers_disconnect_matched (view->job, G_SIGNAL_MATCH_FUNC, 0, 0, NULL, 
+                                            thunar_progress_view_percent, NULL);
+
+      /* don't listen to info messages any more */
+      g_signal_handlers_disconnect_matched (view->job, G_SIGNAL_MATCH_FUNC, 0, 0, NULL,
+                                            thunar_progress_view_info_message, NULL);
+
+      /* update the progress bar text */
+      gtk_progress_bar_set_text (GTK_PROGRESS_BAR (view->progress_bar), 
+                                 _("Cancelling..."));
+    }
 }
 
 



More information about the Xfce4-commits mailing list