f-spot r3675 - in trunk: . extensions/GalleryExport src



Author: sdelcroix
Date: Wed Feb 13 08:01:55 2008
New Revision: 3675
URL: http://svn.gnome.org/viewvc/f-spot?rev=3675&view=rev

Log:
fix Gallery export in --view mode

Modified:
   trunk/ChangeLog
   trunk/extensions/GalleryExport/GalleryExport.addin.xml
   trunk/extensions/GalleryExport/GalleryExport.cs
   trunk/src/FormClient.cs

Modified: trunk/extensions/GalleryExport/GalleryExport.addin.xml
==============================================================================
--- trunk/extensions/GalleryExport/GalleryExport.addin.xml	(original)
+++ trunk/extensions/GalleryExport/GalleryExport.addin.xml	Wed Feb 13 08:01:55 2008
@@ -1,5 +1,5 @@
 <Addin namespace="FSpot"
-	version="1.1"
+	version="1.2"
 	name="Gallery Export"
 	description="This extension allows you to export your photos to PHP Gallery (http://gallery.menalto.com)."
 	author="F-Spot team"

Modified: trunk/extensions/GalleryExport/GalleryExport.cs
==============================================================================
--- trunk/extensions/GalleryExport/GalleryExport.cs	(original)
+++ trunk/extensions/GalleryExport/GalleryExport.cs	Wed Feb 13 08:01:55 2008
@@ -757,6 +757,7 @@
 				} catch (System.Exception e) {
 					progress_dialog.Message = String.Format (Catalog.GetString ("Error uploading picture \"{0}\" to Gallery: {1}"), item.Name, e.Message);
 					progress_dialog.ProgressText = Catalog.GetString ("Error");
+					Console.WriteLine (e);
 
 					if (progress_dialog.PerformRetrySkip ()) {
 						photo_index--;

Modified: trunk/src/FormClient.cs
==============================================================================
--- trunk/src/FormClient.cs	(original)
+++ trunk/src/FormClient.cs	Wed Feb 13 08:01:55 2008
@@ -77,7 +77,9 @@
 			// The types we check here need to match the
 			// types we allow in .Add
 	
-			if (item.Value is FileInfo) {
+			if (item.Value == null) {
+				Write (item.Name, (string)String.Empty);
+			} else if (item.Value is FileInfo) {
 				Write (item.Name, (FileInfo)item.Value);
 			} else if (item.Value is string) {
 				Write (item.Name, (string)item.Value);
@@ -90,7 +92,9 @@
 			// The types we check here need to match the
 			// types we allow in .Add
 	
-			if (item.Value is FileInfo) {
+			if (item.Value == null) {
+				return MultipartLength (item.Name, (string)String.Empty);
+			} else if (item.Value is FileInfo) {
 				return MultipartLength (item.Name, (FileInfo)item.Value);
 			} else if (item.Value is string) {
 				return MultipartLength (item.Name, (string)item.Value);



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