[gnome-photos] build, gegl-gtk-view: Remove code for GTK+ 2.x drawing
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-photos] build, gegl-gtk-view: Remove code for GTK+ 2.x drawing
- Date: Fri, 4 Dec 2015 10:59:22 +0000 (UTC)
commit 8d7487dc78057867a0a2766a49d5d9a7ecebf4fc
Author: Debarshi Ray <debarshir gnome org>
Date: Wed Dec 2 08:43:56 2015 +0100
build, gegl-gtk-view: Remove code for GTK+ 2.x drawing
We are never going to use GTK+ 2.x, 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 from gegl-gtk doesn't matter so
much.
configure.ac | 3 ---
src/gegl-gtk-view.c | 42 ------------------------------------------
2 files changed, 0 insertions(+), 45 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 8689dc9..26db5a1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -82,10 +82,7 @@ PKG_CHECK_MODULES(GOA, [goa-1.0 >= $GOA_MIN_VERSION])
AC_DEFINE([GOA_API_IS_SUBJECT_TO_CHANGE], [], [We are aware that GOA's API can change])
PKG_CHECK_MODULES(GRILO, [grilo-0.3 >= $GRILO_MIN_VERSION])
-
PKG_CHECK_MODULES(GTK, [gtk+-3.0 >= $GTK_MIN_VERSION])
-AC_DEFINE([HAVE_GTK3], [], [We want gegl-gtk to use the GTK+ 3.x code path])
-
PKG_CHECK_MODULES(GTK_UNIX_PRINT, [gtk+-unix-print-3.0])
PKG_CHECK_MODULES(TRACKER, [tracker-control-1.0 tracker-sparql-1.0])
diff --git a/src/gegl-gtk-view.c b/src/gegl-gtk-view.c
index 21ec610..49d75e2 100644
--- a/src/gegl-gtk-view.c
+++ b/src/gegl-gtk-view.c
@@ -119,15 +119,8 @@ static void get_property(GObject *gobject,
GValue *value,
GParamSpec *pspec);
-#ifdef HAVE_GTK2
-static gboolean expose_event(GtkWidget *widget,
- GdkEventExpose *event);
-#endif
-#ifdef HAVE_GTK3
static gboolean draw(GtkWidget *widget,
cairo_t *cr);
-#endif
-
static void
trigger_redraw(ViewHelper *priv, GeglRectangle *rect, GeglGtkView *view);
@@ -147,13 +140,7 @@ gegl_gtk_view_class_init(GeglGtkViewClass *klass)
gobject_class->set_property = set_property;
gobject_class->get_property = get_property;
-#ifdef HAVE_GTK2
- widget_class->expose_event = expose_event;
-#endif
-
-#ifdef HAVE_GTK3
widget_class->draw = draw;
-#endif
g_object_class_install_property(gobject_class, PROP_X,
g_param_spec_float("x",
@@ -396,7 +383,6 @@ draw_implementation(GeglGtkView *self, cairo_t *cr, GdkRectangle *rect)
#endif
}
-#ifdef HAVE_GTK3
static gboolean
draw(GtkWidget *widget, cairo_t *cr)
{
@@ -413,34 +399,6 @@ draw(GtkWidget *widget, cairo_t *cr)
return FALSE;
}
-#endif
-
-#ifdef HAVE_GTK2
-static gboolean
-expose_event(GtkWidget *widget,
- GdkEventExpose *event)
-{
- GeglGtkView *self = GEGL_GTK_VIEW(widget);
- ViewHelper *priv = GET_PRIVATE(self);
- cairo_t *cr;
- GdkRectangle rect;
-
- if (!priv->node)
- return FALSE;
-
- cr = gdk_cairo_create(widget->window);
- gdk_cairo_region(cr, event->region);
- cairo_clip(cr);
- gdk_region_get_clipbox(event->region, &rect);
-
- draw_implementation(self, cr, &rect);
-
- cairo_destroy(cr);
-
- return FALSE;
-}
-#endif
-
/**
* gegl_gtk_view_new:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]