Index: src/window-commands.c
===================================================================
--- src/window-commands.c	(révision 6832)
+++ src/window-commands.c	(copie de travail)
@@ -296,7 +296,7 @@
 	ephy_embed_persist_set_flags
 		(persist, EPHY_EMBED_PERSIST_MAINDOC | EPHY_EMBED_PERSIST_ASK_DESTINATION);
 	ephy_embed_persist_set_persist_key
-		(persist, CONF_STATE_SAVE_DIR);
+		(persist, CONF_STATE_DOWNLOAD_DIR);
 
 	ephy_embed_persist_save (persist);
 
Index: src/ephy-tab.c
===================================================================
--- src/ephy-tab.c	(révision 6832)
+++ src/ephy-tab.c	(copie de travail)
@@ -2008,7 +2008,7 @@
 	/* shift+click saves the link target */
 	else if (is_link && is_left_click && with_shift)
 	{
-		handled = save_property_url (embed, event, "link", CONF_STATE_SAVE_DIR);
+		handled = save_property_url (embed, event, "link", CONF_STATE_DOWNLOAD_DIR);
 	}
 	/* shift+click saves the non-link image
 	 * Note: pressing enter to submit a form synthesizes a mouse click event
Index: src/popup-commands.c
===================================================================
--- src/popup-commands.c	(révision 6832)
+++ src/popup-commands.c	(copie de travail)
@@ -235,7 +235,7 @@
 		(persist, EPHY_EMBED_PERSIST_FROM_CACHE |
 			  (ask_dest ? EPHY_EMBED_PERSIST_ASK_DESTINATION : 0));
 	ephy_embed_persist_set_persist_key
-		(persist, CONF_STATE_SAVE_DIR);
+		(persist, CONF_STATE_DOWNLOAD_DIR);
 	ephy_embed_persist_set_source (persist, location);
 
 	g_signal_connect (persist, "completed",
Index: lib/ephy-file-helpers.c
===================================================================
--- lib/ephy-file-helpers.c	(révision 6832)
+++ lib/ephy-file-helpers.c	(copie de travail)
@@ -120,11 +120,11 @@
 }
 
 char *
-ephy_file_get_downloads_dir (void)
+ephy_file_get_downloads_dir_for_key (const char *key)
 {
 	char *download_dir, *expanded;
 
-	download_dir = eel_gconf_get_string (CONF_STATE_DOWNLOAD_DIR);
+	download_dir = eel_gconf_get_string (key);
 
 	if (download_dir && strcmp (download_dir, "Downloads") == 0)
 	{
@@ -162,6 +162,12 @@
 }
 
 char *
+ephy_file_get_downloads_dir (void)
+{
+	return ephy_file_get_downloads_dir_for_key (CONF_STATE_DOWNLOAD_DIR);
+}
+
+char *
 ephy_file_desktop_dir (void)
 {
 	char *downloads_dir;
Index: lib/ephy-file-helpers.h
===================================================================
--- lib/ephy-file-helpers.h	(révision 6832)
+++ lib/ephy-file-helpers.h	(copie de travail)
@@ -56,6 +56,8 @@
 
 char       *ephy_file_downloads_dir      (void);
 
+char	   *ephy_file_get_downloads_dir_for_key	 (const char *key);
+
 char	   *ephy_file_get_downloads_dir	 (void);
 
 char       *ephy_file_desktop_dir	 (void);
Index: lib/ephy-prefs.h
===================================================================
--- lib/ephy-prefs.h	(révision 6832)
+++ lib/ephy-prefs.h	(copie de travail)
@@ -42,7 +42,6 @@
 #define CONF_GECKO_ENABLE_PANGO			"/apps/epiphany/web/enable_pango"
 
 /* Directories */
-#define CONF_STATE_SAVE_DIR		"/apps/epiphany/directories/save"
 #define CONF_STATE_SAVE_IMAGE_DIR	"/apps/epiphany/directories/saveimage"
 #define CONF_STATE_OPEN_DIR		"/apps/epiphany/directories/open"
 #define CONF_STATE_DOWNLOAD_DIR		"/apps/epiphany/directories/downloads_folder"
Index: lib/ephy-file-chooser.c
===================================================================
--- lib/ephy-file-chooser.c	(révision 6832)
+++ lib/ephy-file-chooser.c	(copie de travail)
@@ -143,23 +143,11 @@
 
 	dialog->priv->persist_key = g_strdup (key);
 
-	dir = eel_gconf_get_string (key);
+	dir = ephy_file_get_downloads_dir_for_key (key);
 	if (dir != NULL)
 	{
-		converted = g_filename_from_utf8
-			(dir, -1, NULL, NULL, NULL);
-
-		if (converted != NULL)
-		{
-			expanded = gnome_vfs_expand_initial_tilde (converted);
-
-			gtk_file_chooser_set_current_folder
-				(GTK_FILE_CHOOSER (dialog), expanded);
-
-			g_free (expanded);
-			g_free (converted);
-		}
-
+		gtk_file_chooser_set_current_folder
+			(GTK_FILE_CHOOSER (dialog), dir);
 		g_free (dir);
 	}
 
Index: data/epiphany.schemas.in
===================================================================
--- data/epiphany.schemas.in	(révision 6832)
+++ data/epiphany.schemas.in	(copie de travail)
@@ -342,15 +342,6 @@
         </locale>
       </schema>
       <schema>
-        <key>/schemas/apps/epiphany/directories/save</key>
-        <applyto>/apps/epiphany/directories/save</applyto>
-        <owner>epiphany</owner>
-        <type>string</type>
-        <default>~</default>
-        <locale name="C">
-        </locale>
-      </schema>
-      <schema>
         <key>/schemas/apps/epiphany/directories/saveimage</key>
         <applyto>/apps/epiphany/directories/saveimage</applyto>
         <owner>epiphany</owner>
Index: embed/mozilla/ContentHandler.cpp
===================================================================
--- embed/mozilla/ContentHandler.cpp	(révision 6832)
+++ embed/mozilla/ContentHandler.cpp	(copie de travail)
@@ -146,7 +146,7 @@
 
 	dialog = ephy_file_chooser_new (_("Save"), parentWindow,
 					GTK_FILE_CHOOSER_ACTION_SAVE,
-					CONF_STATE_SAVE_DIR,
+					CONF_STATE_DOWNLOAD_DIR,
 					EPHY_FILE_FILTER_ALL);
 	gtk_file_chooser_set_do_overwrite_confirmation (GTK_FILE_CHOOSER (dialog), TRUE);
 	gtk_file_chooser_set_current_name (GTK_FILE_CHOOSER (dialog), defaultFile.get());
@@ -373,19 +373,25 @@
 
 	if (auto_downloads)
 	{
-		mAction = CONTENT_ACTION_OPEN;
+		if (mHelperApp)
+			mAction = CONTENT_ACTION_OPEN;
+		else
+			mAction = CONTENT_ACTION_DOWNLOAD;
 	}
 	else
 	{
-		mAction = CONTENT_ACTION_OPEN_TMP;
+		if (mHelperApp)
+			mAction = CONTENT_ACTION_OPEN_TMP;
+		else
+			mAction = CONTENT_ACTION_SAVEAS;
 	}
 
-	if (!mHelperApp || mPermission != EPHY_MIME_PERMISSION_SAFE)
+	if (mPermission != EPHY_MIME_PERMISSION_SAFE)
 	{
 		mAction = CONTENT_ACTION_DOWNLOAD;
+		MIMEConfirmAction ();
 	}
-
-	if (!auto_downloads || mAction == CONTENT_ACTION_DOWNLOAD)
+	else if (mAction == CONTENT_ACTION_OPEN_TMP)
 	{
 		MIMEConfirmAction ();
 	}
Index: embed/mozilla/EphyHeaderSniffer.cpp
===================================================================
--- embed/mozilla/EphyHeaderSniffer.cpp	(révision 6832)
+++ embed/mozilla/EphyHeaderSniffer.cpp	(copie de travail)
@@ -406,7 +406,7 @@
 		dialog = ephy_file_chooser_new (title ? title: _("Save"),
 						GTK_WIDGET (window),
 						GTK_FILE_CHOOSER_ACTION_SAVE,
-						key ? key : CONF_STATE_SAVE_DIR,
+						key ? key : CONF_STATE_DOWNLOAD_DIR,
 						EPHY_FILE_FILTER_ALL_SUPPORTED);
 		gtk_file_chooser_set_do_overwrite_confirmation (GTK_FILE_CHOOSER (dialog), TRUE);
 
