[gnome-raw-thumbnailer] Remove gnome-vfs dependency Fix Makefile.am Bump libopenraw requirement to 0.0.9



commit 2e2470eb217f0228b77c6e9f59ab038df1dd5ca7
Author: Hub Figuiere <hub figuiere net>
Date:   Fri Dec 16 21:09:50 2011 -0800

    Remove gnome-vfs dependency
    Fix Makefile.am
    Bump libopenraw requirement to 0.0.9

 configure.ac          |    4 ++--
 data/Makefile.am      |   10 +++++-----
 src/raw-thumbnailer.c |   24 +++++++++++-------------
 3 files changed, 18 insertions(+), 20 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index d4d4e3b..73484ca 100644
--- a/configure.ac
+++ b/configure.ac
@@ -17,11 +17,11 @@ GNOME_COMPILE_WARNINGS
 
 SCROLLKEEPER_REQUIRED=0.1.4
 
-PKG_CHECK_MODULES(GNOME, gnome-vfs-2.0 gdk-pixbuf-2.0)
+PKG_CHECK_MODULES(GNOME, gdk-pixbuf-2.0)
 AC_SUBST(GNOME_CFLAGS)
 AC_SUBST(GNOME_LIBS)
 
-PKG_CHECK_MODULES(OPENRAW, libopenraw-gnome-1.0 >= 0.0.5)
+PKG_CHECK_MODULES(OPENRAW, libopenraw-gnome-1.0 >= 0.0.9)
 AC_SUBST(OPENRAW_CFLAGS)
 AC_SUBST(OPENRAW_LIBS)
 
diff --git a/data/Makefile.am b/data/Makefile.am
index 10e2f8e..ce66794 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -20,11 +20,11 @@ mime_DATA = raw-thumbnailer.xml
 
 install-data-local: $(schema_DATA)
 if GCONF_SCHEMAS_INSTALL
-        if test -z "$(DESTDIR)" ; then \
-        for p in $^ ; do \
-                GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) $(GCONFTOOL) --makefile-install-rule $$p 2>&1 > /dev/null; \
-        done \
-        fi
+	if test -z "$(DESTDIR)" ; then \
+	for p in $^ ; do \
+		GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) $(GCONFTOOL) --makefile-install-rule $$p 2>&1 > /dev/null; \
+	done \
+	fi
 endif
 
 EXTRA_DIST = \
diff --git a/src/raw-thumbnailer.c b/src/raw-thumbnailer.c
index e9e7751..571d84d 100644
--- a/src/raw-thumbnailer.c
+++ b/src/raw-thumbnailer.c
@@ -28,7 +28,6 @@
 
 #include <glib/gi18n.h>
 #include <libopenraw-gnome/gdkpixbuf.h>
-#include <libgnomevfs/gnome-vfs.h>
 
 static gboolean jpeg_output = FALSE;
 static gboolean output_size = 128;
@@ -69,16 +68,16 @@ save_pixbuf (GdkPixbuf *pixbuf, const char *path, int size)
 	a_height = g_strdup_printf ("%d", height);
 
 	if (gdk_pixbuf_save (small, path, 
-											 jpeg_output ? "jpeg" : "png", &err,
-											 "tEXt::Thumb::Image::Width", a_width,
-												 "tEXt::Thumb::Image::Height", a_height,
-											 NULL) == FALSE) {
-		if (err != NULL) {
-			g_print ("raw-thumbnailer couldn't write the thumbnail '%s': %s\n", path, err->message);
-			g_error_free (err);
-		} else {
-			g_print ("raw-thumbnailer couldn't write the thumbnail '%s'\n", path);
-		}
+			     jpeg_output ? "jpeg" : "png", &err,
+			     "tEXt::Thumb::Image::Width", a_width,
+			     "tEXt::Thumb::Image::Height", a_height,
+			     NULL) == FALSE) {
+	  if (err != NULL) {
+	    g_print ("raw-thumbnailer couldn't write the thumbnail '%s': %s\n", path, err->message);
+	    g_error_free (err);
+	  } else {
+	    g_print ("raw-thumbnailer couldn't write the thumbnail '%s'\n", path);
+	  }
 	}
 
 	if (small != NULL)
@@ -137,8 +136,7 @@ int main (int argc, char ** argv)
 	input_name = filenames[0];
 	output_name = filenames[1];
 
-	gnome_vfs_init();
-	inputfname = gnome_vfs_get_local_path_from_uri (input_name);
+	inputfname = g_filename_from_uri (input_name, NULL, NULL);
 
 	pixbuf = or_gdkpixbuf_extract_rotated_thumbnail(inputfname, output_size);
 	



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