Hello community,
here is the log from the commit of package f-spot
checked in at Fri Nov 28 16:35:46 CET 2008.
--------
--- GNOME/f-spot/f-spot.changes 2008-11-06 12:26:45.000000000 +0100
+++ f-spot/f-spot.changes 2008-11-28 16:34:57.322816000 +0100
@@ -0,0 +1,9 @@
+-------------------------------------------------------------------
+Mon Nov 24 14:20:56 CET 2008 - sdelcroix@novell.com
+
+- Backporting bugfixes from trunk
+ + prefidialog.patch, fix a crasher (bgo#560265)
+ + ellipsize.patch, no longer ellipsize the menu entries
+ + hashjob.patch: provide feedback on the hashjob dialog (bgo#558671),
+ hash new versions on SaveVersion ().
+
calling whatdependson for head-i586
New:
----
ellipsize.patch
hashjob.patch
prefdialog.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ f-spot.spec ++++++
--- /var/tmp/diff_new_pack.V10776/_old 2008-11-28 16:35:13.000000000 +0100
+++ /var/tmp/diff_new_pack.V10776/_new 2008-11-28 16:35:13.000000000 +0100
@@ -30,7 +30,7 @@
AutoReqProv: on
Requires: dcraw
Version: 0.5.0.3
-Release: 4
+Release: 5
Summary: GNOME Photo Management Application
Url: http://www.gnome.org/projects/f-spot/
Source: %{name}-%{version}.tar.bz2
@@ -40,6 +40,9 @@
Patch3: file_import.patch
Patch4: bgo557793.patch
Patch5: theme.patch
+Patch6: prefdialog.patch
+Patch7: ellipsize.patch
+Patch8: hashjob.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Requires: mono-core nautilus-cd-burner dbus-1-x11 libgphoto2 sqlite2
Provides: %{name}-devel = %{version}-%{release}
@@ -76,6 +79,9 @@
%patch3 -p1
%patch4 -p1
%patch5 -p1
+%patch6 -p1
+%patch7 -p1
+%patch8 -p1
%build
autoreconf -f -i
@@ -123,6 +129,12 @@
%define __find_provides env sh -c 'filelist=($(grep -v -E "%{_libdir}/%{name}/extensions|Mono.Addins")) && { printf "%s\\n" "${filelist[@]}" | /usr/lib/rpm/find-provides && printf "%s\\n" "${filelist[@]}" | /usr/bin/mono-find-provides ; } | sort | uniq'
%changelog
+* Mon Nov 24 2008 sdelcroix@novell.com
+- Backporting bugfixes from trunk
+ + prefidialog.patch, fix a crasher (bgo#560265)
+ + ellipsize.patch, no longer ellipsize the menu entries
+ + hashjob.patch: provide feedback on the hashjob dialog (bgo#558671),
+ hash new versions on SaveVersion ().
* Thu Nov 06 2008 sdelcroix@novell.com
- Backporting bugfixes from trunk
+ file_import.patch, load images from the right mass-storage camera if
++++++ ellipsize.patch ++++++
From bfc9c8925a7d34560e1669040dbf5e15076bb6fc Mon Sep 17 00:00:00 2001
From: sdelcroix
Date: Sun, 23 Nov 2008 12:20:34 +0000
Subject: [PATCH] 2008-09-25 Stephane Delcroix
* src/PhotoVersionMenu.cs: no longer Ellipsize items
* src/InfoBox.cs: replace the OptionMenu by a ComboBox, Ellipsize the text.
git-svn-id: svn+ssh://svn.gnome.org/svn/f-spot/branches/FSPOT_0_5_0_STABLE@4611 772769d8-d925-0410-89eb-a6ffa0d40526
---
ChangeLog | 5 +++
src/PhotoVersionMenu.cs | 2 -
src/Widgets/InfoBox.cs | 64 ++++++++++++++++++++++++++++++-----------------
3 files changed, 46 insertions(+), 25 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 1e62445..6bb4c95 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2008-09-25 Stephane Delcroix
+
+ * src/PhotoVersionMenu.cs: no longer Ellipsize items
+ * src/InfoBox.cs: replace the OptionMenu by a ComboBox, Ellipsize the text.
+
2008-11-18 Stephane Delcroix
* src/UI.Dialog/PreferenceDialog.cs: handle the case where the
diff --git a/src/PhotoVersionMenu.cs b/src/PhotoVersionMenu.cs
index 5930125..7c7d734 100644
--- a/src/PhotoVersionMenu.cs
+++ b/src/PhotoVersionMenu.cs
@@ -56,7 +56,6 @@ public class PhotoVersionMenu : Menu {
menu_item.Show ();
menu_item.Sensitive = true;
((Gtk.Label)menu_item.Child).UseUnderline = false;
- ((Gtk.Label)menu_item.Child).Ellipsize = Pango.EllipsizeMode.End;
menu_item.Activated += new EventHandler (HandleMenuItemActivated);
item_infos [i ++] = new MenuItemInfo (menu_item, id);
@@ -68,7 +67,6 @@ public class PhotoVersionMenu : Menu {
MenuItem no_edits_menu_item = new MenuItem (Mono.Unix.Catalog.GetString ("(No Edits)"));
no_edits_menu_item.Show ();
no_edits_menu_item.Sensitive = false;
- ((Gtk.Label)no_edits_menu_item.Child).Ellipsize = Pango.EllipsizeMode.End;
Append (no_edits_menu_item);
}
}
diff --git a/src/Widgets/InfoBox.cs b/src/Widgets/InfoBox.cs
index 5c61322..767185a 100644
--- a/src/Widgets/InfoBox.cs
+++ b/src/Widgets/InfoBox.cs
@@ -103,7 +103,8 @@ namespace FSpot.Widgets
private Label name_value_label;
private Label version_label;
- private OptionMenu version_option_menu;
+ private ListStore version_list;
+ private ComboBox version_combo;
private Label date_label;
private Label date_value_label;
@@ -120,12 +121,6 @@ namespace FSpot.Widgets
private TagView tag_view;
private string default_exposure_string;
- private void HandleVersionIdChanged (PhotoVersionMenu menu)
- {
- if (VersionIdChanged != null)
- VersionIdChanged (this, menu.VersionId);
- }
-
private void HandleRatingChanged (object o, EventArgs e)
{
MainWindow.Toplevel.HandleRatingMenuSelected ((o as Widgets.Rating).Value);
@@ -220,9 +215,16 @@ namespace FSpot.Widgets
date_value_label = AttachLabel (info_table, 2, name_value_label);
size_value_label = AttachLabel (info_table, 3, name_value_label);
exposure_value_label = AttachLabel (info_table, 4, name_value_label);
-
- version_option_menu = new OptionMenu ();
- info_table.Attach (version_option_menu, 1, 2, 1, 2, AttachOptions.Fill, AttachOptions.Fill, TABLE_XPADDING, TABLE_YPADDING);
+
+ version_list = new ListStore (typeof (uint), typeof (string));
+ version_combo = new ComboBox ();
+ CellRendererText version_name_cell = new CellRendererText ();
+ version_name_cell.Ellipsize = Pango.EllipsizeMode.End;
+ version_combo.PackStart (version_name_cell, true);
+ version_combo.SetCellDataFunc (version_name_cell, new CellLayoutDataFunc (VersionNameCellFunc));
+ version_combo.Model = version_list;
+ version_combo.Changed += OnVersionComboChanged;
+ info_table.Attach (version_combo, 1, 2, 1, 2, AttachOptions.Fill, AttachOptions.Fill, TABLE_XPADDING, TABLE_YPADDING);
date_value_label.Text = Environment.NewLine;
exposure_value_label.Text = Environment.NewLine;
@@ -435,21 +437,18 @@ namespace FSpot.Widgets
version_label.Visible = true;
- version_option_menu.Visible = true;
- PhotoVersionMenu menu = new PhotoVersionMenu (photo);
- menu.VersionIdChanged += new PhotoVersionMenu.VersionIdChangedHandler (HandleVersionIdChanged);
- menu.WidthRequest = version_option_menu.Allocation.Width;
- version_option_menu.Menu = menu;
-
- uint i = 0;
+ version_combo.Visible = true;
+ version_list.Clear ();
+ version_combo.Changed -= OnVersionComboChanged;
+ int i = 0;
foreach (uint version_id in photo.VersionIds) {
- if (version_id == photo.DefaultVersionId) {
- // FIXME GTK# why not just .History = i ?
- version_option_menu.SetHistory (i);
- break;
- }
+ version_list.AppendValues (version_id, (photo.GetVersion (version_id) as PhotoVersion).Name);
+ if (version_id == photo.DefaultVersionId)
+ version_combo.Active = i;
i++;
}
+ version_combo.Changed += OnVersionComboChanged;
+
if (show_tags)
tag_view.Current = photo;
rating_label.Visible = show_rating;
@@ -461,6 +460,25 @@ namespace FSpot.Widgets
Show ();
}
+ void VersionNameCellFunc (CellLayout cell_layout, CellRenderer cell, TreeModel tree_model, TreeIter iter)
+ {
+ string name = (string)tree_model.GetValue (iter, 1);
+ (cell as CellRendererText).Text = name;
+ }
+
+
+ void OnVersionComboChanged (object o, EventArgs e)
+ {
+ ComboBox combo = o as ComboBox;
+ if (combo == null)
+ return;
+
+ TreeIter iter;
+
+ if (combo.GetActiveIter (out iter))
+ VersionIdChanged (this, (uint)version_list.GetValue (iter, 0));
+ }
+
private void UpdateMultiple ()
{
histogram_expander.Visible = false;
@@ -469,7 +487,7 @@ namespace FSpot.Widgets
name_value_label.Text = String.Format(Catalog.GetString("{0} Photos"), Photos.Length);
version_label.Visible = false;
- version_option_menu.Visible = false;
+ version_combo.Visible = false;
exposure_label.Visible = false;
exposure_value_label.Visible = false;
--
1.6.0.2
++++++ hashjob.patch ++++++
From 51a917d7bbba286547ac5be7e54d7d2d4fa55414 Mon Sep 17 00:00:00 2001
From: sdelcroix
Date: Mon, 24 Nov 2008 13:10:54 +0000
Subject: [PATCH] yet another round of fixes for md5
2008-11-24 Lorenzo Milesi
* src/Core/Photo.cs: ensure md5 is hashed when creating new version
with SaveVersion.
2008-11-24 Lorenzo Milesi
* HashJob/HashJob.cs: check for missing hashes in photo versions, and
check for empty strings also, not only for null (to work on db 16.3).
display some feedback when pressing buttons.
* HashJob/HashJob.addin.xml: bump ver. fix bgo#558671.
git-svn-id: svn+ssh://svn.gnome.org/svn/f-spot/branches/FSPOT_0_5_0_STABLE@4616 772769d8-d925-0410-89eb-a6ffa0d40526
---
ChangeLog | 5 +++
extensions/Tools/ChangeLog | 7 +++++
extensions/Tools/HashJob/HashJob.addin.xml | 2 +-
extensions/Tools/HashJob/HashJob.cs | 38 +++++++++++++++++++++++++---
src/Core/Photo.cs | 12 +--------
5 files changed, 48 insertions(+), 16 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 6bb4c95..545004f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2008-11-24 Lorenzo Milesi
+
+ * src/Core/Photo.cs: ensure md5 is hashed when creating new version
+ with SaveVersion.
+
2008-09-25 Stephane Delcroix
* src/PhotoVersionMenu.cs: no longer Ellipsize items
diff --git a/extensions/Tools/ChangeLog b/extensions/Tools/ChangeLog
index 7c92594..a573ef4 100644
--- a/extensions/Tools/ChangeLog
+++ b/extensions/Tools/ChangeLog
@@ -1,3 +1,10 @@
+2008-11-24 Lorenzo Milesi
+
+ * HashJob/HashJob.cs: check for missing hashes in photo versions, and
+ check for empty strings also, not only for null (to work on db 16.3).
+ display some feedback when pressing buttons.
+ * HashJob/HashJob.addin.xml: bump ver. fix bgo#558671.
+
2008-10-17 Stephane Delcroix
* HashJob/: new HashJob extension
diff --git a/extensions/Tools/HashJob/HashJob.addin.xml b/extensions/Tools/HashJob/HashJob.addin.xml
index f70af7a..fa3d865 100644
--- a/extensions/Tools/HashJob/HashJob.addin.xml
+++ b/extensions/Tools/HashJob/HashJob.addin.xml
@@ -1,6 +1,6 @@
http://f-spot.org/Extensions"
diff --git a/extensions/Tools/HashJob/HashJob.cs b/extensions/Tools/HashJob/HashJob.cs
index 7aecd53..696bcb4 100644
--- a/extensions/Tools/HashJob/HashJob.cs
+++ b/extensions/Tools/HashJob/HashJob.cs
@@ -15,7 +15,6 @@ using Mono.Data.SqliteClient;
using Gtk;
using FSpot;
-using FSpot.UI.Dialog;
using FSpot.Extensions;
using FSpot.Jobs;
@@ -31,14 +30,37 @@ namespace HashJobExtension {
public class HashJobDialog : Dialog
{
+ private Gtk.Label status_label;
public void ShowDialog ()
{
+ // This query is not very fast, but it's a 'one-time' so don't care much...
+ SqliteDataReader reader = FSpot.Core.Database.Database.Query (
+ "SELECT COUNT(*) FROM photos p WHERE md5_sum IS NULL OR md5_sum = '' OR EXISTS " +
+ "(SELECT * FROM photo_versions pv WHERE p.id=pv.photo_id AND version_id <> '1' AND " +
+ "(pv.md5_sum IS NULL OR pv.md5_sum = ''))");
+ reader.Read ();
+ uint missing_md5 = Convert.ToUInt32 (reader[0]);
+ reader.Close ();
+
+ reader = FSpot.Core.Database.Database.Query (String.Format (
+ "SELECT COUNT(*) FROM jobs WHERE job_type = '{0}' ", typeof(FSpot.Jobs.CalculateHashJob).ToString ()));
+ reader.Read ();
+ uint active_jobs = Convert.ToUInt32 (reader[0]);
+ reader.Close ();
+
VBox.Spacing = 6;
- Label l = new Label ("In order to detect duplicates on pictures you imported before f-spot 0.5.0, f-spot need to analyze your image collection. This is is not done by default as it's time consuming. You can Start or Pause this update process using this dialog.");
+ Label l = new Label (Catalog.GetString ("In order to detect duplicates on pictures you imported before 0.5.0, " +
+ "F-Spot needs to analyze your image collection. This is is not done by default as it's time consuming. " +
+ "You can Start or Pause this update process using this dialog."));
l.LineWrap = true;
VBox.PackStart (l);
+ Label l2 = new Label (Catalog.GetString (String.Format ("You currently have {0} photos needing md5 calculation, and {1} pending jobs",
+ missing_md5, active_jobs)));
+ l2.LineWrap = true;
+ VBox.PackStart (l2);
+
Button execute = new Button (Stock.Execute);
execute.Clicked += HandleExecuteClicked;
VBox.PackStart (execute);
@@ -47,11 +69,13 @@ namespace HashJobExtension {
stop.Clicked += HandleStopClicked;
VBox.PackStart (stop);
+ status_label = new Label ();
+ VBox.PackStart (status_label);
+
this.AddButton ("_Close", ResponseType.Close);
this.Response += HandleResponse;
ShowAll ();
-
}
void HandleResponse (object obj, ResponseArgs args)
@@ -66,18 +90,24 @@ namespace HashJobExtension {
void HandleExecuteClicked (object o, EventArgs e)
{
- SqliteDataReader reader = FSpot.Core.Database.Database.Query ("SELECT id from photos WHERE md5_sum IS NULL");
+ SqliteDataReader reader = FSpot.Core.Database.Database.Query (
+ "SELECT id FROM photos p WHERE md5_sum IS NULL OR md5_sum = '' OR EXISTS " +
+ "(SELECT * FROM photo_versions pv WHERE p.id=pv.photo_id AND version_id <> '1' AND " +
+ "(pv.md5_sum IS NULL OR pv.md5_sum = '') )");
FSpot.Core.Database.Database.BeginTransaction ();
while (reader.Read ())
FSpot.Jobs.CalculateHashJob.Create (FSpot.Core.Database.Jobs, Convert.ToUInt32 (reader[0]));
reader.Close ();
FSpot.Core.Database.Database.CommitTransaction ();
+ status_label.Text = Catalog.GetString ("Processing images...");
}
void HandleStopClicked (object o, EventArgs e)
{
FSpot.Core.Database.Database.ExecuteNonQuery (String.Format ("DELETE FROM jobs WHERE job_type = '{0}'", typeof(FSpot.Jobs.CalculateHashJob).ToString ()));
+ status_label.Text = Catalog.GetString ("Stopped");
}
+
}
}
diff --git a/src/Core/Photo.cs b/src/Core/Photo.cs
index 0fdfd6b..9493bb5 100644
--- a/src/Core/Photo.cs
+++ b/src/Core/Photo.cs
@@ -359,6 +359,7 @@ namespace FSpot
using (Stream stream = System.IO.File.OpenWrite (version_path)) {
img.Save (buffer, stream);
}
+ (GetVersion (version) as PhotoVersion).MD5Sum = GenerateMD5 (VersionUri (version));
FSpot.ThumbnailGenerator.Create (version_path).Dispose ();
DefaultVersionId = version;
} catch (System.Exception e) {
@@ -446,18 +447,7 @@ namespace FSpot
XferOverwriteMode.Abort,
delegate (Gnome.Vfs.XferProgressInfo info) {return 1;});
- // Mono.Unix.Native.Stat stat;
- // int stat_err = Mono.Unix.Native.Syscall.stat (original_path, out stat);
- // File.Copy (original_path, new_path);
FSpot.ThumbnailGenerator.Create (new_uri).Dispose ();
- //
- // if (stat_err == 0)
- // try {
- // Mono.Unix.Native.Syscall.chown(new_path, Mono.Unix.Native.Syscall.getuid (), stat.st_gid);
- // } catch (Exception) {}
- //
- } else {
- md5_sum = Photo.GenerateMD5 (new_uri);
}
highest_version_id ++;
--
1.6.0.2
++++++ prefdialog.patch ++++++
From c8915bc9b92aa56a71117fe9fe41421c546865b3 Mon Sep 17 00:00:00 2001
From: sdelcroix
Date: Tue, 18 Nov 2008 20:14:14 +0000
Subject: [PATCH] 2008-11-18 Stephane Delcroix
* src/UI.Dialog/PreferenceDialog.cs: handle the case where the
screensaver_tag from gconf no longer exists. Fix bgo #560265.
git-svn-id: svn+ssh://svn.gnome.org/svn/f-spot/branches/FSPOT_0_5_0_STABLE@4599 772769d8-d925-0410-89eb-a6ffa0d40526
---
ChangeLog | 5 +++++
src/TagStore.cs | 1 -
src/UI.Dialog/PreferenceDialog.cs | 11 +++--------
3 files changed, 8 insertions(+), 9 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 951e9aa..1e62445 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2008-11-18 Stephane Delcroix
+
+ * src/UI.Dialog/PreferenceDialog.cs: handle the case where the
+ screensaver_tag from gconf no longer exists. Fix bgo #560265.
+
2008-11-06 Stephane Delcroix
* src/main.cs:
diff --git a/src/TagStore.cs b/src/TagStore.cs
index 8d570a5..b4e0e74 100644
--- a/src/TagStore.cs
+++ b/src/TagStore.cs
@@ -129,7 +129,6 @@ public class TagStore : DbStore {
foreach (Tag t in this.item_cache.Values)
if (t.Id == id)
return t;
-
return null;
}
diff --git a/src/UI.Dialog/PreferenceDialog.cs b/src/UI.Dialog/PreferenceDialog.cs
index a83056f..c1857b8 100644
--- a/src/UI.Dialog/PreferenceDialog.cs
+++ b/src/UI.Dialog/PreferenceDialog.cs
@@ -327,18 +327,13 @@ case Preferences.COLOR_MANAGEMENT_ENABLED:
use_x_profile_check.Active = active;
break;
case Preferences.SCREENSAVER_TAG:
- try {
- screensaver_tag = Preferences.Get<int> (key);
- } catch (System.Exception e) {
- Console.WriteLine (e);
- screensaver_tag = 0;
- }
- if (screensaver_tag == 0) {
+ screensaver_tag = Preferences.Get<int> (key);
+ Tag t = MainWindow.Toplevel.Database.Tags.GetTagById (screensaver_tag);
+ if (screensaver_tag == 0 || t == null) {
screensaverall_radio.Active = true;
tag_button.Sensitive = false;
} else {
screensavertagged_radio.Active = true;
- Tag t = MainWindow.Toplevel.Database.Tags.GetTagById (screensaver_tag);
tag_button.Label = t.Name;
}
break;
--
1.6.0.2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org