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 114363 - Buttons should be disabled after calculation error
Buttons should be disabled after calculation error
Status: RESOLVED FIXED
Product: gnome-calculator
Classification: Core
Component: general
unspecified
Other All
: Normal major
: ---
Assigned To: Rich Burridge
Rich Burridge
Depends on:
Blocks:
 
 
Reported: 2003-06-03 20:49 UTC by Abel Cheung
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: 2.3/2.4



Description Abel Cheung 2003-06-03 20:49:35 UTC
Currently, after calc error, buttons are not disabled, so
some funny things can be done like this:

1. enter scientific mode.
2. let calculator shows error (e.g. [0] [log] )
3. Now all constants and registers values are 'error'
4. press 'constant' button, and edit the constants
5. save the constants by pressing 'OK'
6. The constants are gone forever -- the gconf values of
   /apps/gcalctool/constant?value becomes the localized
   string of 'error'
Comment 1 Rich Burridge 2003-06-10 21:13:04 UTC
(Cc:'ing Calum Benson, the HCI guy on this).

Ugh. Nasty. There are two parts to this bug. The first
is that the Constants and Memory Register values should
never show "Error". I've just fixed this and checked it
into CVS (v4.2.87).

The second part is the disabling of buttons etc when
the calculator is in an Error state. When this happens,
the only valid button (or keyboard equivalent) you can 
enter is Clr. Currently all the Scientific toggles and
checkboxes are toggable and checkable and all the menubar
entries and selectable.

What I propose is to (when an Error condition occurs):

* make insensitive all buttons except Clr.
* make all Scientific mode toggles and checkboxes insensitive.
* make all menubar items insensitive except:
  Calculator->Quit
  Help->Contents

Calum, does this seem reasonable? The problem here is 
that this is a UI change and I might have missed the 
feature freeze deadline. It can certainly be changed
for the next release though if this is the case.
Comment 2 Calum Benson 2003-06-13 16:41:21 UTC
UI freeze is July 7th, so you're okay for now :)

Yes, the change sounds reasonable.  I guess longer term we might want
to consider whether rigidly sticking to the calculator metaphor is
really necessary here, and maybe just have any button clear the error,
or pop up the error in an alert box with a single 'clear error'
button, which sounds kind of yucky too although it would give you more
of an opportunity to explain the error and wouldn't require any extra
clicks from the user.  Generally, disabling a whole GUI save for a
single button in response to some event just makes me a little nervous
:)  But I guess in this case it's justifiable since it has the weight
of user expectation behind it.
Comment 3 Rich Burridge 2003-06-18 16:44:31 UTC
Fixed in v4.2.90 (checked into CVS HEAD).

When an error condition occurs:

 - make insensitive all buttons except Clr.
 - make all Scientific mode toggles and checkboxes insensitive.
 - make all menubar items insensitive except:
     Calculator->Quit
     Help->Contents

When the error condition is cleared, resensitise everything, 
setting the numeric base buttons correctly.

Comment 4 Breda McColgan 2003-06-23 20:48:23 UTC
[Rich asked me to have a look at this bug to see if the Help should be
updated.]


I suggest replacing the current Section 4.2 with the following text:
"
4.2. Error Conditions
If you perform an invalid calculation, gcalctool indicates the error
condition as follows:
- Displays the word Error in the display area.
- Makes all calculator buttons unavailable, except Clr.
- Makes all calculator options unavailable.
- Makes all calculator menu items unavailable, except Calculator->Quit
and Help->Contents.

To clear the error condition, click Clr or press Delete.
"

If you're happy with this suggested change, I'll check the updated
manual into CVS.
Comment 5 Rich Burridge 2003-06-23 20:55:22 UTC
Sounds great Breda. Please go ahead and update CVS accordingly.
Thanks!
Comment 6 Breda McColgan 2003-06-25 15:49:29 UTC
Changes made in gcalctool Manual V2.4, now committed into CVS :)