[gnome-builder] bufmgr: hoist cancellable up



commit 6c41c95f64b991b1dbf26343b31da7e0e6e828e8
Author: Christian Hergert <chergert redhat com>
Date:   Thu Jan 4 02:37:29 2018 -0800

    bufmgr: hoist cancellable up

 src/libide/buffers/ide-buffer-manager.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/src/libide/buffers/ide-buffer-manager.c b/src/libide/buffers/ide-buffer-manager.c
index 9e1dcb0..dfcbcf6 100644
--- a/src/libide/buffers/ide-buffer-manager.c
+++ b/src/libide/buffers/ide-buffer-manager.c
@@ -641,6 +641,7 @@ ide_buffer_manager__load_file_query_info_cb (GObject      *object,
   g_autoptr(GTask) task = user_data;
   g_autoptr(GFileInfo) file_info = NULL;
   g_autoptr(GError) error = NULL;
+  GCancellable *cancellable;
   LoadState *state;
   gsize size = 0;
   gboolean create_new_view = FALSE;
@@ -719,9 +720,11 @@ ide_buffer_manager__load_file_query_info_cb (GObject      *object,
 
   g_signal_emit (self, signals [LOAD_BUFFER], 0, state->buffer, create_new_view);
 
+  cancellable = g_task_get_cancellable (task);
+
   gtk_source_file_loader_load_async (state->loader,
                                      G_PRIORITY_LOW,
-                                     g_task_get_cancellable (task),
+                                     cancellable,
                                      ide_progress_file_progress_callback,
                                      g_object_ref (state->progress),
                                      g_object_unref,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]