[f-spot] Avoid setting import Preferences if dialog is not used



commit 16141dc4e5b2e9857724af5a4396d84e2ee7f7f4
Author: Lorenzo Milesi <maxxer yetopen it>
Date:   Wed Aug 12 00:02:20 2009 +0200

    Avoid setting import Preferences if dialog is not used
    
    like in DnD import

 src/ImportCommand.cs |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/src/ImportCommand.cs b/src/ImportCommand.cs
index 8d106f0..2325920 100644
--- a/src/ImportCommand.cs
+++ b/src/ImportCommand.cs
@@ -527,9 +527,11 @@ public class ImportCommand : GladeDialog
 	
 	private void SavePreferences ()
 	{
-		Preferences.Set(Preferences.IMPORT_COPY_FILES, copy_check.Active);
-		Preferences.Set(Preferences.IMPORT_INCLUDE_SUBFOLDERS, recurse_check.Active);
-		Preferences.Set(Preferences.IMPORT_CHECK_DUPLICATES, duplicate_check.Active);
+		if (copy_check != null) {
+			Preferences.Set(Preferences.IMPORT_COPY_FILES, copy_check.Active);
+			Preferences.Set(Preferences.IMPORT_INCLUDE_SUBFOLDERS, recurse_check.Active);
+			Preferences.Set(Preferences.IMPORT_CHECK_DUPLICATES, duplicate_check.Active);
+		}
 	}
 	
 	public void HandleImportBrowse (object o, EventArgs args) 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]