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 706309 - Add a “Save As” button to the “Quit GIMP” dialog
Add a “Save As” button to the “Quit GIMP” dialog
Status: RESOLVED FIXED
Product: GIMP
Classification: Other
Component: User Interface
2.8.6
Other All
: Normal enhancement
: 2.10
Assigned To: GIMP Bugs
GIMP Bugs
: 764698 764699 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2013-08-19 13:45 UTC by Hanadi Nasrallah
Modified: 2016-10-01 19:01 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Save As button in "Quit GIMP" pop up (90.66 KB, image/jpeg)
2013-08-19 13:46 UTC, Hanadi Nasrallah
  Details
Patch adding a "Save" option on file-quit and file-save-all (20.73 KB, patch)
2013-08-25 11:09 UTC, Jehan
rejected Details | Review

Description Hanadi Nasrallah 2013-08-19 13:45:05 UTC
1.Open GIMP version 2.8.6
2.Open any image you want.
3.Change any thing on the image.
4.Close GIMP.

GIMP displays "Help, Discard Changes, Cancel" buttons in “Quit GIMP” pop up except "Save As" button.
Comment 1 Hanadi Nasrallah 2013-08-19 13:46:56 UTC
Created attachment 252229 [details]
Save As button in "Quit GIMP" pop up
Comment 2 Jehan 2013-08-20 14:49:31 UTC
I agree this would be more user-friendly.
Comment 3 Jehan 2013-08-25 11:09:49 UTC
Created attachment 253052 [details] [review]
Patch adding a "Save" option on file-quit and file-save-all

The attached patch adds the following behavior when quitting (file-quit) or closing all views (file-close-all):

* If there are no dirty image, the behavior is same as before (just quit or close all views respectively).

* If there are any dirty image, the popup listing these images will now have a button "Save", additional to the untouched "Discard Changes" and "Cancel".

* Clicking "Save" will save over and close (without further prompting) any dirty image with an existing XCF file. And it will prompt with the usual "Save Image" dialog for any dirty image without XCF file. If there are several of such images, the "Save Image" dialogs will pop up one after another (not all at the same time), with each corresponding image pulled up in the image stack.

* 2 new actions created "file-save-all-and-quit" and "file-save-and-close-all", the first being equivalent to "file-quit", then pressing "Save"; the second to "file-close-all" then pressing "Save".
Comment 4 Michael Natterer 2013-08-25 16:05:12 UTC
That is one hell of a patch :)

Should we really make the worst code in gimp even more complicated?
I already have a hard time understanding the old shit whenever I have
to look at it...
Comment 5 Jehan 2013-08-26 01:13:40 UTC
Hey Mitch,

well it's true that this code was spreading over too many files. But then should we really postpone indefinitely all features until the code is cleaned up/refactored? I mean this basic "save" button was really missing out. I often thought about it myself. And my patch don't really make the current code *that* worst. I did not make any new function or anything. I used everything from the existing architecture (only part "a little" complicated is the usage of the dialog's response to raise "Save Window" dialogs one at a time nicely. Well the loop over all images a little too maybe).

What I can propose is to push this for now, and create another ticket for code rewrite of this part of the code. I'll try to have a look at it and propose a new architecture for the save dialog.

Also while we are at it, now that save and export are different concepts, I really think we should separate their code. Even though "for now" it may be the same looking dialog, at least separate code will allow for real divergence in the future. I realized that when a user complained on IRC the other day about the new behavior and the fact that both dialog are exactly the same! I think one part of the problem is "appearance". Users see twice the same dialog and think the save/export logics is bullshit. If we had 2 clear separate dialogs, with time we could really make them feel like completely different things. And users would say "yes that makes sense".

For instance I think we could definitely get rid of the file extension dropdown list in the save dialog, and come up with a much nicer UI for allowing to select compressed versions.
And in the export dialog, we could begin to have useful features (common to all formats) directly in this first dialog. For instance we could have a "scale before export" (so that you don't scale your main project and undo after exporting. So annoying. I believe the "Export for Web" feature of Bug 98017 must be about this?), or a "export layers separately" (I saw a third-party plugin for this but this would make so much sense in the core GIMP in the export dialog!). And so on.
All this would really make the differences between the 2 dialogs stand out, and people would realize why the change was important.
What do you think of it?
If you agree, I'll make the ticket to clean and separate the 2 features. :-)

And if I can push this one, that would be awesome too.
Comment 6 Jehan 2013-08-26 06:19:25 UTC
After discussion with Mitch on IRC, I'll try the new approach:
- "save" buttons in the list of unsaved images, so you could click them and pop the save dialog from there;
- add a column "unsaved changes from <n> minutes".

Once it got saved, the image disappears from that list automatically, and gimp auto-quits when the last image disappears -> normally this is already implemented higher logic.
Comment 7 Michael Natterer 2016-04-07 06:17:37 UTC
*** Bug 764699 has been marked as a duplicate of this bug. ***
Comment 8 Michael Natterer 2016-04-09 17:08:23 UTC
*** Bug 764698 has been marked as a duplicate of this bug. ***
Comment 9 Michael Natterer 2016-10-01 19:01:37 UTC
Fixed in master:

commit 0089a017f0b4b522a9e8f9fb0be8155e0a78212d
Author: Michael Natterer <mitch@gimp.org>
Date:   Sat Oct 1 20:55:13 2016 +0200

    Bug 706309 - Add a “Save As” button to the “Quit GIMP” dialog
    
    Add GimpCellRendererButton and use it to add a "Save" icon to each row
    of dirty images. Click invokes the "edit-save" action, shift-click
    invokes "edit-save-as". Also add a tooltip for the icon button.
    
    Involves minor changes to GimpContainerTreeView to allow
    GimpCellRendererButton to be added, and to allow external
    "query-tooltip" handlers to run.

 app/dialogs/quit-dialog.c            | 173 ++++++++++++++++++++++++++++++++++++++++++++++------
 app/widgets/Makefile.am              |   2 +
 app/widgets/gimpcellrendererbutton.c | 143 +++++++++++++++++++++++++++++++++++++++++++
 app/widgets/gimpcellrendererbutton.h |  59 ++++++++++++++++++
 app/widgets/gimpcontainertreeview.c  |  32 +++++++---
 app/widgets/widgets-types.h          |   1 +
 6 files changed, 384 insertions(+), 26 deletions(-)