aboutsummaryrefslogtreecommitdiffstats
path: root/embed/mozilla/EphyHeaderSniffer.cpp
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2005-09-22 03:47:40 +0800
committerChristian Persch <chpe@src.gnome.org>2005-09-22 03:47:40 +0800
commitfefb3cc908e332a2dd5c1bb9cc9df2853a25c4a1 (patch)
treec4b4fff8b0d78e72b5868f0be3c7b4be5724a1ea /embed/mozilla/EphyHeaderSniffer.cpp
parentafc8cd42bba6b11bc56464bfcce9dd74e4a1b64b (diff)
downloadgsoc2013-epiphany-fefb3cc908e332a2dd5c1bb9cc9df2853a25c4a1.tar
gsoc2013-epiphany-fefb3cc908e332a2dd5c1bb9cc9df2853a25c4a1.tar.gz
gsoc2013-epiphany-fefb3cc908e332a2dd5c1bb9cc9df2853a25c4a1.tar.bz2
gsoc2013-epiphany-fefb3cc908e332a2dd5c1bb9cc9df2853a25c4a1.tar.lz
gsoc2013-epiphany-fefb3cc908e332a2dd5c1bb9cc9df2853a25c4a1.tar.xz
gsoc2013-epiphany-fefb3cc908e332a2dd5c1bb9cc9df2853a25c4a1.tar.zst
gsoc2013-epiphany-fefb3cc908e332a2dd5c1bb9cc9df2853a25c4a1.zip
New function to check the filename/directory for writability, derived from
2005-09-21 Christian Persch <chpe@cvs.gnome.org> * lib/ephy-gui.c: (ephy_gui_check_location_writable): * lib/ephy-gui.h: New function to check the filename/directory for writability, derived from the now removed ephy_gui_confirm_overwrite_file. * src/bookmarks/ephy-bookmarks-editor.c: * embed/mozilla/FilePicker.cpp: * embed/mozilla/ContentHandler.cpp: * embed/mozilla/EphyHeaderSniffer.cpp: Use the filechooser's stock confirm-overwrite checking, but we still need our own writability check.
Diffstat (limited to 'embed/mozilla/EphyHeaderSniffer.cpp')
-rw-r--r--embed/mozilla/EphyHeaderSniffer.cpp3
1 files changed, 2 insertions, 1 deletions
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);