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 423405 - Form initially truncates values of parameters with options applied
Form initially truncates values of parameters with options applied
Status: RESOLVED FIXED
Product: libgnomedb
Classification: Deprecated
Component: widgets
2.99.x
Other Linux
: Normal normal
: ---
Assigned To: malerba
gnome-db Maintainers
Depends on:
Blocks:
 
 
Reported: 2007-03-27 17:01 UTC by Armin Burgmeier
Modified: 2007-04-19 12:34 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Testcase (1.99 KB, text/plain)
2007-03-27 17:03 UTC, Armin Burgmeier
  Details
Proposed correction (3.08 KB, patch)
2007-03-30 09:38 UTC, malerba
none Details | Review

Description Armin Burgmeier 2007-03-27 17:01:09 UTC
When setting an option for a parameter, by setting the entry-plugin property to "textual:CURRENCY=EUR", and then showing this in a form, the property value is truncated to the first character of the currency and the first character of the value (for example, E2 instead of EUR 25.99). After switching to the next record in the form, it works. Also, the form does not recognize changes in the entry (it does not make the commit button sensitive when the value changes).

However, obtaining the entry from the form via gnome_db_basic_form_get_entry_widget() and then setting the "options" property to "CURRENCY=EUR" works. I think the first approach should be the recommended way, though, because it also works for grids.
Comment 1 Armin Burgmeier 2007-03-27 17:03:28 UTC
Created attachment 85395 [details]
Testcase

This shows the problem with the sqlite example database from gnome-db-demo. Make sure to adjust the LIBGNOMEDB_DATADIR define near the top of the file if it does not point to the correct location on your system.
Comment 2 malerba 2007-03-30 09:38:18 UTC
Created attachment 85556 [details] [review]
Proposed correction

Can you please test that patch? If it's correct, I'll commit it ASAP.

Thanks.
Comment 3 Armin Burgmeier 2007-03-30 12:12:48 UTC
Your patch works. Thanks.
Comment 4 malerba 2007-03-30 13:02:59 UTC
Ok, I'll apply the patch.