diff options
author | jstebbins <[email protected]> | 2011-03-22 00:51:26 +0000 |
---|---|---|
committer | jstebbins <[email protected]> | 2011-03-22 00:51:26 +0000 |
commit | ec038a5c5fa7adf12aea215465c0434a816e57b3 (patch) | |
tree | 823bd2f6c8f96526dc38a76b905ce6658267a0a7 /gtk | |
parent | a459a827c23dd2063c559de1f9c4c23fd0384b19 (diff) |
LinGui: remove use of deprecated gdk_draw_pixbuf
Use gdk_ciaro_set_source_bixbuf and ciaro_paint instead
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3859 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'gtk')
-rw-r--r-- | gtk/src/preview.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/gtk/src/preview.c b/gtk/src/preview.c index 796700da6..d81ab2cff 100644 --- a/gtk/src/preview.c +++ b/gtk/src/preview.c @@ -707,6 +707,16 @@ live_preview_seek_cb(GtkWidget *widget, signal_user_data_t *ud) #endif } +static void _draw_pixbuf(GdkWindow *window, GdkPixbuf *pixbuf) +{ + cairo_t *cr; + + cr = gdk_cairo_create(window); + gdk_cairo_set_source_pixbuf(cr, pixbuf, 0, 0); + cairo_paint(cr); + cairo_destroy(cr); +} + void ghb_set_preview_image(signal_user_data_t *ud) { @@ -756,9 +766,7 @@ ghb_set_preview_image(signal_user_data_t *ud) ud->preview->width = preview_width; ud->preview->height = preview_height; } - gdk_draw_pixbuf( - widget->window, NULL, ud->preview->pix, 0, 0, 0, 0, - -1, -1, GDK_RGB_DITHER_NONE, 0, 0); + _draw_pixbuf(widget->window, ud->preview->pix); gchar *text = g_strdup_printf("%d x %d", width, height); widget = GHB_WIDGET (ud->builder, "preview_dims"); @@ -848,9 +856,7 @@ preview_expose_cb( if (ud->preview->pix != NULL) { - gdk_draw_pixbuf( - widget->window, NULL, ud->preview->pix, 0, 0, 0, 0, - -1, -1, GDK_RGB_DITHER_NONE, 0, 0); + _draw_pixbuf(widget->window, ud->preview->pix); } return TRUE; } |