[gnome-builder] minimap: only bind font-desc if we have an IdeSourceView
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] minimap: only bind font-desc if we have an IdeSourceView
- Date: Fri, 24 Apr 2015 18:51:06 +0000 (UTC)
commit 97da4b2c31b27b6f6d776651daf187100e5383b4
Author: Christian Hergert <christian hergert me>
Date: Fri Apr 24 11:50:55 2015 -0700
minimap: only bind font-desc if we have an IdeSourceView
This won't be available on GtkSourceView directly, so check for
IdeSourceView. We should take a look at what our options are for
abstracting this. Maybe we can add font-desc to GtkSourceView too.
libide/ide-source-map.c | 15 ++++++++++-----
1 files changed, 10 insertions(+), 5 deletions(-)
---
diff --git a/libide/ide-source-map.c b/libide/ide-source-map.c
index a6f297c..2283c48 100644
--- a/libide/ide-source-map.c
+++ b/libide/ide-source-map.c
@@ -217,11 +217,16 @@ ide_source_map_set_view (IdeSourceMap *self,
g_object_bind_property (self->view, "tab-width",
self->child_view, "tab-width",
G_BINDING_SYNC_CREATE);
- g_object_bind_property_full (self->view, "font-desc",
- self, "font-desc",
- G_BINDING_SYNC_CREATE,
- transform_font_desc,
- NULL, NULL, NULL);
+
+ /*
+ * TODO: Not sure what we should do about this in terms of abstraction.
+ */
+ if (IDE_IS_SOURCE_VIEW (self->view))
+ g_object_bind_property_full (self->view, "font-desc",
+ self, "font-desc",
+ G_BINDING_SYNC_CREATE,
+ transform_font_desc,
+ NULL, NULL, NULL);
vadj = gtk_scrollable_get_vadjustment (GTK_SCROLLABLE (self->view));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]