If the amount is monetary, map the keypad decimal key to the correct

decimal character for the locale. #101957


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@7752 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
David Hampton 2003-01-02 07:10:45 +00:00
parent 0b0fc6d281
commit afe35c0f71

View File

@ -144,6 +144,14 @@ gnc_amount_edit_key_press(GtkWidget *widget, GdkEventKey *event)
GNCAmountEdit *gae = GNC_AMOUNT_EDIT(widget);
gint result;
if (event->keyval == GDK_KP_Decimal) {
if (gae->print_info.monetary) {
struct lconv *lc = gnc_localeconv ();
event->keyval = lc->decimal_point[0];
event->string[0] = lc->decimal_point[0];
}
}
result = (* GTK_WIDGET_CLASS (parent_class)->key_press_event)(widget, event);
switch (event->keyval)