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 75391 - gnome-calculator fails to add two numbers while using '+' from numpad
gnome-calculator fails to add two numbers while using '+' from numpad
Status: RESOLVED DUPLICATE of bug 79184
Product: gnome-utils
Classification: Deprecated
Component: gcalc
trunk
Other Solaris
: High normal
: GNOME2.0
Assigned To: gnome-utils Maintainers
gnome-utils Maintainers
: 70697 75746 79647 81341 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2002-03-19 06:28 UTC by Ashok Venkiteswaran
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: 2.0


Attachments
Proposed patch (4.45 KB, patch)
2002-04-11 16:18 UTC, Shivram U
none Details | Review

Description Ashok Venkiteswaran 2002-03-19 06:28:52 UTC
This bug is reported for the beta-2 release version of GNOME-2.0

1) Click on a number (eg: 26)
2) Turn NUMLOCK key ON
3) Click on the '+' operator from the numpad in the keyboard
4) Input another number (eg: 4)

You can observe on the display the number together as "264". 

"+" operator on the numpad doesn't works with gnome-calculator in this 
case and hence a bug.
Comment 1 John Fleck 2002-03-19 13:45:27 UTC
Numlock is on by default in gnome-calculator, so when you hit the
numlock key, it toggles it off. So I think this should be marked
"NOTABUG".
Comment 2 Luis Villa 2002-03-19 19:42:46 UTC
Agreed with jfleck.
Comment 3 Avirupa 2002-03-31 12:43:51 UTC
This behaviour is observed in Solaris 2.9 28th March build
Comment 4 Kevin Vandersloot 2002-03-31 16:15:29 UTC
Guys, this _is_ a bug. Basically it should respond to any keybindings 
that have to do with + and clearly the num-lock/+ combo on Solaris 
generates a key value that gcalc doesn't support.
Comment 5 Kevin Vandersloot 2002-04-05 02:13:57 UTC
Avirupa, Ashok: Can either of you or someone you know figure out which
keybinding corresponds to the plus button when num-lock is on for Solaris?

I can't really fix this because I don't have access to Solaris and it
works fine on Linux
Comment 6 Luis Villa 2002-04-09 17:20:59 UTC
Bharat: who would be responsible for this type of bug within wipro?
(specifically, gnome-utils bugs)
Comment 7 Bharat Tewari 2002-04-11 04:06:36 UTC
this bug has a fix which has been made into the gtk code which is 
still not checked in. I am not too conversant with the fix but i will 
ask the developer to submit the patch over here as well as give the 
analysis of the bug.
Comment 8 Shivram U 2002-04-11 16:17:51 UTC
The problem is described as below:
1. In gdk_keymap_entries_for_keyval and update_keymaps() we are only 
looping for less than max_keycode. ie (keycode < max_keycode) rather 
than (keycode <= max_keycode).
  In the case of sun type-4 keyboard the keycode of KP_Add is the 
max_keycode value.

2. Secondly for some reason the following logic doesnt return the 
desired value for sun type-4 keyboards.

SYM (group, shift_level)

I guess its because the keysyms_per_keycode is 5 and not 4 which is 
the ideal case.
However XKeycodeToKeysym or XKeysymToKeycode works just fine.

Attaching a patch which fixes the problem.
Comment 9 Shivram U 2002-04-11 16:18:47 UTC
Created attachment 7655 [details] [review]
Proposed patch
Comment 10 Shivram U 2002-04-12 10:22:15 UTC
The patch also fixes the problem reported in bug #78061
Comment 11 Luis Villa 2002-04-13 01:42:13 UTC
Adding appropriate keywords; would be nice (as usual) if wipro
engineers did that themselves. :) 

Shivram: also, you must have meant some bug other than bug 78061,
which is a nautilus bug. Do you know what bug you really meant?
Comment 12 Shivram U 2002-04-13 05:08:02 UTC
Oops. Really sorry about the worng bug id. The bud id i meant is 
#75747.
Will update the keyword appropriately in future. Sorry about that too.
Comment 13 Kevin Vandersloot 2002-04-19 00:28:27 UTC
Shivram: have you opened a bug for gtk+ and included this patch. I
don't have commit privaledges for gtk+. Otherwise the gtk maintainers
will not know about the patch
Comment 14 Shivram U 2002-04-19 05:06:47 UTC
Created a bug for the same in gtk+ and included the patch. The bug id 
is bug #79184.
Also bug #75746 is related to this bug.
Comment 15 Luis Villa 2002-04-19 20:26:24 UTC
*** Bug 75746 has been marked as a duplicate of this bug. ***
Comment 16 Glynn Foster 2002-04-29 12:13:24 UTC
Okay, let's get this sorted for 2.0. We need to bug Owen if it is
indeed a gtk issue.
Comment 17 Glynn Foster 2002-04-29 16:27:58 UTC
*** Bug 79647 has been marked as a duplicate of this bug. ***
Comment 18 Luis Villa 2002-05-01 08:58:45 UTC
Agreed that bugging owen about this would be good, but that should
take place in bug 79184 and not in this bug, so removing the 'urgent'
priority here.
Comment 19 Shane O'Connor 2002-05-02 17:21:28 UTC
*** Bug 70697 has been marked as a duplicate of this bug. ***
Comment 20 Glynn Foster 2002-05-02 17:32:49 UTC
*** Bug 80573 has been marked as a duplicate of this bug. ***
Comment 21 Glynn Foster 2002-05-10 12:21:38 UTC
*** Bug 81341 has been marked as a duplicate of this bug. ***
Comment 22 Glynn Foster 2002-05-23 15:05:54 UTC
Okay, closing - it's really a gtk+ bug.

*** This bug has been marked as a duplicate of 79184 ***
Comment 23 Carsten Menke 2002-06-20 15:28:32 UTC
Funny, it is stated that it works fine on Linux, well I have build
Gnome2 yesterday for the first time, using the cvsgnome Script 0.2.0
whch checks out the latest sources (however I ave done a stable build
to pull the *.tar.gz from the Gnome.org site)

I still remark this behavior, using the Numblock with the Numlock Key
on, then hitting  2 for example does nothing, whereby 8,9 and so on
work. I mean that the 2 generally does not work, no matter if you hit
+ sign or not.

Sources grabbed on 19 June, build on LFS 3.0, using gcc-2.95.3 and
glibc-2.2.5 gtk+.2.0.5

Could someone please comment on this ?
Comment 24 Carsten Menke 2002-06-20 17:18:32 UTC
Sorry, I better should have deleted all files related to gnome in my 
homedir, I rebuild again and now it works

Comment 25 Carsten Menke 2002-06-20 17:40:04 UTC
Yes, again, as stated in some other Bug Reports GCalc does not work 
with NumLock ON. Well this still happens for me as well on Linux.

It works only correct if you turn off Numlock. I think it should be 
made that GCalc

1. Either works correctly with NUMLOCK ON or OFF
2. Works with NUMLOCK ON, as other Programs require to have the 
NUMLOCK ON when you want to type something in, the normal user would 
not think to turn NUMLOCK OFF to get to work with GCalc.
Comment 26 John Fleck 2002-06-20 17:46:36 UTC
The numlock bug is in gtk: 79184
Comment 27 Carsten Menke 2002-06-21 00:03:37 UTC
John: 
I do not have a Sun keyboard, I have standard PC-105 Keyboard on x86
hardware using Linux and what I'm talking about is Comment 1 by you. I
think that it is wrong to have Gcalc toggling the NumLock OFF when it
is actually set to on. Or do you think, that this will be seemed
logical for people ? I mean, now I know that the behavior is simply
changed but I don't think that a new Gnome User will think 

"Hey, I use Gcalc so to use the NumPad I have to set the NumLock to
OFF, and when I'm back in Gedit I have to set it NumLock back ON to
get it working"

So I would suggest to either let Gcalc accept both modes as they were
NumLock ON
or to use NumLock when it is *REALLY* set to on. 

In my eyes it doesn't make much sense to switch the NumLock behavior
of Gcalc, also it is uncomfortable to always switch NumLock ON and OFF
when working in Gnome wether  you use Gcalc or another Gnome Program.
Comment 28 John Fleck 2002-06-21 00:34:31 UTC
Carsten - You need to go look at bug #79184. This is a legitimate bug, 
people are working on it, that's where this and all the other 
duplicate reports have been assigned, and that's where all the 
discussion about fixing it is going on. No one is suggesting just 
leaving it this way.
Comment 29 prabhut 2002-07-12 08:06:12 UTC
Today I tested with the source taken on "July 10th " from CVS Head. I 
tested on Solaris 5.8 machine. Still I am able to reproduce this 
problem.

Steps to reproduce:

1. Press Numlock.
2. Press 1.
3. Press +
4. Press 5
5. Press enter.

Expected behaviour: It should total both the numbers.

Current behaviour: It shows the number as 15.
Comment 30 prabhut 2002-07-17 07:59:26 UTC
I tested with the source on "15th July" on Solaris 5.9 and  I could 
simulate the problem.

Louie: Can we reopen the bug once again.
Comment 31 Luis Villa 2002-07-17 15:23:26 UTC
prabhut: does your version of gtk have the relevant gtk patches
discussed in bug 79184?