Hello community,
here is the log from the commit of package f-spot
checked in at Sun May 7 15:56:47 CEST 2006.
--------
--- GNOME/f-spot/f-spot.changes 2006-03-20 18:39:47.000000000 +0100
+++ STABLE/f-spot/f-spot.changes 2006-05-05 22:36:13.000000000 +0200
@@ -1,0 +2,12 @@
+Fri May 5 22:36:00 CEST 2006 - lewing@suse.de
+
+- Fix loupe dllimport statements, fixes 168265.
+- Do url escaping ourselves since mono changed. Fixes 172466.
+
+-------------------------------------------------------------------
+Thu May 4 02:51:19 CEST 2006 - lewing@suse.de
+
+- Fix 161671 by handling corrupt db files with more grace.
+- Fix spec file to apply patch5
+
+-------------------------------------------------------------------
New:
----
f-spot-dberror.patch
f-spot-loupedll.patch
f-spot-mailtoescape.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ f-spot.spec ++++++
--- /var/tmp/diff_new_pack.MOWXSZ/_old 2006-05-07 15:56:18.000000000 +0200
+++ /var/tmp/diff_new_pack.MOWXSZ/_new 2006-05-07 15:56:18.000000000 +0200
@@ -18,8 +18,9 @@
Group: Productivity/Graphics/Viewers
Autoreqprov: on
Requires: mono-core
+Suggests: dcraw
Version: 0.1.11
-Release: 4
+Release: 14
Summary: GNOME Photo Management Application
URL: http://www.gnome.org/projects/f-spot/
Source: %{name}-%{version}.tar.bz2
@@ -30,6 +31,9 @@
Patch3: %{name}-photography.patch
Patch4: %{name}-configure.patch
Patch5: %{name}-copy.patch
+Patch6: %{name}-dberror.patch
+Patch7: %{name}-loupedll.patch
+Patch8: %{name}-mailtoescape.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Requires: nautilus-cd-burner
@@ -56,6 +60,10 @@
%patch1 -p1
%patch3
%patch4
+%patch5
+%patch6
+%patch7
+%patch8
%build
rename no nb po/no.*
@@ -114,6 +122,12 @@
%endif
%changelog -n f-spot
+* Fri May 05 2006 - lewing@suse.de
+- Fix loupe dllimport statements, fixes 168265.
+- Do url escaping ourselves since mono changed. Fixes 172466.
+* Thu May 04 2006 - lewing@suse.de
+- Fix 161671 by handling corrupt db files with more grace.
+- Fix spec file to apply patch5
* Mon Mar 20 2006 - lewing@suse.de
- Fix import dialog to read the copy option.
- Clean up after the import.
++++++ f-spot-copy.patch ++++++
--- /var/tmp/diff_new_pack.MOWXSZ/_old 2006-05-07 15:56:18.000000000 +0200
+++ /var/tmp/diff_new_pack.MOWXSZ/_new 2006-05-07 15:56:18.000000000 +0200
@@ -1,11 +1,10 @@
-Index: ImportCommand.cs
+Index: src/ImportCommand.cs
===================================================================
RCS file: /cvs/gnome/f-spot/src/ImportCommand.cs,v
retrieving revision 1.59
-retrieving revision 1.60
-diff -u -p -r1.59 -r1.60
---- ImportCommand.cs 13 Mar 2006 05:51:18 -0000 1.59
-+++ ImportCommand.cs 13 Mar 2006 21:30:49 -0000 1.60
+diff -u -p -r1.59 ImportCommand.cs
+--- src/ImportCommand.cs 13 Mar 2006 05:51:18 -0000 1.59
++++ src/ImportCommand.cs 3 May 2006 22:08:50 -0000
@@ -424,11 +424,11 @@ public class ImportCommand : FSpot.Glade
collection.Add (photo);
@@ -30,14 +29,13 @@
bool recurse = true;
if (recurse_check != null)
-Index: FileImportBackend.cs
+Index: src/FileImportBackend.cs
===================================================================
RCS file: /cvs/gnome/f-spot/src/FileImportBackend.cs,v
retrieving revision 1.29
-retrieving revision 1.30
-diff -u -p -r1.29 -r1.30
---- FileImportBackend.cs 13 Mar 2006 03:49:25 -0000 1.29
-+++ FileImportBackend.cs 15 Mar 2006 18:49:04 -0000 1.30
+diff -u -p -r1.29 FileImportBackend.cs
+--- src/FileImportBackend.cs 13 Mar 2006 03:49:25 -0000 1.29
++++ src/FileImportBackend.cs 3 May 2006 22:08:50 -0000
@@ -21,7 +21,8 @@ public class FileImportBackend : ImportB
ArrayList file_paths;
++++++ f-spot-dberror.patch ++++++
Index: src/MainWindow.cs
===================================================================
RCS file: /cvs/gnome/f-spot/src/MainWindow.cs,v
retrieving revision 1.286
diff -u -p -r1.286 MainWindow.cs
--- src/MainWindow.cs 6 Mar 2006 22:13:57 -0000 1.286
+++ src/MainWindow.cs 4 May 2006 00:33:28 -0000
@@ -246,8 +246,15 @@ public class MainWindow {
info_box = new InfoBox ();
info_box.VersionIdChanged += HandleInfoBoxVersionIdChange;
left_vbox.PackStart (info_box, false, true, 0);
+
+ try {
+ query = new FSpot.PhotoQuery (db.Photos);
+ } catch (System.Exception e) {
+ //FIXME assume any exception here is due to a corrupt db and handle that.
+ RestoreDb (e);
+ query = new FSpot.PhotoQuery (db.Photos);
+ }
- query = new FSpot.PhotoQuery (db.Photos);
query.Changed += HandleQueryChanged;
db.Photos.ItemsChanged += HandleDbItemsChanged;
@@ -725,6 +732,20 @@ public class MainWindow {
TagPopup popup = new TagPopup ();
popup.Activate (null, null, tag_selection_widget.TagHighlight);
args.RetVal = true;
+ }
+
+ void RestoreDb (System.Exception e)
+ {
+ string backup = db.Repair ();
+ string short_msg = Mono.Posix.Catalog.GetString ("Error loading database.");
+ string long_msg = Mono.Posix.Catalog.GetString ("F-Spot encountered an error while loading the photo database" +
+ " the old database has be moved to {0} and a new database has been created.");
+
+ HigMessageDialog md = new HigMessageDialog (main_window, DialogFlags.DestroyWithParent,
+ MessageType.Error, ButtonsType.Ok,
+ short_msg, String.Format (long_msg, backup));
+ md.Run ();
+ md.Destroy ();
}
void HandleTagSelectionDragBegin (object sender, DragBeginArgs args)
Index: src/Db.cs
===================================================================
RCS file: /cvs/gnome/f-spot/src/Db.cs,v
retrieving revision 1.17
diff -u -p -r1.17 Db.cs
--- src/Db.cs 9 Mar 2006 05:20:46 -0000 1.17
+++ src/Db.cs 4 May 2006 00:33:28 -0000
@@ -198,6 +198,7 @@ public class Db : IDisposable {
ImportStore import_store;
MetaStore meta_store;
bool empty;
+ string path;
public TagStore Tags {
get { return tag_store; }
@@ -275,10 +276,30 @@ public class Db : IDisposable {
}
}
+ public string Repair ()
+ {
+ string backup_path = path;
+ int i = 0;
+
+ while (File.Exists (backup_path)) {
+ backup_path = String.Format ("{0}-{1}-{2}{3}",
+ Path.GetFileNameWithoutExtension (path),
+ System.DateTime.Now.ToString ("yyyyMMdd"),
+ i++,
+ Path.GetExtension (path));
+ }
+
+ File.Move (path, backup_path);
+ Init (path, true);
+
+ return backup_path;
+ }
+
public void Init (string path, bool create_if_missing)
{
bool new_db = ! File.Exists (path);
string version_string = "";
+ this.path = path;
if (new_db && ! create_if_missing)
throw new Exception (path + ": File not found");
++++++ f-spot-loupedll.patch ++++++
Index: src/Loupe.cs
===================================================================
RCS file: /cvs/gnome/f-spot/src/Loupe.cs,v
retrieving revision 1.20
diff -u -p -r1.20 Loupe.cs
--- src/Loupe.cs 25 Feb 2006 00:00:37 -0000 1.20
+++ src/Loupe.cs 5 May 2006 16:15:50 -0000
@@ -197,16 +197,21 @@ namespace FSpot {
{
base.OnSizeAllocated (allocation);
if (use_shape_ext) {
- Gdk.Pixmap bitmap = new Gdk.Pixmap (GdkWindow,
- allocation.Width,
- allocation.Height, 1);
+ try {
+ Gdk.Pixmap bitmap = new Gdk.Pixmap (GdkWindow,
+ allocation.Width,
+ allocation.Height, 1);
+ Graphics g = CreateDrawable (bitmap);
+ DrawShape (g, allocation.Width, allocation.Height);
+ ((IDisposable)g).Dispose ();
+ ShapeCombineMask (bitmap, 0, 0);
+ bitmap.Dispose ();
+ } catch (System.Exception e) {
+ use_shape_ext = false;
+ }
+ }
- Graphics g = CreateDrawable (bitmap);
- DrawShape (g, allocation.Width, allocation.Height);
- ((IDisposable)g).Dispose ();
- ShapeCombineMask (bitmap, 0, 0);
- bitmap.Dispose ();
- } else {
+ if (! use_shape_ext) {
Realize ();
Graphics g = CreateDrawable (GdkWindow);
DrawShape (g, Allocation.Width, Allocation.Height);
@@ -478,7 +483,7 @@ namespace FSpot {
cairo_user_to_device (g.Handle, ref x, ref y);
}
- [DllImport("libgdk-x11-2.0.so")]
+ [DllImport("libgdk-2.0-0.dll")]
extern static void gdk_cairo_set_source_pixbuf (IntPtr handle,
IntPtr pixbuf,
double pixbuf_x,
@@ -489,7 +494,7 @@ namespace FSpot {
gdk_cairo_set_source_pixbuf (g.Handle, pixbuf.Handle, x, y);
}
- [DllImport("libgdk-x11-2.0.so")]
+ [DllImport("libgdk-2.0-0.dll")]
static extern IntPtr gdk_cairo_create (IntPtr raw);
public static Cairo.Graphics CreateDrawable (Gdk.Drawable drawable)
++++++ f-spot-mailtoescape.patch ++++++
Index: src/MainWindow.cs
===================================================================
RCS file: /cvs/gnome/f-spot/src/MainWindow.cs,v
retrieving revision 1.286.2.1
diff -u -p -r1.286.2.1 MainWindow.cs
--- src/MainWindow.cs 4 May 2006 00:44:33 -0000 1.286.2.1
+++ src/MainWindow.cs 5 May 2006 20:13:00 -0000
@@ -1421,7 +1421,7 @@ public class MainWindow {
StringBuilder url = new StringBuilder ("mailto:?subject=my%20photos");
foreach (Photo p in SelectedPhotos ()) {
- url.Append ("&attach=" + HttpUtility.UrlEncode(p.DefaultVersionPath));
+ url.Append ("&attach=" + UriList.EscapeString (p.DefaultVersionPath, true, true, true));
}
GnomeUtil.UrlShow (main_window, url.ToString ());
}
Index: src/Util.cs
===================================================================
RCS file: /cvs/gnome/f-spot/src/Util.cs,v
retrieving revision 1.22
diff -u -p -r1.22 Util.cs
--- src/Util.cs 24 Feb 2006 18:43:31 -0000 1.22
+++ src/Util.cs 5 May 2006 20:13:00 -0000
@@ -103,6 +103,53 @@ public class UriList : ArrayList {
}
}
+ // NOTE: this was copied from mono's System.Uri where it is protected.
+ public static string EscapeString (string str, bool escapeReserved, bool escapeHex, bool escapeBrackets)
+ {
+ if (str == null)
+ return String.Empty;
+
+ byte [] data = Encoding.UTF8.GetBytes (str);
+ StringBuilder s = new StringBuilder ();
+ int len = data.Length;
+ for (int i = 0; i < len; i++) {
+ char c = (char) data [i];
+ // reserved = ";" | "/" | "?" | ":" | "@" | "&" | "=" | "+" | "$" | ","
+ // mark = "-" | "_" | "." | "!" | "~" | "*" | "'" | "(" | ")"
+ // control =