[f-spot] Fix image version naming in reparenting.
- From: Lorenzo Milesi <lmilesi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [f-spot] Fix image version naming in reparenting.
- Date: Sun, 13 Jun 2010 15:49:57 +0000 (UTC)
commit 01d4f58fa70e852b65da63699b7d3a3d1fddd18f
Author: Lorenzo Milesi <maxxer yetopen it>
Date: Sun Jun 13 17:38:17 2010 +0200
Fix image version naming in reparenting.
src/Core/Photo.cs | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/src/Core/Photo.cs b/src/Core/Photo.cs
index 0d0f047..b5e72c2 100644
--- a/src/Core/Photo.cs
+++ b/src/Core/Photo.cs
@@ -345,10 +345,11 @@ namespace FSpot
if (filename.StartsWith (parent_filename))
name = filename.Substring (parent_filename.Length).Replace ("(", "").Replace (")", "").Replace ("_", " "). Trim();
- for (int num = 1; name == null || VersionNameExists (name); num++) {
+ if (String.IsNullOrEmpty (name)) {
// Note for translators: Reparented is a picture becoming a version of another one
- name = Catalog.GetString (num == 1 ? "Reparented" : "Reparented ({0})");
- name = String.Format (name, num);
+ string rep = name = Catalog.GetString ("Reparented");
+ for (int num = 1; VersionNameExists (name); num++)
+ name = String.Format (rep + " ({0})", num);
}
highest_version_id ++;
versions [highest_version_id] = new PhotoVersion (this, highest_version_id, version.BaseUri, version.Filename, version.ImportMD5, name, is_protected);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]