After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 152850 - Save dialog should pop up a replace dialog if the file exists
Save dialog should pop up a replace dialog if the file exists
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: GtkFileChooser
2.4.x
Other All
: Normal enhancement
: Medium API
Assigned To: gtk-bugs
gtk-bugs
: 152860 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2004-09-16 20:21 UTC by Christopher Aillon
Modified: 2005-07-15 17:53 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Current UI (24.60 KB, image/png)
2005-07-15 12:08 UTC, Christian Neumair
Details

Description Christopher Aillon 2004-09-16 20:21:01 UTC
Per conversation with jrb and owen:

When saving, if a file already exists, the file chooser should have a hook to
automatically throw the Replace File dialog instead of forcing the app to do it.
Comment 1 Matthias Clasen 2004-09-17 17:42:45 UTC
*** Bug 152860 has been marked as a duplicate of this bug. ***
Comment 2 Marius Gedminas 2005-02-13 22:52:33 UTC
This problem applies only to recent Firefox versions what use the Gtk+ file chooser.

When you accidentaly try to save a file with the name of an already existing
file, you get a confirmation dialog (file exists, do you want to overwrite it).
 If you answer "no", the save dialog is closed and you are not given a chance to
enter another name.

To reproduce:

1. Open any web page in Firefox
2. Hit Ctrl+S
3. Save the page
4. Hit Ctrl+S again
5. Try to save the file again with the same name.
6. You will get a "File already exists, do you want to replace it?" dialog.
7. Click on "No"

The save dialog disappears.

Expected result: the save dialog would remain and let me enter a different file
name.
Comment 3 Marius Gedminas 2005-02-13 22:56:58 UTC
Oops.  This was meant to be a new bug report in bugzilla.ubuntu.com.  I pasted
the texts into the wrong browser tab.   Where did I put my brown paper bag?
Comment 4 Federico Mena Quintero 2005-05-10 20:36:03 UTC
We need a boolean property in the file chooser called "confirm-overwrite", and
the default should be FALSE.  This is to keep compatibility with applications
which already pop up their confirmation dialogs.

When the program sets the property to TRUE, save dialogs should confirm before
exiting.
Comment 5 Federico Mena Quintero 2005-07-15 04:57:09 UTC
Fixed on HEAD.  See this for the details, or read the documentation:
http://primates.ximian.com/~federico/news-2005-07.html#14
Comment 6 Dennis Cranston 2005-07-15 05:24:53 UTC
Nice.  I have a couple HIG comments after looking at the dialog.  The button
labels should use header capitalization.  For example, "Select another file"
should be "Select Another File".  Also, the dialog should not have a window
title, i.e. "Question" should be removed. 
Comment 7 Federico Mena Quintero 2005-07-15 06:16:12 UTC
I just fixed the buttons; thanks for the reminder.

Can you please file a bug about the "Question" bit?  That's the responsibility
of GtkMessageDialog.
Comment 8 Dennis Cranston 2005-07-15 06:48:29 UTC
I opened bug 310443 about the "Question" window title issue.
Comment 9 Dennis Cranston 2005-07-15 07:14:14 UTC
I added support for this to gnome-search-tool, but the dialog is always
displayed whether the file already exists or not.  ?
Comment 10 Mattias Karlsson 2005-07-15 07:19:27 UTC
This is great news (the dialog that is). I just have another HIG nitpick. The
primary text should be punctuated in 'newspaper headline' style, i.e. no
terminating period.

cheers
Comment 11 Gregor Hoffleit 2005-07-15 08:11:01 UTC
Sorry, "Select Another File" is wrong. The user is not supposed to select an
other *file*, he is supposed to provide an other filename (probably a filename
for that no file yet exists).

So please change this at least to "Select Another Filename".
Comment 12 Ilya Konstantinov 2005-07-15 08:40:37 UTC
Thanks Federico.

The Cancel icon feels bad. It suggests the "Select another file" operation is
unusual or bad. I'd rather see a Back icon in its place, to suggest that you're
merely going one step back in the process of selecting a file (a'la Wizard).
Comment 13 Christian Neumair 2005-07-15 12:08:46 UTC
Created attachment 49225 [details]
Current UI

The image is from
http://primates.ximian.com/~federico/misc/gtkfilechooser-confirm.png

Usability squad, do you share the feeling that the stock icons and labels used
in this dialog are not appropriate?
Comment 14 Alan Horkan 2005-07-15 12:38:34 UTC
Something definately doesn't feel quite right about this, the labels really
shouldn't be so long.  They should be very terse ideally one word only.  I might
go with:  
[ Try Again ] [ Replace ]
(feels very Mac OS to me for some reason)

I do not think the Refresh icon is appropriate for Replace, it only happens to
look vaguely appropriate because of the default them and I am certain this will
break badly in other themes.  I'm not sure if the Stock Replace (Find and
Replace) icon is appropriate as it is more associated with replacing text but it
might work.  
If the cancel icon is appropriate it might be best to also go ahead use the
stock label Cancel (and spare translators the extra work).  If we were to use a
different label like "Try Again" it should really become a stock item and we
would have to reconsider the labels we use all over the place (I'm of the
opinion almost every menu/button label in GTK should be reusable Stock).  
Cancel may not make it absolutely clear that you are only going to cancel this
current dialog rather than the whole file chooser but users will discover pretty
quickly it is the former, and it is what people have come to expect from other
file choosers. 
Using the back button doesn't sound like a bad idea but using Cancel is the
safer more conservative choice.  

(Changed the OS to All.)

But that is just my humble opinion...  
Comment 15 Calum Benson 2005-07-15 14:03:23 UTC
- Bold text should be in 'newspaper headline' style, so "File '%s' Already
Exists" (with no trailing punctuation) would be shorter and more appropriate

- "Replace Existing File" (should be book title case) could just be "Replace". 
Dunno about the icon, could just be the stock 'Save' icon I suppose.

- "Select Another File(name)" could, as Alan said, probably just be a bog
standard "Cancel" button, although I share his concern that it might be
interpreted as cancelling the whole Save operation.
Comment 16 Federico Mena Quintero 2005-07-15 14:05:45 UTC
OK, improved the message text; changed the buttons; fixed the "appears always"
bug (sorry about that last one - the perils of late-night hacking).

Fixed on CVS HEAD.
Comment 17 Alan Horkan 2005-07-15 17:53:36 UTC
> Dunno about the icon, could just be the stock 'Save' icon I suppose.

I like that idea.  

> I share his concern that it might be interpreted as cancelling the whole Save
operation.

When saving files from a web browser I would nearly prefer to cancel the action
because I'm fairly careful about unique names and a file of the same name means
I already have the file I want.  Would make an interesting usability test but I
dont think any of us have the time and energy to prove if it would actually be
better for normal users.