aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk/empathy-kludge-label.c
diff options
context:
space:
mode:
authorJavier Jardón <jjardon@gnome.org>2009-11-13 13:29:35 +0800
committerDanielle Madeley <danielle.madeley@collabora.co.uk>2009-11-17 07:53:40 +0800
commit6f9fe3b417a3870ce48288f1273843af05d39624 (patch)
treebf9836bcf0e67793ee18e3beca4835880ed656aa /libempathy-gtk/empathy-kludge-label.c
parente836a987945a601d70082eef2c6f2fd6796c4fd3 (diff)
downloadgsoc2013-empathy-6f9fe3b417a3870ce48288f1273843af05d39624.tar
gsoc2013-empathy-6f9fe3b417a3870ce48288f1273843af05d39624.tar.gz
gsoc2013-empathy-6f9fe3b417a3870ce48288f1273843af05d39624.tar.bz2
gsoc2013-empathy-6f9fe3b417a3870ce48288f1273843af05d39624.tar.lz
gsoc2013-empathy-6f9fe3b417a3870ce48288f1273843af05d39624.tar.xz
gsoc2013-empathy-6f9fe3b417a3870ce48288f1273843af05d39624.tar.zst
gsoc2013-empathy-6f9fe3b417a3870ce48288f1273843af05d39624.zip
Use accessor functions instead direct access.
Some functions still remaining because there is not API in GTK+ 2.19.0 yet. http://bugzilla.gnome.org/show_bug.cgi?id=586476 Reviewed-By: Danielle Madeley <danielle.madeley@collabora.co.uk>
Diffstat (limited to 'libempathy-gtk/empathy-kludge-label.c')
-rw-r--r--libempathy-gtk/empathy-kludge-label.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/libempathy-gtk/empathy-kludge-label.c b/libempathy-gtk/empathy-kludge-label.c
index f4a29dec2..7ed4be62f 100644
--- a/libempathy-gtk/empathy-kludge-label.c
+++ b/libempathy-gtk/empathy-kludge-label.c
@@ -44,6 +44,7 @@ empathy_kludge_label_expose_event (GtkWidget *self,
PangoLayout *layout;
PangoRectangle rect;
GtkAllocation real_allocation;
+ GtkAllocation allocation;
gboolean r;
layout = gtk_label_get_layout (GTK_LABEL (self));
@@ -54,13 +55,15 @@ empathy_kludge_label_expose_event (GtkWidget *self,
* layout when painting it. This really sucks. We're going to compensate by
* adding this value to the allocation.
*/
- real_allocation = self->allocation;
- self->allocation.x += rect.x;
+ gtk_widget_get_allocation (self, &allocation);
+ real_allocation = allocation;
+ allocation.x += rect.x;
+ gtk_widget_set_allocation (self, &allocation);
r = GTK_WIDGET_CLASS (empathy_kludge_label_parent_class)->expose_event (
self, event);
- self->allocation = real_allocation;
+ gtk_widget_set_allocation (self, &real_allocation);
return r;
}