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 422979 - FormatEntry resets decimals when editing floating point values
FormatEntry resets decimals when editing floating point values
Status: RESOLVED FIXED
Product: libgnomedb
Classification: Deprecated
Component: widgets
unspecified
Other Linux
: Normal normal
: ---
Assigned To: malerba
gnome-db Maintainers
Depends on:
Blocks:
 
 
Reported: 2007-03-26 12:29 UTC by Armin Burgmeier
Modified: 2007-03-30 07:40 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Testcase (896 bytes, text/plain)
2007-03-26 12:31 UTC, Armin Burgmeier
  Details
Proposed correction (1.95 KB, patch)
2007-03-27 09:22 UTC, malerba
none Details | Review

Description Armin Burgmeier 2007-03-26 12:29:08 UTC
When setting the decimal places in a FormatEntry to something other than -1 (unlimited), gnome_db_format_entry_set_text() discards the values of the decimal places and makes them zero. This causes fields with decimals to lose the decimal places when navigating around in a GnomeDbForm.
Comment 1 Armin Burgmeier 2007-03-26 12:31:28 UTC
Created attachment 85319 [details]
Testcase

I tried to patch this, but the FormatEntry code is rather complicated and I was unable to quickly find the responsible piece of code. So I created a simple testcase that shows the misbehaviour.
Comment 2 malerba 2007-03-27 09:22:04 UTC
Created attachment 85375 [details] [review]
Proposed correction

To test
Comment 3 malerba 2007-03-27 09:22:39 UTC
If it's Ok, I'll commit it ASAP.
Comment 4 Armin Burgmeier 2007-03-27 13:32:53 UTC
Works for me. Thanks.
Comment 5 malerba 2007-03-27 13:44:45 UTC
Ok, then I'll commit the patch ASAP.