GNOME Bugzilla – Bug 158008
Stock button for Dont Save, Discard Changes, Do Not Save
Last modified: 2007-06-07 15:11:13 UTC
lots of applications have a dialog that asks you to Save, Cancel and continue working or to close and discard the changes. Close seems too ambiguous so applications have been making up their own buttons, including Don't Save, Do Not Save, Discard Changes and I'm sure there are others. I actually saw both Discard Changes and Dont Save within the same program. Gnumeric uses a button labelled Discard with a Trashcan icon. I was thinking that a stock widget might improve the situation but now that i've written this I am wondering if the Human Interface guidelines might not be a better place to address this. Please let me know what you think.
I have been looking at more applications and looking at KDE "Discard" is what KDE uses, and GTK_STOCK_DISCARD seems like it would be a sensible terse lable for the stock item even if you were to change the label text later. I think this could help improve consistancey quite a bit. In hindsight I really should have filded this against GTK, so moving...
Created attachment 37279 [details] [review] Proposed patch. The attached patch adds a "Discard" stock item.
Do we have a stock icon to go with that ?
gnumeric uses a trashcan icon which I thought was fairly appropriate (not sure if KDE uses an icon, will try to check and report back)
I don't want to simply duplicate the existing icon for "Delete". And simply adding "Discard" as an icon-less item seems not worth it, since you are talking about replacing the text anyway...
I agree that the icon should not be duplicated. However, I disagree that it's useless to create the stock item while there's no icon yet. The prime reason for having a stock item would IMO be that there's automatic translations and a uniform look and feel for multiple programs. These benefits are still there without the icon. Programs should be changed to use this item. As long as it isn't available, they cannot do that. For example, I recently submitted a patch to istanbul, where I would have wanted to use this stock item. If it gets implemented now, then istanbul should be changed again. If it would have been implemented a year ago, istanbul would now use it and would auto-use the icon once it becomes available. I see that as a very good thing. I would design an icon myself if I'd be an artist, but I'm afraid I'm really bad at that sort of thing.
ok then, lets add this to HEAD.
What about discarding changes in multiple documents? Should it be the same single "Discard" button or something different, e.g. "Save None" in a dialog which proposes to choose which files to save? And what about HIG which has "Close without Saving" button?
The big point of this request is that by having a stock item then developers and advanced users can modify their local copy of GTK and change the lable to whatever they find most appropriate and have that change appear in all applications which correctly use the stock items. (Similarly if a user decided they preferred the word Options/Settings to preferences they could make much fewer changes thanks to the use of stock items. The HIG is primarily aimed at applications using the Single Document Interface (SDI) and the question of multiple documents although interesting is not the primary concern. Also if you look at how recent versions of the GNU Image Manipulation program prompt users with a list of unsaved files, the buttons being shown need not be different from the case of where users are asked to "Discard/Close without saving" one or many documents. Updating the HIG urging developers to in general use stock buttons correctly would be a good idea but a specific reference to this new stock item would need to wait for a new release of GTK and it takes quite a while before applications adopt it.
In simple words, more mess. Before, there was HIG which worked for single-document case, "Close without Saving". Now we will have half that, half GTK_STOCK_DISCARD. And still complete mess with multiple documents. As to GIMP, not letting user save what he wants is good? "Close and lose your changes or press Cancel and try again" is not exactly the best approach, IMO (and it's not only my opinion). You may consider this stock item as something optional, but GTK having it actually urges me to use it. Either it's the thing we must use or it's a thing which makes no good and no sense. But, it's quite a change to remove "Close without Saving" button (from HIG) and adding "Discard" button (from gnumeric?). In other words, it's extremely important to have it "blessed" in some way (HIG would be cool, but just someone stating somewhere what and what should be used in what and what situations, with dialog text and everything, would be good).
Yevgen Muntyan you misunderstand me i think. This needs to be included in GTK sooner rather than later for technical and practical reasons. I do not want to argue what exactly the lable should be and I urge Calum Benson and others to try and come up with the best choice for the most number of people and then we can keep it consistent. Consistency is key, and by using a stock item it would allow anyone who disagrees to simply change the lable in their local copy of GTK and have things their way while remaining consistent. Hope that makes it clearer.
(In reply to comment #7) > ok then, lets add this to HEAD. from looking at SVN (using the websvn interface) it seems as if this change was withheld but perhaps I'm just not looking at the right place http://svn.gnome.org/viewcvs/gtk%2B/trunk/gtk/gtkstock.h?view=markup I've added Calum Benson to the CC list in the hope that he will see the intent of this and approve it (either with the label "Discard" or even just providing the infrastructure and retaining the current label "Close without Saving"). This needs to be in GTK to allow further steps to be made to improve consistency. (As mentioned previously being able to more easily change this label across various applications by changing a single stock item could not only improve consistency but help GTK integrate better with on desktops like KDE (Discard) and Apple (Don't Save) where a different labels is preffered, and it is something I would hope some distributions would make use of.)
Sorry, I forgot to commit it. Committed to HEAD. Closing bug report.