diff --unified -r gthumb-2.10.6/data/glade/gthumb_camera.glade gthumb-2.10.6-bug431187/data/glade/gthumb_camera.glade
--- gthumb-2.10.6/data/glade/gthumb_camera.glade	2007-11-13 22:04:58.000000000 +0100
+++ gthumb-2.10.6-bug431187/data/glade/gthumb_camera.glade	2007-11-13 22:07:14.000000000 +0100
@@ -241,35 +241,6 @@
 		  <property name="column_spacing">6</property>
 
 		  <child>
-		    <widget class="GtkLabel" id="label2">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">_Film:</property>
-		      <property name="use_underline">True</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</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">0</property>
-		      <property name="ypad">0</property>
-		      <property name="mnemonic_widget">film_entry</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="left_attach">0</property>
-		      <property name="right_attach">1</property>
-		      <property name="top_attach">1</property>
-		      <property name="bottom_attach">2</property>
-		      <property name="x_options">fill</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
 		    <widget class="GtkLabel" id="label3">
 		      <property name="visible">True</property>
 		      <property name="label" translatable="yes">Ca_tegories:</property>
@@ -348,27 +319,6 @@
 		  </child>
 
 		  <child>
-		    <widget class="GtkEntry" id="film_entry">
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="editable">True</property>
-		      <property name="visibility">True</property>
-		      <property name="max_length">0</property>
-		      <property name="text" translatable="yes"></property>
-		      <property name="has_frame">True</property>
-		      <property name="invisible_char">*</property>
-		      <property name="activates_default">False</property>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">1</property>
-		      <property name="right_attach">2</property>
-		      <property name="top_attach">1</property>
-		      <property name="bottom_attach">2</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
 		    <widget class="GtkCheckButton" id="keep_names_checkbutton">
 		      <property name="visible">True</property>
 		      <property name="can_focus">True</property>
@@ -482,6 +432,52 @@
 		      <property name="y_options"></property>
 		    </packing>
 		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="label16">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">_Group into subfolders:</property>
+		      <property name="use_underline">True</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</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="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">1</property>
+		      <property name="bottom_attach">2</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkComboBox" id="group_into_subfolderscombobutton">
+		      <property name="visible">True</property>
+		      <property name="can_default">True</property>
+		      <property name="items" translatable="yes">Group per day</property>
+		      <property name="add_tearoffs">False</property>
+		      <property name="focus_on_click">True</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">1</property>
+		      <property name="right_attach">2</property>
+		      <property name="top_attach">1</property>
+		      <property name="bottom_attach">2</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options">fill</property>
+		    </packing>
+		  </child>
 		</widget>
 		<packing>
 		  <property name="padding">0</property>
diff --unified -r gthumb-2.10.6/libgthumb/preferences.c gthumb-2.10.6-bug431187/libgthumb/preferences.c
--- gthumb-2.10.6/libgthumb/preferences.c	2007-11-13 22:05:20.000000000 +0100
+++ gthumb-2.10.6-bug431187/libgthumb/preferences.c	2007-11-13 22:06:17.000000000 +0100
@@ -241,6 +241,14 @@
 	{ 0, NULL }
 };
 
+static EnumStringTable import_subfolder_table [] = {
+	{ GTH_IMPORT_SUBFOLDER_GROUP_DAY,   "Group per day" },
+	{ GTH_IMPORT_SUBFOLDER_GROUP_MONTH, "Group per month" },
+	{ GTH_IMPORT_SUBFOLDER_GROUP_NOW,   "Current date/time" },
+	{ GTH_IMPORT_SUBFOLDER_GROUP_NONE,  "No subfolder at all" },
+	{ 0, NULL }
+};
+
 /* --------------- */
 
 
@@ -496,7 +504,7 @@
 GET_SET_FUNC(image_sizing,           PREF_PRINT_IMAGE_SIZING,      GthImageSizing)
 GET_SET_FUNC(image_resolution,       PREF_PRINT_IMAGE_RESOLUTION,  GthImageResolution)
 GET_SET_FUNC(crop_ratio,             PREF_CROP_ASPECT_RATIO,       GthCropRatio)
-
+GET_SET_FUNC(import_subfolder,       PREF_PHOTO_IMPORT_SUBFOLDER,  GthSubFolder)
 
 GthViewMode
 pref_get_view_mode (void)
diff --unified -r gthumb-2.10.6/libgthumb/preferences.h gthumb-2.10.6-bug431187/libgthumb/preferences.h
--- gthumb-2.10.6/libgthumb/preferences.h	2007-11-13 22:05:20.000000000 +0100
+++ gthumb-2.10.6-bug431187/libgthumb/preferences.h	2007-11-13 22:06:17.000000000 +0100
@@ -215,7 +215,7 @@
 #define  PREF_CHOOSE_DESTINATION_VIEW  "/apps/gthumb/dialogs/choose_destination/view"
 
 #define  PREF_PHOTO_IMPORT_DESTINATION    "/apps/gthumb/dialogs/photo_importer/destination"
-#define  PREF_PHOTO_IMPORT_FILM           "/apps/gthumb/dialogs/photo_importer/film"
+#define  PREF_PHOTO_IMPORT_SUBFOLDER      "/apps/gthumb/dialogs/photo_importer/subfolder"
 #define  PREF_PHOTO_IMPORT_DELETE         "/apps/gthumb/dialogs/photo_importer/delete_from_camera"
 #define  PREF_PHOTO_IMPORT_KEEP_FILENAMES "/apps/gthumb/dialogs/photo_importer/keep_original_filenames"
 #define  PREF_PHOTO_IMPORT_RESET_EXIF_ORIENTATION	"/apps/gthumb/dialogs/photo_importer/reset_exif_orientation_on_import"
@@ -320,5 +320,7 @@
 GthImageResolution pref_get_image_resolution       (void);
 void               pref_set_crop_ratio             (GthCropRatio value);
 GthCropRatio       pref_get_crop_ratio             (void);
+GthSubFolder       pref_get_import_subfolder       (void);
+void               pref_set_import_subfolder       (GthSubFolder value);
 
 #endif /* PREFERENCES_H */
diff --unified -r gthumb-2.10.6/libgthumb/typedefs.h gthumb-2.10.6-bug431187/libgthumb/typedefs.h
--- gthumb-2.10.6/libgthumb/typedefs.h	2007-11-13 22:05:31.000000000 +0100
+++ gthumb-2.10.6-bug431187/libgthumb/typedefs.h	2007-11-13 22:06:45.000000000 +0100
@@ -247,6 +247,14 @@
 } GthDropPosition;
 
 
+typedef enum { /*< skip >*/
+        GTH_IMPORT_SUBFOLDER_GROUP_DAY         = 0,
+	GTH_IMPORT_SUBFOLDER_GROUP_MONTH,
+	GTH_IMPORT_SUBFOLDER_GROUP_NOW,
+	GTH_IMPORT_SUBFOLDER_GROUP_NONE
+} GthSubFolder;
+
+
 typedef void (*ErrorFunc)          (gpointer data);
 typedef void (*DoneFunc)           (gpointer data);
 typedef void (*ProgressFunc)       (gfloat percent,
diff --unified -r gthumb-2.10.6/src/dlg-photo-importer.c gthumb-2.10.6-bug431187/src/dlg-photo-importer.c
--- gthumb-2.10.6/src/dlg-photo-importer.c	2007-11-13 22:05:46.000000000 +0100
+++ gthumb-2.10.6-bug431187/src/dlg-photo-importer.c	2007-11-13 22:06:31.000000000 +0100
@@ -28,6 +28,7 @@
 #include <string.h>
 #include <strings.h>
 #include <time.h>
+#include <stdio.h>
 
 #include <glib/gi18n.h>
 #include <gtk/gtk.h>
@@ -89,7 +90,7 @@
 	GtkWidget           *camera_model_label;
 	GtkWidget           *select_model_button;
 	GtkWidget           *destination_filechooserbutton;
-	GtkWidget           *film_entry;
+	GtkWidget           *subfolder_combobox;
 	GtkWidget           *keep_names_checkbutton;
 	GtkWidget           *delete_checkbutton;
 	GtkWidget           *choose_categories_button;
@@ -1134,8 +1135,9 @@
 get_folder_name (DialogData *data)
 {
 	char *destination;
-	char *film_name;
+	char *subfolder_name;
 	char *path;
+	GthSubFolder subfolder_value;
 
 	destination = gtk_file_chooser_get_uri (GTK_FILE_CHOOSER (data->destination_filechooserbutton));
 	eel_gconf_set_path (PREF_PHOTO_IMPORT_DESTINATION, destination);
@@ -1145,24 +1147,28 @@
 		return NULL;
 	}
 
-	film_name = _gtk_entry_get_filename_text (GTK_ENTRY (data->film_entry));
-	if (! is_valid_filename (film_name)) {
+	subfolder_name = NULL;
+	subfolder_value = gtk_combo_box_get_active (GTK_COMBO_BOX (data->subfolder_combobox));
+
+	if (subfolder_value == GTH_IMPORT_SUBFOLDER_GROUP_NOW) {
 		time_t     now;
 		struct tm *tm;
 		char       time_txt[50 + 1];
 
-		g_free (film_name);
-
 		time (&now);
 		tm = localtime (&now);
 		strftime (time_txt, 50, "%Y-%m-%d--%H.%M.%S", tm);
+		subfolder_name = g_strdup (time_txt);
+	}
 
-		film_name = g_strdup (time_txt);
-	} else
-		eel_gconf_set_path (PREF_PHOTO_IMPORT_FILM, film_name);
+	pref_set_import_subfolder (subfolder_value);
 
-	path = g_build_filename (destination, film_name, NULL);
-	g_free (film_name);
+	if (subfolder_name != NULL) {
+		path = g_build_filename (destination, subfolder_name, NULL);
+		g_free(subfolder_name);
+	} else {
+		path = g_strdup(destination);
+	}
 	g_free (destination);
 
 	return path;
@@ -1278,6 +1284,13 @@
 	char       *local_path;
 	char       *file_uri;
 	char	   *unescaped_local_folder;
+	time_t     exif_date;
+	int        result;
+	GthSubFolder subfolder_value;
+	char       *temp_file_name;
+	int        error_found;
+
+	error_found = 0;
 
 	gp_file_new (&file);
 
@@ -1290,47 +1303,88 @@
 			    file,
 			    data->context);
 
+	subfolder_value = gtk_combo_box_get_active (GTK_COMBO_BOX (data->subfolder_combobox));
 	unescaped_local_folder = gnome_vfs_unescape_string (local_folder, "");
-	file_uri = get_file_name (data, camera_path, unescaped_local_folder, n);
-	g_free (unescaped_local_folder);
 
-	local_path = get_cache_filename_from_uri (file_uri);
-	if ((local_path != NULL) && gp_file_save (file, local_path) >= 0) {
-		if (data->adjust_orientation) 
-			data->adjust_orientation_list = g_list_prepend (data->adjust_orientation_list, g_strdup (file_uri));
-		if (data->delete_from_camera)
-			data->delete_list = g_list_prepend (data->delete_list, g_strdup (camera_path));
-		data->saved_images_list = g_list_prepend (data->saved_images_list, g_strdup (file_uri));
-		add_categories_to_image (data, local_path);
+	if ( (subfolder_value == GTH_IMPORT_SUBFOLDER_GROUP_DAY) || 
+	     (subfolder_value == GTH_IMPORT_SUBFOLDER_GROUP_MONTH) ) {
+		temp_file_name = tempnam(NULL, "gthumb");
+
+		if(temp_file_name == NULL) {
+			error_found = 1;
+			file_uri = g_strdup(""); /* file_uri and local_path should be allocated */
+			local_path = g_strdup("");
+		}
+		else {
+			local_path = g_strdup(temp_file_name);
+			free(temp_file_name);	
+		}
+	} else {
+		file_uri = get_file_name (data, camera_path, unescaped_local_folder, n);
+		local_path = get_cache_filename_from_uri (file_uri);		
+	}
+
+	if ( (!error_found) && (local_path != NULL) && gp_file_save (file, local_path) >= 0) {
+
+		subfolder_value = gtk_combo_box_get_active (GTK_COMBO_BOX (data->subfolder_combobox));
+
+		if ( (subfolder_value == GTH_IMPORT_SUBFOLDER_GROUP_DAY) || 
+		     (subfolder_value == GTH_IMPORT_SUBFOLDER_GROUP_MONTH) ) {
+
+			exif_date = get_metadata_time(NULL, local_path);
+			if (exif_date != (time_t) 0) {
+				struct tm           *exif_tm = localtime(&exif_date);
+				char                dest_subfolder[14 + 1];
+				char                *dest_folder;
+				
+				if (subfolder_value == GTH_IMPORT_SUBFOLDER_GROUP_DAY) {
+					strftime(dest_subfolder, 14, "%Y_%m_%d", exif_tm);
+				}
+				else {
+					strftime(dest_subfolder, 14, "%Y_%m", exif_tm);
+				}
+
+				dest_folder = g_build_filename (unescaped_local_folder, dest_subfolder, NULL);
+				file_uri = get_file_name(data, camera_path, dest_folder, n);
+				
+				if (ensure_dir_exists (dest_folder, 0755) ) {
+					if (!file_move(local_path, file_uri)) {
+						error_found = 1;
+					}
+				} 
+				else {
+					error_found = 1;
+				}
+				g_free(dest_folder);
+			}
+		}
+		if (!error_found) {
+			if (data->adjust_orientation) 
+				data->adjust_orientation_list = g_list_prepend (data->adjust_orientation_list, g_strdup (file_uri));
+			if (data->delete_from_camera)
+				data->delete_list = g_list_prepend (data->delete_list, g_strdup (camera_path));
+			data->saved_images_list = g_list_prepend (data->saved_images_list, g_strdup (file_uri));
+			add_categories_to_image (data, local_path);
+		}
 	} 
 	else {
+		error_found = 1;
+	}
+
+	if (error_found) { 
 		g_mutex_lock (data->data_mutex);
 		data->error = TRUE;
 		data->interrupted = TRUE;
 		g_mutex_unlock (data->data_mutex);
 	}
 
+	g_free (unescaped_local_folder);
 	g_free (camera_folder);
 	g_free (file_uri);
 	g_free (local_path);
 	gp_file_unref (file);
 }
 
-
-static void
-add_film_keyword (const char *folder)
-{
-	CommentData *cdata;
-
-	cdata = comments_load_comment (folder, FALSE);
-	if (cdata == NULL)
-		cdata = comment_data_new ();
-	comment_data_add_keyword (cdata, _("Film"));
-	comments_save_categories (folder, cdata);
-	comment_data_free (cdata);
-}
-
-
 static void
 delete_images__init (AsyncOperationData *aodata,
                      DialogData         *data)
@@ -1705,8 +1759,6 @@
 		return;
 	}
 
-	add_film_keyword (data->local_folder);
-
 	data->aodata = async_operation_new (NULL,
 					    file_list,
 					    save_images__init,
@@ -1952,7 +2004,6 @@
 	GtkWidget  *btn_help;
 	GdkPixbuf  *mute_pixbuf;
 	char       *default_path;
-	char       *default_film_name;
 
 	data = g_new0 (DialogData, 1);
 	data->browser = browser;
@@ -1996,7 +2047,7 @@
 	data->camera_model_label = glade_xml_get_widget (data->gui, "camera_model_label");
 	data->select_model_button = glade_xml_get_widget (data->gui, "select_model_button");
 	data->destination_filechooserbutton = glade_xml_get_widget (data->gui, "destination_filechooserbutton");
-	data->film_entry = glade_xml_get_widget (data->gui, "film_entry");
+        data->subfolder_combobox = glade_xml_get_widget(data->gui, "group_into_subfolderscombobutton");
 	data->keep_names_checkbutton = glade_xml_get_widget (data->gui, "keep_names_checkbutton");
 	data->delete_checkbutton = glade_xml_get_widget (data->gui, "delete_checkbutton");
 	data->choose_categories_button = glade_xml_get_widget (data->gui, "choose_categories_button");
@@ -2057,12 +2108,17 @@
 					         default_path);
 	g_free (default_path);
 
-	default_film_name = eel_gconf_get_path (PREF_PHOTO_IMPORT_FILM, "");
-	_gtk_entry_set_filename_text (GTK_ENTRY (data->film_entry), default_film_name);
-	g_free (default_film_name);
-
 	task_terminated (data);
 
+        gtk_combo_box_append_text (GTK_COMBO_BOX (data->subfolder_combobox),
+                                   _("Group per month"));
+        gtk_combo_box_append_text (GTK_COMBO_BOX (data->subfolder_combobox),
+                                   _("Current date/time"));
+        gtk_combo_box_append_text (GTK_COMBO_BOX (data->subfolder_combobox),
+                                   _("No subfolder at all"));
+
+	gtk_combo_box_set_active (GTK_COMBO_BOX (data->subfolder_combobox), pref_get_import_subfolder());
+
 	/* Set the signals handlers. */
 
 	g_signal_connect (G_OBJECT (data->dialog),
