aboutsummaryrefslogtreecommitdiffstats
path: root/embed/mozilla
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2004-06-07 20:14:31 +0800
committerChristian Persch <chpe@src.gnome.org>2004-06-07 20:14:31 +0800
commit934fa0b4b992c413ee5e8f654555b67d15f74ffd (patch)
treefcc2f74dd8e6e3d81bcf1836878b51c877a9feaf /embed/mozilla
parent54dd3d1fe778b2210cb23905148e294cef496fce (diff)
downloadgsoc2013-epiphany-934fa0b4b992c413ee5e8f654555b67d15f74ffd.tar
gsoc2013-epiphany-934fa0b4b992c413ee5e8f654555b67d15f74ffd.tar.gz
gsoc2013-epiphany-934fa0b4b992c413ee5e8f654555b67d15f74ffd.tar.bz2
gsoc2013-epiphany-934fa0b4b992c413ee5e8f654555b67d15f74ffd.tar.lz
gsoc2013-epiphany-934fa0b4b992c413ee5e8f654555b67d15f74ffd.tar.xz
gsoc2013-epiphany-934fa0b4b992c413ee5e8f654555b67d15f74ffd.tar.zst
gsoc2013-epiphany-934fa0b4b992c413ee5e8f654555b67d15f74ffd.zip
Don't allow ::SetDefaultString unless we're in modeSave.
2004-06-07 Christian Persch <chpe@cvs.gnome.org> * embed/mozilla/FilePicker.cpp: Don't allow ::SetDefaultString unless we're in modeSave.
Diffstat (limited to 'embed/mozilla')
-rw-r--r--embed/mozilla/FilePicker.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/embed/mozilla/FilePicker.cpp b/embed/mozilla/FilePicker.cpp
index 023cb12d2..816eadee5 100644
--- a/embed/mozilla/FilePicker.cpp
+++ b/embed/mozilla/FilePicker.cpp
@@ -272,7 +272,7 @@ NS_IMETHODIMP GFilePicker::SetDefaultString(const PRUnichar *aDefaultString)
{
NS_ENSURE_TRUE (mDialog, NS_ERROR_FAILURE);
- if (!mMode == nsIFilePicker::modeSave) return NS_ERROR_FAILURE;
+ if (mMode != nsIFilePicker::modeSave) return NS_ERROR_FAILURE;
#if MOZILLA_CHECK_VERSION4 (1, 8, MOZILLA_ALPHA, 1)
if (aDefaultString.Length())
@@ -288,6 +288,9 @@ NS_IMETHODIMP GFilePicker::SetDefaultString(const PRUnichar *aDefaultString)
NS_UTF16ToCString (nsEmbedString(aDefaultString),
NS_CSTRING_ENCODING_UTF8, defaultString);
#endif
+
+ LOG ("GFilePicker::SetDefaultString %s", defaultString.get())
+
/* set_current_name takes UTF-8, not a filename */
gtk_file_chooser_set_current_name
(GTK_FILE_CHOOSER (mDialog), defaultString.get());