[gnome-builder] minimap: only attach IdeBuffer instances to the signal group



commit 229ed6d9d9c14f6164adea385a5892335c62d6d6
Author: Christian Hergert <christian hergert me>
Date:   Wed May 20 21:29:24 2015 -0700

    minimap: only attach IdeBuffer instances to the signal group

 libide/ide-source-map.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/libide/ide-source-map.c b/libide/ide-source-map.c
index e8faab9..d922199 100644
--- a/libide/ide-source-map.c
+++ b/libide/ide-source-map.c
@@ -168,7 +168,8 @@ ide_source_map__view_notify_buffer (IdeSourceMap  *self,
   g_assert (GTK_SOURCE_IS_VIEW (view));
 
   buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (view));
-  egg_signal_group_set_target (self->buffer_signals, buffer);
+  if (IDE_IS_BUFFER (buffer))
+    egg_signal_group_set_target (self->buffer_signals, buffer);
 }
 
 static gboolean
@@ -262,7 +263,7 @@ ide_source_map_init (IdeSourceMap *self)
   GtkSourceView *child_view;
 
   /* Buffer */
-  self->buffer_signals = egg_signal_group_new (GTK_TYPE_TEXT_BUFFER);
+  self->buffer_signals = egg_signal_group_new (IDE_TYPE_BUFFER);
   egg_signal_group_connect_object (self->buffer_signals,
                                    "line-flags-changed",
                                    G_CALLBACK (ide_source_map__buffer_line_flags_changed),


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