[gnome-builder] libide: track the buffer if it has not yet been registered
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] libide: track the buffer if it has not yet been registered
- Date: Mon, 23 Mar 2015 23:38:50 +0000 (UTC)
commit bec373f41343ab56e53406ee92c14f67c2e67e1a
Author: Christian Hergert <christian hergert me>
Date: Mon Feb 23 16:45:29 2015 -0800
libide: track the buffer if it has not yet been registered
libide/ide-buffer-manager.c | 14 ++++++++++++++
1 files changed, 14 insertions(+), 0 deletions(-)
---
diff --git a/libide/ide-buffer-manager.c b/libide/ide-buffer-manager.c
index d9ca1d7..18d83e2 100644
--- a/libide/ide-buffer-manager.c
+++ b/libide/ide-buffer-manager.c
@@ -370,6 +370,7 @@ ide_buffer_manager_load_file__load_cb (GObject *object,
IdeBufferManager *self;
LoadState *state;
GError *error = NULL;
+ gsize i;
g_assert (G_IS_TASK (task));
g_assert (GTK_SOURCE_IS_FILE_LOADER (loader));
@@ -388,6 +389,19 @@ ide_buffer_manager_load_file__load_cb (GObject *object,
return;
}
+ for (i = 0; i < self->buffers->len; i++)
+ {
+ IdeBuffer *cur_buffer;
+
+ cur_buffer = g_ptr_array_index (self->buffers, i);
+
+ if (cur_buffer == state->buffer)
+ goto emit_signal;
+ }
+
+ ide_buffer_manager_add_buffer (self, state->buffer);
+
+emit_signal:
g_signal_emit (self, gSignals [BUFFER_LOADED], 0, state->buffer);
g_task_return_pointer (task, g_object_ref (state->buffer), g_object_unref);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]