]> git.0d.be Git - empathy.git/blobdiff - libempathy-gtk/empathy-local-xmpp-assistant-widget.c
GNOME Goal: Update icon names
[empathy.git] / libempathy-gtk / empathy-local-xmpp-assistant-widget.c
index aa4d6cfcb16f2cd4a97637a3ea91df2b00ef6f64..f0f6aefecbc0a072e8cbcfca748145d8a5004f5b 100644 (file)
 
 #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)
@@ -88,11 +87,14 @@ empathy_local_xmpp_assistant_widget_constructed (GObject *object)
   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"));
@@ -220,7 +222,7 @@ empathy_local_xmpp_assistant_widget_should_create_account (
   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))
     {
@@ -233,7 +235,7 @@ empathy_local_xmpp_assistant_widget_should_create_account (
         }
     }
 
-  g_list_free (accounts);
+  g_list_free_full (accounts, g_object_unref);
 
   return !salut_created;
 }