diff options
author | Christian Persch <chpe@cvs.gnome.org> | 2004-04-10 05:40:32 +0800 |
---|---|---|
committer | Christian Persch <chpe@src.gnome.org> | 2004-04-10 05:40:32 +0800 |
commit | 4a908200fdd1064924da73f61a64f61d628dae96 (patch) | |
tree | 4f0c3c141564bbc1e392631b128a654f3551950a /embed/mozilla/EphyHeaderSniffer.cpp | |
parent | 23b63c1cd2fafb38cdbb404577e2639570118d8b (diff) | |
download | gsoc2013-epiphany-4a908200fdd1064924da73f61a64f61d628dae96.tar gsoc2013-epiphany-4a908200fdd1064924da73f61a64f61d628dae96.tar.gz gsoc2013-epiphany-4a908200fdd1064924da73f61a64f61d628dae96.tar.bz2 gsoc2013-epiphany-4a908200fdd1064924da73f61a64f61d628dae96.tar.lz gsoc2013-epiphany-4a908200fdd1064924da73f61a64f61d628dae96.tar.xz gsoc2013-epiphany-4a908200fdd1064924da73f61a64f61d628dae96.tar.zst gsoc2013-epiphany-4a908200fdd1064924da73f61a64f61d628dae96.zip |
Don't quit the filechooser when selecting "No" from the confirm- overwrite
2004-04-09 Christian Persch <chpe@cvs.gnome.org>
* embed/mozilla/EphyHeaderSniffer.cpp:
* embed/mozilla/FilePicker.cpp:
Don't quit the filechooser when selecting "No" from the confirm-
overwrite dialoge. Fixes bug #139400.
* lib/ephy-gui.c: (ephy_gui_confirm_overwrite_file):
Convert the filename to UTF-8 before showing it in the confirm
dialogue.
Diffstat (limited to 'embed/mozilla/EphyHeaderSniffer.cpp')
-rw-r--r-- | embed/mozilla/EphyHeaderSniffer.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/embed/mozilla/EphyHeaderSniffer.cpp b/embed/mozilla/EphyHeaderSniffer.cpp index d7165af18..07a50e77f 100644 --- a/embed/mozilla/EphyHeaderSniffer.cpp +++ b/embed/mozilla/EphyHeaderSniffer.cpp @@ -206,18 +206,18 @@ filechooser_response_cb (EphyFileChooser *dialog, gint response, EphyHeaderSniff filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (dialog)); - LOG ("Filename %s", filename) + if (ephy_gui_confirm_overwrite_file (parent, filename) == FALSE) + { + g_free (filename); + return; + } - if (filename && - ephy_gui_confirm_overwrite_file (parent, filename) == TRUE) + nsCOMPtr<nsILocalFile> destFile = do_CreateInstance (NS_LOCAL_FILE_CONTRACTID); + if (destFile) { - nsCOMPtr<nsILocalFile> destFile = do_CreateInstance (NS_LOCAL_FILE_CONTRACTID); - if (destFile) - { - destFile->InitWithNativePath (nsDependentCString (filename)); - - sniffer->InitiateDownload (destFile); - } + destFile->InitWithNativePath (nsDependentCString (filename)); + + sniffer->InitiateDownload (destFile); } g_free (filename); |