[gedit] Use utility method gdk_cairo_set_source_window.
- From: Ignacio Casal Quinteiro <icq src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gedit] Use utility method gdk_cairo_set_source_window.
- Date: Thu, 2 Dec 2010 12:43:52 +0000 (UTC)
commit 4e8bf71db0d4cfe5d36c3ca850db597572204eb8
Author: Ignacio Casal Quinteiro <icq gnome org>
Date: Thu Dec 2 13:43:09 2010 +0100
Use utility method gdk_cairo_set_source_window.
gedit/theatrics/gedit-theatrics-animated-widget.c | 19 ++++++-------------
1 files changed, 6 insertions(+), 13 deletions(-)
---
diff --git a/gedit/theatrics/gedit-theatrics-animated-widget.c b/gedit/theatrics/gedit-theatrics-animated-widget.c
index 108ba0a..0f3c13d 100644
--- a/gedit/theatrics/gedit-theatrics-animated-widget.c
+++ b/gedit/theatrics/gedit-theatrics-animated-widget.c
@@ -77,12 +77,10 @@ G_DEFINE_TYPE_EXTENDED (GeditTheatricsAnimatedWidget,
static void
on_widget_destroyed (GtkWidget *widget,
- GeditTheatricsAnimatedWidget *aw)
+ GeditTheatricsAnimatedWidget *aw)
{
GdkWindow *window;
cairo_t *img_cr;
- cairo_t *cr;
- cairo_surface_t *surface;
if (!gtk_widget_get_realized (GTK_WIDGET (aw)))
return;
@@ -91,24 +89,19 @@ on_widget_destroyed (GtkWidget *widget,
aw->priv->height = aw->priv->widget_alloc.height;
aw->priv->surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32,
- aw->priv->width,
- aw->priv->height);
+ aw->priv->width,
+ aw->priv->height);
img_cr = cairo_create (aw->priv->surface);
window = gtk_widget_get_window (GTK_WIDGET (aw));
- cr = gdk_cairo_create (GDK_DRAWABLE (window));
- surface = cairo_get_target (cr);
-
- cairo_set_source_surface (img_cr, surface,
- aw->priv->widget_alloc.x,
- aw->priv->widget_alloc.y);
+ gdk_cairo_set_source_window (img_cr, window,
+ aw->priv->widget_alloc.x,
+ aw->priv->widget_alloc.y);
cairo_paint (img_cr);
-
cairo_destroy (img_cr);
- cairo_destroy (cr);
if (aw->priv->animation_state != GEDIT_THEATRICS_ANIMATION_STATE_GOING)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]