[f-spot] Kill direct gphoto2 support.



commit 0e076603a363a6b571ecb8e21534a834c1fd5e9d
Author: Ruben Vermeersch <ruben savanne be>
Date:   Wed May 26 00:48:52 2010 +0200

    Kill direct gphoto2 support.
    
    We do it through gvfs directly now. Also fixes a lot of URI mistakes.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=618773

 Makefile.include                                   |    2 -
 README                                             |    2 -
 configure.ac                                       |   13 +-
 .../Exporters/PicasaWebExport/PicasaWebExport.cs   |    2 +-
 lib/Makefile.am                                    |    1 -
 lib/libgphoto2-sharp/.gitignore                    |    5 -
 lib/libgphoto2-sharp/AUTHORS                       |    3 -
 lib/libgphoto2-sharp/AssemblyInfo.cs               |   42 --
 lib/libgphoto2-sharp/COPYING                       |  482 --------------------
 lib/libgphoto2-sharp/Camera.cs                     |  246 ----------
 lib/libgphoto2-sharp/CameraAbilities.cs            |  114 -----
 lib/libgphoto2-sharp/CameraAbilitiesList.cs        |   81 ----
 lib/libgphoto2-sharp/CameraCaptureType.cs          |   19 -
 lib/libgphoto2-sharp/CameraDriverStatus.cs         |   22 -
 lib/libgphoto2-sharp/CameraEventType.cs            |   20 -
 lib/libgphoto2-sharp/CameraFile.cs                 |  105 -----
 lib/libgphoto2-sharp/CameraFileOperation.cs        |   27 --
 lib/libgphoto2-sharp/CameraFilePath.cs             |   35 --
 lib/libgphoto2-sharp/CameraFilesystem.cs           |   84 ----
 lib/libgphoto2-sharp/CameraFolderOperation.cs      |   26 -
 lib/libgphoto2-sharp/CameraList.cs                 |   96 ----
 lib/libgphoto2-sharp/CameraOperation.cs            |   27 --
 lib/libgphoto2-sharp/CameraText.cs                 |   27 --
 lib/libgphoto2-sharp/Context.cs                    |  252 ----------
 lib/libgphoto2-sharp/ContextFeedback.cs            |   21 -
 lib/libgphoto2-sharp/DeviceType.cs                 |   22 -
 lib/libgphoto2-sharp/ErrorCodes.cs                 |  123 -----
 lib/libgphoto2-sharp/GPList.cs                     |   85 ----
 lib/libgphoto2-sharp/GPObject.cs                   |   57 ---
 lib/libgphoto2-sharp/Makefile.am                   |   60 ---
 lib/libgphoto2-sharp/Port.cs                       |  189 --------
 lib/libgphoto2-sharp/PortInfo.cs                   |   47 --
 lib/libgphoto2-sharp/PortInfoList.cs               |   75 ---
 lib/libgphoto2-sharp/PortSerialParity.cs           |   22 -
 lib/libgphoto2-sharp/PortType.cs                   |   27 --
 lib/libgphoto2-sharp/glue/.gitignore               |    7 -
 lib/libgphoto2-sharp/glue/Makefile.am              |   15 -
 lib/libgphoto2-sharp/glue/context.c                |  151 ------
 .../libgphoto2-sharp.dll.config.in                 |    5 -
 src/CameraFileSelectionDialog.cs                   |  317 -------------
 src/CameraSelectionDialog.cs                       |   70 ---
 src/Core/App.cs                                    |    7 +-
 src/Core/SafeUriExtensions.cs                      |   10 +-
 src/FileImportBackend.cs                           |    6 +-
 src/GPhotoCamera.cs                                |  307 -------------
 src/Imaging/ImageFile.cs                           |    3 +-
 src/ImportCommand.cs                               |   49 +--
 src/MainWindow.cs                                  |   90 ----
 src/Makefile.am                                    |    3 -
 src/PhotoStore.cs                                  |   10 +-
 src/SingleView.cs                                  |    2 +-
 src/UI.Dialog/EditTagIconDialog.cs                 |    2 +-
 src/f-spot.in                                      |    2 +-
 53 files changed, 39 insertions(+), 3478 deletions(-)
---
diff --git a/Makefile.include b/Makefile.include
index 30b8ac6..fecefb4 100644
--- a/Makefile.include
+++ b/Makefile.include
@@ -5,7 +5,6 @@
 
 DIR_DOCS = $(top_builddir)/docs
 DIR_EXTENSIONS = $(top_builddir)/extensions
-DIR_GPHOTO2 = $(top_builddir)/lib/libgphoto2-sharp
 DIR_ICONS = $(top_builddir)/icons
 DIR_JPEGTRAN = $(top_builddir)/lib/libjpegtran
 DIR_LIBFSPOT = $(top_builddir)/lib/libfspot
@@ -18,7 +17,6 @@ DIR_UNIQUESHARP = $(top_builddir)/lib/unique-sharp/unique
 ## Links
 
 LINK_KEYRING = $(KEYRINGSHARP_LIBS)
-LINK_GPHOTO2 = -r:$(DIR_GPHOTO2)/libgphoto2-sharp.dll
 LINK_SEMWEB = -r:$(DIR_SEMWEB)/SemWeb.dll
 LINK_GIOSHARP = -r:$(DIR_GIOSHARP)/gio-sharp.dll
 LINK_GTKSHARPBEANS = -r:$(DIR_GTKSHARPBEANS)/gtk-sharp-beans.dll
diff --git a/README b/README
index fa39dde..4bf841f 100644
--- a/README
+++ b/README
@@ -16,8 +16,6 @@ Requirements:
 
 	- liblcms 1.12 or later, http://www.littlecms.com/
 
-	- libgphoto2 2.4 or later, http://www.gphoto.org
-
 	- hicolor-icon-theme 0.10 or later, http://icon-theme.freedesktop.org/wiki/HicolorTheme
 
 To compile, just go through the normal autogen/configure stuff and
diff --git a/configure.ac b/configure.ac
index f81715e..44cc68a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -148,7 +148,6 @@ NDESK_DBUS_GLIB_REQUIRED=0.3.0
 MONO_CAIRO_REQUIRED=1.2.5
 CAIRO_REQUIRED=1.4.0
 LCMS_REQUIRED=1.12
-LIBGPHOTO2_REQUIRED=2.4
 MONOADDINS_REQUIRED=0.3
 
 PKG_CHECK_MODULES(F, libgnome-2.0 >= $LIBGNOME_REQUIRED libgnomeui-2.0 >= $LIBGNOMEUI_REQUIRED libexif >= $LIBEXIF_REQUIRED_MIN libexif < $LIBEXIF_REQUIRED_MAX gtk-sharp-2.0 >= $GTKSHARP_REQUIRED glib-sharp-2.0 >= $GTKSHARP_REQUIRED glade-sharp-2.0 >= $GTKSHARP_REQUIRED gtk+-2.0 >= $GTK_REQUIRED mono-cairo >= $MONO_CAIRO_REQUIRED cairo >= $CAIRO_REQUIRED mono-addins >= $MONOADDINS_REQUIRED mono-addins-gui >= $MONOADDINS_REQUIRED mono-addins-setup >= $MONOADDINS_REQUIRED)
@@ -191,6 +190,8 @@ if pkg-config --atleast-version=2.16 gtk+-2.0; then
 	CSC_DEFINES="$CSC_DEFINES -d:GTK_2_16"
 fi
 
+AC_SUBST(CSC_DEFINES)
+
 dnl -- dbus-sharp
 PKG_CHECK_MODULES(NDESK_DBUS, ndesk-dbus-1.0 >= $NDESK_DBUS_REQUIRED ndesk-dbus-glib-1.0 >= $NDESK_DBUS_GLIB_REQUIRED)
 AC_SUBST(NDESK_DBUS_LIBS)
@@ -251,13 +252,6 @@ PKG_CHECK_MODULES(LCMS, lcms >= $LCMS_REQUIRED, [],
 	LCMS_LIBS='-llcms'
 	LCMS_CFLAGS=''])
 
-
-dnl --- libgphoto2
-
-PKG_CHECK_MODULES(LIBGPHOTO2, libgphoto2 >= $LIBGPHOTO2_REQUIRED)
-
-AC_SUBST(CSC_DEFINES)
-
 dnl --- libexif version check
 
 LIBEXIF_API_CHANGE=0.6.0
@@ -353,9 +347,6 @@ lib/gio-sharp/gio/Makefile
 lib/gio-sharp/generator/Makefile
 lib/gtk-sharp-beans/Makefile
 lib/libfspot/Makefile
-lib/libgphoto2-sharp/Makefile
-lib/libgphoto2-sharp/libgphoto2-sharp.dll.config
-lib/libgphoto2-sharp/glue/Makefile
 lib/libjpegtran/Makefile
 lib/Makefile
 lib/semweb/Makefile
diff --git a/extensions/Exporters/PicasaWebExport/PicasaWebExport.cs b/extensions/Exporters/PicasaWebExport/PicasaWebExport.cs
index e1359fe..71f57a9 100644
--- a/extensions/Exporters/PicasaWebExport/PicasaWebExport.cs
+++ b/extensions/Exporters/PicasaWebExport/PicasaWebExport.cs
@@ -286,7 +286,7 @@ namespace FSpotGoogleExport {
 
 			if (show_captcha) {
 				try {
-					using  (ImageFile img = ImageFile.Create(new SafeUri(captcha_exception.CaptchaUrl))) {
+					using  (ImageFile img = ImageFile.Create(new SafeUri(captcha_exception.CaptchaUrl, true))) {
 						captcha_image.Pixbuf = img.Load();
 						token = captcha_exception.Token;
 					}
diff --git a/lib/Makefile.am b/lib/Makefile.am
index 4f608c6..243733a 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -6,6 +6,5 @@ SUBDIRS = \
 	gtk-sharp-beans		\
 	libjpegtran			\
 	libfspot			\
-	libgphoto2-sharp	\
 	semweb				\
 	unique-sharp
diff --git a/src/Core/App.cs b/src/Core/App.cs
index 5f3729a..b53c7d5 100644
--- a/src/Core/App.cs
+++ b/src/Core/App.cs
@@ -203,10 +203,7 @@ namespace FSpot
 		void HandleImport (string path)
 		{
 			Organizer.Window.Present ();
-			if (path != null && path.StartsWith ("gphoto2:"))
-				Organizer.ImportCamera (path);
-			else
-				Organizer.ImportFile (path == null ? null : new SafeUri (path));
+			Organizer.ImportFile (path == null ? null : new SafeUri(path));
 		}
 
 		void HandleOrganize ()
@@ -314,7 +311,7 @@ namespace FSpot
 		{
 			List<SafeUri> ul = new List<SafeUri> ();
 			foreach (var u in uris)
-				ul.Add (new SafeUri (u));
+				ul.Add (new SafeUri (u, true));
 			try {
 				Register (new FSpot.SingleView (ul.ToArray ()).Window);
 			} catch (System.Exception e) {
diff --git a/src/Core/SafeUriExtensions.cs b/src/Core/SafeUriExtensions.cs
index a913fd6..5d382b3 100644
--- a/src/Core/SafeUriExtensions.cs
+++ b/src/Core/SafeUriExtensions.cs
@@ -6,13 +6,13 @@ namespace FSpot
     {
         public static SafeUri Append (this SafeUri base_uri, string filename)
         {
-            return new SafeUri (base_uri.AbsoluteUri + (base_uri.AbsoluteUri.EndsWith ("/") ? "" : "/") + filename);
+            return new SafeUri (base_uri.AbsoluteUri + (base_uri.AbsoluteUri.EndsWith ("/") ? "" : "/") + filename, true);
         }
 
         public static SafeUri GetBaseUri (this SafeUri uri)
         {
             var abs_uri = uri.AbsoluteUri;
-            return new SafeUri (abs_uri.Substring (0, abs_uri.LastIndexOf ('/')));
+            return new SafeUri (abs_uri.Substring (0, abs_uri.LastIndexOf ('/')), true);
         }
 
         public static string GetFilename (this SafeUri uri)
@@ -21,6 +21,12 @@ namespace FSpot
             return abs_uri.Substring (abs_uri.LastIndexOf ('/') + 1);
         }
 
+        public static string GetExtension (this SafeUri uri)
+        {
+            var abs_uri = uri.AbsoluteUri;
+            return abs_uri.Substring (abs_uri.LastIndexOf ('.'));
+        }
+
         public static string GetFilenameWithoutExtension (this SafeUri uri)
         {
             var name = uri.GetFilename ();
diff --git a/src/FileImportBackend.cs b/src/FileImportBackend.cs
index 19650a7..b1627aa 100644
--- a/src/FileImportBackend.cs
+++ b/src/FileImportBackend.cs
@@ -85,8 +85,8 @@ public class FileImportBackend : ImportBackend {
 		foreach (var uri in base_paths) {
 			var enumerator = new RecursiveFileEnumerator (uri, recurse, true);
 			foreach (var file in enumerator) {
-				if (FSpot.ImageFile.HasLoader (file.Uri))
-					import_info.Add (new ImportInfo (new SafeUri(file.Uri)));
+				if (FSpot.ImageFile.HasLoader (new SafeUri (file.Uri, true)))
+					import_info.Add (new ImportInfo (new SafeUri(file.Uri, true)));
 			}
 		}	
 
@@ -114,7 +114,7 @@ public class FileImportBackend : ImportBackend {
 			dest = System.IO.Path.Combine (path, numbered_name);
 		}
 		
-		return new SafeUri ("file://"+dest);
+		return new SafeUri ("file://"+dest, true);
 	}
 	
 	public static SafeUri ChooseLocation (SafeUri uri)
diff --git a/src/Imaging/ImageFile.cs b/src/Imaging/ImageFile.cs
index 78d1cbc..77a9fe6 100644
--- a/src/Imaging/ImageFile.cs
+++ b/src/Imaging/ImageFile.cs
@@ -203,8 +203,7 @@ namespace FSpot {
 
 		static Type GetLoaderType (SafeUri uri)
 		{
-			string path = uri.AbsolutePath;
-			string extension = System.IO.Path.GetExtension (path).ToLower ();
+			string extension = uri.GetExtension ().ToLower ();
 			Type t = (Type) name_table [extension];
 
 			if (t == null) {
diff --git a/src/ImportCommand.cs b/src/ImportCommand.cs
index 3f67087..fcabb18 100644
--- a/src/ImportCommand.cs
+++ b/src/ImportCommand.cs
@@ -92,8 +92,20 @@ public class ImportCommand : GladeDialog
 				System.Console.WriteLine (e);
 			}
 
-			uri = new SafeUri (mount.Root.Uri);
+			uri = new SafeUri (mount.Root.Uri, true);
 			
+			/* FIXME: Camera identification!
+
+			this.Name = String.Format ("{0} ({1})", cam.CameraList.GetName (index), cam.CameraList.GetValue (index));
+#else
+			this.Name = String.Format ("{0}", cam.CameraList.GetName (index));
+#endif
+			this.Icon = GtkUtil.TryLoadIcon (FSpot.Global.IconTheme, "camera-photo", 32, (Gtk.IconLookupFlags)0);
+			if (this.Icon == null)
+				this.Icon = GtkUtil.TryLoadIcon (FSpot.Global.IconTheme, "media-flash", 32, (Gtk.IconLookupFlags)0);
+
+
+			 */
 			
 			if (this.IsIPodPhoto)
 				this.Icon = GtkUtil.TryLoadIcon (FSpot.Global.IconTheme, "multimedia-player", 32, (Gtk.IconLookupFlags)0);
@@ -133,33 +145,6 @@ public class ImportCommand : GladeDialog
 		}
 	}
 
-	internal class CameraSource : ImportSource
-	{
-		GPhotoCamera cam;
-		int CameraIndex;
-		
-		public CameraSource (GPhotoCamera cam, int index)
-		{
-			this.cam = cam;
-			this.CameraIndex = index;
-
-#if LONG_NAMES
-			this.Name = String.Format ("{0} ({1})", cam.CameraList.GetName (index), cam.CameraList.GetValue (index));
-#else
-			this.Name = String.Format ("{0}", cam.CameraList.GetName (index));
-#endif
-			this.Icon = GtkUtil.TryLoadIcon (FSpot.Global.IconTheme, "camera-photo", 32, (Gtk.IconLookupFlags)0);
-			if (this.Icon == null)
-				this.Icon = GtkUtil.TryLoadIcon (FSpot.Global.IconTheme, "media-flash", 32, (Gtk.IconLookupFlags)0);
-		}
-
-		public string Port {
-			get {
-				return cam.CameraList.GetValue (CameraIndex);
-			}
-		}
-	}
-
 	internal abstract class ImportSource {
 		public Gdk.Pixbuf Icon;
 		public string Name;
@@ -341,12 +326,6 @@ public class ImportCommand : GladeDialog
 		} else if (item.Source is VfsSource) {
 			VfsSource vfs = item.Source as VfsSource;
 			ImportUri = vfs.uri;
-		} else if (item.Source is CameraSource) {
-			CameraSource csource = item.Source as CameraSource;
-			string port = "gphoto2:" + csource.Port;
-			this.Cancel ();
-			this.Dialog.Destroy ();
-			App.Instance.Organizer.ImportCamera (port);
 		}
 
 		idle_start.Start ();
@@ -529,7 +508,7 @@ public class ImportCommand : GladeDialog
 		int response = file_chooser.Run ();
 
 		if ((ResponseType) response == ResponseType.Ok) {
-			uri = new SafeUri (file_chooser.Uri);
+			uri = new SafeUri (file_chooser.Uri, true);
 		}
 
 		file_chooser.Destroy ();
diff --git a/src/MainWindow.cs b/src/MainWindow.cs
index 8ac4950..bca7a18 100644
--- a/src/MainWindow.cs
+++ b/src/MainWindow.cs
@@ -28,8 +28,6 @@ using FSpot.Utils;
 using FSpot.UI.Dialog;
 using FSpot.Platform;
 
-using GPhoto2;
-
 namespace FSpot
 {
 	public class MainWindow
@@ -1158,27 +1156,6 @@ namespace FSpot
 			}
 		}
 	
-	#if false
-		public void ImportUdi (string udi)
-		{
-			/* probably a camera we need to contruct on of our gphoto2 uris */
-			Hal.Device dev = new Hal.Device (Core.HalContext, udi);
-			string mount_point = dev.GetPropertyString ("volume.mount_point");
-			int bus = dev.GetPropertyInt ("usb.bus_number");
-			int device = dev.GetPropertyInt ("usb.linux.device_number");
-			System.Console.WriteLine ("dev = {1} exists = {2} mount_point = {0} {3},{4}", mount_point, dev, dev.Exists, bus, device);
-	
-			if (! dev.Exists || mount_point != null) {
-				ImportFile (mount_point);
-			} else {
-				string gphoto_uri = String.Format ("gphoto2:usb:{0},{1}", bus.ToString ("d3") , device.ToString ("d3"));
-				System.Console.WriteLine ("gphoto_uri = {0}", gphoto_uri);
-				ImportCamera (gphoto_uri);
-			} 
-				
-		}
-	#endif
-	
 		void HandleIconViewDragDataReceived (object sender, DragDataReceivedArgs args)
 		{
 		 	Widget source = Gtk.Drag.GetSourceWidget (args.Context);     
@@ -1482,73 +1459,6 @@ namespace FSpot
 			Database.Sync = true;		
 		}
 	
-		void HandleImportFromCameraCommand (object sender, EventArgs e)
-		{
-			ImportCamera (null);
-		}
-	
-		public void ImportCamera (string camera_device)
-		{
-			Log.Debug ("ImportCamera {0}", camera_device);
-			GPhotoCamera cam = new GPhotoCamera();
-	
-			try {
-				int num_cameras = cam.DetectCameras();
-				int selected_cam = 0;
-	
-				if (num_cameras < 1) {
-					HigMessageDialog md = new HigMessageDialog (main_window, DialogFlags.DestroyWithParent, 
-						MessageType.Warning, ButtonsType.Ok, 
-						Catalog.GetString ("No cameras detected."),
-						Catalog.GetString ("F-Spot was unable to find any cameras attached to this system." + 
-									      "  Double check that the camera is connected and has power")); 
-	
-					md.Run ();
-					md.Destroy ();
-					return;
-				} else if (num_cameras == 1) {
-					selected_cam = 0;
-				} else {
-					bool found = false;
-					if (camera_device != null)
-						for (int i = 0; i < num_cameras; i++) {
-							if (camera_device.IndexOf (cam.CameraList.GetValue(i)) != 0) {
-								selected_cam = i;
-								found = true;
-								break;
-							}
-					}
-					
-					if (!found) {
-						FSpot.CameraSelectionDialog camselect = new FSpot.CameraSelectionDialog (cam.CameraList);
-						selected_cam = camselect.Run ();
-					}
-				}
-	
-				if (selected_cam >= 0) {
-					cam.SelectCamera (selected_cam);	
-					cam.InitializeCamera ();
-	
-					FSpot.CameraFileSelectionDialog selector = new FSpot.CameraFileSelectionDialog (cam, Database);
-					if (selector.Run() > 0)
-						query.RollSet = new RollSet (Database.Rolls.GetRolls (1)[0]);
-					UpdateQuery ();
-				}
-			}
-			catch (GPhotoException ge) {
-				System.Console.WriteLine (ge.ToString ());
-				HigMessageDialog md = new HigMessageDialog (main_window, DialogFlags.DestroyWithParent, 
-					MessageType.Error, ButtonsType.Ok, 
-					Catalog.GetString ("Error connecting to camera"),
-					String.Format (Catalog.GetString ("Received error \"{0}\" while connecting to camera"), 
-					ge.Message));
-	
-				md.Run ();
-				md.Destroy ();
-			} finally {
-				cam.ReleaseGPhotoResources ();
-			}
-		}
 		void HandlePageSetupActivated (object o, EventArgs e)
 		{
 			FSpot.Global.PageSetup = Print.RunPageSetupDialog (this.Window, FSpot.Global.PageSetup, null);
diff --git a/src/Makefile.am b/src/Makefile.am
index 3e3ee9e..bf8678c 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -286,9 +286,6 @@ F_SPOT_CSDISTFILES =				\
 	$(srcdir)/ThumbnailCommand.cs		\
 	$(srcdir)/QueryWidget.cs		\
 	$(srcdir)/Query/HiddenTag.cs		\
-	$(srcdir)/GPhotoCamera.cs		\
-	$(srcdir)/CameraSelectionDialog.cs	\
-	$(srcdir)/CameraFileSelectionDialog.cs	\
 	$(srcdir)/Widgets/SlideShow.cs		\
 	$(srcdir)/Widgets/CompositeUtils.cs	\
 	$(srcdir)/Widgets/Dissolve.cs		\
diff --git a/src/PhotoStore.cs b/src/PhotoStore.cs
index 62f8e74..afa369b 100644
--- a/src/PhotoStore.cs
+++ b/src/PhotoStore.cs
@@ -185,7 +185,7 @@ public class PhotoStore : DbStore<Photo> {
 		while (reader.Read ()) {
 			uint version_id = Convert.ToUInt32 (reader ["version_id"]);
 			string name = reader["name"].ToString ();
-			var base_uri = new SafeUri (reader ["base_uri"].ToString ());
+			var base_uri = new SafeUri (reader ["base_uri"].ToString (), true);
 			var filename = reader ["filename"].ToString ();
 			string md5_sum = reader["md5_sum"] != null ? reader ["md5_sum"].ToString () : null;
 			bool is_protected = Convert.ToBoolean (reader["protected"]);
@@ -227,7 +227,7 @@ public class PhotoStore : DbStore<Photo> {
 			if (reader ["version_id"] != null) {
 				uint version_id = Convert.ToUInt32 (reader ["version_id"]);
 				string name = reader["name"].ToString ();
-				var base_uri = new SafeUri (reader ["base_uri"].ToString ());
+				var base_uri = new SafeUri (reader ["base_uri"].ToString (), true);
 				var filename = reader ["filename"].ToString ();
 				string md5_sum = reader["md5_sum"] != null ? reader ["md5_sum"].ToString () : null;
 				bool is_protected = Convert.ToBoolean (reader["protected"]);
@@ -285,7 +285,7 @@ public class PhotoStore : DbStore<Photo> {
 		);
 
 		if (reader.Read ()) {
-			var base_uri = new SafeUri (reader ["base_uri"].ToString ());
+			var base_uri = new SafeUri (reader ["base_uri"].ToString (), true);
 			var filename = reader ["filename"].ToString ();
 			photo = new Photo (id,
 				Convert.ToInt64 (reader ["time"]),
@@ -377,7 +377,7 @@ public class PhotoStore : DbStore<Photo> {
 		);
 
 		while (reader.Read ()) {
-			var base_uri = new SafeUri (reader ["base_uri"].ToString ());
+			var base_uri = new SafeUri (reader ["base_uri"].ToString (), true);
 			var filename = reader ["filename"].ToString ();
 			Photo photo =
 				new Photo (Convert.ToUInt32 (reader ["id"]),
@@ -855,7 +855,7 @@ public class PhotoStore : DbStore<Photo> {
 			Photo photo = LookupInCache (id);
 
 			if (photo == null) {
-				var base_uri = new SafeUri (reader ["base_uri"].ToString ());
+				var base_uri = new SafeUri (reader ["base_uri"].ToString (), true);
 				var filename = reader ["filename"].ToString ();
 				photo =
 					new Photo (id,
diff --git a/src/SingleView.cs b/src/SingleView.cs
index a64f7eb..edafd18 100644
--- a/src/SingleView.cs
+++ b/src/SingleView.cs
@@ -354,7 +354,7 @@ namespace FSpot {
 			int response = chooser.Run ();
 
 			if ((ResponseType) response == ResponseType.Ok)
-				CurrentUri = new SafeUri (chooser.Uri);
+				CurrentUri = new SafeUri (chooser.Uri, true);
 			
 
 			chooser.Destroy ();
diff --git a/src/UI.Dialog/EditTagIconDialog.cs b/src/UI.Dialog/EditTagIconDialog.cs
index 49f8c09..ff585be 100644
--- a/src/UI.Dialog/EditTagIconDialog.cs
+++ b/src/UI.Dialog/EditTagIconDialog.cs
@@ -160,7 +160,7 @@ namespace FSpot.UI.Dialog
 		void CreateTagIconFromExternalPhoto ()
 		{
 			try {
-				using (FSpot.ImageFile img = FSpot.ImageFile.Create (new SafeUri(external_photo_chooser.Uri))) {
+				using (FSpot.ImageFile img = FSpot.ImageFile.Create (new SafeUri(external_photo_chooser.Uri, true))) {
 					using (Gdk.Pixbuf external_image = img.Load ()) {
 						PreviewPixbuf = PixbufUtils.TagIconFromPixbuf (external_image);
 					}
diff --git a/src/f-spot.in b/src/f-spot.in
index 269bf82..020388f 100644
--- a/src/f-spot.in
+++ b/src/f-spot.in
@@ -55,7 +55,7 @@ for arg in "$@"; do
 	x--uninstalled)
 	    echo "*** Running uninstalled f-spot ***"
 	    EXE_TO_RUN="./f-spot.exe"
-	    export MONO_PATH=../lib/libgphoto2-sharp:../lib/semweb:../lib/gio-sharp/gio:../lib/gtk-sharp-beans:../lib/unique-sharp/unique:$MONO_PATH
+	    export MONO_PATH=../lib/semweb:../lib/gio-sharp/gio:../lib/gtk-sharp-beans:../lib/unique-sharp/unique:$MONO_PATH
 	    ;;
     esac
 done



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