]> git.0d.be Git - empathy.git/blobdiff - libempathy-gtk/empathy-avatar-chooser.c
GNOME Goal: Update icon names
[empathy.git] / libempathy-gtk / empathy-avatar-chooser.c
index f75b4fdb9b1d0ed746d4f7c42778a2b99529b6ea..4c58a1aa58094aeae7338edd0dbe279d1a3cadb0 100644 (file)
  */
 
 #include "config.h"
-
-#include <string.h>
+#include "empathy-avatar-chooser.h"
 
 #include <glib/gi18n-lib.h>
-#include <gtk/gtk.h>
-#include <gio/gio.h>
-
-#include <libempathy/empathy-camera-monitor.h>
-#include <libempathy/empathy-gsettings.h>
-#include <libempathy/empathy-utils.h>
-
-#include "empathy-avatar-chooser.h"
-#include "empathy-images.h"
-#include "empathy-ui-utils.h"
 
 #ifdef HAVE_CHEESE
 #include <cheese-avatar-chooser.h>
 #endif /* HAVE_CHEESE */
 
+#include "empathy-camera-monitor.h"
+#include "empathy-gsettings.h"
+#include "empathy-images.h"
+#include "empathy-ui-utils.h"
+#include "empathy-utils.h"
 
 #define DEBUG_FLAG EMPATHY_DEBUG_OTHER
-#include <libempathy/empathy-debug.h>
+#include "empathy-debug.h"
 
 /**
  * SECTION:empathy-avatar-chooser
@@ -123,15 +117,18 @@ get_avatar_cb (GObject *source,
     GAsyncResult *result,
     gpointer user_data)
 {
-  TpWeakRef *weak = user_data;
-  EmpathyAvatarChooser *self = tp_weak_ref_dup_object (weak);
+  TpWeakRef *wr = user_data;
+  EmpathyAvatarChooser *self = tp_weak_ref_dup_object (wr);
   const GArray *avatar;
   GdkPixbuf *pixbuf;
   gchar *mime_type;
   GError *error = NULL;
 
   if (self == NULL)
-    goto out;
+    {
+      tp_weak_ref_destroy (wr);
+      return;
+    }
 
   avatar = tp_account_get_avatar_finish (self->priv->account, result, &error);
   if (avatar == NULL)
@@ -159,10 +156,10 @@ get_avatar_cb (GObject *source,
   g_free (mime_type);
 
   self->priv->changed = FALSE;
-  g_object_unref (self);
 
 out:
-  tp_weak_ref_destroy (weak);
+  tp_weak_ref_destroy (wr);
+  g_object_unref (self);
 }
 
 static void
@@ -856,7 +853,7 @@ avatar_chooser_update_preview_cb (GtkFileChooser *file_chooser,
       else
         {
           gtk_image_set_from_stock (GTK_IMAGE (image),
-                  "gtk-dialog-question",
+                  "dialog-question",
                   GTK_ICON_SIZE_DIALOG);
         }