summaryrefslogtreecommitdiff
path: root/tests/icles
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian.droege@collabora.co.uk>2010-06-27 07:40:50 +0200
committerSebastian Dröge <sebastian.droege@collabora.co.uk>2010-06-27 07:40:50 +0200
commit44b9b422d8432ac093b63bfe75b6a42204744133 (patch)
tree12ffcfd6c963436bba2b44d9c3a11d65581f147e /tests/icles
parentd13a122a56b0b5eb317ce09529437dd57f0a7fdd (diff)
downloadgstreamer-plugins-bad-44b9b422d8432ac093b63bfe75b6a42204744133.tar.gz
tests: Don't use deprecated GTK API to fix the build with GTK+ 3.0
Diffstat (limited to 'tests/icles')
-rw-r--r--tests/icles/metadata_editor.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/tests/icles/metadata_editor.c b/tests/icles/metadata_editor.c
index 343b31c4b..d17d50629 100644
--- a/tests/icles/metadata_editor.c
+++ b/tests/icles/metadata_editor.c
@@ -322,9 +322,11 @@ gboolean
on_drawingMain_expose_event (GtkWidget * widget, GdkEventExpose * event,
gpointer data)
{
- GtkAllocation a = widget->allocation;
+ GtkAllocation a;
gint w, h, x, y;
+ gtk_widget_get_allocation (widget, &a);
+
if (draw_pixbuf == NULL)
return FALSE;
@@ -341,7 +343,8 @@ on_drawingMain_expose_event (GtkWidget * widget, GdkEventExpose * event,
if (y < 0)
y = 0;
- gdk_draw_pixbuf (GDK_DRAWABLE (widget->window), widget->style->black_gc,
+ gdk_draw_pixbuf (GDK_DRAWABLE (gtk_widget_get_window (widget)),
+ gtk_widget_get_style (widget)->black_gc,
draw_pixbuf, 0, 0, x, y, w, h, GDK_RGB_DITHER_NONE, 0, 0);
return TRUE; /* handled expose event */
@@ -902,6 +905,7 @@ me_gst_bus_callback_view (GstBus * bus, GstMessage * message, gpointer data)
break;
case GST_MESSAGE_ELEMENT: {
const GValue *val;
+ GtkAllocation a;
/* only interested in element messages from our gdkpixbufsink */
if (message->src != GST_OBJECT_CAST (gst_video_sink))
@@ -925,8 +929,8 @@ me_gst_bus_callback_view (GstBus * bus, GstMessage * message, gpointer data)
g_print ("Got image pixbuf: %dx%d\n", gdk_pixbuf_get_width (last_pixbuf),
gdk_pixbuf_get_height (last_pixbuf));
- update_draw_pixbuf (GTK_WIDGET (ui_drawing)->allocation.width,
- GTK_WIDGET (ui_drawing)->allocation.height);
+ gtk_widget_get_allocation (GTK_WIDGET (ui_drawing), &a);
+ update_draw_pixbuf (a.width, a.height);
gtk_widget_queue_draw (ui_drawing);
break;