[gtk+/rendering-cleanup-next: 66/154] viewport: Merge gtk_viewport_paint() into expose function
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/rendering-cleanup-next: 66/154] viewport: Merge gtk_viewport_paint() into expose function
- Date: Tue, 14 Sep 2010 15:52:13 +0000 (UTC)
commit 0d790cbcfc6d64e60dee8fe1f7bf002992c307e4
Author: Benjamin Otte <otte redhat com>
Date: Tue Sep 7 16:41:57 2010 +0200
viewport: Merge gtk_viewport_paint() into expose function
gtk/gtkviewport.c | 34 ++++++++++------------------------
1 files changed, 10 insertions(+), 24 deletions(-)
---
diff --git a/gtk/gtkviewport.c b/gtk/gtkviewport.c
index 4d115ad..4e67c1c 100644
--- a/gtk/gtkviewport.c
+++ b/gtk/gtkviewport.c
@@ -84,8 +84,6 @@ static void gtk_viewport_set_scroll_adjustments (GtkViewport *viewport,
GtkAdjustment *vadjustment);
static void gtk_viewport_realize (GtkWidget *widget);
static void gtk_viewport_unrealize (GtkWidget *widget);
-static void gtk_viewport_paint (GtkWidget *widget,
- GdkRectangle *area);
static gint gtk_viewport_expose (GtkWidget *widget,
GdkEventExpose *event);
static void gtk_viewport_add (GtkContainer *container,
@@ -765,37 +763,25 @@ gtk_viewport_unrealize (GtkWidget *widget)
GTK_WIDGET_CLASS (gtk_viewport_parent_class)->unrealize (widget);
}
-static void
-gtk_viewport_paint (GtkWidget *widget,
- GdkRectangle *area)
-{
- if (gtk_widget_is_drawable (widget))
- {
- GtkViewport *viewport = GTK_VIEWPORT (widget);
- GtkViewportPrivate *priv = viewport->priv;
-
- gtk_paint_shadow (gtk_widget_get_style (widget),
- gtk_widget_get_window (widget),
- GTK_STATE_NORMAL, priv->shadow_type,
- area, widget, "viewport",
- 0, 0, -1, -1);
- }
-}
-
static gint
gtk_viewport_expose (GtkWidget *widget,
GdkEventExpose *event)
{
- GtkViewport *viewport;
-
if (gtk_widget_is_drawable (widget))
{
- viewport = GTK_VIEWPORT (widget);
+ GtkViewport *viewport = GTK_VIEWPORT (widget);
GtkViewportPrivate *priv = viewport->priv;
if (event->window == gtk_widget_get_window (widget))
- gtk_viewport_paint (widget, &event->area);
- else if (event->window == priv->bin_window)
+ {
+ gtk_paint_shadow (gtk_widget_get_style (widget),
+ gtk_widget_get_window (widget),
+ GTK_STATE_NORMAL, priv->shadow_type,
+ &event->area, widget, "viewport",
+ 0, 0, -1, -1);
+ }
+
+ if (event->window == priv->bin_window)
{
gtk_paint_flat_box(gtk_widget_get_style (widget), priv->bin_window,
GTK_STATE_NORMAL, GTK_SHADOW_NONE,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]