[gnome-builder] build: depend on gtk+ 3.16.1



commit 9200c2a716161990323a51b78a0509c7d3b5081f
Author: Christian Hergert <christian hergert me>
Date:   Mon Apr 13 13:06:00 2015 -0700

    build: depend on gtk+ 3.16.1
    
    We can also remove the dynamic gproperty check for underline-rgba since
    we require 3.16.1.

 build/autotools/autoconf.d/50_dependencies.post-am |    2 +-
 libide/ide-buffer.c                                |   40 +++----------------
 2 files changed, 8 insertions(+), 34 deletions(-)
---
diff --git a/build/autotools/autoconf.d/50_dependencies.post-am 
b/build/autotools/autoconf.d/50_dependencies.post-am
index b500fb0..b971a3b 100644
--- a/build/autotools/autoconf.d/50_dependencies.post-am
+++ b/build/autotools/autoconf.d/50_dependencies.post-am
@@ -1,4 +1,4 @@
-m4_define([gtk_required_version], [3.16.0])
+m4_define([gtk_required_version], [3.16.1])
 m4_define([glib_required_version], [2.44.0])
 m4_define([gtksourceview_required_version], [3.16.0])
 m4_define([ggit_required_version], [0.22.5])
diff --git a/libide/ide-buffer.c b/libide/ide-buffer.c
index dd99e3d..1133bc6 100644
--- a/libide/ide-buffer.c
+++ b/libide/ide-buffer.c
@@ -738,53 +738,27 @@ ide_buffer_mark_set (GtkTextBuffer     *buffer,
     ide_buffer_emit_cursor_moved (IDE_BUFFER (buffer));
 }
 
-static gboolean
-ide_buffer_check_underline_rgba (void)
-{
-  static gboolean did_check;
-  static gboolean has_underline_rgba;
-
-  if (!did_check)
-    {
-      GObjectClass *type_class;
-      GParamSpec *pspec;
-
-      type_class = g_type_class_ref (GTK_TYPE_TEXT_TAG);
-      pspec = g_object_class_find_property (type_class, "underline-rgba");
-      has_underline_rgba = (pspec != NULL) && (pspec->value_type == GDK_TYPE_RGBA);
-      g_type_class_unref (type_class);
-      did_check = TRUE;
-    }
-
-  return has_underline_rgba;
-}
-
 static void
 ide_buffer_constructed (GObject *object)
 {
   IdeBuffer *self = (IdeBuffer *)object;
   IdeBufferPrivate *priv = ide_buffer_get_instance_private (self);
-  GtkTextTag *warning_tag;
+  GdkRGBA warning_rgba;
 
   G_OBJECT_CLASS (ide_buffer_parent_class)->constructed (object);
 
+  gdk_rgba_parse (&warning_rgba, "#fcaf3e");
+
   gtk_text_buffer_create_tag (GTK_TEXT_BUFFER (self), TAG_ERROR,
                               "underline", PANGO_UNDERLINE_ERROR,
                               NULL);
   gtk_text_buffer_create_tag (GTK_TEXT_BUFFER (self), TAG_NOTE,
                               "underline", PANGO_UNDERLINE_SINGLE,
                               NULL);
-
-  warning_tag = gtk_text_buffer_create_tag (GTK_TEXT_BUFFER (self), TAG_WARNING,
-                                            "underline", PANGO_UNDERLINE_ERROR,
-                                            NULL);
-  if (ide_buffer_check_underline_rgba ())
-    {
-      GdkRGBA warning_rgba;
-
-      gdk_rgba_parse (&warning_rgba, "#fcaf3e");
-      g_object_set (warning_tag, "underline-rgba", &warning_rgba, NULL);
-    }
+  gtk_text_buffer_create_tag (GTK_TEXT_BUFFER (self), TAG_WARNING,
+                              "underline", PANGO_UNDERLINE_ERROR,
+                              "underline-rgba", &warning_rgba,
+                              NULL);
 
   priv->highlight_engine = ide_highlight_engine_new (self);
 


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