Index: nautilus-cd-burner.c
===================================================================
RCS file: /cvs/gnome/nautilus-cd-burner/nautilus-cd-burner.c,v
retrieving revision 1.187
diff -p -u -r1.187 nautilus-cd-burner.c
--- nautilus-cd-burner.c	19 Apr 2006 14:46:34 -0000	1.187
+++ nautilus-cd-burner.c	19 Apr 2006 15:29:03 -0000
@@ -2211,6 +2211,42 @@ verify_source_image (const char         
 }
 
 static void
+gconf_save_device (GConfClient *client,
+		   const char  *device)
+{
+	const char *hostname;
+
+	hostname = g_get_host_name ();
+
+	if (hostname != NULL) {
+		gboolean    res;
+		char       *key;
+
+		key = g_strdup_printf ("/apps/nautilus-cd-burner/%s/last_device", hostname);
+		res = gconf_client_set_string  (client, key, device, NULL);
+	}
+}
+
+static char *
+gconf_load_device (GConfClient *client)
+{
+	const char *hostname;
+	char       *device;
+
+	device = NULL;
+
+	hostname = g_get_host_name ();
+	if (hostname != NULL) {
+		char *key;
+
+		key = g_strdup_printf ("/apps/nautilus-cd-burner/%s/last_device", hostname);
+		device = gconf_client_get_string  (client, key, NULL);
+	}
+
+	return device;
+}
+
+static void
 selection_dialog_response (GtkWidget                *dialog,
 			   int                       response_id,
 			   NautilusBurnerSourceData *burn_data)
@@ -2268,8 +2304,11 @@ selection_dialog_response (GtkWidget    
 
 		speed = get_speed_selection (speed_combobox);
 
+		/* save selections */
 		gconf_client = gconf_client_get_default ();
 		gconf_client_set_int (gconf_client, "/apps/nautilus-cd-burner/default_speed", speed, NULL);
+		gconf_save_device (gconf_client, drive->device);
+
 		debug     = gconf_client_get_bool (gconf_client, "/apps/nautilus-cd-burner/debug", NULL);
 		overburn  = gconf_client_get_bool (gconf_client, "/apps/nautilus-cd-burner/overburn", NULL);
 		burnproof = gconf_client_get_bool (gconf_client, "/apps/nautilus-cd-burner/burnproof", NULL);
@@ -2404,6 +2443,7 @@ create_selection_dialog (NautilusBurnerS
 	GdkCursor               *cursor;
 	GConfClient             *gconf_client;
 	gboolean                 debug;
+	char                    *last_device;
 
 	if (g_file_test ("cdburn.glade", G_FILE_TEST_EXISTS) != FALSE) {
 		xml = glade_xml_new ("./cdburn.glade", NULL, NULL);
@@ -2418,6 +2458,15 @@ create_selection_dialog (NautilusBurnerS
 
 	gconf_client = gconf_client_get_default ();
 	debug        = gconf_client_get_bool (gconf_client, "/apps/nautilus-cd-burner/debug", NULL);
+	last_device = gconf_load_device (gconf_client);
+	if (last_device) {
+		GtkWidget *selection;
+
+		selection = glade_xml_get_widget (xml, "target_optionmenu");
+		nautilus_burn_drive_selection_set_device (NAUTILUS_BURN_DRIVE_SELECTION (selection), last_device);
+		g_free (last_device);
+	}
+
 	g_object_unref (gconf_client);
 
 	dummy_check = glade_xml_get_widget (xml, "dummy_check");
