[f-spot/taglib-metadata: 4/9] Make it build.
- From: Ruben Vermeersch <rubenv src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [f-spot/taglib-metadata: 4/9] Make it build.
- Date: Sun, 13 Jun 2010 13:05:15 +0000 (UTC)
commit b7fda41805a8fd0fc6ce1cedeea3f0c46128886d
Author: Ruben Vermeersch <ruben savanne be>
Date: Fri Jun 11 21:56:17 2010 +0200
Make it build.
build/build.environment.mk | 10 ++++++++--
src/Imaging/JpegFile.cs | 12 ++++++------
src/Utils/GIOTagLibFileAbstraction.cs | 5 +++--
src/Utils/Makefile.am | 1 +
4 files changed, 18 insertions(+), 10 deletions(-)
---
diff --git a/build/build.environment.mk b/build/build.environment.mk
index b74c261..2e13482 100644
--- a/build/build.environment.mk
+++ b/build/build.environment.mk
@@ -19,6 +19,7 @@ DIR_SRC = $(top_builddir)/src
DIR_GIOSHARP = $(top_builddir)/lib/gio-sharp/gio
DIR_GTKSHARPBEANS = $(top_builddir)/lib/gtk-sharp-beans
DIR_UNIQUESHARP = $(top_builddir)/lib/unique-sharp/unique
+DIR_TAGLIB = $(top_builddir)/lib/TagLib
DIR_BIN = $(top_builddir)/bin
@@ -71,6 +72,11 @@ REF_SEMWEB = $(LINK_SYSTEMDATA) $(LINK_HYENA_DEPS)
LINK_SEMWEB = -r:$(DIR_BIN)/SemWeb.dll
LINK_SEMWEB_DEPS = $(REF_SEMWEB) $(LINK_SEMWEB)
+# TagLib
+REF_TAGLIB =
+LINK_TAGLIB = -r:$(DIR_TAGLIB)/TagLib.dll
+LINK_TAGLIB_DEPS = $(REF_TAGLIB) $(LINK_TAGLIB)
+
# Hyena.Data.Sqlite
REF_HYENA_DATA_SQLITE = $(LINK_SQLITE)
LINK_HYENA_DATA_SQLITE = -r:$(DIR_BIN)/Hyena.Data.Sqlite.dll
@@ -87,7 +93,7 @@ LINK_FSPOT_CMS = -r:$(DIR_BIN)/FSpot.Cms.dll
LINK_FSPOT_CMS_DEPS = $(REF_FSPOT_CMS) $(LINK_FSPOT_CMS)
# FSpot.Utils
-REF_FSPOT_UTILS = $(LINK_HYENA_DEPS) $(LINK_GTK) $(LINK_GIO) $(LINK_MONO_CAIRO)
+REF_FSPOT_UTILS = $(LINK_HYENA_DEPS) $(LINK_GTK) $(LINK_GIO) $(LINK_MONO_CAIRO) $(LINK_TAGLIB)
LINK_FSPOT_UTILS = -r:$(DIR_BIN)/FSpot.Utils.dll
LINK_FSPOT_UTILS_DEPS = $(REF_FSPOT_UTILS) $(LINK_FSPOT_UTILS)
@@ -126,7 +132,7 @@ REF_FSPOT = $(LINK_FSPOT_WIDGETS_DEPS) $(LINK_FSPOT_PLATFORM_DEPS) $(LINK_FSPOT_
$(LINK_GLIB) $(LINK_MONO_ADDINS_DEPS) $(LINK_UNIQUE_DEPS) $(LINK_MONO_ADDINS_SETUP_DEPS) \
$(LINK_SEMWEB_DEPS) $(LINK_GLADE) $(LINK_MONODATA) $(LINK_MONO_DATA_SQLITECLIENT) \
$(LINK_MONO_ADDINS_GUI_DEPS) $(LINK_FSPOT_JOB_SCHEDULER_DEPS) $(LINK_ICSHARP_ZIP_LIB) \
- $(LINK_GNOME)
+ $(LINK_GNOME) $(LINK_TAGLIB)
# FIXME: do not link executables
LINK_FSPOT = -r:$(DIR_BIN)/f-spot.exe
LINK_FSPOT_DEPS = $(REF_FSPOT) $(LINK_FSPOT)
diff --git a/src/Imaging/JpegFile.cs b/src/Imaging/JpegFile.cs
index dfb6b37..b187e8d 100644
--- a/src/Imaging/JpegFile.cs
+++ b/src/Imaging/JpegFile.cs
@@ -12,15 +12,15 @@ namespace FSpot {
}
public class JpegFile : ImageFile, IThumbnailContainer {
- public Image.File Metadata {
+ public TagLib.Image.File Metadata {
get { return metadata_file; }
}
- private Image.File metadata_file;
+ private TagLib.Image.File metadata_file;
public JpegFile (SafeUri uri) : base (uri)
{
- metadata_file = TagLib.File.Create (new GIOTagLibFileAbstraction () { Uri = uri }) as Image.File;
+ metadata_file = TagLib.File.Create (new GIOTagLibFileAbstraction () { Uri = uri }) as TagLib.Image.File;
}
~JpegFile () {
@@ -72,9 +72,9 @@ namespace FSpot {
// other way around, but Taglib# doesn't have an interface to do this.
// https://bugzilla.gnome.org/show_bug.cgi?id=618768
- var uri = UriUtils.PathToFileUri (path);
+ var uri = new SafeUri (path);
var tmp = System.IO.Path.GetTempFileName ();
- var tmp_uri = UriUtils.PathToFileUri (tmp);
+ var tmp_uri = new SafeUri (tmp);
var orig_file = GLib.FileFactory.NewForUri (uri);
var tmp_file = GLib.FileFactory.NewForUri (tmp_uri);
@@ -175,7 +175,7 @@ namespace FSpot {
public void SetOrientation (PixbufOrientation orientation)
{
- metadata_file.ImageTag.Orientation = (Image.ImageOrientation) orientation;
+ metadata_file.ImageTag.Orientation = (TagLib.Image.ImageOrientation) orientation;
}
public void SetDateTimeOriginal (DateTime time)
diff --git a/src/Utils/GIOTagLibFileAbstraction.cs b/src/Utils/GIOTagLibFileAbstraction.cs
index c6240a3..7d79b6d 100644
--- a/src/Utils/GIOTagLibFileAbstraction.cs
+++ b/src/Utils/GIOTagLibFileAbstraction.cs
@@ -1,6 +1,7 @@
using System;
using System.IO;
using GLib;
+using Hyena;
namespace FSpot.Utils
{
@@ -13,11 +14,11 @@ namespace FSpot.Utils
return Uri.ToString ();
}
set {
- Uri = new Uri (value);
+ Uri = new SafeUri (value);
}
}
- public Uri Uri { get; set; }
+ public SafeUri Uri { get; set; }
public Stream ReadStream {
get {
diff --git a/src/Utils/Makefile.am b/src/Utils/Makefile.am
index ce7ba7c..290d401 100644
--- a/src/Utils/Makefile.am
+++ b/src/Utils/Makefile.am
@@ -9,6 +9,7 @@ SOURCES = \
DbUtils.cs \
FileExtensions.cs \
GdkUtils.cs \
+ GIOTagLibFileAbstraction.cs \
GtkUtil.cs \
PixbufOrientation.cs \
PixbufUtils.cs \
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]