GNOME Bugzilla – Bug 151152
"discard all" button does not work
Last modified: 2004-12-22 21:47:04 UTC
- open a new sheet - open a second new sheet - quit gnumeric - choose "discard all" => pressing on this button has no effect
new workbooks, presumably. Confirmed
gnumeric_dialog_run doesn't return for result_id's >= 0. "Discard all" has result_id = -GTK_RESPONSE_NO = +9.
And SaveAll is -GTK_RESPONSE_YES. Strange -- this obviously used to work.
Not strange. Jody changed gnumeric_dialog_run like this. - result = gtk_dialog_run (dialog); + while ((result = gtk_dialog_run (dialog)) >= 0) + ; in order to use it for prev/next buttons in druids (like stf). But it is wong to assumpe that a user defined response_id should never destroy the dialog. The solution altenatives are: - reserve a range of response_ids for druidic behaviour. - not use gnumeric_dialog_run both for druids and normal dialogs.
I'd go for just defining GNM_DRUID_NEXT = 1000 GNM_DRUID_PREV = 1001 and loop on those only.
Fixed by changing respons ids for "discard all" and "save all" to GNM_RESPONSE_SAVE_ALL / GNM_RESPONSE_DISCARD_ALL. These are < 0, and work with current gnumeric_dialog_run.