[gnome-photos] utils: Silence compiler warnings and some style fixes



commit 454c2c68e6051f0eaa7643e2adae066acc9fbca4
Author: Debarshi Ray <debarshir gnome org>
Date:   Thu Nov 27 14:38:31 2014 +0100

    utils: Silence compiler warnings and some style fixes
    
    Fallout from 483575028fd324f7063870b3e838318f62b808b9

 src/photos-utils.c |   12 +++---------
 1 files changed, 3 insertions(+), 9 deletions(-)
---
diff --git a/src/photos-utils.c b/src/photos-utils.c
index 5c6f330..777cba6 100644
--- a/src/photos-utils.c
+++ b/src/photos-utils.c
@@ -96,23 +96,17 @@ photos_utils_border_pixbuf (GdkPixbuf *pixbuf)
 GdkPixbuf *
 photos_utils_center_pixbuf (GdkPixbuf *pixbuf, gint size)
 {
-  GdkPixbuf *opaque_pixbuf = NULL;
   GdkPixbuf *ret_val;
   gint height;
-  gint pixbuf_size;
   gint width;
-  guint32 color;
-
-  height = gdk_pixbuf_get_height (pixbuf);
-  width = gdk_pixbuf_get_width (pixbuf);
-  pixbuf_size = MAX (height, width);
 
   ret_val = gdk_pixbuf_new (GDK_COLORSPACE_RGB, TRUE, 8, size, size);
   gdk_pixbuf_fill (ret_val, 0x00000000);
+
+  height = gdk_pixbuf_get_height (pixbuf);
+  width = gdk_pixbuf_get_width (pixbuf);
   gdk_pixbuf_copy_area (pixbuf, 0, 0, width, height, ret_val, (size - width) / 2, (size - height) / 2);
 
- out:
-  g_clear_object (&opaque_pixbuf);
   return ret_val;
 }
 


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