#include <glib/gi18n-lib.h>
-#include <libempathy/empathy-utils.h>
-
-#include <libempathy-gtk/empathy-account-widget.h>
-#include <libempathy-gtk/empathy-ui-utils.h>
+#include "empathy-account-widget.h"
+#include "empathy-ui-utils.h"
+#include "empathy-utils.h"
#define DEBUG_FLAG EMPATHY_DEBUG_ACCOUNT
-#include <libempathy/empathy-debug.h>
+#include "empathy-debug.h"
G_DEFINE_TYPE (EmpathyLocalXmppAssistantWidget,
empathy_local_xmpp_assistant_widget, GTK_TYPE_GRID)
gtk_widget_show (w);
pix = empathy_pixbuf_from_icon_name_sized ("im-local-xmpp", 48);
- w = gtk_image_new_from_pixbuf (pix);
- gtk_grid_attach (GTK_GRID (self), w, 1, 0, 1, 1);
- gtk_widget_show (w);
+ if (pix != NULL)
+ {
+ w = gtk_image_new_from_pixbuf (pix);
+ gtk_grid_attach (GTK_GRID (self), w, 1, 0, 1, 1);
+ gtk_widget_show (w);
- g_object_unref (pix);
+ g_object_unref (pix);
+ }
self->priv->settings = empathy_account_settings_new ("salut", "local-xmpp",
NULL, _("People nearby"));
gboolean salut_created = FALSE;
GList *accounts, *l;
- accounts = tp_account_manager_get_valid_accounts (manager);
+ accounts = tp_account_manager_dup_valid_accounts (manager);
for (l = accounts; l != NULL; l = g_list_next (l))
{
TpAccount *account = TP_ACCOUNT (l->data);
- if (!tp_strdiff (tp_account_get_protocol (account), "local-xmpp"))
+ if (!tp_strdiff (tp_account_get_protocol_name (account), "local-xmpp"))
{
salut_created = TRUE;
break;
}
}
- g_list_free (accounts);
+ g_list_free_full (accounts, g_object_unref);
return !salut_created;
}