[totem] screenshot: Port to GtkStyleContext
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [totem] screenshot: Port to GtkStyleContext
- Date: Mon, 6 Dec 2010 18:14:16 +0000 (UTC)
commit 8e7ca24a7628b4361a3e45a9c0da430777669ca2
Author: Bastien Nocera <hadess hadess net>
Date: Mon Dec 6 15:58:14 2010 +0000
screenshot: Port to GtkStyleContext
src/plugins/screenshot/gnome-screenshot-widget.c | 8 +++-----
1 files changed, 3 insertions(+), 5 deletions(-)
---
diff --git a/src/plugins/screenshot/gnome-screenshot-widget.c b/src/plugins/screenshot/gnome-screenshot-widget.c
index 6a89cf3..ebd7fcf 100644
--- a/src/plugins/screenshot/gnome-screenshot-widget.c
+++ b/src/plugins/screenshot/gnome-screenshot-widget.c
@@ -266,10 +266,10 @@ on_preview_expose_event (GtkWidget *drawing_area, GdkEventExpose *event, GnomeSc
{
GdkPixbuf *pixbuf = NULL;
gboolean free_pixbuf = FALSE;
- GtkStyle *style;
+ GtkStyleContext *context;
cairo_t *cr;
- style = gtk_widget_get_style (drawing_area);
+ context = gtk_widget_get_style_context (drawing_area);
/* Stolen from GtkImage. I really should just make the drawing area an
* image some day (TODO) */
@@ -281,9 +281,7 @@ on_preview_expose_event (GtkWidget *drawing_area, GdkEventExpose *event, GnomeSc
gtk_icon_source_set_size (source, GTK_ICON_SIZE_SMALL_TOOLBAR);
gtk_icon_source_set_size_wildcarded (source, FALSE);
- pixbuf = gtk_style_render_icon (style, source,
- gtk_widget_get_direction (drawing_area), gtk_widget_get_state (drawing_area),
- (GtkIconSize) -1, drawing_area, "gtk-image");
+ pixbuf = gtk_render_icon_pixbuf (context, source, (GtkIconSize) -1);
free_pixbuf = TRUE;
gtk_icon_source_free (source);
} else {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]