[gnome-builder] editor: proxy title changes from the buffer



commit b34a974b1416edc5250d902e6d5b48bce83dc1c9
Author: Christian Hergert <christian hergert me>
Date:   Mon Mar 23 03:14:33 2015 -0700

    editor: proxy title changes from the buffer

 src/editor/gb-editor-view.c |   17 +++++++++++++++++
 1 files changed, 17 insertions(+), 0 deletions(-)
---
diff --git a/src/editor/gb-editor-view.c b/src/editor/gb-editor-view.c
index b6ad449..b70ad12 100644
--- a/src/editor/gb-editor-view.c
+++ b/src/editor/gb-editor-view.c
@@ -188,6 +188,17 @@ gb_editor_view__buffer_changed_on_volume (GbEditorView *self,
 }
 
 static void
+gb_editor_view__buffer_notify_title (GbEditorView *self,
+                                     GParamSpec   *pspec,
+                                     IdeBuffer    *buffer)
+{
+  g_assert (GB_IS_EDITOR_VIEW (self));
+  g_assert (GB_IS_EDITOR_DOCUMENT (buffer));
+
+  g_object_notify (G_OBJECT (self), "title");
+}
+
+static void
 gb_editor_view_set_document (GbEditorView     *self,
                              GbEditorDocument *document)
 {
@@ -220,6 +231,12 @@ gb_editor_view_set_document (GbEditorView     *self,
                                G_CONNECT_SWAPPED);
 
       g_signal_connect_object (document,
+                               "notify::title",
+                               G_CALLBACK (gb_editor_view__buffer_notify_title),
+                               self,
+                               G_CONNECT_SWAPPED);
+
+      g_signal_connect_object (document,
                                "notify::changed-on-volume",
                                G_CALLBACK (gb_editor_view__buffer_changed_on_volume),
                                self,


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