[gnome-builder] clone: don't transition if task was canceled
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] clone: don't transition if task was canceled
- Date: Mon, 13 Mar 2017 04:01:45 +0000 (UTC)
commit 01d5aad6d8523dc1bed3cee3e1a39003b8c97391
Author: Christian Hergert <chergert redhat com>
Date: Sun Mar 12 21:01:25 2017 -0700
clone: don't transition if task was canceled
If the task got canceled while we were cloning, then we don't want to
transition to the workbench. Instead return from the task worker.
plugins/git/ide-git-clone-widget.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/plugins/git/ide-git-clone-widget.c b/plugins/git/ide-git-clone-widget.c
index 12bbc3c..a5cd603 100644
--- a/plugins/git/ide-git-clone-widget.c
+++ b/plugins/git/ide-git-clone-widget.c
@@ -372,6 +372,9 @@ ide_git_clone_widget_worker (GTask *task,
return;
}
+ if (g_task_return_error_if_cancelled (task))
+ return;
+
req->project_file = ggit_repository_get_workdir (repository);
g_timeout_add (0, finish_animation_in_idle, g_object_ref (task));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]