commit d544e49d0af816c8fa98e86a689442e7f3983c8e
Author: György Balló <ballogy@freestart.hu>
Date:   Mon Nov 28 16:54:13 2011 +0100

    Port to Flickrnet 3.0

diff --git a/build/m4/f-spot/flickrnet.m4 b/build/m4/f-spot/flickrnet.m4
index c1ce557..63ef3c1 100644
--- a/build/m4/f-spot/flickrnet.m4
+++ b/build/m4/f-spot/flickrnet.m4
@@ -1,6 +1,6 @@
 AC_DEFUN([FSPOT_CHECK_FLICKRNET],
 [
-	FLICKRNET_REQUIRED=2.0
+	FLICKRNET_REQUIRED=3.0
 
 	PKG_CHECK_MODULES(FLICKRNET,
 		flickrnet >= $FLICKRNET_REQUIRED)
diff --git a/src/Extensions/Exporters/FSpot.Exporters.Flickr/FSpot.Exporters.Flickr/FlickrExport.cs b/src/Extensions/Exporters/FSpot.Exporters.Flickr/FSpot.Exporters.Flickr/FlickrExport.cs
index 3a738bc..85629d0 100644
--- a/src/Extensions/Exporters/FSpot.Exporters.Flickr/FSpot.Exporters.Flickr/FlickrExport.cs
+++ b/src/Extensions/Exporters/FSpot.Exporters.Flickr/FSpot.Exporters.Flickr/FlickrExport.cs
@@ -157,9 +157,9 @@ namespace FSpot.Exporters.Flickr {
 					do_export_flickr.Sensitive = true;
 					auth_flickr.Sensitive = true;
 					auth_label.Text = System.String.Format (Catalog.GetString ("Welcome {0} you are connected to {1}"),
-										auth.User.Username,
+										auth.User.UserName,
 										current_service.Name);
-					auth_flickr.Label = String.Format (Catalog.GetString ("Sign in as a different user"), auth.User.Username);
+					auth_flickr.Label = String.Format (Catalog.GetString ("Sign in as a different user"), auth.User.UserName);
 					used_bandwidth.Visible = !fr.Connection.PeopleGetUploadStatus().IsPro &&
 									fr.Connection.PeopleGetUploadStatus().BandwidthMax > 0;
 					if (used_bandwidth.Visible) {
@@ -359,7 +359,7 @@ namespace FSpot.Exporters.Flickr {
 				progress_dialog.ProgressText = String.Format (Catalog.GetString ("Waiting for response {0} of {1}"),
 									      photo_index, selection.Count);
 			}
-			progress_dialog.Fraction = (photo_index - 1.0 + (args.Bytes / (double) info.Length)) / (double) selection.Count;
+			progress_dialog.Fraction = (photo_index - 1.0 + (args.BytesSent / (double) info.Length)) / (double) selection.Count;
 		}
 
 		private class DateComparer : IComparer
@@ -403,7 +403,7 @@ namespace FSpot.Exporters.Flickr {
 						App.Instance.Database.Exports.Create ((photo as FSpot.Photo).Id,
 									      (photo as FSpot.Photo).DefaultVersionId,
 									      ExportStore.FlickrExportType,
-									      auth.User.UserId + ":" + auth.User.Username + ":" + current_service.Name + ":" + id);
+									      auth.User.UserId + ":" + auth.User.UserName + ":" + current_service.Name + ":" + id);
 
 				} catch (System.Exception e) {
 					progress_dialog.Message = String.Format (Catalog.GetString ("Error Uploading To {0}: {1}"),
@@ -426,7 +426,7 @@ namespace FSpot.Exporters.Flickr {
 			if (open && ids.Count != 0) {
 				string view_url;
 				if (current_service.Name == "Zooomr.com")
-					view_url = string.Format ("http://www.{0}/photos/{1}/", current_service.Name, auth.User.Username);
+					view_url = string.Format ("http://www.{0}/photos/{1}/", current_service.Name, auth.User.UserName);
 				else {
 					view_url = string.Format ("http://www.{0}/tools/uploader_edit.gne?ids", current_service.Name);
 					bool first = true;
diff --git a/src/Extensions/Exporters/FSpot.Exporters.Flickr/FSpot.Exporters.Flickr/FlickrRemote.cs b/src/Extensions/Exporters/FSpot.Exporters.Flickr/FSpot.Exporters.Flickr/FlickrRemote.cs
index da35672..7340b60 100644
--- a/src/Extensions/Exporters/FSpot.Exporters.Flickr/FSpot.Exporters.Flickr/FlickrRemote.cs
+++ b/src/Extensions/Exporters/FSpot.Exporters.Flickr/FSpot.Exporters.Flickr/FlickrRemote.cs
@@ -56,7 +56,7 @@ using Hyena;
 
 namespace FSpot.Exporters.Flickr {
 public class FlickrRemote {
-	public static Licenses    licenses;
+	public static LicenseCollection    licenses;
 	private string            frob;
 	private string            token;
 	private Auth              auth;
@@ -96,28 +96,30 @@ public class FlickrRemote {
 		get { return flickr; }
 	}
 
-	public License[] GetLicenses ()
+	public LicenseCollection GetLicenses ()
 	{
 		// Licenses won't change normally in a user session
 		if (licenses == null) {
 			try {
 				licenses = flickr.PhotosLicensesGetInfo();
 			} catch (FlickrNet.FlickrApiException e ) {
-				Log.Error (e.Code + ": " + e.Verbose );
+				Log.Error (e.Code + ": " + e.OriginalMessage );
 				return null;
 			}
 		}
-		return licenses.LicenseCollection;
+		return licenses;
 	}
 
 	public List<string> Search (string[] tags, int licenseId)
 	{
 		List<string> photos_url = new List<string> ();
 		// Photos photos = flickr.PhotosSearchText (tags, licenseId);
-		Photos photos = flickr.PhotosSearch (tags);
+		PhotoSearchOptions options = new PhotoSearchOptions ();
+		options.Tags = string.Join(",", tags);
+		PhotoCollection photos = flickr.PhotosSearch (options);
 
 		if (photos != null) {
-			foreach (FlickrNet.Photo photo in photos.PhotoCollection) {
+			foreach (FlickrNet.Photo photo in photos) {
 				photos_url.Add (photo.ThumbnailUrl);
 			}
 		}
@@ -128,10 +130,12 @@ public class FlickrRemote {
 	public List<string> Search (string tags, int licenseId)
 	{
 		List<string> photos_url = new List<string> ();
-		Photos photos = flickr.PhotosSearchText (tags, licenseId);
+		PhotoSearchOptions options = new PhotoSearchOptions ();
+		options.Tags = tags;
+		PhotoCollection photos = flickr.PhotosSearch (options);
 
 		if (photos != null) {
-			foreach (FlickrNet.Photo photo in photos.PhotoCollection) {
+			foreach (FlickrNet.Photo photo in photos) {
 				photos_url.Add (photo.ThumbnailUrl);
 			}
 		}
@@ -160,7 +164,7 @@ public class FlickrRemote {
 
 				return auth;
 			} catch (FlickrNet.FlickrApiException ex) {
-				Log.Error ("Problems logging in to Flickr - " + ex.Verbose);
+				Log.Error ("Problems logging in to Flickr - " + ex.OriginalMessage);
 				return null;
 			}
 		}
