[gnome-photos] build, gegl-gtk-view: Remove the cairo-gobject checks



commit 90466a80ce9a155d0ad039ddc4697e9b3d2d592d
Author: Debarshi Ray <debarshir gnome org>
Date:   Wed Dec 2 08:57:27 2015 +0100

    build, gegl-gtk-view: Remove the cairo-gobject checks
    
    We really do need cairo-gobject, and this is a step towards cleaning up
    this code. We are ultimately going to use the new image viewer widget
    in GTK+, so the divergence from gegl-gtk doesn't matter so much.

 configure.ac        |    3 ---
 src/gegl-gtk-view.c |   17 -----------------
 2 files changed, 0 insertions(+), 20 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 26db5a1..383e389 100644
--- a/configure.ac
+++ b/configure.ac
@@ -64,10 +64,7 @@ if test "$have_langinfo_measurement" = "yes"; then
 fi
 
 PKG_CHECK_MODULES(BABL, [babl])
-
 PKG_CHECK_MODULES(CAIRO, [cairo >= $CAIRO_MIN_VERSION cairo-gobject])
-AC_DEFINE([HAVE_CAIRO_GOBJECT], [], [We want gegl-gtk to use the cairo-gobject code path])
-
 PKG_CHECK_MODULES(GFBGRAPH, [libgfbgraph-0.2 >= $GFBGRAPH_MIN_VERSION])
 PKG_CHECK_MODULES(GDATA, [libgdata >= $GDATA_MIN_VERSION])
 PKG_CHECK_MODULES(GEGL, [gegl-0.3 >= $GEGL_MIN_VERSION])
diff --git a/src/gegl-gtk-view.c b/src/gegl-gtk-view.c
index 49d75e2..a6a9897 100644
--- a/src/gegl-gtk-view.c
+++ b/src/gegl-gtk-view.c
@@ -22,10 +22,7 @@
 #include <glib-object.h>
 #include <gtk/gtk.h>
 #include <gegl.h>
-
-#ifdef HAVE_CAIRO_GOBJECT
 #include <cairo-gobject.h>
-#endif
 
 #include "gegl-gtk-view.h"
 #include "gegl-gtk-view-helper.h"
@@ -90,7 +87,6 @@ enum {
     PROP_AUTOSCALE_POLICY
 };
 
-#ifdef HAVE_CAIRO_GOBJECT
 enum {
     SIGNAL_DRAW_BACKGROUND,
     SIGNAL_DRAW_OVERLAY,
@@ -98,7 +94,6 @@ enum {
 };
 
 static guint gegl_view_signals[N_SIGNALS];
-#endif
 
 static ViewHelper *
 get_private(GeglGtkView *self)
@@ -196,7 +191,6 @@ gegl_gtk_view_class_init(GeglGtkViewClass *klass)
  *
  * Note:
  * Manipulating the view widget in the signal handler is not supported.
- * This signal is only available if GEGL-GTK was build with Cairo GObject support.
  **/
 
 /**
@@ -209,12 +203,7 @@ gegl_gtk_view_class_init(GeglGtkViewClass *klass)
 *
 * Allows consumers to draw an overlay for the widget, for instance
 * for simple user interface elements.
-*
-* Note:
-* Manipulating the view widget in the signal handler is not supported.
-* This signal is only available if GEGL-GTK was build with Cairo GObject support.
 **/
-#ifdef HAVE_CAIRO_GOBJECT
     gegl_view_signals[SIGNAL_DRAW_BACKGROUND] =
         g_signal_new("draw-background",
                      G_TYPE_FROM_CLASS(klass),
@@ -234,8 +223,6 @@ gegl_gtk_view_class_init(GeglGtkViewClass *klass)
                      NULL,
                      gegl_gtk_marshal_VOID__BOXED_BOXED,
                      G_TYPE_NONE, 2, CAIRO_GOBJECT_TYPE_CONTEXT, GDK_TYPE_RECTANGLE);
-#endif
-
 }
 
 static void
@@ -361,26 +348,22 @@ draw_implementation(GeglGtkView *self, cairo_t *cr, GdkRectangle *rect)
 {
     ViewHelper *priv = GET_PRIVATE(self);
 
-#ifdef HAVE_CAIRO_GOBJECT
     /* Draw background */
     cairo_save(cr);
     g_signal_emit(G_OBJECT(self), gegl_view_signals[SIGNAL_DRAW_BACKGROUND],
                   0, cr, rect, NULL);
     cairo_restore(cr);
-#endif
 
     /* Draw the gegl node */
     cairo_save(cr);
     view_helper_draw(priv, cr, rect);
     cairo_restore(cr);
 
-#ifdef HAVE_CAIRO_GOBJECT
     /* Draw overlay */
     cairo_save(cr);
     g_signal_emit(G_OBJECT(self), gegl_view_signals[SIGNAL_DRAW_OVERLAY],
                   0, cr, rect, NULL);
     cairo_restore(cr);
-#endif
 }
 
 static gboolean


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