Re: Gallery 2 Export



This patch should fix it.

Ben


2005/12/9, Nico Kaiser <nico kaiser gmail com>:
Hi!

2005/12/9, Larry Ewing <lewing novell com>:

Ok, I tested this on Nat's gallery 1 install and it worked well so I
went ahead and put it in.  If people with gallery2 installs could please
test this as well I've be very appreciated ,I'll try to find time to do
it myself but I'm swamped.


Connection works perfectly, I can create a new album and upload images.
However,
- I can't create an album with empty "Description"
- After creating a new album this new album should be selected in the drop-down box. I just accidentally uploaded photos to the wrong album...

Nico.


Index: GalleryExport.cs
===================================================================
RCS file: /cvs/gnome/f-spot/src/GalleryExport.cs,v
retrieving revision 1.30
diff -u -r1.30 GalleryExport.cs
--- GalleryExport.cs	9 Dec 2005 15:40:41 -0000	1.30
+++ GalleryExport.cs	9 Dec 2005 18:25:40 -0000
@@ -424,7 +424,7 @@
 			description = description_entry.Text;
 			title = title_entry.Text;
 
-			if (name == "" || description == "" || title == "")
+			if (name == "" || title == "")
 				add_button.Sensitive = false;
 			else
 				add_button.Sensitive = true;
@@ -435,7 +435,7 @@
 		{
 			if (args.ResponseId == Gtk.ResponseType.Ok) {
 				gallery.NewAlbum (parent, name, title, description);
-				export.HandleAlbumAdded ();
+				export.HandleAlbumAdded (title);
 			}
 			Dialog.Destroy ();
 		}
@@ -663,9 +663,17 @@
 			Connect ();
 		}
 
-		public void HandleAlbumAdded () {
+		public void HandleAlbumAdded (string title) {
 			GalleryAccount account = (GalleryAccount) accounts [gallery_optionmenu.History];
 			PopulateAlbumOptionMenu (account.Gallery);
+				
+			// make the newly created album selected
+			ArrayList albums = account.Gallery.Albums;
+			for (int i=0; i < albums.Count; i++) {
+				if (((Album)albums[i]).Title == title) {
+					album_optionmenu.SetHistory((uint)i);
+				}
+			}
 		}
 
 		private void PopulateAlbumOptionMenu (Gallery gallery)


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