aboutsummaryrefslogtreecommitdiffstats
path: root/embed/mozilla/FilePicker.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/FilePicker.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/FilePicker.cpp')
-rw-r--r--embed/mozilla/FilePicker.cpp6
1 files changed, 5 insertions, 1 deletions
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));