Index: src/f-spot.glade =================================================================== --- src/f-spot.glade (wersja 2906) +++ src/f-spot.glade (kopia robocza) @@ -1031,7 +1031,7 @@ True - 3 + 4 3 False 5 @@ -1259,6 +1259,30 @@ + + + + True + Delete imported file from camera + True + _Delete from camera + True + GTK_RELIEF_NORMAL + True + False + False + True + + + + 0 + 1 + 3 + 4 + fill + + + 0 Index: src/GPhotoCamera.cs =================================================================== --- src/GPhotoCamera.cs (wersja 2906) +++ src/GPhotoCamera.cs (kopia robocza) @@ -208,7 +208,18 @@ camfile.Save (filename); } - + + public void DeleteFile (int index) + { + if (camera_fs == null || files == null || index < 0 || index >= files.Count) + return; + + GPhotoCameraFile selected_file = (GPhotoCameraFile)files [index]; + camera_fs.DeleteFile (selected_file.Directory, + selected_file.FileName, + context); + } + public void SaveAllFiles (string prefix, int start_number) { for(int index = 0; index < files.Count; index++) { Index: src/CameraFileSelectionDialog.cs =================================================================== --- src/CameraFileSelectionDialog.cs (wersja 2906) +++ src/CameraFileSelectionDialog.cs (kopia robocza) @@ -22,6 +22,7 @@ [Widget] Gtk.Button save_directory_selection_button; [Widget] Gtk.Entry prefix_entry; [Widget] Gtk.CheckButton import_files_checkbox; + [Widget] Gtk.CheckButton delete_files_checkbox; [Widget] Gtk.Button select_tag_button; GPhotoCamera camera; @@ -257,6 +258,9 @@ camera.SaveFile (index, path); + if (delete_files_checkbox.Active) + camera.DeleteFile (index); + string dest = FileImportBackend.ChooseLocation (path); System.IO.File.Move (path, dest); path = dest;