[gimp/gtk3-port: 30/228] app: port to GtkWidget::draw()
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/gtk3-port: 30/228] app: port to GtkWidget::draw()
- Date: Wed, 14 May 2014 23:36:41 +0000 (UTC)
commit 7b5c5751c71b610735eec9a6cb4de654b3632c77
Author: Michael Natterer <mitch gimp org>
Date: Fri Oct 15 16:07:18 2010 +0200
app: port to GtkWidget::draw()
app/widgets/gimptoolbox.c | 20 ++++++--------------
1 files changed, 6 insertions(+), 14 deletions(-)
---
diff --git a/app/widgets/gimptoolbox.c b/app/widgets/gimptoolbox.c
index 4f87b31..75f8d8a 100644
--- a/app/widgets/gimptoolbox.c
+++ b/app/widgets/gimptoolbox.c
@@ -128,8 +128,8 @@ static void gimp_toolbox_book_removed (GimpDock *dock,
static void gimp_toolbox_size_request_wilber (GtkWidget *widget,
GtkRequisition *requisition,
GimpToolbox *toolbox);
-static gboolean gimp_toolbox_expose_wilber (GtkWidget *widget,
- GdkEventExpose *event);
+static gboolean gimp_toolbox_draw_wilber (GtkWidget *widget,
+ cairo_t *cr);
static GtkWidget * toolbox_create_color_area (GimpToolbox *toolbox,
GimpContext *context);
static GtkWidget * toolbox_create_foo_area (GimpToolbox *toolbox,
@@ -244,8 +244,8 @@ gimp_toolbox_constructed (GObject *object)
g_signal_connect (toolbox->p->header, "size-request",
G_CALLBACK (gimp_toolbox_size_request_wilber),
toolbox);
- g_signal_connect (toolbox->p->header, "expose-event",
- G_CALLBACK (gimp_toolbox_expose_wilber),
+ g_signal_connect (toolbox->p->header, "draw",
+ G_CALLBACK (gimp_toolbox_draw_wilber),
toolbox);
gimp_help_set_help_data (toolbox->p->header,
@@ -664,19 +664,11 @@ gimp_toolbox_size_request_wilber (GtkWidget *widget,
}
static gboolean
-gimp_toolbox_expose_wilber (GtkWidget *widget,
- GdkEventExpose *event)
+gimp_toolbox_draw_wilber (GtkWidget *widget,
+ cairo_t *cr)
{
- cairo_t *cr;
-
- cr = gdk_cairo_create (gtk_widget_get_window (widget));
- gdk_cairo_region (cr, event->region);
- cairo_clip (cr);
-
gimp_cairo_draw_toolbox_wilber (widget, cr);
- cairo_destroy (cr);
-
return FALSE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]