[gnome-chat] chat-contacts-list-dialog: Move the check of presence contact to start the function



commit 081f90a8b7c75dbf06bd3a10e94ba00411c912b4
Author: Yosef Or Boczko <yoseforb gmail com>
Date:   Fri Sep 13 00:13:20 2013 +0300

    chat-contacts-list-dialog: Move the check of presence contact to start the function

 src/chat-contacts-list-dialog.c |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/src/chat-contacts-list-dialog.c b/src/chat-contacts-list-dialog.c
index 1cc4e89..dd159ea 100644
--- a/src/chat-contacts-list-dialog.c
+++ b/src/chat-contacts-list-dialog.c
@@ -132,13 +132,6 @@ chat_contacts_list_dialog_add_row (ChatContactsListDialog *self, TpContact *cont
   GtkWidget *image;
   const gchar *state;
 
-  row = gtk_list_box_row_new ();
-  box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
-  gtk_widget_set_hexpand (box, TRUE);
-  gtk_container_set_border_width (GTK_CONTAINER (box), 6);
-  gtk_container_add (GTK_CONTAINER (row), box);
-  gtk_container_add (GTK_CONTAINER (priv->list_box), row);
-
   presence = tp_contact_get_presence_type (contact);
   if (presence == TP_CONNECTION_PRESENCE_TYPE_UNSET ||
       presence == TP_CONNECTION_PRESENCE_TYPE_ERROR)
@@ -146,6 +139,13 @@ chat_contacts_list_dialog_add_row (ChatContactsListDialog *self, TpContact *cont
       return;
     }
 
+  row = gtk_list_box_row_new ();
+  box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
+  gtk_widget_set_hexpand (box, TRUE);
+  gtk_container_set_border_width (GTK_CONTAINER (box), 6);
+  gtk_container_add (GTK_CONTAINER (row), box);
+  gtk_container_add (GTK_CONTAINER (priv->list_box), row);
+
   image = chat_contacts_list_dialog_get_avatar_image (contact);
   gtk_container_add (GTK_CONTAINER (box), image);
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]