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 527133 - unable to close multiple files without saving
unable to close multiple files without saving
Status: RESOLVED FIXED
Product: Gnumeric
Classification: Applications
Component: GUI
git master
Other All
: Normal enhancement
: ---
Assigned To: Jody Goldberg
Jody Goldberg
Depends on:
Blocks:
 
 
Reported: 2008-04-09 13:08 UTC by r
Modified: 2010-11-07 03:33 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch that changes the "Save selected" button label to "Discard changes" when no files have been selected to be saved (2.04 KB, patch)
2010-11-06 13:50 UTC, Sameer Morar
none Details | Review
Patch to resolve this issue (6.89 KB, patch)
2010-11-06 22:56 UTC, Sameer Morar
none Details | Review
Updated patch (6.90 KB, patch)
2010-11-07 02:12 UTC, Sameer Morar
none Details | Review
Updated patch (6.87 KB, patch)
2010-11-07 02:18 UTC, Sameer Morar
needs-work Details | Review
Updated patch (6.79 KB, patch)
2010-11-07 03:18 UTC, Sameer Morar
committed Details | Review

Description r 2008-04-09 13:08:46 UTC
Scenario: two books are opened and edited. Then attempt to quit. A dialogue window appears offering the options to:

select all
clear selection
save selected
don't quit

There is no option to quit without saving any files.
Comment 1 Morten Welinder 2008-04-09 13:49:39 UTC
We do not want you do lose work.

If you really do not want to save, click "clear selection" so nothing
is selected and then "save selected".

We are open for suggestions for improvements of the GUI, but it is
very important that it is not easy to lose work.
Comment 2 r 2008-04-10 08:27:50 UTC
To instruct a user to "clear selection" and then "save selected" is contradictory english.

Add a new button: "close without saving"
Comment 3 Morten Welinder 2008-04-10 13:10:14 UTC
> Add a new button: "close without saving"

That's precisely the GUI we want to avoid.  One click and too much work
is gone.
Comment 4 Jody Goldberg 2008-04-13 16:01:40 UTC
Make a proposal for an interface and we can consider it.  Closing this for now.
Comment 5 r 2008-04-14 09:38:45 UTC
If you want to insult the intelligence of the end-user that is your prerogative. Now the dialogue window contains poor instruction; to tell the user to clear selection and then save selected? Just imagine trying to write a tutorial to describe that task!

Further suggestion: add button "close without saving" and add final warning window "if you proceed to exit gnumeric, changes made to opened files will not be saved".
Comment 6 Morten Welinder 2008-04-14 13:26:23 UTC
Intelligence has nothing to do with it: not all pointing devices are
100% precise.  For example, with a laptop pad, it is not very uncommon
to end up pressing the wrong button by mistake.

Therefore we want to avoid placing the self-destruct button right next
to the intercom switch.

We'll consider the suggestion.
Comment 7 Andreas J. Guelzow 2008-09-20 03:49:09 UTC
well, it may be clearer if after "clear selection" the "save selected" button changes its label to "quit without saving". I think that would even be safer than still having a button that claims to save something when it doesn't.
Comment 8 Sameer Morar 2010-11-06 13:50:38 UTC
Created attachment 173945 [details] [review]
Patch that changes the "Save selected" button label to "Discard changes" when no files have been selected to be saved

This patch changes the "Save selected" button label to "Discard changes" when no files have been selected to be saved.

However, there is a problem... The buttons resize themselves when this change occurs, which visually is not right.

Any suggestions on solving this problem?
Comment 9 Jean Bréfort 2010-11-06 14:12:58 UTC
Comment on attachment 173945 [details] [review]
Patch that changes the "Save selected" button label to "Discard changes" when no files have been selected to be saved

You might use gtk_tree_selection_count_selected_rows instead of none_set.

Avoid the button resize is not easy, and might be even worse. In some languages, the strings might be of quite different lengths. Not even sure that the dialog will not resize.
Comment 10 Jean Bréfort 2010-11-06 14:18:27 UTC
The dialog actually resize for me.
Comment 11 Jean Bréfort 2010-11-06 14:37:43 UTC
Sameer, you should also avoid gcc warnings such as:

dialog-quit.c:166: warning: passing argument 1 of ‘go_widget_set_tooltip_text’ from incompatible pointer type
Comment 12 Jean Bréfort 2010-11-06 15:09:36 UTC
hmm, the gtk_tree_selection_count_selected_rows is full stupid. Forget it.
Comment 13 Andreas J. Guelzow 2010-11-06 18:47:45 UTC
We currently have a row of 4 buttons:
(Select all)(Clear Selection)(Save Selected)(Don't Quit)

The first two are just selection handling. The last two are final decisions. Note that normally the "Don't Quit" or "Cancel" would be to the left of "Save". So that is in the wrong order.

Problems with changing button sizes always occurs when one changes button text. I fond it much simpler to show all buttons and possibly just disable some. So I would suggest we create two rows of buttons:

First row:   (Select all)(Clear Selection)
Second row:  (Discard Changes)(Don't Quit)(Save Selected)

[note the order of this second row matches the order in teh dialog we see when closing a single document window.]

At any time (depending on the selection status) we should then have one of (Discard Changes) and (Save Selected) enabled. [One could argue that (Discard Changes) should always be enabled but we want to ensure that it cannot be accidentally chosen, so users have to first deselect all and then can use that button.]
Comment 14 Sameer Morar 2010-11-06 22:56:20 UTC
Created attachment 173972 [details] [review]
Patch to resolve this issue
Comment 15 Sameer Morar 2010-11-07 02:12:41 UTC
Created attachment 173978 [details] [review]
Updated patch

Fixes issues with:
Changelog
Distinct names
Select All label
Replaced none_set with 'positive' files_set, to avoid double false issues...
Proper tabification and whitespace
Comment 16 Sameer Morar 2010-11-07 02:18:42 UTC
Created attachment 173979 [details] [review]
Updated patch

Previous patch touched another lines whitespace unnecessarily
Comment 17 Andreas J. Guelzow 2010-11-07 02:36:59 UTC
Comment on attachment 173979 [details] [review]
Updated patch

There is no need for FileSetState. It is just a gboolean anyways.
Comment 18 Sameer Morar 2010-11-07 03:18:57 UTC
Created attachment 173980 [details] [review]
Updated patch

Removed FileSetState
Comment 19 Andreas J. Guelzow 2010-11-07 03:29:45 UTC
I have committed a slightly modified version of this patch.

This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.
Comment 20 Andreas J. Guelzow 2010-11-07 03:33:35 UTC
Comment on attachment 173980 [details] [review]
Updated patch

Just as a note: it could be important to initialize files_set_state in files_set since there is no guarantee that foreach_is_file_set is ever called. (At this time we don't create the dialog if there are no files but it is better to be save than sorry.)