[gnome-photos] facebook-item: Style fixes



commit 5fcacf45dfb06323feebf501e646a02bab646cec
Author: Debarshi Ray <debarshir gnome org>
Date:   Tue Feb 14 08:25:57 2017 +0100

    facebook-item: Style fixes

 src/photos-facebook-item.c |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)
---
diff --git a/src/photos-facebook-item.c b/src/photos-facebook-item.c
index 5ba58d4..34b0eef 100644
--- a/src/photos-facebook-item.c
+++ b/src/photos-facebook-item.c
@@ -139,14 +139,17 @@ photos_facebook_item_create_thumbnail (PhotosBaseItem *item, GCancellable *cance
   GFBGraphPhoto *photo = NULL;
   const GFBGraphPhotoImage *thumbnail_image;
   gboolean ret_val = FALSE;
+  const gchar *uri;
   gchar *local_dir = NULL;
   gchar *local_path = NULL;
+  guint size;
 
   photo = photos_facebook_get_gfbgraph_photo (item, cancellable, error);
   if (photo == NULL)
     goto out;
 
-  thumbnail_image = gfbgraph_photo_get_image_near_width (photo, photos_utils_get_icon_size ());
+  size = (guint) photos_utils_get_icon_size ();
+  thumbnail_image = gfbgraph_photo_get_image_near_width (photo, size);
   if (thumbnail_image == NULL)
     {
       g_set_error (error, PHOTOS_ERROR, 0, "Failed to find an image for the thumbnail");
@@ -155,9 +158,10 @@ photos_facebook_item_create_thumbnail (PhotosBaseItem *item, GCancellable *cance
 
   remote_file = g_file_new_for_uri (thumbnail_image->source);
 
-  local_path = gnome_desktop_thumbnail_path_for_uri (photos_base_item_get_uri (item),
-                                                     GNOME_DESKTOP_THUMBNAIL_SIZE_NORMAL);
+  uri = photos_base_item_get_uri (item);
+  local_path = gnome_desktop_thumbnail_path_for_uri (uri, GNOME_DESKTOP_THUMBNAIL_SIZE_NORMAL);
   local_file = g_file_new_for_path (local_path);
+
   local_dir = g_path_get_dirname (local_path);
   g_mkdir_with_parents (local_dir, 0700);
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]