diff -u f-spot-0.6.1.5/debian/changelog f-spot-0.6.1.5/debian/changelog --- f-spot-0.6.1.5/debian/changelog +++ f-spot-0.6.1.5/debian/changelog @@ -1,3 +1,20 @@ +f-spot (0.6.1.5-2ubuntu4) lucid; urgency=low + + * debian/patches/ubuntu_add_filmstrip_browsing_to_view_mode.patch: + + Fix a crash when right-clicking on the filmstrip in view mode. + * debian/patches/ubuntu_add_save_and_undo.patch: + + Change the current item after Save As, so further saves will go to the + new file. + + Only display save confirmation dialog on exit when there are unsaved + changes to an image. + * debian/patches/ubuntu_add_other_files_in_directory_in_view_mode.patch: + + When passing a filename to f-spot --view, also display all the other + images in the directory. (LP: #484887) + * debian/patches/ubuntu_clear_selection_on_crop.patch: + + Clear the selection after using the crop editor (LP: #535186) + + -- Christopher James Halse Rogers Fri, 12 Mar 2010 13:02:57 +1100 + f-spot (0.6.1.5-2ubuntu3) lucid; urgency=low * debian/patches/ubuntu_add_editing_to_view_mode.patch: diff -u f-spot-0.6.1.5/debian/patches/series f-spot-0.6.1.5/debian/patches/series --- f-spot-0.6.1.5/debian/patches/series +++ f-spot-0.6.1.5/debian/patches/series @@ -20,6 +20,8 @@ ubuntu_fix_disposed_pixbuf_errors_in_adjustment.patch ubuntu_add_save_and_undo.patch ubuntu_add_filmstrip_browsing_to_view_mode.patch +ubuntu_add_other_files_in_directory_in_view_mode.patch +ubuntu_clear_selection_on_crop.patch git_copy_attribute_normal.patch git_no_urlencode.patch diff -u f-spot-0.6.1.5/debian/patches/ubuntu_add_filmstrip_browsing_to_view_mode.patch f-spot-0.6.1.5/debian/patches/ubuntu_add_filmstrip_browsing_to_view_mode.patch --- f-spot-0.6.1.5/debian/patches/ubuntu_add_filmstrip_browsing_to_view_mode.patch +++ f-spot-0.6.1.5/debian/patches/ubuntu_add_filmstrip_browsing_to_view_mode.patch @@ -4,8 +4,10 @@ Forwarded: No === modified file 'src/PhotoImageView.cs' ---- a/src/PhotoImageView.cs 2010-03-08 01:47:37 +0000 -+++ b/src/PhotoImageView.cs 2010-03-09 03:54:02 +0000 +Index: f-spot-0.6.1.5/src/PhotoImageView.cs +=================================================================== +--- f-spot-0.6.1.5.orig/src/PhotoImageView.cs 2010-03-12 12:27:11.951832409 +1100 ++++ f-spot-0.6.1.5/src/PhotoImageView.cs 2010-03-12 12:27:11.991817989 +1100 @@ -24,7 +24,7 @@ { } @@ -15,10 +17,10 @@ { history_cache = history; } - -=== modified file 'src/SingleView.cs' ---- a/src/SingleView.cs 2010-03-09 00:23:47 +0000 -+++ b/src/SingleView.cs 2010-03-09 04:08:27 +0000 +Index: f-spot-0.6.1.5/src/SingleView.cs +=================================================================== +--- f-spot-0.6.1.5.orig/src/SingleView.cs 2010-03-12 12:27:11.951832409 +1100 ++++ f-spot-0.6.1.5/src/SingleView.cs 2010-03-12 12:27:12.001818837 +1100 @@ -20,6 +20,7 @@ [Glade.Widget] Gtk.ScrolledWindow image_scrolled; [Glade.Widget] Gtk.HPaned info_hpaned; @@ -134,7 +136,7 @@ Window.ShowAll (); AddinManager.AddExtensionNodeHandler ("/FSpot/Sidebar", OnSidebarExtensionChanged); -@@ -196,6 +233,7 @@ +@@ -198,6 +235,7 @@ image_view.Item.Collection.ItemsChanged += sidebar.HandleSelectionItemsChanged; UpdateStatusLabel (); @@ -142,7 +144,7 @@ if (collection.Count > 0) directory_view.Selection.Add (0); -@@ -205,6 +243,28 @@ +@@ -207,6 +245,28 @@ export.Activated += HandleExportActivated ; } @@ -171,7 +173,7 @@ void HandleUndoStateChanged (object sender, UndoStateChangedArgs e) { if (e.ChangedFor == image_view.Item.Current.DefaultVersionUri) { -@@ -255,6 +315,7 @@ +@@ -258,6 +318,7 @@ rotate_left.Sensitive = rotate_right.Sensitive = rr_button.Sensitive = rl_button.Sensitive = collection.Count != 0; UpdateStatusLabel (); @@ -179,7 +181,7 @@ } public bool ShowSidebar { -@@ -319,6 +380,7 @@ +@@ -322,6 +383,7 @@ undo.Sensitive = false; } UpdateStatusLabel (); @@ -187,7 +189,7 @@ } private void HandleItemChanged (object sender, BrowsablePointerChangedEventArgs old) -@@ -368,8 +430,9 @@ +@@ -371,8 +433,9 @@ private void HandleViewFilenames (object sender, System.EventArgs args) { @@ -198,7 +200,7 @@ } private void HandleAbout (object sender, System.EventArgs args) -@@ -634,6 +697,7 @@ +@@ -636,6 +699,7 @@ { if (PresentUnsavedChangesDialog ()) { SavePreferences (); @@ -206,7 +208,7 @@ undo_history.Dispose (); this.Window.Destroy (); } -@@ -676,6 +740,7 @@ +@@ -678,6 +742,7 @@ if (PresentUnsavedChangesDialog ()) { SavePreferences (); undo_history.Dispose (); @@ -214,11 +216,11 @@ this.Window.Destroy (); } } - -=== modified file 'src/f-spot.glade' ---- a/src/f-spot.glade 2010-03-05 04:41:46 +0000 -+++ b/src/f-spot.glade 2010-03-09 03:54:02 +0000 -@@ -2665,15 +2665,28 @@ +Index: f-spot-0.6.1.5/src/f-spot.glade +=================================================================== +--- f-spot-0.6.1.5.orig/src/f-spot.glade 2010-03-12 12:27:11.971828726 +1100 ++++ f-spot-0.6.1.5/src/f-spot.glade 2010-03-12 12:27:15.764329176 +1100 +@@ -2699,15 +2699,28 @@ @@ -255 +257,18 @@ - +Index: f-spot-0.6.1.5/src/Widgets/Filmstrip.cs +=================================================================== +--- f-spot-0.6.1.5.orig/src/Widgets/Filmstrip.cs 2010-03-12 12:27:11.831818745 +1100 ++++ f-spot-0.6.1.5/src/Widgets/Filmstrip.cs 2010-03-12 12:27:57.091817982 +1100 +@@ -587,8 +587,11 @@ + + protected override bool OnButtonPressEvent (EventButton evnt) + { +- if (evnt.Button == 3) +- return DrawOrientationMenu (evnt); ++ // We don't handle changing the orientation in View mode at this point ++ if (MainWindow.Toplevel != null) { ++ if (evnt.Button == 3) ++ return DrawOrientationMenu (evnt); ++ } + + if (evnt.Button != 1 || ( + (Orientation == Orientation.Horizontal && (evnt.X > filmstrip_end_pos || evnt.X < filmstrip_start_pos)) || diff -u f-spot-0.6.1.5/debian/patches/ubuntu_add_save_and_undo.patch f-spot-0.6.1.5/debian/patches/ubuntu_add_save_and_undo.patch --- f-spot-0.6.1.5/debian/patches/ubuntu_add_save_and_undo.patch +++ f-spot-0.6.1.5/debian/patches/ubuntu_add_save_and_undo.patch @@ -3,10 +3,10 @@ Forwarded: No === modified file 'src/Editors/Editor.cs' -Index: lucid/src/Editors/Editor.cs +Index: f-spot-0.6.1.5/src/Editors/Editor.cs =================================================================== ---- lucid.orig/src/Editors/Editor.cs 2010-03-09 19:29:30.374578823 +1100 -+++ lucid/src/Editors/Editor.cs 2010-03-09 19:29:31.464589337 +1100 +--- f-spot-0.6.1.5.orig/src/Editors/Editor.cs 2010-03-12 14:54:01.431823151 +1100 ++++ f-spot-0.6.1.5/src/Editors/Editor.cs 2010-03-12 14:54:01.491829984 +1100 @@ -18,7 +18,6 @@ using Mono.Unix; @@ -85,10 +85,10 @@ } done++; -Index: lucid/src/Makefile.am +Index: f-spot-0.6.1.5/src/Makefile.am =================================================================== ---- lucid.orig/src/Makefile.am 2010-03-09 19:11:27.174579940 +1100 -+++ lucid/src/Makefile.am 2010-03-09 19:29:31.534584692 +1100 +--- f-spot-0.6.1.5.orig/src/Makefile.am 2010-03-12 14:28:07.131816656 +1100 ++++ f-spot-0.6.1.5/src/Makefile.am 2010-03-12 14:54:01.491829984 +1100 @@ -58,6 +58,7 @@ $(srcdir)/Utils/Log.cs \ $(srcdir)/Utils/PixbufOrientation.cs \ @@ -114,10 +114,10 @@ @echo -e "\n*** Compiling $@" $(CSC_LIB) -out:$@ $(EXTRAFLAGS) $(UTILS_CSFILES) $(UTILS_ASSEMBLIES) -Index: lucid/src/PhotoImageView.cs +Index: f-spot-0.6.1.5/src/PhotoImageView.cs =================================================================== ---- lucid.orig/src/PhotoImageView.cs 2010-03-09 19:11:27.124578836 +1100 -+++ lucid/src/PhotoImageView.cs 2010-03-09 19:29:45.234589824 +1100 +--- f-spot-0.6.1.5.orig/src/PhotoImageView.cs 2010-03-12 14:28:07.061820215 +1100 ++++ f-spot-0.6.1.5/src/PhotoImageView.cs 2010-03-12 14:54:09.551819969 +1100 @@ -20,9 +20,14 @@ namespace FSpot.Widgets { public class PhotoImageView : ImageView { @@ -160,10 +160,10 @@ timer = Log.DebugTimerStart (); if (loader != null) loader.Dispose (); -Index: lucid/src/SingleView.cs +Index: f-spot-0.6.1.5/src/SingleView.cs =================================================================== ---- lucid.orig/src/SingleView.cs 2010-03-09 19:29:30.694591393 +1100 -+++ lucid/src/SingleView.cs 2010-03-09 19:29:45.244578615 +1100 +--- f-spot-0.6.1.5.orig/src/SingleView.cs 2010-03-12 14:54:01.441828643 +1100 ++++ f-spot-0.6.1.5/src/SingleView.cs 2010-03-12 14:54:15.974319386 +1100 @@ -1,6 +1,9 @@ using Gtk; using Gdk; @@ -305,7 +305,7 @@ UpdateStatusLabel (); } -@@ -356,6 +401,62 @@ +@@ -356,6 +401,70 @@ Open (FileChooserAction.Open); } @@ -322,6 +322,7 @@ + img.Save (current_image, stream); + } + } ++ undo_history.MarkImageSaved (current_item.DefaultVersionUri); + Log.Debug ("Saved changes to {0}", current_item.DefaultVersionUri.LocalPath); + + directory_view.UpdateThumbnail (collection.IndexOf (current_item)); @@ -359,7 +360,14 @@ + } + } + Log.Debug ("Saved changes to {0}", current_item.DefaultVersionUri.AbsoluteUri); -+ collection.Add (new Uri (chooser.Uri)); ++ undo_history.MarkImageSaved (current_item.DefaultVersionUri); ++ ++ Uri new_item_uri = new Uri (chooser.Uri); ++ collection.Add (new_item_uri); ++ // We know that chooser.Uri points to a local file, so collection.Add will be synchronous ++ var new_item = collection.Items.FirstOrDefault ((item) => item.DefaultVersionUri == new_item_uri); ++ directory_view.Selection.Clear (); ++ directory_view.Selection.Add (new_item); + } + + chooser.Destroy (); @@ -368,7 +376,7 @@ private void Open (FileChooserAction action) { string title = Catalog.GetString ("Open"); -@@ -463,10 +564,81 @@ +@@ -463,10 +572,81 @@ popup_menu.Popup (null, null, null, 0, Gtk.Global.CurrentEventTime); } @@ -452,7 +460,7 @@ args.RetVal = true; } -@@ -503,8 +675,11 @@ +@@ -503,8 +683,11 @@ private void HandleFileClose (object sender, System.EventArgs args) { @@ -466,11 +474,11 @@ } private void SavePreferences () -Index: lucid/src/Utils/UndoCache.cs +Index: f-spot-0.6.1.5/src/Utils/UndoCache.cs =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ lucid/src/Utils/UndoCache.cs 2010-03-09 19:30:10.574576641 +1100 -@@ -0,0 +1,220 @@ ++++ f-spot-0.6.1.5/src/Utils/UndoCache.cs 2010-03-12 14:54:15.984318314 +1100 +@@ -0,0 +1,229 @@ +// +// UndoCache.cs +// @@ -584,6 +592,7 @@ + } + public Stack pixbuf_history; + public Profile profile; ++ public bool on_disc; + } + + Dictionary history; @@ -600,6 +609,12 @@ + history[photoUri] = new PixbufProfilePair (); + history[photoUri].profile = profile; + history[photoUri].pixbuf_history.Push (new CachedPixbuf (baseImage)); ++ history[photoUri].on_disc = true; ++ } ++ ++ public void MarkImageSaved (Uri photoUri) ++ { ++ history[photoUri].on_disc = true; + } + + public void PushEdit (Uri photoUri, Pixbuf image) @@ -608,6 +623,7 @@ + throw new ApplicationException ("Must initialise the undo cache before adding a new edit"); + } + history[photoUri].pixbuf_history.Push (new CachedPixbuf (image)); ++ history[photoUri].on_disc = false; + + var handler = UndoStateChanged; + if (handler != null) { @@ -628,7 +644,7 @@ + public IEnumerable ChangedUris () + { + foreach (var uri in history.Keys) { -+ if (ContainsUndoInformationFor (uri)) { ++ if (ContainsUndoInformationFor (uri) && !history[uri].on_disc) { + yield return uri; + } + } @@ -657,6 +673,7 @@ + throw new KeyNotFoundException (String.Format ("No Undo info for image {0}!", photoUri.AbsolutePath)); + } + history[photoUri].pixbuf_history.Pop ().Dispose (); ++ history[photoUri].on_disc = false; + + var handler = UndoStateChanged; + if (handler != null) { @@ -691,10 +708,10 @@ + public event EventHandler UndoStateChanged; + } +} -Index: lucid/src/Widgets/EditorPage.cs +Index: f-spot-0.6.1.5/src/Widgets/EditorPage.cs =================================================================== ---- lucid.orig/src/Widgets/EditorPage.cs 2010-03-09 19:29:30.811265385 +1100 -+++ lucid/src/Widgets/EditorPage.cs 2010-03-09 19:29:32.127114856 +1100 +--- f-spot-0.6.1.5.orig/src/Widgets/EditorPage.cs 2010-03-12 14:54:01.441828643 +1100 ++++ f-spot-0.6.1.5/src/Widgets/EditorPage.cs 2010-03-12 14:54:01.501829330 +1100 @@ -41,7 +41,12 @@ public override Gtk.Window ParentWindow { @@ -739,10 +756,10 @@ editor.Initialize (state); return true; } -Index: lucid/src/f-spot.glade +Index: f-spot-0.6.1.5/src/f-spot.glade =================================================================== ---- lucid.orig/src/f-spot.glade 2010-03-09 19:29:29.904577249 +1100 -+++ lucid/src/f-spot.glade 2010-03-09 19:29:45.254589196 +1100 +--- f-spot-0.6.1.5.orig/src/f-spot.glade 2010-03-12 14:54:01.211828952 +1100 ++++ f-spot-0.6.1.5/src/f-spot.glade 2010-03-12 14:54:09.571818522 +1100 @@ -2440,6 +2440,31 @@ @@ -775,10 +792,10 @@ True _Export -Index: lucid/src/UI.Dialog/HigMessageDialog.cs +Index: f-spot-0.6.1.5/src/UI.Dialog/HigMessageDialog.cs =================================================================== ---- lucid.orig/src/UI.Dialog/HigMessageDialog.cs 2010-03-09 19:11:27.144580241 +1100 -+++ lucid/src/UI.Dialog/HigMessageDialog.cs 2010-03-09 19:30:30.897092526 +1100 +--- f-spot-0.6.1.5.orig/src/UI.Dialog/HigMessageDialog.cs 2010-03-12 14:28:07.101819159 +1100 ++++ f-spot-0.6.1.5/src/UI.Dialog/HigMessageDialog.cs 2010-03-12 14:54:01.521828023 +1100 @@ -77,6 +77,7 @@ label.Justify = Gtk.Justification.Left; label.LineWrap = true; only in patch2: unchanged: --- f-spot-0.6.1.5.orig/debian/patches/ubuntu_add_other_files_in_directory_in_view_mode.patch +++ f-spot-0.6.1.5/debian/patches/ubuntu_add_other_files_in_directory_in_view_mode.patch @@ -0,0 +1,288 @@ +Description: Display all images in directories passed to --view + When a file is passed to --view, also view all the other images in the same + directory. +Author: Christopher James Halse Rogers +Bug-LP: https://bugs.edge.launchpad.net/ubuntu/+source/f-spot/+bug/484887 +Bug: https://bugzilla.gnome.org/show_bug.cgi?id=333189 + +Index: f-spot-0.6.1.5/src/SingleView.cs +=================================================================== +--- f-spot-0.6.1.5.orig/src/SingleView.cs 2010-03-12 12:51:05.971832042 +1100 ++++ f-spot-0.6.1.5/src/SingleView.cs 2010-03-12 12:53:02.551817808 +1100 +@@ -82,28 +82,44 @@ + string glade_name = "single_view"; + this.uri = uris[0]; + ++ // If we are passed the URI to a file we want to ++ // (a) Display & select that file, and ++ // (b) Display the other files in the same directory. ++ List uris_to_display = new List (); ++ foreach (var uri in uris) { ++ Uri candidate_uri; ++ if (uri.IsFile) { ++ candidate_uri = uri.GetDirectoryUri (); ++ } else { ++ candidate_uri = uri; ++ } ++ if (!uris_to_display.Contains (candidate_uri)) { ++ uris_to_display.Add (candidate_uri); ++ } ++ } ++ + xml = new Glade.XML (null, "f-spot.glade", glade_name, "f-spot"); + xml.Autoconnect (this); + window = (Gtk.Window)xml.GetWidget (glade_name); +- ++ + LoadPreference (Preferences.VIEWER_WIDTH); + LoadPreference (Preferences.VIEWER_MAXIMIZED); +- ++ + Gtk.Toolbar toolbar = new Gtk.Toolbar (); + toolbar_hbox.PackStart (toolbar); +- ++ + rl_button = GtkUtil.ToolButtonFromTheme ("object-rotate-left", Catalog.GetString ("Rotate Left"), true); + rl_button.Clicked += HandleRotate270Command; + rl_button.SetTooltip (toolTips, Catalog.GetString ("Rotate photo left"), null); + toolbar.Insert (rl_button, -1); +- ++ + rr_button = GtkUtil.ToolButtonFromTheme ("object-rotate-right", Catalog.GetString ("Rotate Right"), true); + rr_button.Clicked += HandleRotate90Command; + rr_button.SetTooltip (toolTips, Catalog.GetString ("Rotate photo right"), null); + toolbar.Insert (rr_button, -1); +- ++ + toolbar.Insert (new SeparatorToolItem (), -1); +- ++ + StockItem undo_info = Stock.Lookup (Stock.Undo); + undo = new ToolButton (undo_info.StockId); + undo.Label = undo_info.Label; +@@ -118,7 +134,7 @@ + fs_button.Clicked += HandleViewFullscreen; + fs_button.SetTooltip (toolTips, Catalog.GetString ("View photos fullscreen"), null); + toolbar.Insert (fs_button, -1); +- ++ + ToolButton ss_button = GtkUtil.ToolButtonFromTheme ("media-playback-start", Catalog.GetString ("Slideshow"), true); + ss_button.Clicked += HandleViewSlideshow; + ss_button.SetTooltip (toolTips, Catalog.GetString ("View photos in a slideshow"), null); +@@ -143,9 +159,10 @@ + toolbar.Insert (next_image, -1); + next_image.TooltipText = Catalog.GetString ("Next photo"); + next_image.Clicked += (sender, args) => { image_view.Item.MoveNext (); }; +- + +- collection = new UriCollection (uris); ++ collection = new UriCollection (uris_to_display.ToArray ()); ++ collection.LoadingComplete += HandleCollectionLoadingComplete; ++ + undo_history = new UndoCache (); + undo_history.UndoStateChanged += HandleUndoStateChanged; + +@@ -201,7 +218,7 @@ + + Window.ShowAll (); + +- AddinManager.AddExtensionNodeHandler ("/FSpot/Sidebar", OnSidebarExtensionChanged); ++ AddinManager.AddExtensionNodeHandler ("/FSpot/Sidebar", OnSidebarExtensionChanged); + sidebar.Context = ViewContext.Single; + + zoom_scale.ValueChanged += HandleZoomScaleValueChanged; +@@ -237,14 +254,43 @@ + UpdateStatusLabel (); + UpdateToolbar (image_view.Item.Collection); + +- if (collection.Count > 0) +- directory_view.Selection.Add (0); ++ if (collection.Count > 0) { ++ if (File.Exists (uris[0].AbsolutePath)) { ++ Log.Debug ("File {0} exists, displaying", uris[0].AbsolutePath); ++ var selected_image = collection.Items.FirstOrDefault ((item) => item.DefaultVersionUri == uris[0]); ++ if (selected_image != null) { ++ directory_view.Selection.Add (selected_image); ++ } else { ++ Log.Warning ("Unable to open requested file {0}", uris[0].AbsolutePath); ++ } ++ } else { ++ directory_view.Selection.Add (0); ++ } ++ } + + export.Submenu = (Mono.Addins.AddinManager.GetExtensionNode ("/FSpot/Menus/Exports") as FSpot.Extensions.SubmenuNode).GetMenuItem (this).Submenu; + export.Submenu.ShowAll (); + export.Activated += HandleExportActivated ; + } + ++ void HandleCollectionLoadingComplete (object sender, EventArgs e) ++ { ++ if (collection.Count > 0) { ++ if (File.Exists (Uri.UnescapeDataString (uri.AbsolutePath))) { ++ Log.Debug ("{0} exists, displaying", uri); ++ var selected_image = collection.Items.FirstOrDefault ((item) => item.DefaultVersionUri == uri); ++ ++ if (selected_image != null && directory_view != null) { ++ directory_view.Selection.Clear (); ++ directory_view.Selection.Add (selected_image); ++ } ++ } else { ++ Log.Warning ("Unable to open requested file {0}", uri); ++ } ++ } ++ collection.LoadingComplete -= HandleCollectionLoadingComplete; ++ } ++ + void ToggleFilmstrip (bool enabled) + { + Gtk.Widget packed_filmstrip = display_vbox.AllChildren.Cast ().FirstOrDefault ((widget) => {return widget == filmstrip;}); +Index: f-spot-0.6.1.5/src/UriCollection.cs +=================================================================== +--- f-spot-0.6.1.5.orig/src/UriCollection.cs 2010-03-12 12:51:09.221817566 +1100 ++++ f-spot-0.6.1.5/src/UriCollection.cs 2010-03-12 12:51:16.751832536 +1100 +@@ -21,25 +21,31 @@ + + namespace FSpot { + public class UriCollection : PhotoList { +- public UriCollection () : base (new IBrowsableItem [0]) ++ public UriCollection () : base(new IBrowsableItem[0]) + { ++ loading_count = 0; + } + +- public UriCollection (System.IO.FileInfo [] files) : this () ++ public UriCollection (System.IO.FileInfo[] files) : this() + { ++ loading_count = 0; ++ LoaderStarting (); + LoadItems (files); + } + +- public UriCollection (Uri [] uri) : this () ++ public UriCollection (Uri[] uri) : this() + { ++ loading_count = 0; + LoadItems (uri); + } + + public void Add (Uri uri) + { ++ LoaderStarting (); + if (FSpot.ImageFile.HasLoader (uri)) { + //Console.WriteLine ("using image loader {0}", uri.ToString ()); + Add (new FileBrowsableItem (uri)); ++ LoaderComplete (); + } else { + GLib.FileInfo info = FileFactory.NewForUri (uri).QueryInfo ("standard::type,standard::content-type", FileQueryInfoFlags.None, null); + +@@ -57,13 +63,37 @@ + } + } + +- public void LoadItems (Uri [] uris) ++ public void LoadItems (Uri[] uris) + { ++ // Prime the count with 1, so that if everything is synchronous the LoadingCount-- at the end ++ // will trigger LoadingComplete. ++ LoaderStarting (); + foreach (Uri uri in uris) { + Add (uri); + } ++ LoaderComplete (); + } + ++ public event EventHandler LoadingComplete; ++ ++ int loading_count; ++ void LoaderStarting () ++ { ++ System.Threading.Interlocked.Increment (ref loading_count); ++ } ++ ++ void LoaderComplete () ++ { ++ if (System.Threading.Interlocked.Decrement (ref loading_count) == 0) { ++ FSpot.Utils.Log.Debug ("Final loader finished, triggering LoadingComplete signal"); ++ var handler = LoadingComplete; ++ if (handler != null) { ++ handler (this, EventArgs.Empty); ++ } ++ } ++ } ++ ++ + private class RssLoader + { + public RssLoader (UriCollection collection, System.Uri uri) +@@ -74,15 +104,15 @@ + ns.AddNamespace ("media", "http://search.yahoo.com/mrss/"); + ns.AddNamespace ("pheed", "http://www.pheed.com/pheed/"); + ns.AddNamespace ("apple", "http://www.apple.com/ilife/wallpapers"); +- ++ + ArrayList items = new ArrayList (); + XmlNodeList list = doc.SelectNodes ("/rss/channel/item/media:content", ns); + foreach (XmlNode item in list) { +- Uri image_uri = new Uri (item.Attributes ["url"].Value); ++ Uri image_uri = new Uri (item.Attributes["url"].Value); + System.Console.WriteLine ("flickr uri = {0}", image_uri.ToString ()); + items.Add (new FileBrowsableItem (image_uri)); + } +- ++ + if (list.Count < 1) { + list = doc.SelectNodes ("/rss/channel/item/pheed:imgsrc", ns); + foreach (XmlNode item in list) { +@@ -91,7 +121,7 @@ + items.Add (new FileBrowsableItem (image_uri)); + } + } +- ++ + if (list.Count < 1) { + list = doc.SelectNodes ("/rss/channel/item/apple:image", ns); + foreach (XmlNode item in list) { +@@ -100,7 +130,8 @@ + items.Add (new FileBrowsableItem (image_uri)); + } + } +- collection.Add (items.ToArray (typeof (FileBrowsableItem)) as FileBrowsableItem []); ++ collection.Add (items.ToArray (typeof(FileBrowsableItem)) as FileBrowsableItem[]); ++ collection.LoaderComplete (); + } + } + +@@ -120,7 +151,6 @@ + 500, + null, + InfoLoaded); +- + } + + void InfoLoaded (GLib.Object o, GLib.AsyncResult res) +@@ -132,13 +162,14 @@ + if (FSpot.ImageFile.HasLoader (i)) + items.Add (new FileBrowsableItem (i)); + } +- Gtk.Application.Invoke (items, System.EventArgs.Empty, delegate (object sender, EventArgs args) { ++ Gtk.Application.Invoke (items, System.EventArgs.Empty, delegate(object sender, EventArgs args) { + collection.Add (items.ToArray ()); ++ collection.LoaderComplete (); + }); + } + } + +- protected void LoadItems (System.IO.FileInfo [] files) ++ protected void LoadItems (System.IO.FileInfo[] files) + { + List items = new List (); + foreach (var f in files) { +@@ -149,6 +180,7 @@ + } + + list = items; ++ LoaderComplete (); + this.Reload (); + } + } only in patch2: unchanged: --- f-spot-0.6.1.5.orig/debian/patches/ubuntu_clear_selection_on_crop.patch +++ f-spot-0.6.1.5/debian/patches/ubuntu_clear_selection_on_crop.patch @@ -0,0 +1,28 @@ +Description: Clear the selection after crop +Author: Christopher James Halse Rogers +Bug-LP: https://bugs.edge.launchpad.net/ubuntu/+source/f-spot/+bug/535186 +Forwarded: No + +------------------------------------------------------------ +revno: 99 +committer: Christopher James Halse Rogers +branch nick: edit-fixes +timestamp: Thu 2010-03-11 15:08:26 +1100 +message: + Clear selection after crop +modified: + src/Editors/CropEditor.cs +diff: +=== modified file 'src/Editors/CropEditor.cs' +--- a/src/Editors/CropEditor.cs 2009-08-10 17:42:29 +0000 ++++ b/src/Editors/CropEditor.cs 2010-03-11 04:08:26 +0000 +@@ -178,7 +178,8 @@ + selection.Width, selection.Height); + + input.CopyArea (selection.X, selection.Y, +- selection.Width, selection.Height, edited, 0, 0); ++ selection.Width, selection.Height, edited, 0, 0); ++ State.PhotoImageView.Selection = Rectangle.Zero; + return edited; + } + }