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 151152 - "discard all" button does not work
"discard all" button does not work
Status: RESOLVED FIXED
Product: Gnumeric
Classification: Applications
Component: General
1.3.x
Other All
: Normal normal
: ---
Assigned To: Jody Goldberg
Jody Goldberg
Depends on:
Blocks:
 
 
Reported: 2004-08-26 18:32 UTC by Frederic Parrenin
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Frederic Parrenin 2004-08-26 18:32:39 UTC
- open a new sheet
- open a second new sheet
- quit gnumeric
- choose "discard all"
=> pressing on this button has no effect
Comment 1 Jon Kåre Hellan 2004-08-26 19:07:48 UTC
new workbooks, presumably.
Confirmed
Comment 2 Jon Kåre Hellan 2004-08-26 20:47:16 UTC
gnumeric_dialog_run doesn't return for result_id's >= 0. "Discard all" has
result_id = -GTK_RESPONSE_NO = +9.
Comment 3 Morten Welinder 2004-08-27 01:50:53 UTC
And SaveAll is -GTK_RESPONSE_YES.
Strange -- this obviously used to work.
Comment 4 Jon Kåre Hellan 2004-08-27 10:26:41 UTC
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.
Comment 5 Morten Welinder 2004-08-27 15:02:43 UTC
I'd go for just defining

GNM_DRUID_NEXT = 1000
GNM_DRUID_PREV = 1001

and loop on those only.
Comment 6 Jon Kåre Hellan 2004-08-27 16:41:39 UTC
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.