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 118826 - pasted uppercase letters in hex mode don't appear
pasted uppercase letters in hex mode don't appear
Status: RESOLVED FIXED
Product: gnome-calculator
Classification: Core
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Rich Burridge
Rich Burridge
Depends on:
Blocks:
 
 
Reported: 2003-07-31 23:10 UTC by Olivier Blin
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: 2.3/2.4



Description Olivier Blin 2003-07-31 23:10:58 UTC
To reproduce :
1. Start gcalctool and go in hex mode
2. Open another Gnome app and copy a string containing numbers and
uppercase letters between A and F
3. Paste this string in gcalctool

Expected result:
The pasted string appears in gcalctool and is the same as the copied string.

Actual result:
The pasted string appears in gcalctool, but without the uppercase letters,
and sometines without other numbers (try with string "A6").

Solution:
Before evaluating the pasted string, convert all uppercase letters to the
corresponding lowercase letters.

Thanks for this useful app :)
Comment 1 Rich Burridge 2003-08-01 00:17:54 UTC
Hi Olivier,

Cc:'ing Calum, the HCI man. I was tempted to just
close this as NOTABUG or WONTFIX, but I'll get HCI
input before I do that. I think we can improve the
situation a little bit.

The string you can paste into gcalctool has to
consist of the keyboard equivalent of each character,
as if you typed it at the keyboard.

The keyboard equivalents of the hexadecimal digits
are "a" to "f" not "A" to "F". "A" followed by a number 
in the range 0-9 adjusts numeric accuracy (and so on).

Now why are the keyboard equivalents "a" to "f"
instead of "A" to "F" (which is what is displayed)?
Well that's so you can enter hexadecimal numbers from
the keyboard without having to turn on the CapsLock key.

Adjusting the hex. digits to lowercase before converting
won't work for the reason above (i.e. the uppercase
letters have different meanings).

Having said all of this, it's kind of wierd that you
can "Cut" a gcalctool hexadecimal number from the display,
clear the display, then "Paste" it back in, and it doesn't
give you what you started with.

So I can think of two ways to improve this:

1/ When you "Cut" a hexadecimal number, the cut buffer
   converts the uppercase hex. letters to lowercase, so
   that it can then be "Paste"d back and it'll work.

2/ We adjust the keyboard shortcuts for the hex. digits
   to be "A" to "F", and reassign the functions that are
   already using those letters to something else (presumably
   the lower case equivalents).

I prefer 1/, but I'm easy either way.

Calum, what's your take on this?

Thanks.
Comment 2 Rich Burridge 2003-08-01 14:00:05 UTC
Adding Breda to the cc: as this will affect the docs
*when* we fix it.

Just discussed this with Calum on IRC. As it's a feature
change (and we are past the freeze), this won't be fixed
until GNOME 2.[5,6]. The proposed solution will be 2/
above.

More in a few weeks/months.
Comment 3 Rich Burridge 2003-09-24 18:20:09 UTC
Changes checked into CVS HEAD. Fixed in v4.3.9.
The keyboard shortcuts for the six hex. digits are now 
"A" to "F".

The functions that previously used those letters have 
been reassigned to their lowercase equivalents. 

These were:

	Accuracy			(now "a")
	Change Sign			(now "c")
	Double-declining depreciation (now "d")
	Exponential			(now "e")
	User-defined functions		(now "f")

Note that left or right shifting 10-15 places now uses 
the 'A' to 'F' keyboard accelerators (rather than 'a' 
to 'f').

I will add an appropriate entry to the gcalctool doc.
bug (bug #123132) for these changes.