diff options
author | Javier Jardón <jjardon@gnome.org> | 2009-11-13 13:29:35 +0800 |
---|---|---|
committer | Danielle Madeley <danielle.madeley@collabora.co.uk> | 2009-11-17 07:53:40 +0800 |
commit | 6f9fe3b417a3870ce48288f1273843af05d39624 (patch) | |
tree | bf9836bcf0e67793ee18e3beca4835880ed656aa /libempathy-gtk/empathy-chat.c | |
parent | e836a987945a601d70082eef2c6f2fd6796c4fd3 (diff) | |
download | gsoc2013-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-chat.c')
-rw-r--r-- | libempathy-gtk/empathy-chat.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/libempathy-gtk/empathy-chat.c b/libempathy-gtk/empathy-chat.c index 67c8426cb..07bd35711 100644 --- a/libempathy-gtk/empathy-chat.c +++ b/libempathy-gtk/empathy-chat.c @@ -1822,6 +1822,7 @@ chat_update_contacts_visibility (EmpathyChat *chat) { EmpathyChatPriv *priv = GET_PRIV (chat); gboolean show; + GtkAllocation allocation; show = priv->remote_contact == NULL && priv->show_contacts; @@ -1839,7 +1840,8 @@ chat_update_contacts_visibility (EmpathyChat *chat) * chat view is bigger the contact list will take some space on * it but we make sure the chat view don't become smaller than * 250. Relax the size request once the resize is done */ - min_width = MIN (priv->vbox_left->allocation.width, 250); + gtk_widget_get_allocation (priv->vbox_left, &allocation); + min_width = MIN (allocation.width, 250); gtk_widget_set_size_request (priv->vbox_left, min_width, -1); g_idle_add (chat_reset_size_request, priv->vbox_left); @@ -2053,7 +2055,7 @@ chat_size_request (GtkWidget *widget, child = gtk_bin_get_child (bin); - if (child && GTK_WIDGET_VISIBLE (child)) + if (child && gtk_widget_get_visible (child)) { GtkRequisition child_requisition; @@ -2072,11 +2074,11 @@ chat_size_allocate (GtkWidget *widget, GtkAllocation child_allocation; GtkWidget *child; - widget->allocation = *allocation; + gtk_widget_set_allocation (widget, allocation); child = gtk_bin_get_child (bin); - if (child && GTK_WIDGET_VISIBLE (child)) + if (child && gtk_widget_get_visible (child)) { child_allocation.x = allocation->x + gtk_container_get_border_width (GTK_CONTAINER (widget)); child_allocation.y = allocation->y + gtk_container_get_border_width (GTK_CONTAINER (widget)); |