aboutsummaryrefslogtreecommitdiff
path: root/src/metadata-widget.c
diff options
context:
space:
mode:
authorMichael Terry <michael.terry@canonical.com>2011-06-22 15:19:49 -0400
committerMichael Terry <michael.terry@canonical.com>2011-06-22 15:19:49 -0400
commit41416ba7f8944ac60a6c1d84409d05a2d9e4d787 (patch)
treeab8893a878c38e7f383df787ca148d2f105ed489 /src/metadata-widget.c
parent808a7108ec6c8cca9423b25269c846b5c6e2461d (diff)
downloadayatana-indicator-sound-41416ba7f8944ac60a6c1d84409d05a2d9e4d787.tar.gz
ayatana-indicator-sound-41416ba7f8944ac60a6c1d84409d05a2d9e4d787.tar.bz2
ayatana-indicator-sound-41416ba7f8944ac60a6c1d84409d05a2d9e4d787.zip
port to gtk3
Diffstat (limited to 'src/metadata-widget.c')
-rw-r--r--src/metadata-widget.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/metadata-widget.c b/src/metadata-widget.c
index f687d0c..5c1db2f 100644
--- a/src/metadata-widget.c
+++ b/src/metadata-widget.c
@@ -267,7 +267,7 @@ static void
draw_album_border(GtkWidget *metadata, gboolean selected)
{
cairo_t *cr;
- cr = gdk_cairo_create (metadata->window);
+ cr = gdk_cairo_create (gtk_widget_get_window (metadata));
GtkStyle *style;
style = gtk_widget_get_style (metadata);
@@ -357,7 +357,7 @@ static void
draw_album_art_placeholder(GtkWidget *metadata)
{
cairo_t *cr;
- cr = gdk_cairo_create (metadata->window);
+ cr = gdk_cairo_create (gtk_widget_get_window (metadata));
GtkStyle *style;
style = gtk_widget_get_style (metadata);
@@ -659,10 +659,12 @@ metadata_widget_icon_triangle_draw_cb (GtkWidget *widget,
style = gtk_widget_get_style (widget);
- cr = (cairo_t*) gdk_cairo_create (widget->window);
+ cr = (cairo_t*) gdk_cairo_create (gtk_widget_get_window (widget));
- x = widget->allocation.x;
- y = widget->allocation.y;
+ GtkAllocation allocation;
+ gtk_widget_get_allocation (widget, &allocation);
+ x = allocation.x;
+ y = allocation.y;
// Draw player icon
if (priv->icon_buf != NULL){