=== modified file 'ChangeLog'
--- ChangeLog	2008-01-25 16:15:34 +0000
+++ ChangeLog	2008-01-26 22:35:58 +0000
@@ -373,6 +373,17 @@
 
 	* src/Imaging/RafFile.cs: fixing bgo 505965.
 
+2008-01-08  Roland Mas  <lolando@debian.org>
+
+      * src/GPhotoCamera.cs: New DeleteFile method.
+
+      * src/CameraFileSelectionDialog.cs: Conditionnally remove pictures
+      from their source after download.
+
+      * src/f-spot.glade: New delete_from_cam_check checkbox, to allow
+      choosing whether pictures should be removed from their source
+      after download.  Fixes bgo #321596.
+
 2008-01-05  Gabriel Burt  <gabriel.burt@gmail.com>
 
 	* src/FSpot.addin.xml: Add accelerator keys. Patch from

=== modified file 'src/CameraFileSelectionDialog.cs'
--- src/CameraFileSelectionDialog.cs	2007-09-23 16:17:13 +0000
+++ src/CameraFileSelectionDialog.cs	2008-01-26 23:04:40 +0000
@@ -30,6 +30,7 @@
 		[Widget] Gtk.TreeView file_tree;
 		[Widget] Gtk.OptionMenu tag_option_menu;
 		[Widget] Gtk.CheckButton attach_check;
+		[Widget] Gtk.CheckButton delete_from_cam_check;
 
 		GPhotoCamera camera;
 		ListStore preview_list_store;
@@ -273,10 +274,30 @@
 			return path;
 		}
 		
+		private void DeleteFile (int index) 
+		{
+			GPhotoCameraFile camfile = (GPhotoCameraFile) camera.FileList [index];
+			camera.DeleteFile (index);
+		}
+		
 		private int ImportFiles ()
 		{
 			ImportCommand command = new ImportCommand (null);
-			return command.ImportFromPaths (db.Photos, saved_files, selected_tags);
+			int import_result = command.ImportFromPaths (db.Photos, saved_files, selected_tags);
+
+			for (int i = 0; i < index_list.Count; i++) {
+				try {
+					if (delete_from_cam_check.Active)
+						DeleteFile ((int)(index_list [i]));
+				}
+				catch (System.Exception e) {
+					System.Console.WriteLine (e.ToString ());
+					progress_dialog.Message = String.Format ("{0}{2}{1}", e.Message, e.ToString (), Environment.NewLine);
+					progress_dialog.ProgressText = Catalog.GetString ("Error deleting file");
+				}
+			}
+
+			return import_result;
 		}
 		
 		public Tag[] Tags {

=== modified file 'src/GPhotoCamera.cs'
--- src/GPhotoCamera.cs	2007-03-05 13:46:44 +0000
+++ src/GPhotoCamera.cs	2008-01-26 22:35:58 +0000
@@ -217,6 +217,13 @@
 		}
 	}
 	
+	public void DeleteFile (int index)
+	{
+		GPhotoCameraFile selected_file = (GPhotoCameraFile)files [index];		
+		
+		camera_fs.DeleteFile (selected_file.Directory, selected_file.FileName, context) ;
+	}
+		
 	~GPhotoCamera ()
 	{
 		ReleaseGPhotoResources ();

=== modified file 'src/f-spot.glade'
--- src/f-spot.glade	2008-01-25 14:23:01 +0000
+++ src/f-spot.glade	2008-01-26 22:35:58 +0000
@@ -650,6 +650,19 @@
                 <property name="position">2</property>
               </packing>
             </child>
+            <child>
+              <widget class="GtkCheckButton" id="delete_from_cam_check">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="label" translatable="yes">Delete from camera</property>
+                <property name="response_id">0</property>
+                <property name="draw_indicator">True</property>
+              </widget>
+              <packing>
+                <property name="expand">False</property>
+                <property name="position">3</property>
+              </packing>
+            </child>
           </widget>
           <packing>
             <property name="position">1</property>

