[gimp/gtk3-port: 90/230] plug-ins: port cml-explorer to GtkWidget::draw()
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/gtk3-port: 90/230] plug-ins: port cml-explorer to GtkWidget::draw()
- Date: Mon, 9 Jun 2014 22:41:55 +0000 (UTC)
commit b1db2f742a079184384394d9afc3bebbe06ced35
Author: Michael Natterer <mitch gimp org>
Date: Sun Oct 31 17:05:14 2010 +0100
plug-ins: port cml-explorer to GtkWidget::draw()
plug-ins/common/cml-explorer.c | 18 ++++++------------
1 files changed, 6 insertions(+), 12 deletions(-)
---
diff --git a/plug-ins/common/cml-explorer.c b/plug-ins/common/cml-explorer.c
index b629c19..8d6f357 100644
--- a/plug-ins/common/cml-explorer.c
+++ b/plug-ins/common/cml-explorer.c
@@ -1771,21 +1771,15 @@ preview_update (void)
}
static gboolean
-function_graph_expose (GtkWidget *widget,
- GdkEventExpose *event,
- gpointer *data)
+function_graph_draw (GtkWidget *widget,
+ cairo_t *cr,
+ gpointer *data)
{
GtkStyle *style = gtk_widget_get_style (widget);
gint x, y;
gint rgbi[3];
gint channel_id = GPOINTER_TO_INT (data[0]);
CML_PARAM *param = data[1];
- cairo_t *cr;
-
- cr = gdk_cairo_create (gtk_widget_get_window (widget));
-
- gdk_cairo_region (cr, event->region);
- cairo_clip (cr);
cairo_set_line_width (cr, 1.0);
@@ -1832,7 +1826,6 @@ function_graph_expose (GtkWidget *widget,
gdk_cairo_set_source_color (cr, &style->black);
cairo_stroke (cr);
- cairo_destroy (cr);
return TRUE;
}
@@ -1864,8 +1857,9 @@ function_graph_new (GtkWidget *widget,
gtk_widget_set_size_request (preview, GRAPHSIZE, GRAPHSIZE);
gtk_container_add (GTK_CONTAINER (frame), preview);
gtk_widget_show (preview);
- g_signal_connect (preview, "expose-event",
- G_CALLBACK (function_graph_expose), data);
+ g_signal_connect (preview, "draw",
+ G_CALLBACK (function_graph_draw),
+ data);
gtk_widget_show (dialog);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]