[gimp/gtk3-port: 51/247] app: port to GtkWidget::draw()



commit 2c99a6e5b22481552bb8023398fc40a51a5c33cb
Author: Michael Natterer <mitch gimp org>
Date:   Fri Oct 15 16:07:18 2010 +0200

    app: port to GtkWidget::draw()

 app/widgets/gimptoolbox.c |   24 ++++++++----------------
 1 files changed, 8 insertions(+), 16 deletions(-)
---
diff --git a/app/widgets/gimptoolbox.c b/app/widgets/gimptoolbox.c
index 64e01c9..e828cb8 100644
--- a/app/widgets/gimptoolbox.c
+++ b/app/widgets/gimptoolbox.c
@@ -90,8 +90,8 @@ struct _GimpToolboxPrivate
 };
 
 
-static void        gimp_toolbox_constructed             (GObject               *object);
-static void        gimp_toolbox_dispose                 (GObject               *object);
+static void        gimp_toolbox_constructed             (GObject        *object);
+static void        gimp_toolbox_dispose                 (GObject        *object);
 static void        gimp_toolbox_set_property            (GObject        *object,
                                                          guint           property_id,
                                                          const GValue   *value,
@@ -130,8 +130,8 @@ static void        gimp_toolbox_book_added              (GimpDock       *dock,
                                                          GimpDockbook   *dockbook);
 static void        gimp_toolbox_book_removed            (GimpDock       *dock,
                                                          GimpDockbook   *dockbook);
-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,
@@ -262,8 +262,8 @@ gimp_toolbox_constructed (GObject *object)
   if (config->toolbox_wilber)
     gtk_widget_show (toolbox->p->header);
 
-  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,
@@ -718,19 +718,11 @@ gimp_toolbox_set_drag_handler (GimpToolbox  *toolbox,
 /*  private functions  */
 
 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]