diff options
author | Diego Escalante Urrelo <diegoe@src.gnome.org> | 2008-08-30 21:21:23 +0800 |
---|---|---|
committer | Diego Escalante Urrelo <diegoe@src.gnome.org> | 2008-08-30 21:21:23 +0800 |
commit | 2a3829e09c0c7d46fffadfab6eb74068bf14e311 (patch) | |
tree | 66be841b19bf3c5af916e6717db3fc856a1dc73e /embed/mozilla/ContentHandler.cpp | |
parent | e8fc293fa2dc70173c06e3adca9e685c43096cda (diff) | |
download | gsoc2013-epiphany-2a3829e09c0c7d46fffadfab6eb74068bf14e311.tar gsoc2013-epiphany-2a3829e09c0c7d46fffadfab6eb74068bf14e311.tar.gz gsoc2013-epiphany-2a3829e09c0c7d46fffadfab6eb74068bf14e311.tar.bz2 gsoc2013-epiphany-2a3829e09c0c7d46fffadfab6eb74068bf14e311.tar.lz gsoc2013-epiphany-2a3829e09c0c7d46fffadfab6eb74068bf14e311.tar.xz gsoc2013-epiphany-2a3829e09c0c7d46fffadfab6eb74068bf14e311.tar.zst gsoc2013-epiphany-2a3829e09c0c7d46fffadfab6eb74068bf14e311.zip |
Remove leading dots in suggested filename.
When saving files, remove the leading dots in the filename, presuming that
users could cluelessly save the files with a leading dot, closes: #430965.
svn path=/branches/gnome-2-24/; revision=8441
Diffstat (limited to 'embed/mozilla/ContentHandler.cpp')
-rw-r--r-- | embed/mozilla/ContentHandler.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/embed/mozilla/ContentHandler.cpp b/embed/mozilla/ContentHandler.cpp index 11d33c877..6601f070b 100644 --- a/embed/mozilla/ContentHandler.cpp +++ b/embed/mozilla/ContentHandler.cpp @@ -165,7 +165,11 @@ NS_IMETHODIMP GContentHandler::PromptForSaveToFile( CONF_STATE_SAVE_DIR, EPHY_FILE_FILTER_ALL); gtk_file_chooser_set_do_overwrite_confirmation (GTK_FILE_CHOOSER (dialog), TRUE); - gtk_file_chooser_set_current_name (GTK_FILE_CHOOSER (dialog), defaultFile.get()); + /* Remove leading dots */ + const char *fname = defaultFile.get(); + while (*fname == '.') fname++; + + gtk_file_chooser_set_current_name (GTK_FILE_CHOOSER (dialog), fname); if (parentWindow) { |