]> git.0d.be Git - empathy.git/blobdiff - libempathy-gtk/empathy-contact-list-store.c
Merge branch 'irc-dialog-579800'
[empathy.git] / libempathy-gtk / empathy-contact-list-store.c
index e18675295b3ec2db8287bd32b93578bd876853ae..e7982f3aae25a0833950d9c24671fe15c3681d88 100644 (file)
@@ -32,6 +32,7 @@
 
 #include <telepathy-glib/util.h>
 
+#include <libempathy/empathy-utils.h>
 #include "empathy-contact-list-store.h"
 #include "empathy-ui-utils.h"
 #include "empathy-gtk-enum-types.h"
@@ -49,8 +50,7 @@
 /* Time in seconds after connecting which we wait before active users are enabled */
 #define ACTIVE_USER_WAIT_TO_ENABLE_TIME 5
 
-#define GET_PRIV(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), EMPATHY_TYPE_CONTACT_LIST_STORE, EmpathyContactListStorePriv))
-
+#define GET_PRIV(obj) EMPATHY_GET_PRIV (obj, EmpathyContactListStore)
 typedef struct {
        EmpathyContactList         *list;
        gboolean                    show_offline;
@@ -80,8 +80,6 @@ typedef struct {
        gboolean                remove;
 } ShowActiveData;
 
-static void             empathy_contact_list_store_class_init         (EmpathyContactListStoreClass *klass);
-static void             empathy_contact_list_store_init               (EmpathyContactListStore      *list);
 static void             contact_list_store_finalize                  (GObject                       *object);
 static void             contact_list_store_get_property              (GObject                       *object,
                                                                      guint                          param_id,
@@ -272,10 +270,10 @@ empathy_contact_list_store_class_init (EmpathyContactListStoreClass *klass)
 static void
 empathy_contact_list_store_init (EmpathyContactListStore *store)
 {
-       EmpathyContactListStorePriv *priv;
-
-       priv = GET_PRIV (store);
+       EmpathyContactListStorePriv *priv = G_TYPE_INSTANCE_GET_PRIVATE (store,
+               EMPATHY_TYPE_CONTACT_LIST_STORE, EmpathyContactListStorePriv);
 
+       store->priv = priv;
        priv->show_avatars = TRUE;
        priv->show_groups = TRUE;
        priv->inhibit_active = g_timeout_add_seconds (ACTIVE_USER_WAIT_TO_ENABLE_TIME,
@@ -855,7 +853,7 @@ contact_list_store_add_contact (EmpathyContactListStore *store,
 
        priv = GET_PRIV (store);
        
-       if (G_STR_EMPTY (empathy_contact_get_name (contact)) ||
+       if (EMP_STR_EMPTY (empathy_contact_get_name (contact)) ||
            (!priv->show_offline && !empathy_contact_is_online (contact))) {
                return;
        }