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 696909 - subtract button inserts additional minus
subtract button inserts additional minus
Status: RESOLVED FIXED
Product: gnome-calculator
Classification: Core
Component: general
git master
Other Linux
: Normal normal
: ---
Assigned To: gcalctool maintainers
gcalctool maintainers
Depends on:
Blocks:
 
 
Reported: 2013-03-30 14:21 UTC by Paul B
Modified: 2013-04-02 14:16 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
removed a few lines from math-buttons.vala connecting calc_subtract_button with equation.insert_subtract (856 bytes, patch)
2013-03-30 14:21 UTC, Paul B
rejected Details | Review
Fix Subtract button inserts additional minus (1.93 KB, patch)
2013-04-02 13:55 UTC, PioneerAxon
committed Details | Review

Description Paul B 2013-03-30 14:21:01 UTC
Created attachment 240169 [details] [review]
removed a few lines from math-buttons.vala connecting calc_subtract_button with equation.insert_subtract

Clicking on "-" button (calc_subtract_button) with mouse causes two minus characters to be inserted into the calculator display field. It doesn't happen with a keyboard input though.

Not connecting calc_subtract_button with equation.insert_subtract fixes it for me but I'm not sure if that's the right thing to do. (see attached patch)

Tested on Lubuntu i386 13.04 Raring Ringtail (development branch)
Tested against:
GNOME_CALCULATOR_3_7_2
GNOME_CALCULATOR_3_8_0
master (ca27408)

I couldn't repeat it on older versions like gcalctool 6.6.0 - it seam to work fine.
Comment 1 PioneerAxon 2013-04-02 13:39:18 UTC
Review of attachment 240169 [details] [review]:

This solves the dual insertion bug, but breaks minus button behaviour with superscript mode on.
Comment 2 PioneerAxon 2013-04-02 13:55:54 UTC
Created attachment 240382 [details] [review]
Fix Subtract button inserts additional minus

Paul B, Thank you for your report, and a possible solution.
For future references, this is the actual solution to the bug. :)
Comment 3 PioneerAxon 2013-04-02 13:56:58 UTC
Review of attachment 240382 [details] [review]:

Committed.