]> git.0d.be Git - empathy.git/blobdiff - libempathy/empathy-presence-manager.c
Updated Czech translation
[empathy.git] / libempathy / empathy-presence-manager.c
index 22af1ec7b4fc48f13605b103579de28ce05e0a2d..a6aca1adf0b6416e370cc787f5d6ec0a5302d0db 100644 (file)
  * Authors: Xavier Claessens <xclaesse@gmail.com>
  */
 
+#include "config.h"
 #include "empathy-presence-manager.h"
 
-#include <config.h>
-
-#include <string.h>
-
-#include <glib/gi18n-lib.h>
-#include <dbus/dbus-glib.h>
-
-#include <telepathy-glib/account-manager.h>
-#include <telepathy-glib/dbus.h>
-#include <telepathy-glib/util.h>
+#include <tp-account-widgets/tpaw-utils.h>
 
 #include "empathy-utils.h"
 
@@ -88,7 +80,7 @@ G_DEFINE_TYPE (EmpathyPresenceManager, empathy_presence_manager, G_TYPE_OBJECT);
 
 static EmpathyPresenceManager * singleton = NULL;
 
-static const gchar *presence_type_to_status[NUM_TP_CONNECTION_PRESENCE_TYPES] =
+static const gchar *presence_type_to_status[TP_NUM_CONNECTION_PRESENCE_TYPES] =
 {
   NULL,
   "offline",
@@ -117,7 +109,7 @@ most_available_presence_changed (TpAccountManager *manager,
 
   g_free (self->priv->status);
   self->priv->state = state;
-  if (EMP_STR_EMPTY (status_message))
+  if (TPAW_STR_EMPTY (status_message))
     self->priv->status = NULL;
   else
     self->priv->status = g_strdup (status_message);
@@ -357,7 +349,7 @@ empathy_presence_manager_class_init (EmpathyPresenceManagerClass *klass)
   g_object_class_install_property (object_class,
       PROP_STATE,
       g_param_spec_uint ("state", "state", "state",
-        0, NUM_TP_CONNECTION_PRESENCE_TYPES,
+        0, TP_NUM_CONNECTION_PRESENCE_TYPES,
         TP_CONNECTION_PRESENCE_TYPE_UNSET,
         G_PARAM_READWRITE));
 
@@ -433,13 +425,13 @@ account_manager_ready_cb (GObject *source_object,
   most_available_presence_changed (account_manager, state, status,
     status_message, self);
 
-  accounts = tp_account_manager_get_valid_accounts (self->priv->manager);
+  accounts = tp_account_manager_dup_valid_accounts (self->priv->manager);
   for (l = accounts; l != NULL; l = l->next)
     {
       tp_g_signal_connect_object (l->data, "status-changed",
           G_CALLBACK (account_status_changed_cb), self, 0);
     }
-  g_list_free (accounts);
+  g_list_free_full (accounts, g_object_unref);
 
   g_free (status);
   g_free (status_message);
@@ -527,7 +519,7 @@ empathy_presence_manager_do_set_presence (EmpathyPresenceManager *self,
 {
   const gchar *status;
 
-  g_assert (status_type > 0 && status_type < NUM_TP_CONNECTION_PRESENCE_TYPES);
+  g_assert (status_type > 0 && status_type < TP_NUM_CONNECTION_PRESENCE_TYPES);
 
   status = presence_type_to_status[status_type];