[gimp/gtk3-port: 88/235] 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: 88/235] plug-ins: port cml-explorer to GtkWidget::draw()
- Date: Mon, 22 May 2017 21:44:04 +0000 (UTC)
commit 0f527be34cdf7cc45b089e9c055af8db482bd34b
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 40312d5..15568d2 100644
--- a/plug-ins/common/cml-explorer.c
+++ b/plug-ins/common/cml-explorer.c
@@ -1774,21 +1774,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);
@@ -1835,7 +1829,6 @@ function_graph_expose (GtkWidget *widget,
gdk_cairo_set_source_color (cr, &style->black);
cairo_stroke (cr);
- cairo_destroy (cr);
return TRUE;
}
@@ -1867,8 +1860,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]