aboutsummaryrefslogtreecommitdiffstats
path: root/embed
diff options
context:
space:
mode:
Diffstat (limited to 'embed')
-rw-r--r--embed/mozilla/ContentHandler.cpp3
-rw-r--r--embed/mozilla/EphyHeaderSniffer.cpp3
-rw-r--r--embed/mozilla/FilePicker.cpp6
3 files changed, 9 insertions, 3 deletions
diff --git a/embed/mozilla/ContentHandler.cpp b/embed/mozilla/ContentHandler.cpp
index 2c8e0e93d..ead2ea138 100644
--- a/embed/mozilla/ContentHandler.cpp
+++ b/embed/mozilla/ContentHandler.cpp
@@ -173,6 +173,7 @@ NS_IMETHODIMP GContentHandler::PromptForSaveToFile(
GTK_FILE_CHOOSER_ACTION_SAVE,
CONF_STATE_SAVE_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());
if (parentWindow)
@@ -191,7 +192,7 @@ NS_IMETHODIMP GContentHandler::PromptForSaveToFile(
response = gtk_dialog_run (GTK_DIALOG (dialog));
filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (dialog));
} while (response == GTK_RESPONSE_ACCEPT
- && !ephy_gui_confirm_overwrite_file (GTK_WIDGET (dialog), filename));
+ && !ephy_gui_check_location_writable (GTK_WIDGET (dialog), filename));
if (response == GTK_RESPONSE_ACCEPT)
{
diff --git a/embed/mozilla/EphyHeaderSniffer.cpp b/embed/mozilla/EphyHeaderSniffer.cpp
index 7676c245f..8eaac238b 100644
--- a/embed/mozilla/EphyHeaderSniffer.cpp
+++ b/embed/mozilla/EphyHeaderSniffer.cpp
@@ -213,7 +213,7 @@ filechooser_response_cb (GtkWidget *dialog,
filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (dialog));
- if (ephy_gui_confirm_overwrite_file (dialog, filename) == FALSE)
+ if (ephy_gui_check_location_writable (dialog, filename) == FALSE)
{
g_free (filename);
return;
@@ -367,6 +367,7 @@ nsresult EphyHeaderSniffer::PerformSave (nsIURI* inOriginalURI)
GTK_FILE_CHOOSER_ACTION_SAVE,
key ? key : CONF_STATE_SAVE_DIR,
EPHY_FILE_FILTER_ALL_SUPPORTED);
+ gtk_file_chooser_set_do_overwrite_confirmation (GTK_FILE_CHOOSER (dialog), TRUE);
gtk_file_chooser_set_current_name (GTK_FILE_CHOOSER (dialog),
filename);
diff --git a/embed/mozilla/FilePicker.cpp b/embed/mozilla/FilePicker.cpp
index 58559bc0d..261318515 100644
--- a/embed/mozilla/FilePicker.cpp
+++ b/embed/mozilla/FilePicker.cpp
@@ -127,6 +127,10 @@ NS_IMETHODIMP GFilePicker::Init(nsIDOMWindowInternal *parent, const PRUnichar *t
{
gtk_file_chooser_set_select_multiple (GTK_FILE_CHOOSER (mDialog), TRUE);
}
+ if (mMode == nsIFilePicker::modeSave)
+ {
+ gtk_file_chooser_set_do_overwrite_confirmation (GTK_FILE_CHOOSER (mDialog), TRUE);
+ }
g_object_add_weak_pointer (G_OBJECT (mDialog), (gpointer *) &mDialog);
@@ -447,7 +451,7 @@ NS_IMETHODIMP GFilePicker::Show(PRInt16 *_retval)
}
while (response == GTK_RESPONSE_ACCEPT &&
mMode == nsIFilePicker::modeSave &&
- !ephy_gui_confirm_overwrite_file (GTK_WIDGET (mDialog), filename));
+ !ephy_gui_check_location_writable (GTK_WIDGET (mDialog), filename));
gtk_widget_hide (GTK_WIDGET (mDialog));