From 934fa0b4b992c413ee5e8f654555b67d15f74ffd Mon Sep 17 00:00:00 2001 From: Christian Persch Date: Mon, 7 Jun 2004 12:14:31 +0000 Subject: Don't allow ::SetDefaultString unless we're in modeSave. 2004-06-07 Christian Persch * embed/mozilla/FilePicker.cpp: Don't allow ::SetDefaultString unless we're in modeSave. --- ChangeLog | 7 +++++++ embed/mozilla/FilePicker.cpp | 5 ++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 461662bd3..5ec33fe75 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,13 @@ +2004-06-07 Christian Persch + + * embed/mozilla/FilePicker.cpp: + + Don't allow ::SetDefaultString unless we're in modeSave. + 2004-06-07 Ross Burton * src/ephy-shell.c: + Load extensions from ~/.gnome2/epiphany/extensions as well. 2004-06-07 Christian Persch 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()); -- cgit v1.2.3