Index: src/f-spot.glade
===================================================================
--- src/f-spot.glade	(revision 3105)
+++ src/f-spot.glade	(working copy)
@@ -9045,6 +9045,45 @@
 		  </child>
 
 		  <child>
+		    <widget class="GtkMenuItem" id="rolls_submenu">
+ 		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Import Rolls</property>
+	              <property name="use_underline">True</property>
+
+	              <child>
+		        <widget class="GtkMenu" id="find_menu">
+		          <child>
+		            <widget class="GtkMenuItem" id="last_roll">
+		              <property name="visible">True</property>
+		              <property name="label" translatable="yes">Last import roll</property>
+		              <property name="use_underline">True</property>
+		              <signal name="activate" handler="HandleSelectLastRoll"/>
+		            </widget>
+		          </child>
+
+		          <child>
+		            <widget class="GtkMenuItem" id="select_rolls">
+		              <property name="visible">True</property>
+		              <property name="label" translatable="yes">Select import rolls...</property>
+		              <property name="use_underline">True</property>
+		              <signal name="activate" handler="HandleSelectRolls"/>
+		            </widget>
+		          </child>
+
+		          <child>
+		            <widget class="GtkMenuItem" id="clear_roll_filter">
+		              <property name="visible">True</property>
+		              <property name="label" translatable="yes">Clear roll filter</property>
+		              <property name="use_underline">True</property>
+		              <signal name="activate" handler="HandleClearRollFilter"/>
+		            </widget>
+		          </child>
+			</widget>
+		      </child>
+		    </widget>
+		  </child>
+
+		  <child>
 		    <widget class="GtkSeparatorMenuItem" id="separator15">
 		      <property name="visible">True</property>
 		    </widget>
@@ -14905,6 +14944,260 @@
   </child>
 </widget>
 
+<widget class="GtkDialog" id="last_import_rolls_filter">
+  <property name="visible">True</property>
+  <property name="title" translatable="yes">Filter on selected rolls</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">False</property>
+  <property name="resizable">True</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+  <property name="focus_on_map">True</property>
+  <property name="urgency_hint">False</property>
+  <property name="has_separator">True</property>
+
+  <child internal-child="vbox">
+    <widget class="GtkVBox" id="dialog-vbox1">
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">0</property>
+
+      <child internal-child="action_area">
+	<widget class="GtkHButtonBox" id="dialog-action_area1">
+	  <property name="visible">True</property>
+	  <property name="layout_style">GTK_BUTTONBOX_END</property>
+
+	  <child>
+	    <widget class="GtkButton" id="cancelbutton1">
+	      <property name="visible">True</property>
+	      <property name="tooltip" translatable="yes">Show all photos.</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-cancel</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">-6</property>
+	    </widget>
+	  </child>
+
+	  <child>
+	    <widget class="GtkButton" id="okbutton1">
+	      <property name="visible">True</property>
+	      <property name="tooltip" translatable="yes">Display only those photos that were imported in specified Rolls.</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-ok</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">-5</property>
+	    </widget>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">False</property>
+	  <property name="fill">True</property>
+	  <property name="pack_type">GTK_PACK_END</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkVBox" id="vbox1">
+	  <property name="width_request">450</property>
+	  <property name="visible">True</property>
+	  <property name="homogeneous">False</property>
+	  <property name="spacing">5</property>
+
+	  <child>
+	    <widget class="GtkLabel" id="label1">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">&lt;b&gt;View all pictures imported&lt;/b&gt;</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">True</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">False</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkHBox" id="hbox1">
+	      <property name="visible">True</property>
+	      <property name="homogeneous">False</property>
+	      <property name="spacing">4</property>
+
+	      <child>
+		<widget class="GtkComboBox" id="combo_filter">
+		  <property name="visible">True</property>
+		  <property name="items" translatable="yes" comments="at, or after a date, or between dates">at
+after
+between</property>
+		  <property name="add_tearoffs">False</property>
+		  <property name="focus_on_click">True</property>
+		  <signal name="changed" handler="HandleComboFilterChanged"/>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkComboBox" id="combo_roll_1">
+		  <property name="visible">True</property>
+		  <property name="items" translatable="yes"></property>
+		  <property name="add_tearoffs">False</property>
+		  <property name="focus_on_click">True</property>
+		  <signal name="changed" handler="HandleComboRollChanged"/>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">True</property>
+		  <property name="fill">True</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkLabel" id="and_label">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">and</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		  <property name="width_chars">-1</property>
+		  <property name="single_line_mode">False</property>
+		  <property name="angle">0</property>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkComboBox" id="combo_roll_2">
+		  <property name="visible">True</property>
+		  <property name="items" translatable="yes"></property>
+		  <property name="add_tearoffs">False</property>
+		  <property name="focus_on_click">True</property>
+		  <signal name="changed" handler="HandleComboRollChanged"/>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">True</property>
+		  <property name="fill">True</property>
+		</packing>
+	      </child>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkHBox" id="hbox85">
+	      <property name="visible">True</property>
+	      <property name="homogeneous">False</property>
+	      <property name="spacing">0</property>
+
+	      <child>
+		<widget class="GtkLabel" id="label210">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">Number of photos in selected rolls :</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		  <property name="width_chars">-1</property>
+		  <property name="single_line_mode">False</property>
+		  <property name="angle">0</property>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkLabel" id="photos_in_selected_rolls">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes"></property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">3</property>
+		  <property name="ypad">0</property>
+		  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		  <property name="width_chars">-1</property>
+		  <property name="single_line_mode">False</property>
+		  <property name="angle">0</property>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+	    </widget>
+	    <packing>
+	      <property name="padding">5</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">3</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
+    </widget>
+  </child>
+</widget>
+
 <widget class="GtkDialog" id="mail_dialog">
   <property name="visible">True</property>
   <property name="title" translatable="yes">Create Mail</property>
Index: src/PhotoStore.cs
===================================================================
--- src/PhotoStore.cs	(revision 3105)
+++ src/PhotoStore.cs	(working copy)
@@ -208,6 +208,12 @@
 		}
 	}
 
+	private uint roll_id = 0;
+	public uint RollId {
+		get { return roll_id; }
+		set { roll_id = value; }
+	}
+
 	// Version management
 	public const int OriginalVersionId = 1;
 	private uint highest_version_id;
@@ -687,6 +693,7 @@
 			"       directory_path     STRING NOT NULL,		   " +
 			"       name               STRING NOT NULL,		   " +
 			"       description        TEXT NOT NULL,	           " +
+			"       roll_id            INTEGER NOT NULL,		   " +
 			"       default_version_id INTEGER NOT NULL		   " +
 			")");
 
@@ -707,12 +714,13 @@
 	}
 
 
-	public Photo Create (string path, out Pixbuf thumbnail)
+	public Photo Create (string path, uint roll_id, out Pixbuf thumbnail)
 	{
-		return Create (path, path, out thumbnail);
+		return Create (path, path, roll_id, out thumbnail);
+
 	}
 
-	public Photo Create (string newPath, string origPath, out Pixbuf thumbnail)
+	public Photo Create (string newPath, string origPath, uint roll_id, out Pixbuf thumbnail)
 	{
 		Photo photo;
 		using (FSpot.ImageFile img = FSpot.ImageFile.Create (origPath)) {
@@ -720,13 +728,14 @@
 			string description = img.Description != null  ? img.Description.Split ('\0') [0] : String.Empty;
 	
 	 		uint id = (uint) Database.Execute (new DbCommand ("INSERT INTO photos (time, "	+
-					"directory_path, name, description, default_version_id) "	+
+					"directory_path, name, description, roll_id, default_version_id) "	+
 	 				"VALUES (:time, :directory_path, :name, :description, "		+
-					":default_version_id)",
+					":roll_id, :default_version_id)",
 	 				"time", unix_time,
 	 				"directory_path", System.IO.Path.GetDirectoryName (newPath),
 	 				"name", System.IO.Path.GetFileName (newPath),
 	 				"description", description,
+					"roll_id", roll_id,
 	 				"default_version_id", Photo.OriginalVersionId));
 	
 			photo = new Photo (id, unix_time, newPath);
@@ -887,7 +896,7 @@
 			return photo;
 
 		SqliteDataReader reader = Database.Query(new DbCommand("SELECT time, directory_path, name, description, "
-                                                     + "default_version_id FROM photos WHERE id = :id", "id", id));
+                                                     + "roll_id, default_version_id FROM photos WHERE id = :id", "id", id));
 
 		if (reader.Read ()) {
 			photo = new Photo (id,
@@ -896,7 +905,8 @@
 					   reader [2].ToString ());
 
 			photo.Description = reader[3].ToString ();
-			photo.DefaultVersionId = Convert.ToUInt32 (reader[4]);
+			photo.RollId = Convert.ToUInt32 (reader[4]);
+			photo.DefaultVersionId = Convert.ToUInt32 (reader[5]);
 			AddToCache (photo);
 		}
 		reader.Close();
@@ -920,7 +930,7 @@
 		string directory_path = System.IO.Path.GetDirectoryName (path);
 		string filename = System.IO.Path.GetFileName (path);
 
-		SqliteDataReader reader = Database.Query(new DbCommand("SELECT id, time, description, default_version_id FROM photos "
+		SqliteDataReader reader = Database.Query(new DbCommand("SELECT id, time, description, roll_id, default_version_id FROM photos "
                 + "WHERE directory_path = :directory_path AND name = :name", "directory_path", directory_path, "name", filename));
 
 		if (reader.Read ()) {
@@ -930,7 +940,8 @@
 					   filename);
 
 			photo.Description = reader[2].ToString ();
-			photo.DefaultVersionId = Convert.ToUInt32 (reader[3]);
+			photo.RollId = Convert.ToUInt32 (reader[3]);
+			photo.DefaultVersionId = Convert.ToUInt32 (reader[4]);
 			AddToCache (photo);
 		}
         reader.Close();
@@ -1065,20 +1076,43 @@
 		}
 	}
 
+
 	// Queries.
+
+	[Obsolete ("drop this, use IQueryCondition correctly instead")]
+	private string AddLastImportFilter (RollSet roll_set, bool added_where)
+	{
+		if (roll_set == null)
+			return null;
+
+		return  String.Format (" {0}{1}", added_where ? " AND " : " WHERE ", roll_set.SqlClause () );
+	}
+
+	
+	
+	public Photo [] Query (Tag [] tags, DateTime start, DateTime end, Roll [] rolls)
+	{
+		return Query (tags, null, new DateRange (start, end), new RollSet (rolls));
+	}
+
+	public Photo [] Query (Tag [] tags, Roll [] rolls)
+	{
+		return Query (tags, null, null, rolls == null ? null : new RollSet (rolls));
+	}
+
 	public Photo [] Query (Tag [] tags, DateTime start, DateTime end)
 	{
-		return Query (tags, null, new DateRange (start, end));
+		return Query (tags, null, new DateRange (start, end), null);
 	}
 	
 	public Photo [] Query (Tag [] tags) {
-		return Query (tags, null, null);
+		return Query (tags, null, null, null);
 	}
 
 	public Photo [] Query (string query)
 	{
 		SqliteDataReader reader = Database.Query(query);
-		
+
 		ArrayList version_list = new ArrayList ();
 		ArrayList id_list = new ArrayList ();
 		while (reader.Read ()) {
@@ -1092,7 +1126,8 @@
 						   reader [3].ToString ());
 				
 				photo.Description = reader[4].ToString ();
-				photo.DefaultVersionId = Convert.ToUInt32 (reader[5]);		 
+				photo.RollId = Convert.ToUInt32 (reader[5]);
+				photo.DefaultVersionId = Convert.ToUInt32 (reader[6]);
 				
 				version_list.Add (photo);
 			}
@@ -1127,6 +1162,7 @@
 						     "       photos.directory_path,              " +
 						     "       photos.name,                        " +
 						     "       photos.description,                 " +
+						     "       photos.roll_id,                     " +
 						     "       photos.default_version_id           " +
 						     "     FROM photos                           " +
 						     "     WHERE directory_path = \"{0}\"", dir.FullName);
@@ -1134,30 +1170,37 @@
 		return Query (query_string);
 	}
 
-	public Photo [] QueryUntagged (DateRange range)
+	public Photo [] QueryUntagged (DateRange range, RollSet importidrange)
 	{
 		StringBuilder query_builder = new StringBuilder ();
 
 		query_builder.Append ("SELECT * FROM photos WHERE id NOT IN " +
 					"(SELECT DISTINCT photo_id FROM photo_tags) ");
 		
+		bool added_where = true;
 		if (range != null) {
 			query_builder.Append (String.Format ("AND photos.time >= {0} AND photos.time <= {1} ",
 							     DbUtils.UnixTimeFromDateTime (range.Start), 
 							     DbUtils.UnixTimeFromDateTime (range.End)));
+			added_where = true;
 		}
 
+		if (importidrange != null) {
+			query_builder.Append (AddLastImportFilter (importidrange, added_where));
+			added_where = true;
+ 		}
+
 		query_builder.Append("ORDER BY time");
 
 		return Query (query_builder.ToString ());
 	}
 
-	public Photo [] Query (Tag [] tags, string extra_condition, DateRange range)
+	public Photo [] Query (Tag [] tags, string extra_condition, DateRange range, RollSet importidrange)
 	{
-		return Query (OrTerm.FromTags(tags), extra_condition, range);
+		return Query (OrTerm.FromTags(tags), extra_condition, range, importidrange);
 	}
 
-	public Photo [] Query (Term searchexpression, string extra_condition, DateRange range)
+	public Photo [] Query (Term searchexpression, string extra_condition, DateRange range, RollSet importidrange)
 	{
 		bool hide = (extra_condition == null);
 
@@ -1168,6 +1211,7 @@
 		//        photos.directory_path,
 		//        photos.name,
 		//        photos.description,
+		//	  photos.roll_id,
 		//        photos.default_version_id
 		//                  FROM photos, photo_tags
 		//                  WHERE photos.id = photo_tags.photo_id
@@ -1175,6 +1219,8 @@
 		//			            OR photo_tags.tag_id = cat1tag2 ) 
 		// 		                AND (photo_tags.tag_id = cat2tag1
 		//			            OR photo_tags.tag_id = cat2tag2 )
+		//			  	AND (photos.roll_id = roll_id1
+		//			   	    OR photos.roll_id = roll_id2 ...)
 		//                  GROUP BY photos.id
 		
 		StringBuilder query_builder = new StringBuilder ();
@@ -1183,6 +1229,7 @@
 					     "photos.directory_path, " 		+
 					     "photos.name, "			+
 					     "photos.description, "		+
+				      	     "photos.roll_id, "   		+
 					     "photos.default_version_id "	+
 				      "FROM photos ");
 		
@@ -1194,6 +1241,11 @@
 							     DbUtils.UnixTimeFromDateTime (range.End)));
 			where_statement_added = true;
 		}
+
+		if (importidrange != null) {
+			query_builder.Append (AddLastImportFilter (importidrange, where_statement_added));
+			where_statement_added = true;
+		}		
 		
 		if (hide && tag_store.Hidden != null) {
 			query_builder.Append (String.Format ("{0} photos.id NOT IN (SELECT photo_id FROM photo_tags WHERE tag_id = {1}) ", 
@@ -1290,14 +1342,14 @@
 
 		Pixbuf unused_thumbnail;
 
-		Photo ny_landscape = db.Photos.Create (DateTime.Now.ToUniversalTime (), "/home/ettore/Photos/ny_landscape.jpg",
+		Photo ny_landscape = db.Photos.Create (DateTime.Now.ToUniversalTime (), 1, "/home/ettore/Photos/ny_landscape.jpg",
 						       out unused_thumbnail);
 		ny_landscape.Description = "Pretty NY skyline";
 		ny_landscape.AddTag (landscapes_tag);
 		ny_landscape.AddTag (favorites_tag);
 		db.Photos.Commit (ny_landscape);
 
-		Photo me_in_sf = db.Photos.Create (DateTime.Now.ToUniversalTime (), "/home/ettore/Photos/me_in_sf.jpg",
+		Photo me_in_sf = db.Photos.Create (DateTime.Now.ToUniversalTime (), 2, "/home/ettore/Photos/me_in_sf.jpg",
 						   out unused_thumbnail);
 		me_in_sf.AddTag (landscapes_tag);
 		me_in_sf.AddTag (portraits_tag);
@@ -1310,7 +1362,7 @@
 		me_in_sf.CreateVersion ("UM-ed", Photo.OriginalVersionId);
 		db.Photos.Commit (me_in_sf);
 
-		Photo macro_shot = db.Photos.Create (DateTime.Now.ToUniversalTime (), "/home/ettore/Photos/macro_shot.jpg",
+		Photo macro_shot = db.Photos.Create (DateTime.Now.ToUniversalTime (), 2, "/home/ettore/Photos/macro_shot.jpg",
 						     out unused_thumbnail);
 		db.Dispose ();
 
Index: src/TimeAdaptor.cs
===================================================================
--- src/TimeAdaptor.cs	(revision 3105)
+++ src/TimeAdaptor.cs	(working copy)
@@ -222,7 +222,7 @@
 		{
 			years.Clear ();
 
-			Photo [] photos = query.Store.Query ((Tag [])null, null, null);
+			Photo [] photos = query.Store.Query ((Tag [])null, null, null, null);
 			Array.Sort (query.Photos);
 			Array.Sort (photos);
 
Index: src/FileImportBackend.cs
===================================================================
--- src/FileImportBackend.cs	(revision 3105)
+++ src/FileImportBackend.cs	(working copy)
@@ -16,6 +16,7 @@
 
 public class FileImportBackend : ImportBackend {
 	PhotoStore store;
+ 	RollStore rolls = FSpot.Core.Database.Rolls;
 	TagStore tag_store = FSpot.Core.Database.Tags;
 	bool recurse;
 	bool copy;
@@ -121,6 +122,8 @@
 		directories = new Stack ();
 		xmptags = new XmpTagsImporter (store, tag_store);
 
+		roll = rolls.Create ();
+
 		return import_info.Count;
 	}
 
@@ -216,12 +219,12 @@
 			// Don't copy if we are already home
 			if (info.OriginalPath == destination) {
 				info.DestinationPath = destination;
-				photo = store.Create (info.DestinationPath, out thumbnail);
+				photo = store.Create (info.DestinationPath, roll.Id, out thumbnail);
 			} else {
 				System.IO.File.Copy (info.OriginalPath, destination);
 				info.DestinationPath = destination;
 
-				photo = store.Create (info.DestinationPath, info.OriginalPath, out thumbnail);
+				photo = store.Create (info.DestinationPath, info.OriginalPath, roll.Id, out thumbnail);
 
 				try {
 					File.SetAttributes (destination, File.GetAttributes (info.DestinationPath) & ~FileAttributes.ReadOnly);
@@ -309,6 +312,8 @@
 		}
 		// Clean up just created tags
 		xmptags.Cancel();
+
+		rolls.Remove (roll);
 	}
 
 	public override void Finish ()
@@ -324,6 +329,7 @@
 		import_info = null;
 		xmptags.Finish();
 		count = 0;
+	//rolls.EndImport();    // Clean up the imported session.
 	}
 
 	public FileImportBackend (PhotoStore store, string [] base_paths, bool recurse, Gtk.Window parent) : this (store, base_paths, false, recurse, null, parent) {}
@@ -352,7 +358,7 @@
 
 		Db db = new Db (path, true);
 
-		FileImportBackend import = new FileImportBackend (db.Photos, args [0],true);
+		FileImportBackend import = new FileImportBackend (db.Photos, args [0],true, this);
 
 		Console.WriteLine ("Preparing...");
 
Index: src/QueryWidget.cs
===================================================================
--- src/QueryWidget.cs	(revision 3105)
+++ src/QueryWidget.cs	(working copy)
@@ -7,6 +7,8 @@
 		LogicWidget logic_widget;
 		Gtk.Label label;
 		Gtk.Label untagged;
+		Gtk.Label comma_label;
+		Gtk.Label rollfilter;
 		Gtk.HBox warning_box;
 		Gtk.Button clear_button;
 		Gtk.Tooltips tips = new Gtk.Tooltips ();
@@ -40,7 +42,15 @@
 			untagged = new Gtk.Label (Catalog.GetString ("Untagged photos"));
 			untagged.Visible = false;
 			hbox.PackStart (untagged, false, false, 0);
-			
+
+			comma_label = new Gtk.Label (", ");
+			comma_label.Visible = false;
+			hbox.PackStart (comma_label, false, false, 0);
+
+			rollfilter = new Gtk.Label (Catalog.GetString ("Import roll"));	
+			rollfilter.Visible = false;
+			hbox.PackStart (rollfilter, false, false, 0);
+
 			logic_widget = new LogicWidget (query, db.Tags, selector);
 			logic_widget.Show ();
 			hbox.PackStart (logic_widget, true, true, 0);
@@ -78,6 +88,7 @@
 		public void Close ()
 		{
 			query.Untagged = false;
+			query.RollSet = null;
 
 			if (query.Untagged)
 				return;
@@ -103,7 +114,7 @@
 			if (query.ExtraCondition == null)
 				logic_widget.Clear = true;
 
-			if (!logic_widget.Clear || query.Untagged) {
+			if (!logic_widget.Clear || query.Untagged || (query.RollSet != null)) {
                 ShowBar ();
 			} else {
 				HideBar ();
@@ -111,6 +122,9 @@
 
 			untagged.Visible = query.Untagged;
 			warning_box.Visible = (query.Count < 1);
+			comma_label.Visible = query.Untagged && (query.RollSet != null);
+			rollfilter.Visible = (query.RollSet != null);
+
 		}
 
 		public void PhotoTagsChanged (Tag[] tags)
Index: src/RollSet.cs
===================================================================
--- src/RollSet.cs	(revision 0)
+++ src/RollSet.cs	(revision 0)
@@ -0,0 +1,39 @@
+/*
+ * RollSet.cs
+ *
+ * Author(s):
+ * 	Bengt Thuree
+ * 	Stephane Delcroix  <stephane@delcroix.org>
+ *
+ * This is frees software. See COPYING for details.
+ */
+
+namespace FSpot {
+	public class RollSet : IQueryCondition
+	{
+		private Roll [] rolls;
+
+		public RollSet (Roll [] rolls)
+		{
+			this.rolls = rolls;
+		}
+
+		public RollSet (Roll roll) : this (new Roll[] {roll})
+		{
+		}
+
+		public string SqlClause ()
+		{
+			//Building something like " photos.roll_id IN (3, 4, 7) " 
+			System.Text.StringBuilder sb = new System.Text.StringBuilder (" photos.roll_id IN (");
+			for (int i = 0; i < rolls.Length; i++) {
+				sb.Append (rolls [i].Id);
+				if (i != rolls.Length - 1)
+					sb.Append (", ");
+			}
+			sb.Append (") ");
+	System.Console.WriteLine (sb.ToString ());
+			return sb.ToString ();	
+		}
+	}
+}
Index: src/Db.cs
===================================================================
--- src/Db.cs	(revision 3105)
+++ src/Db.cs	(working copy)
@@ -162,8 +162,8 @@
 
 	TagStore tag_store;
 	PhotoStore photo_store;
- 	ImportStore import_store;
-    ExportStore export_store;
+ 	RollStore roll_store;
+	ExportStore export_store;
  	MetaStore meta_store;
 	bool empty;
 	string path;
@@ -172,8 +172,8 @@
 		get { return tag_store; }
 	}
 
-	public ImportStore Imports {
-		get { return import_store; }
+	public RollStore Rolls {
+		get { return roll_store; }
 	}
 
     public ExportStore Exports {
@@ -241,7 +241,7 @@
 		Database.BeginTransaction ();
 
 		tag_store = new TagStore (Database, new_db);
-		import_store = new ImportStore (Database, new_db);
+		roll_store = new RollStore (Database, new_db);
 		export_store = new ExportStore (Database, new_db);
  		photo_store = new PhotoStore (Database, new_db, tag_store);
 		
Index: src/Updater.cs
===================================================================
--- src/Updater.cs	(revision 3105)
+++ src/Updater.cs	(working copy)
@@ -81,9 +81,40 @@
 			//Version 4.0, bump the version number to a integer, for backward compatibility
 			AddUpdate (new Version (4, 0), delegate () {});
 
-//TODO: please consider fixing bgo 324425 on the next update of the db.
-			// Update to version 5.0
-			//AddUpdate (new Version (5,0),delegate () {
+
+			//Version 5.0, add a roll_id field to photos, rename table 'imports' to 'rolls' 
+			//and fix bgo 324425.
+			AddUpdate (new Version (5, 0), delegate () {
+				System.Console.WriteLine ("Will add a roll_id field to photos!");
+				string tmp_photos = MoveTableToTemp ("photos");
+				ExecuteNonQuery (
+					"CREATE TABLE photos (                                     " +
+					"	id                 INTEGER PRIMARY KEY NOT NULL,   " +
+					"       time               INTEGER NOT NULL,	   	   " +
+					"       directory_path     STRING NOT NULL,		   " +
+					"       name               STRING NOT NULL,		   " +
+					"       description        TEXT NOT NULL,	           " +
+					"       roll_id            INTEGER NOT NULL,		   " +
+					"       default_version_id INTEGER NOT NULL		   " +
+					")");
+				ExecuteScalar (String.Format("INSERT INTO photos SELECT id, time, directory_path, name, description, 0, default_version_id FROM {0}", tmp_photos));
+
+				System.Console.WriteLine ("Will rename imports to rolls!");
+				string tmp_rolls = MoveTableToTemp ("imports");
+				ExecuteNonQuery (
+					"CREATE TABLE rolls (                                     " +
+					"	id                 INTEGER PRIMARY KEY NOT NULL,   " +
+					"       time               INTEGER NOT NULL	   	   " +
+					")");
+				ExecuteScalar (String.Format("INSERT INTO rolls SELECT id, time FROM {0}", tmp_rolls));
+
+				System.Console.WriteLine ("Cleaning weird descriptions, fixes bug #324425.");
+				ExecuteNonQuery ("UPDATE photos SET description = \"\" WHERE description LIKE \"Invalid size of entry%\"");
+			});				
+
+
+			// Update to version 6.0
+			//AddUpdate (new Version (6,0),delegate () {
 			//	do update here
 			//});
 
Index: src/LastRollDialog.cs
===================================================================
--- src/LastRollDialog.cs	(revision 0)
+++ src/LastRollDialog.cs	(revision 0)
@@ -0,0 +1,128 @@
+/*
+ * LastRollDialog.cs:
+ *
+ * Author(s):
+ * 	Bengt Thuree (bengt@thuree.com)
+ *	Stephane Delcroix  <stephane@delcroix.org>
+ *
+ * This is free software. See COPYING for details.
+ */
+
+
+using System;
+using Gtk;
+using Gnome;
+
+namespace FSpot {
+	public class LastRolls : FSpot.GladeDialog {
+		FSpot.PhotoQuery query;
+		RollStore rollstore;
+		Gtk.Window parent_window;
+		
+		Roll [] rolls;
+
+		[Glade.Widget] private ComboBox combo_filter; // at, after, or between
+		[Glade.Widget] private ComboBox combo_roll_1;
+		[Glade.Widget] private ComboBox combo_roll_2;
+		[Glade.Widget] private Label    and_label; // and label between two comboboxes.
+		[Glade.Widget] private Label    photos_in_selected_rolls; 
+		
+		public LastRolls (FSpot.PhotoQuery query, RollStore rollstore, Gtk.Window parent_window) : base ("last_import_rolls_filter") 
+		{
+			this.query = query;
+			this.rollstore = rollstore;
+			this.parent_window = parent_window;
+			rolls = rollstore.GetRolls ((int) FSpot.Preferences.Get (FSpot.Preferences.IMPORT_GUI_ROLL_HISTORY, 10));
+
+			PopulateCombos ();
+			
+			combo_filter.Active = 0;
+			combo_roll_1.Active = 0;
+			combo_roll_2.Active = 0;
+			
+			Dialog.DefaultResponse = ResponseType.Ok;
+			Dialog.Response += HandleResponse;
+			Dialog.Show ();
+		}
+
+		[GLib.ConnectBefore]
+		protected void HandleResponse (object o, Gtk.ResponseArgs args)
+		{
+			if (args.ResponseId == ResponseType.Ok) {
+				Roll [] selected_rolls = SelectedRolls ();
+				
+				if (selected_rolls.Length > 0 )
+					query.RollSet = new FSpot.RollSet (selected_rolls);
+			}
+			Dialog.Destroy ();
+		}
+		
+		void HandleComboFilterChanged (object o, EventArgs args)
+		{
+			combo_roll_2.Visible = (combo_filter.Active == 2);
+			and_label.Visible = combo_roll_2.Visible;
+
+			UpdateNumberOfPhotos ();
+		}
+
+		void HandleComboRollChanged (object o, EventArgs args)
+		{
+			UpdateNumberOfPhotos ();
+		}
+
+		private void UpdateNumberOfPhotos()
+		{
+			Roll [] selected_rolls = SelectedRolls ();
+			uint sum = 0;
+			if (selected_rolls != null)
+				foreach (Roll roll in selected_rolls) 
+					sum = sum + rollstore.PhotosInRoll (roll);
+			photos_in_selected_rolls.Text = sum.ToString();
+		}
+		
+		private void PopulateCombos ()
+		{
+			for (uint k = 0; k < rolls.Length; k++)
+			{
+				uint numphotos = rollstore.PhotosInRoll (rolls [k]);
+				DateTime date = rolls [k].Time.ToLocalTime ();
+				
+				string header = String.Format ("{0} ({1})",
+					date.ToString("%dd %MMM, %HH:%mm"),
+					numphotos);		
+					
+				combo_roll_1.AppendText (header);
+				combo_roll_2.AppendText (header);
+			}					
+		}
+		
+		private Roll [] SelectedRolls ()
+		{
+			if ((combo_roll_1.Active < 0) || ((combo_filter.Active == 2) && (combo_roll_2.Active < 0)))
+				return null;
+				
+			System.Collections.ArrayList result = new System.Collections.ArrayList ();
+
+			switch (combo_filter.Active) {
+			case 0 : // at - Return the roll the user selected
+				result.Add (rolls [combo_roll_1.Active]);
+				break;
+			case 1 : // after - Return all rolls from latest to the one the user selected
+				for (uint k = 0; k <= combo_roll_1.Active; k++)
+					result.Add (rolls [k]);
+				break;
+			case 2 : // between - Return all rolls between the two import rolls the user selected
+				uint k1 = (uint) combo_roll_1.Active;
+				uint k2 = (uint) combo_roll_2.Active;
+				if (k1 > k2) {
+					k1 = (uint) combo_roll_2.Active;
+					k2 = (uint) combo_roll_1.Active;
+				}
+				for (uint k = k1; k <= k2; k++)
+					result.Add (rolls[k]);
+				break;
+			}
+			return (Roll []) result.ToArray (typeof(Roll));
+		}
+	}
+}
Index: src/PhotoQuery.cs
===================================================================
--- src/PhotoQuery.cs	(revision 3105)
+++ src/PhotoQuery.cs	(working copy)
@@ -11,12 +11,13 @@
 		private Tag [] tags;
 		private string extra_condition;
 		private PhotoStore.DateRange range = null;
+		private RollSet roll_set = null;
 		
 		// Constructor
 		public PhotoQuery (PhotoStore store)
 		{
 			this.store = store;
-			photos = store.Query ((Tag [])null, null, range);
+			photos = store.Query ((Tag [])null, null, range, roll_set);
 		}
 
 		public int Count {
@@ -116,12 +117,23 @@
 			}
 		}
 
+		public RollSet RollSet {
+			get { return roll_set; }
+			set {
+				if (value == roll_set)
+					return;
+
+				roll_set = value;	
+ 				RequestReload ();
+ 			}
+		}
+
 		public void RequestReload ()
 		{
 			if (untagged)
-				photos = store.QueryUntagged (range);
+				photos = store.QueryUntagged (range, roll_set);
 			else
-				photos = store.Query (terms, extra_condition, range);
+				photos = store.Query (terms, extra_condition, range, roll_set);
 
 			if (Changed != null)
 				Changed (this);
Index: src/ImportStore.cs
===================================================================
--- src/ImportStore.cs	(revision 3105)
+++ src/ImportStore.cs	(working copy)
@@ -1,3 +1,14 @@
+/*
+ * RollStore.cs
+ *
+ * Author(s)
+ *	Ettore Perazzoli <ettore@perazzoli.org>
+ *	Bengt Thuree
+ *	Stephane Delcroix <stephane@delcroix.org>
+ *
+ * This is free software. See COPYING for details.
+ */
+
 using Mono.Data.SqliteClient;
 using System.Collections;
 using System.IO;
@@ -4,112 +15,115 @@
 using System;
 using Banshee.Database;
 
-
-public class ImportStore : DbStore {
-
-	public class Import : DbItem {
-		// The time is always in UTC.
-		private DateTime time;
-		public DateTime Time {
-			get {
-				return time;
-			}
-		}
-
-		public Import (uint id, long unix_time)
-			: base (id)
-		{
-			time = DbUtils.DateTimeFromUnixTime (unix_time);
-		}
+public class Roll : DbItem
+{
+	// The time is always in UTC.
+	private DateTime time;
+	public DateTime Time {
+		get { return time; }
 	}
 
-	private class ImportComparerByDate : IComparer {
-		public int Compare (Object a, Object b) {
-			return DateTime.Compare ((a as Import).Time, (b as Import).Time);
-		}
+	public Roll (uint id, long unix_time) : base (id)
+	{
+		time = DbUtils.DateTimeFromUnixTime (unix_time);
 	}
+}
 
-	// Constructor
-
-	public ImportStore (QueuedSqliteDatabase database, bool is_new)
-		: base (database, false)
+public class RollStore : DbStore
+{
+	public RollStore (QueuedSqliteDatabase database, bool is_new) : base (database, false)
 	{
-		if (! is_new)
+		if (!is_new && Database.TableExists("rolls"))
 			return;
-		
+
 		Database.ExecuteNonQuery (
-			"CREATE TABLE imports (                            " +
+			"CREATE TABLE rolls (                            " +
 			"	id          INTEGER PRIMARY KEY NOT NULL,  " +
-			"       time        INTEGER			   " +
+			"       time        INTEGER NOT NULL		   " +
 			")");
-
 	}
 
-	public Import Create (DateTime time_in_utc)
+	public Roll Create (DateTime time_in_utc)
 	{
 		long unix_time = DbUtils.UnixTimeFromDateTime (time_in_utc);
+		uint id = (uint) Database.Execute (new DbCommand ("INSERT INTO rolls (time) VALUES (:time)", "time", unix_time));
 
-		uint id = (uint)Database.Execute (new DbCommand ("INSERT INTO import (time) VALUES (:time)", "time", unix_time));
+		Roll roll = new Roll (id, unix_time);
+		AddToCache (roll);
 
-		Import import = new Import (id, unix_time);
-		AddToCache (import);
+		return roll;
+	}
 
-		return import;
+	public Roll Create ()
+	{
+		return Create (System.DateTime.UtcNow);
 	}
 
 	public override DbItem Get (uint id)
 	{
-		Import import = LookupInCache (id) as Import;
-		if (import != null)
-			return import;
+		Roll roll = LookupInCache (id) as Roll;
+		if (roll != null)
+			return roll;
 
-		
-		SqliteDataReader reader = Database.Query(new DbCommand ("SELECT time FROM imports WHERE id = :id", "id", id));
+		SqliteDataReader reader = Database.Query(new DbCommand ("SELECT time FROM rolls WHERE id = :id", "id", id));
 
 		if (reader.Read ()) {
-			import = new Import (id, Convert.ToUInt32 (reader [0]));
-			AddToCache (import);
+			roll = new Roll (id, Convert.ToUInt32 (reader [0]));
+			AddToCache (roll);
 		}
 
-		return import;
+		return roll;
 	}
 
 	public override void Remove (DbItem item)
 	{
 		RemoveFromCache (item);
-
-		Database.ExecuteNonQuery (new DbCommand ("DELETE FROM imports WHERE id = :id", "id", item.Id));
+		Database.ExecuteNonQuery (new DbCommand ("DELETE FROM rolls WHERE id = :id", "id", item.Id));
 	}
 
 	public override void Commit (DbItem item)
 	{
-		// Nothing to do here, since all the properties of an import are immutable.
+		// Nothing to do here, since all the properties of a roll are immutable.
 	}
 
-	// FIXME: Maybe this should be an abstract method in the base class?
-	public ArrayList GetAll ()
+	public uint PhotosInRoll (Roll roll)
 	{
+		uint number_of_photos = 0;
+		using (SqliteDataReader reader = Database.Query (new DbCommand ("SELECT count(*) FROM photos WHERE roll_id = :id", "id", roll.Id))) {
+			if (reader.Read ())
+				number_of_photos = Convert.ToUInt32 (reader [0]);
+               
+			reader.Close ();
+		}
+                return number_of_photos;
+	}
+
+	public Roll [] GetRolls ()
+	{
+		return GetRolls (-1);
+	}
+
+	public Roll [] GetRolls (int limit)
+	{
 		ArrayList list = new ArrayList ();
 
-		SqliteDataReader reader = Database.Query("SELECT id, time FROM imports"); 
+		string query = "SELECT DISTINCT rolls.id, rolls.time FROM rolls, photos WHERE photos.roll_id = rolls.id";
+		if (limit <= 0)
+			query += " LIMIT " + limit + " ORDER BY time DESC";
 
-		while (reader.Read ()) {
-			// Note that we get both time and ID from the database, but we have to see
-			// if the item is already in the cache first to make sure we return always
-			// the same object for a given ID.
-			
-			uint id = Convert.ToUInt32 (reader[0]);
+		using (SqliteDataReader reader = Database.Query(query)) {
+			while (reader.Read ()) {
+				uint id = Convert.ToUInt32 (reader[0]);
 
-			Import import = LookupInCache (id) as Import;
-			if (import == null) {
-				import = new Import (id, Convert.ToUInt32 (reader[1]));
-				AddToCache (import);
+				Roll roll = LookupInCache (id) as Roll;
+				if (roll == null) {
+					roll = new Roll (id, Convert.ToUInt32 (reader[1]));
+					AddToCache (roll);
+				}
+				list.Add (roll);
 			}
-
-			list.Add (import);
+			reader.Close ();
 		}
-
-		list.Sort (new ImportComparerByDate ());
-		return list;
+		return (Roll []) list.ToArray (typeof (Roll));
 	}
 }
Index: src/Makefile.am
===================================================================
--- src/Makefile.am	(revision 3105)
+++ src/Makefile.am	(working copy)
@@ -118,10 +118,11 @@
 	$(srcdir)/InfoOverlay.cs		\
 	$(srcdir)/InternalProcess.cs		\
 	$(srcdir)/IOChannel.cs			\
+	$(srcdir)/IQueryCondition.cs		\
 	$(srcdir)/ItemAction.cs			\
 	$(srcdir)/Imaging/DCRawFile.cs		\
 	$(srcdir)/Imaging/Bim.cs		\
-	$(srcdir)/Imaging/Ciff.cs			\
+	$(srcdir)/Imaging/Ciff.cs		\
 	$(srcdir)/Imaging/Exif.cs		\
 	$(srcdir)/Imaging/ImageFile.cs		\
 	$(srcdir)/Imaging/IptcFile.cs		\
@@ -137,6 +138,7 @@
 	$(srcdir)/Imaging/X3fFile.cs		\
 	$(srcdir)/Imaging/XmpFile.cs		\
 	$(srcdir)/Imaging/Tiff.cs		\
+	$(srcdir)/LastRollDialog.cs		\
 	$(srcdir)/Loupe.cs			\
 	$(srcdir)/MainWindow.cs			\
 	$(srcdir)/MetaStore.cs			\
@@ -165,6 +167,7 @@
 	$(srcdir)/QueuedSqliteDatabase.cs	\
 	$(srcdir)/RepairDialog.cs		\
 	$(srcdir)/RotateCommand.cs		\
+	$(srcdir)/RollSet.cs			\
 	$(srcdir)/ScalingIconView.cs		\
 	$(srcdir)/SendEmail.cs                  \
 	$(srcdir)/SlideView.cs			\
Index: src/ImportBackend.cs
===================================================================
--- src/ImportBackend.cs	(revision 3105)
+++ src/ImportBackend.cs	(working copy)
@@ -13,4 +13,7 @@
 
 	// Complete importing (needs to be called).
 	public abstract void Finish ();
+
+	// The import roll. Should be set at Prepare () and removed at Cancel ()
+	protected Roll roll;
 }
Index: src/Preferences.cs
===================================================================
--- src/Preferences.cs	(revision 3105)
+++ src/Preferences.cs	(working copy)
@@ -103,6 +103,8 @@
  		public const string EXPORT_EMAIL_ROTATE = "/apps/f-spot/export/email/auto_rotate";
  		public const string EXPORT_EMAIL_DELETE_TIMEOUT_SEC = "/apps/f-spot/export/email/delete_timeout_seconds";
 
+		public const string IMPORT_GUI_ROLL_HISTORY = "/apps/f-spot/import/gui_roll_history";
+
 		public const string SCREENSAVER_TAG = "/apps/f-spot/screensaver/tag_id";
 
 		public const string STORAGE_PATH = "/apps/f-spot/import/storage_path";
Index: src/MainWindow.cs
===================================================================
--- src/MainWindow.cs	(revision 3105)
+++ src/MainWindow.cs	(working copy)
@@ -99,6 +99,10 @@
 
 	[Glade.Widget] CheckMenuItem find_untagged;
 	
+	[Glade.Widget] MenuItem last_roll;
+	[Glade.Widget] MenuItem select_rolls;
+	[Glade.Widget] MenuItem clear_roll_filter;	
+	
 	// Tags
 	[Glade.Widget] MenuItem edit_selected_tag;
 	[Glade.Widget] MenuItem delete_selected_tag;
@@ -2467,6 +2471,19 @@
 		}
 		query.Range = null;
 	}
+
+	void HandleSelectLastRoll (object sender, EventArgs args) {
+		query.RollSet = new RollSet (db.Rolls.GetRolls (1)[0]);
+	}
+
+	void HandleSelectRolls (object sender, EventArgs args) {
+		new LastRolls (query, db.Rolls, main_window);
+	}
+
+	void HandleClearRollFilter (object sender, EventArgs args) {
+		query.RollSet = null;
+	}
+
 	
 	void HandleFindUntagged (object sender, EventArgs args) {
 		if (query.Untagged == find_untagged.Active)
@@ -2762,7 +2779,11 @@
 		exif_data.Sensitive = active_selection;
 		sharpen.Sensitive = active_selection;
 		remove_from_catalog.Sensitive = active_selection;
-
+		
+		last_roll.Sensitive = (db.Rolls.GetRolls (1).Length > 0);
+		select_rolls.Sensitive = (db.Rolls.GetRolls (2).Length > 1);
+		clear_roll_filter.Sensitive = (query.RollSet != null);
+		
 		delete_selected_tag.Sensitive = tag_sensitive;
 		edit_selected_tag.Sensitive = tag_sensitive;
 
Index: src/IQueryCondition.cs
===================================================================
--- src/IQueryCondition.cs	(revision 0)
+++ src/IQueryCondition.cs	(revision 0)
@@ -0,0 +1,16 @@
+/*
+ * IQueryCondition.cs
+ *
+ * Author(s)
+ * 	Stephane Delcroix  <stephane@delcroix.org>
+ *
+ * This is free software. See COPYING for details.
+ */
+
+namespace FSpot
+{
+	public interface IQueryCondition
+	{
+		string SqlClause ();
+	}
+}
Index: src/DirectoryAdaptor.cs
===================================================================
--- src/DirectoryAdaptor.cs	(revision 3105)
+++ src/DirectoryAdaptor.cs	(working copy)
@@ -92,7 +92,7 @@
 		public override void Reload () 
 		{
 			System.Collections.Hashtable ht = new System.Collections.Hashtable ();
-			Photo [] photos = query.Store.Query ((Tag [])null, null, null);
+			Photo [] photos = query.Store.Query ((Tag [])null, null, null, null);
 			
 			foreach (Photo p in photos) {
 				if (ht.Contains (p.DirectoryPath)) {
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 3105)
+++ ChangeLog	(working copy)
@@ -1,3 +1,45 @@
+2007-05-22  Stephane Delcroix  <stephane@delcroix.org>
+
+	* src/PhotoStore.cs: new roll_id field to Photos, make queries works
+	with RollSets.
+
+	* src/ImportBackend.cs:
+	* src/FileImportBackend.cs: create a new Roll at Prepare () time, and
+	add pass the reference to the created photos.
+
+	* src/QueryWidget.cs: display the roll filters in the Query Widget
+
+	* src/IQueryCondition.cs: interface meant to be used by all Query
+	conditions, now only used by RollSet.
+
+	* src/RollSet.cs: this new class represent a set of rolls and contains
+	it's own sql generation routines.
+
+	* src/Updater.cs: update the db to version 5, rename imports to rolls,
+	update photos, and fix bgo #324425
+
+	* src/f-spot.glade:
+	* src/LastRollDialog.cs: new dialog to create a RollSet
+
+	* src/RollStore.cs: (was ImportStore.cs) abstraction layer for the
+	rolls db table.
+
+	* src/MainWindow.cs: hook up some menu entries
+
+	* src/Preferences.cs: gui_roll_history preference. This preference
+	says how much imports rolls will be displayed in the Dialog (all the
+	imports rolls are kept in the db though)
+
+	* src/Db.cs:
+	* src/PhotoQuery.cs:
+	* src/Makefile.am:
+	* src/DirectoryAdaptor.cs:
+	* src/TimeAdaptor.cs: minor changes to follow some API changes
+		
+	This big commit is based on patch by Bengt Thuree and fix bgo #321770
+	(original patch attached to the bug). I reworked it to makes things a
+	little more generic and reusable.
+
 2007-05-20  Stephane Delcroix  <stephane@delcroix.org>
 
 	* src/PicasaWebExport.cs: set the correct photo title at upload time.
