Hello community, here is the log from the commit of package f-spot checked in at Wed May 10 18:39:34 CEST 2006. -------- --- GNOME/f-spot/f-spot.changes 2006-05-05 22:36:13.000000000 +0200 +++ STABLE/f-spot/f-spot.changes 2006-05-10 01:12:19.000000000 +0200 @@ -1,0 +2,10 @@ +Wed May 10 01:11:50 CEST 2006 - lewing@suse.de + +- Register register the dbus service as soon as possible. Fixes 17335 + +------------------------------------------------------------------- +Tue May 9 20:56:14 CEST 2006 - lewing@suse.de + +- Handle errors while editing missing files. Fixes 173680, 172302 + +------------------------------------------------------------------- New: ---- f-spot-editmissing.patch f-spot-startuprace.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ f-spot.spec ++++++ --- /var/tmp/diff_new_pack.s1rucf/_old 2006-05-10 18:38:32.000000000 +0200 +++ /var/tmp/diff_new_pack.s1rucf/_new 2006-05-10 18:38:32.000000000 +0200 @@ -20,7 +20,7 @@ Requires: mono-core Suggests: dcraw Version: 0.1.11 -Release: 14 +Release: 16 Summary: GNOME Photo Management Application URL: http://www.gnome.org/projects/f-spot/ Source: %{name}-%{version}.tar.bz2 @@ -34,6 +34,8 @@ Patch6: %{name}-dberror.patch Patch7: %{name}-loupedll.patch Patch8: %{name}-mailtoescape.patch +Patch9: %{name}-editmissing.patch +Patch10: %{name}-startuprace.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build Requires: nautilus-cd-burner @@ -64,6 +66,8 @@ %patch6 %patch7 %patch8 +%patch9 +%patch10 %build rename no nb po/no.* @@ -122,6 +126,10 @@ %endif %changelog -n f-spot +* Wed May 10 2006 - lewing@suse.de +- Register register the dbus service as soon as possible. Fixes 17335 +* Tue May 09 2006 - lewing@suse.de +- Handle errors while editing missing files. Fixes 173680, 172302 * Fri May 05 2006 - lewing@suse.de - Fix loupe dllimport statements, fixes 168265. - Do url escaping ourselves since mono changed. Fixes 172466. ++++++ f-spot-editmissing.patch ++++++ Index: src/PhotoView.cs =================================================================== RCS file: /cvs/gnome/f-spot/src/PhotoView.cs,v retrieving revision 1.84 diff -u -p -r1.84 PhotoView.cs --- src/PhotoView.cs 25 Feb 2006 08:54:05 -0000 1.84 +++ src/PhotoView.cs 9 May 2006 18:43:52 -0000 @@ -284,9 +284,6 @@ public class PhotoView : EventBox { desc); md.Run (); md.Destroy (); - - md.Run (); - md.Destroy (); } private void HandleSepiaButtonClicked (object sender, EventArgs args) @@ -331,36 +328,40 @@ public class PhotoView : EventBox { md.Destroy (); return; } - - Pixbuf original_pixbuf = photo_view.CompletePixbuf (); - if (original_pixbuf == null) { - return; - } - + Photo photo = (Photo)Item.Current; - - Pixbuf edited; - if (redeye) { + try { + if (! System.IO.File.Exists (photo.DefaultVersionPath)) { + throw new System.IO.FileNotFoundException (); + } + + Pixbuf original_pixbuf = photo_view.CompletePixbuf (); + + if (original_pixbuf == null) { + return; + } + + Pixbuf edited; + if (redeye) { Gdk.Rectangle area = new Gdk.Rectangle (x, y, width, height); edited = PixbufUtils.RemoveRedeye (original_pixbuf, area); - } else { // Crop (I told you it was ugly) - edited = new Pixbuf (original_pixbuf.Colorspace, - original_pixbuf.HasAlpha, original_pixbuf.BitsPerSample, - width, height); + } else { // Crop (I told you it was ugly) + edited = new Pixbuf (original_pixbuf.Colorspace, + original_pixbuf.HasAlpha, original_pixbuf.BitsPerSample, + width, height); + + original_pixbuf.CopyArea (x, y, width, height, edited, 0, 0); + } + + + // FIXME the fact that the selection doesn't go away is a bug in ImageView, it should + // be fixed there. + photo_view.UnsetSelection (); - original_pixbuf.CopyArea (x, y, width, height, edited, 0, 0); - } - - - // FIXME the fact that the selection doesn't go away is a bug in ImageView, it should - // be fixed there. - photo_view.Pixbuf = edited; - photo_view.UnsetSelection (); - - try { bool create_version = photo.DefaultVersionId == Photo.OriginalVersionId; photo.SaveVersion (edited, create_version); + photo_view.Pixbuf = edited; query.Commit (Item.Index); query.MarkChanged (Item.Index); } catch (System.Exception e) { ++++++ f-spot-startuprace.patch ++++++ Index: src/Db.cs =================================================================== RCS file: /cvs/gnome/f-spot/src/Db.cs,v retrieving revision 1.17.2.1 diff -u -p -r1.17.2.1 Db.cs --- src/Db.cs 4 May 2006 00:44:33 -0000 1.17.2.1 +++ src/Db.cs 9 May 2006 22:54:07 -0000 @@ -324,6 +324,8 @@ public class Db : IDisposable { sqlite_connection.Open (); + BeginTransaction (); + // Load or create the meta table meta_store = new MetaStore (sqlite_connection, new_db); @@ -334,6 +336,8 @@ public class Db : IDisposable { import_store = new ImportStore (sqlite_connection, new_db); photo_store = new PhotoStore (sqlite_connection, new_db, tag_store); + CommitTransaction (); + empty = new_db; } Index: src/Core.cs =================================================================== RCS file: /cvs/gnome/f-spot/src/Core.cs,v retrieving revision 1.15 diff -u -p -r1.15 Core.cs --- src/Core.cs 23 Feb 2006 17:00:02 -0000 1.15 +++ src/Core.cs 9 May 2006 22:54:07 -0000 @@ -24,11 +24,13 @@ namespace FSpot { private static Db db; static DBus.Connection connection; System.Collections.ArrayList toplevels; + const string ServicePath = "org.gnome.FSpot"; + const string CorePath = "/org/gnome/FSpot/Core"; public Core () { toplevels = new System.Collections.ArrayList (); - + // Load the database, upgrading/creating it as needed string base_directory = FSpot.Global.BaseDirectory; if (! File.Exists (base_directory)) @@ -53,16 +55,48 @@ namespace FSpot { public static Core FindInstance () { - DBus.Service service = DBus.Service.Get (Connection, "org.gnome.FSpot"); - return (Core)service.GetObject (typeof (Core), "/org/gnome/FSpot/Core"); + DBus.Service service = DBus.Service.Get (Connection, ServicePath); + return (Core)service.GetObject (typeof (Core), CorePath); + } + + public void UnregisterServer () + { + try { + connection = null; + DBus.Service serv = DBus.Service.Get (Connection, ServicePath); + serv.UnregisterObject (this); + } catch (System.Exception e) { + // noop + System.Console.WriteLine ("unregister\n{0}\nunregister", e); + } } public void RegisterServer () { - DBus.Service service = new DBus.Service (Connection, "org.gnome.FSpot"); - service.RegisterObject (this, "/org/gnome/FSpot/Core"); + Service.RegisterObject (this, CorePath); + } + + public static void AssertOwnership () { + if (Service == null) + System.Console.WriteLine ("problems getting service"); } + private static DBus.Service Service { + get { + DBus.Service service = null; + + if (service == null) { + try { + service = DBus.Service.Get (Connection, ServicePath); + } catch (System.Exception e) { + System.Console.WriteLine (e); + service = new DBus.Service (Connection, ServicePath); + } + } + return service; + } + } + private class ImportCommand { string path; Index: src/main.cs =================================================================== RCS file: /cvs/gnome/f-spot/src/main.cs,v retrieving revision 1.29 diff -u -p -r1.29 main.cs --- src/main.cs 26 Feb 2006 22:37:08 -0000 1.29 +++ src/main.cs 9 May 2006 22:54:07 -0000 @@ -57,35 +57,43 @@ public class Driver { Defines.VERSION, Modules.UI, args); - try { - control = Core.FindInstance (); - System.Console.WriteLine ("Found active FSpot server: {0}", control); - program = null; - } catch (System.Exception e) { - System.Console.WriteLine ("Starting new FSpot server"); - } + bool create = true; + while (control == null) { + try { + control = Core.FindInstance (); + System.Console.WriteLine ("Found active FSpot server: {0}", control); + program = null; + } catch (System.Exception e) { + Core.AssertOwnership (); + System.Console.WriteLine ("Starting new FSpot server"); + } - if (control == null) { Core core = null; - - Gnome.Vfs.Vfs.Initialize (); - StockIcons.Initialize (); - - Mono.Posix.Catalog.Init ("f-spot", Defines.LOCALE_DIR); - Gtk.Window.DefaultIconList = new Gdk.Pixbuf [] {PixbufUtils.LoadFromAssembly ("f-spot-logo.png")}; - - // FIXME: Error checking is non-existant here... - - core = new Core (); - try { - core.RegisterServer (); + if (control == null && create) { + create = false; + Gnome.Vfs.Vfs.Initialize (); + StockIcons.Initialize (); + + Mono.Posix.Catalog.Init ("f-spot", Defines.LOCALE_DIR); + + core = new Core (); + core.RegisterServer (); + + Gtk.Window.DefaultIconList = new Gdk.Pixbuf [] {PixbufUtils.LoadFromAssembly ("f-spot-logo.png")}; + + // FIXME: Error checking is non-existant here... + + empty = Core.Database.Empty; + control = core; + } } catch (System.Exception e) { - System.Console.WriteLine (e.ToString ()); + System.Console.WriteLine ("XXXXX\n{0}\nXXXXX", e); + control = null; + + if (core != null) + core.UnregisterServer (); } - - empty = Core.Database.Empty; - control = core; } for (int i = 0; i < args.Length; i++) { ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun...
participants (1)
-
root@suse.de