[gnome-software] Use libgnome-desktop with g_autoptr



commit 4deeb497cd3b38aa72d768aba8446d8e5caa6e1f
Author: Kalev Lember <klember redhat com>
Date:   Tue Sep 8 19:21:37 2015 +0200

    Use libgnome-desktop with g_autoptr
    
    ... and bump its dep to 3.17.92 for the cleanup macro support.

 configure.ac              |    2 +-
 src/gs-screenshot-image.c |    5 ++---
 2 files changed, 3 insertions(+), 4 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 131124e..9c5f270 100644
--- a/configure.ac
+++ b/configure.ac
@@ -65,7 +65,7 @@ PKG_CHECK_MODULES(APPSTREAM, appstream-glib >= 0.5.1)
 PKG_CHECK_MODULES(SQLITE, sqlite3)
 PKG_CHECK_MODULES(SOUP, libsoup-2.4 >= 2.42)
 PKG_CHECK_MODULES(GSETTINGS_DESKTOP_SCHEMAS, gsettings-desktop-schemas >= 3.11.5)
-PKG_CHECK_MODULES(GNOME_DESKTOP, gnome-desktop-3.0)
+PKG_CHECK_MODULES(GNOME_DESKTOP, gnome-desktop-3.0 >= 3.17.92)
 PKG_CHECK_MODULES(POLKIT, polkit-gobject-1)
 AC_PATH_PROG(APPSTREAM_UTIL, [appstream-util], [unfound])
 AC_ARG_ENABLE(man,
diff --git a/src/gs-screenshot-image.c b/src/gs-screenshot-image.c
index b440ff3..7f9c8a9 100644
--- a/src/gs-screenshot-image.c
+++ b/src/gs-screenshot-image.c
@@ -29,7 +29,6 @@
 #include <libgnome-desktop/gnome-bg.h>
 #include <libgnome-desktop/gnome-desktop-thumbnail.h>
 
-#include "gs-cleanup.h"
 #include "gs-screenshot-image.h"
 #include "gs-utils.h"
 
@@ -89,8 +88,8 @@ gs_screenshot_image_set_error (GsScreenshotImage *ssimg, const gchar *message)
 static GdkPixbuf *
 gs_screenshot_image_get_desktop_pixbuf (GsScreenshotImage *ssimg)
 {
-       _cleanup_object_unref_ GnomeBG *bg = NULL;
-       _cleanup_object_unref_ GnomeDesktopThumbnailFactory *factory = NULL;
+       g_autoptr(GnomeBG) bg = NULL;
+       g_autoptr(GnomeDesktopThumbnailFactory) factory = NULL;
        g_autoptr(GSettings) settings = NULL;
 
        factory = gnome_desktop_thumbnail_factory_new (GNOME_DESKTOP_THUMBNAIL_SIZE_LARGE);


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