]> git.0d.be Git - empathy.git/blobdiff - libempathy-gtk/empathy-avatar-image.c
add myself to AUTHORS
[empathy.git] / libempathy-gtk / empathy-avatar-image.c
index f7898e1bdf324a7c027ec1f7885626c0ce4906f2..ef4185ae9da85e9873f19d33ef210923af7d3aed 100644 (file)
@@ -190,6 +190,7 @@ avatar_image_button_press_event (GtkWidget *widget, GdkEventButton *event)
        gint                   popup_width, popup_height;
        gint                   width, height;
        GdkPixbuf             *pixbuf;
+       GtkAllocation          allocation;
 
        priv = GET_PRIV (widget);
 
@@ -205,8 +206,9 @@ avatar_image_button_press_event (GtkWidget *widget, GdkEventButton *event)
        popup_width = gdk_pixbuf_get_width (priv->pixbuf);
        popup_height = gdk_pixbuf_get_height (priv->pixbuf);
 
-       width = priv->image->allocation.width;
-       height = priv->image->allocation.height;
+       gtk_widget_get_allocation (priv->image, &allocation);
+       width = allocation.width;
+       height = allocation.height;
 
        /* Don't show a popup if the popup is smaller then the currently avatar
         * image.
@@ -306,7 +308,8 @@ empathy_avatar_image_set (EmpathyAvatarImage *avatar_image,
        }
 
        if (avatar) {
-               priv->pixbuf = empathy_pixbuf_from_data (avatar->data, avatar->len);
+               priv->pixbuf = empathy_pixbuf_from_data ((gchar *) avatar->data,
+                               avatar->len);
        }
 
        if (!priv->pixbuf) {