aboutsummaryrefslogtreecommitdiffstats
path: root/embed/mozilla/mozilla-embed-single.cpp
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <marco@it.gnome.org>2003-06-05 15:41:18 +0800
committerMarco Pesenti Gritti <mpeseng@src.gnome.org>2003-06-05 15:41:18 +0800
commit34b76e16a93ada1c21369fba8dee4ce9e752848d (patch)
tree5c30c21f032d734db9734c8930eeec633a8e2191 /embed/mozilla/mozilla-embed-single.cpp
parent7ae9c02441b4d75c6e686870e6c214ce7f0a823d (diff)
downloadgsoc2013-epiphany-34b76e16a93ada1c21369fba8dee4ce9e752848d.tar
gsoc2013-epiphany-34b76e16a93ada1c21369fba8dee4ce9e752848d.tar.gz
gsoc2013-epiphany-34b76e16a93ada1c21369fba8dee4ce9e752848d.tar.bz2
gsoc2013-epiphany-34b76e16a93ada1c21369fba8dee4ce9e752848d.tar.lz
gsoc2013-epiphany-34b76e16a93ada1c21369fba8dee4ce9e752848d.tar.xz
gsoc2013-epiphany-34b76e16a93ada1c21369fba8dee4ce9e752848d.tar.zst
gsoc2013-epiphany-34b76e16a93ada1c21369fba8dee4ce9e752848d.zip
Actually add the ask for dest pref, it was using the wrong key.
2003-06-05 Marco Pesenti Gritti <marco@it.gnome.org> * data/epiphany.schemas.in: * embed/ephy-embed-popup.c: (embed_popup_download_link_cmd): * embed/ephy-embed-utils.c: (ephy_embed_utils_save): Actually add the ask for dest pref, it was using the wrong key. * embed/mozilla/FilePicker.cpp: * embed/mozilla/mozilla-embed-single.cpp: Return directory also on cancel. * lib/ephy-prefs.h: * src/popup-commands.c: (popup_cmd_download_link): Persist directory also on cancel.
Diffstat (limited to 'embed/mozilla/mozilla-embed-single.cpp')
-rw-r--r--embed/mozilla/mozilla-embed-single.cpp27
1 files changed, 12 insertions, 15 deletions
diff --git a/embed/mozilla/mozilla-embed-single.cpp b/embed/mozilla/mozilla-embed-single.cpp
index 211d2eb30..d865c6881 100644
--- a/embed/mozilla/mozilla-embed-single.cpp
+++ b/embed/mozilla/mozilla-embed-single.cpp
@@ -1100,6 +1100,7 @@ impl_show_file_picker (EphyEmbedSingle *shell,
int *ret_file_format)
{
gchar *expanded_directory;
+ gresult result;
GFilePicker *filePicker = new GFilePicker (file_formats);
@@ -1132,19 +1133,15 @@ impl_show_file_picker (EphyEmbedSingle *shell,
*ret_file_format = filePicker->mSelectedFileFormat;
}
- if (retval == nsIFilePicker::returnCancel)
- {
- delete filePicker;
- return G_FAILED;
- }
- else
- {
- nsCOMPtr<nsILocalFile> file;
- filePicker->GetFile (getter_AddRefs(file));
- nsCAutoString tempFullPathStr;
- file->GetNativePath (tempFullPathStr);
- *ret_fullpath = g_strdup (tempFullPathStr.get());
- delete filePicker;
- return G_OK;
- }
+ nsCOMPtr<nsILocalFile> local_file;
+ filePicker->GetFile (getter_AddRefs(local_file));
+ nsCAutoString tempFullPathStr;
+ local_file->GetNativePath (tempFullPathStr);
+ *ret_fullpath = g_strdup (tempFullPathStr.get());
+
+ result = (retval == nsIFilePicker::returnCancel) ? G_FAILED : G_OK;
+
+ delete filePicker;
+
+ return result;
}