aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2010-09-30 20:09:02 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2010-10-04 16:43:28 +0800
commit28cda4cfa04b92840430137ecb366769d1a28791 (patch)
tree6a554627b8ddfc83083c5361a5a7ba1cd6c304e5 /libempathy-gtk
parente47e07d74933c39641c56bfa2f66fd9b31007993 (diff)
downloadgsoc2013-empathy-28cda4cfa04b92840430137ecb366769d1a28791.tar
gsoc2013-empathy-28cda4cfa04b92840430137ecb366769d1a28791.tar.gz
gsoc2013-empathy-28cda4cfa04b92840430137ecb366769d1a28791.tar.bz2
gsoc2013-empathy-28cda4cfa04b92840430137ecb366769d1a28791.tar.lz
gsoc2013-empathy-28cda4cfa04b92840430137ecb366769d1a28791.tar.xz
gsoc2013-empathy-28cda4cfa04b92840430137ecb366769d1a28791.tar.zst
gsoc2013-empathy-28cda4cfa04b92840430137ecb366769d1a28791.zip
empathy-video-widget: port to new GTK+3 API
Diffstat (limited to 'libempathy-gtk')
-rw-r--r--libempathy-gtk/empathy-video-widget.c22
1 files changed, 13 insertions, 9 deletions
diff --git a/libempathy-gtk/empathy-video-widget.c b/libempathy-gtk/empathy-video-widget.c
index a3b13fd12..26cc878b2 100644
--- a/libempathy-gtk/empathy-video-widget.c
+++ b/libempathy-gtk/empathy-video-widget.c
@@ -170,8 +170,10 @@ empathy_video_widget_constructed (GObject *object)
static void empathy_video_widget_dispose (GObject *object);
static void empathy_video_widget_finalize (GObject *object);
-static gboolean empathy_video_widget_expose_event (GtkWidget *widget,
- GdkEventExpose *event);
+
+static gboolean empathy_video_widget_draw (GtkWidget *widget,
+ cairo_t *cr);
+
static void
empathy_video_widget_element_set_sink_properties (EmpathyVideoWidget *self);
@@ -258,7 +260,7 @@ empathy_video_widget_class_init (
object_class->set_property = empathy_video_widget_set_property;
object_class->get_property = empathy_video_widget_get_property;
- widget_class->expose_event = empathy_video_widget_expose_event;
+ widget_class->draw = empathy_video_widget_draw;
param_spec = g_param_spec_object ("gst-element",
"gst-element", "The underlaying gstreamer element",
@@ -421,20 +423,22 @@ empathy_video_widget_sync_message_cb (GstBus *bus, GstMessage *message,
}
static gboolean
-empathy_video_widget_expose_event (GtkWidget *widget, GdkEventExpose *event)
+empathy_video_widget_draw (GtkWidget *widget,
+ cairo_t *cr)
{
EmpathyVideoWidget *self = EMPATHY_VIDEO_WIDGET (widget);
EmpathyVideoWidgetPriv *priv = GET_PRIV (self);
GtkAllocation allocation;
- if (event != NULL && event->count > 0)
- return TRUE;
-
if (priv->overlay == NULL)
{
gtk_widget_get_allocation (widget, &allocation);
- gdk_window_clear_area (gtk_widget_get_window (widget), 0, 0,
- allocation.width, allocation.height);
+
+ gtk_paint_flat_box (gtk_widget_get_style (widget), cr,
+ GTK_STATE_NORMAL, GTK_SHADOW_NONE, widget, NULL,
+ 0, 0,
+ gtk_widget_get_allocated_width (widget),
+ gtk_widget_get_allocated_height (widget));
return TRUE;
}